Author: leo Date: Sun Jan 15 10:49:33 2006 New Revision: 11198 Modified: trunk/lib/Parrot/OpTrans/CGP.pm trunk/lib/Parrot/OpTrans/CSwitch.pm Log: Disable explicit register usage for gcc - explicit register assignment isn't reliable and breaks some --optimize'd compiles - depend it on PARROT_CGP_REGS or PARROT_SWITCH_REGS defines
Modified: trunk/lib/Parrot/OpTrans/CGP.pm ============================================================================== --- trunk/lib/Parrot/OpTrans/CGP.pm (original) +++ trunk/lib/Parrot/OpTrans/CGP.pm Sun Jan 15 10:49:33 2006 @@ -145,7 +145,7 @@ sub run_core_func_start * # if 1191 := PARROT_OP_set_args_pc * (gdb) disas l_ops_addr[1191] l_ops_addr[1192] */ -#if defined(__GNUC__) && defined(I386) && __GNUC__ == 3 +#if defined(__GNUC__) && defined(I386) && defined(PARROT_CGP_REGS) register opcode_t *cur_opcode asm ("esi") = cur_op; register char * _reg_base asm ("edi"); #else Modified: trunk/lib/Parrot/OpTrans/CSwitch.pm ============================================================================== --- trunk/lib/Parrot/OpTrans/CSwitch.pm (original) +++ trunk/lib/Parrot/OpTrans/CSwitch.pm Sun Jan 15 10:49:33 2006 @@ -172,7 +172,7 @@ Returns the C code prior to the run core sub run_core_func_start { return <<END_C; -#if defined(__GNUC__) && defined(I386) && __GNUC__ < 4 +#if defined(__GNUC__) && defined(I386) && defined(PARROT_SWITCH_REGS) register opcode_t *cur_opcode asm ("esi") = cur_op; register char * _reg_base asm ("edi"); #else