summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGisle Aas <gisle@aas.no>1998-03-03 19:05:07 +0100
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1998-03-05 19:05:23 +0000
commitd1ca3daa86c9b198ada1278ef16d193996bbf3c9 (patch)
tree8db26d184fb143b38ae5c46d00ad97037153cd8f
parent2f34f9d4825ac9262ece854fc4c50479f4838ff8 (diff)
downloadperl-d1ca3daa86c9b198ada1278ef16d193996bbf3c9.tar.gz
Compiling with OP_IN_REGISTER
p4raw-id: //depot/perl@782
-rw-r--r--perl.h4
-rw-r--r--pp_ctl.c7
2 files changed, 11 insertions, 0 deletions
diff --git a/perl.h b/perl.h
index 2c4ee91409..0f9b22de94 100644
--- a/perl.h
+++ b/perl.h
@@ -46,7 +46,11 @@
# 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
diff --git a/pp_ctl.c b/pp_ctl.c
index 35915fd602..1cda481dbf 100644
--- 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;
}