# HG changeset patch # User Shinji KONO # Date 1291617805 -32400 # Node ID 11d784da0c7bb4dbd249caf66138d04efb9be925 # Parent 6ae3a4f60798dd4c133006c0c8cb57cb1e6c73c4 minor fix diff -r 6ae3a4f60798 -r 11d784da0c7b mc-code-i64.c --- a/mc-code-i64.c Mon Dec 06 15:38:18 2010 +0900 +++ b/mc-code-i64.c Mon Dec 06 15:43:25 2010 +0900 @@ -803,12 +803,16 @@ clear_ptr_cache_reg(reg); #endif if (ireg && reg!=ireg ) { + clear_ptr_cache_reg(ireg); if (regs[ireg]!=REG_VAR) free_register(ireg); if (mode) { printf("\tmovq %s,%s\n",reg_name_q[ireg],reg_name_q[reg]); } } - if (creg>0 && regs[creg]!=REG_VAR) free_register(creg); + if (creg>0 && regs[creg]!=REG_VAR) { + clear_ptr_cache_reg(creg); + free_register(creg); + } } creg = ireg = reg; if (!regs[reg]) regs[reg]=USING_REG; diff -r 6ae3a4f60798 -r 11d784da0c7b mc-code-powerpc.c --- a/mc-code-powerpc.c Mon Dec 06 15:38:18 2010 +0900 +++ b/mc-code-powerpc.c Mon Dec 06 15:43:25 2010 +0900 @@ -2146,12 +2146,15 @@ clear_ptr_cache_reg(reg); if (ireg && reg!=ireg ) { clear_ptr_cache_reg(ireg); - free_register(ireg); + if (regs[ireg]!=REG_VAR) free_register(ireg); if (mode) { printf("\tmr %s,%s\n",register_name(reg),register_name(ireg)); } } - free_register(creg); + if (regs[creg]!=REG_VAR) { + clear_ptr_cache_reg(creg); + free_register(creg); + } if (creg==lreg) lreg = 0; regs[reg]=USING_REG; }