Compiling with OP_IN_REGISTER
Gisle Aas [Tue, 3 Mar 1998 18:05:07 +0000 (19:05 +0100)]
p4raw-id: //depot/perl@782

perl.h
pp_ctl.c

diff --git a/perl.h b/perl.h
index 2c4ee91..0f9b22d 100644 (file)
--- a/perl.h
+++ b/perl.h
 #  ifdef __GNUC__
 #    define stringify_immed(s) #s
 #    define stringify(s) stringify_immed(s)
+#ifdef EMBED
+register struct op *Perl_op asm(stringify(OP_IN_REGISTER));
+#else
 register struct op *op asm(stringify(OP_IN_REGISTER));
+#endif
 #  endif
 #endif
 
index 35915fd..1cda481 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2155,7 +2155,11 @@ sv_compile_2op(SV *sv, OP** startop, char *code, AV** avp)
     safestr = savepv(tmpbuf);
     SAVEDELETE(defstash, safestr, strlen(safestr));
     SAVEI32(hints);
+#ifdef OP_IN_REGISTER
+    opsave = op;
+#else
     SAVEPPTR(op);
+#endif
     hints = 0;
 
     op = &dummy;
@@ -2172,6 +2176,9 @@ sv_compile_2op(SV *sv, OP** startop, char *code, AV** avp)
     lex_end();
     *avp = (AV*)SvREFCNT_inc(comppad);
     LEAVE;
+#ifdef OP_IN_REGISTER
+    op = opsave;
+#endif
     return rop;
 }