From: Gisle Aas Date: Tue, 3 Mar 1998 18:05:07 +0000 (+0100) Subject: Compiling with OP_IN_REGISTER X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d1ca3daa86c9b198ada1278ef16d193996bbf3c9;p=p5sagit%2Fp5-mst-13.2.git Compiling with OP_IN_REGISTER p4raw-id: //depot/perl@782 --- diff --git a/perl.h b/perl.h index 2c4ee91..0f9b22d 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 35915fd..1cda481 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; }