@@ -3902,7 +3902,8 @@ (define_insn "movdi_er_high_g"
else
return "ldq %0,%2(%1)\t\t!literal!%3";
}
- [(set_attr "type" "ldsym")])
+ [(set_attr "type" "ldsym")
+ (set_attr "cannot_copy" "true")])
(define_split
[(set (match_operand:DI 0 "register_operand")
@@ -3926,7 +3927,8 @@ (define_insn "movdi_er_tlsgd"
return "lda %0,%2(%1)\t\t!tlsgd";
else
return "lda %0,%2(%1)\t\t!tlsgd!%3";
-})
+}
+ [(set_attr "cannot_copy" "true")])
(define_insn "movdi_er_tlsldm"
[(set (match_operand:DI 0 "register_operand" "=r")
@@ -3939,7 +3941,8 @@ (define_insn "movdi_er_tlsldm"
return "lda %0,%&(%1)\t\t!tlsldm";
else
return "lda %0,%&(%1)\t\t!tlsldm!%2";
-})
+}
+ [(set_attr "cannot_copy" "true")])
(define_insn "*movdi_er_gotdtp"
[(set (match_operand:DI 0 "register_operand" "=r")
@@ -5908,6 +5911,7 @@ (define_insn "call_value_osf_<tls>"
"HAVE_AS_TLS"
"ldq $27,%1($29)\t\t!literal!%2\;jsr $26,($27),%1\t\t!lituse_<tls>!%2\;ldah $29,0($26)\t\t!gpdisp!%*\;lda $29,0($29)\t\t!gpdisp!%*"
[(set_attr "type" "jsr")
+ (set_attr "cannot_copy" "true")
(set_attr "length" "16")])
;; We must use peep2 instead of a split because we need accurate life
new file mode 100644
@@ -0,0 +1,46 @@
+/* PR target/115526 */
+/* { dg-do assemble } */
+/* { dg-options "-O2 -Wno-attributes -fvisibility=hidden -fPIC -mcpu=ev4" } */
+
+struct _ts {
+ struct _dtoa_state *interp;
+};
+struct Bigint {
+ int k;
+} *_Py_dg_strtod_bs;
+struct _dtoa_state {
+ struct Bigint p5s;
+ struct Bigint *freelist[];
+};
+extern _Thread_local struct _ts _Py_tss_tstate;
+typedef struct Bigint Bigint;
+int pow5mult_k;
+long _Py_dg_strtod_ndigits;
+void PyMem_Free();
+void Bfree(Bigint *v) {
+ if (v)
+ {
+ if (v->k)
+ PyMem_Free();
+ else {
+ struct _dtoa_state *interp = _Py_tss_tstate.interp;
+ interp->freelist[v->k] = v;
+ }
+ }
+}
+static Bigint *pow5mult(Bigint *b) {
+ for (;;) {
+ if (pow5mult_k & 1) {
+ Bfree(b);
+ if (b == 0)
+ return 0;
+ }
+ if (!(pow5mult_k >>= 1))
+ break;
+ }
+ return 0;
+}
+void _Py_dg_strtod() {
+ if (_Py_dg_strtod_ndigits)
+ pow5mult(_Py_dg_strtod_bs);
+}