Mercurial > hg > CbC > old > device
changeset 844:11d784da0c7b
minor fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 06 Dec 2010 15:43:25 +0900 |
parents | 6ae3a4f60798 |
children | a97cd8b97434 |
files | mc-code-i64.c mc-code-powerpc.c |
diffstat | 2 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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; }