Mercurial > hg > CbC > old > device
changeset 774:9f663c87b8eb
sassign fix for emit_copy single register copy offset (should fix emit_copy?)
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 18 Nov 2010 20:01:00 +0900 |
parents | e35af486b436 |
children | a2a7b2835fa3 |
files | .gdbinit mc-codegen.c |
diffstat | 2 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/.gdbinit Thu Nov 18 17:12:15 2010 +0900 +++ b/.gdbinit Thu Nov 18 20:01:00 2010 +0900 @@ -14,12 +14,13 @@ end b errmsg # r -s test/tmp7.c +r -s -DINLINE=inline test/tmp7.c # r -s test/int.c # r -s test/tmp6.c # r -s test/call.c # r -s test/static.c # r -s test/tmpa.c -r -s test/code-gen-all.c +# r -s test/code-gen-all.c # r -s mc-code-powerpc.c # r -s test/macro.c # r -s test/basic.c
--- a/mc-codegen.c Thu Nov 18 17:12:15 2010 +0900 +++ b/mc-codegen.c Thu Nov 18 20:01:00 2010 +0900 @@ -1871,8 +1871,11 @@ /* 一般的にはコピーのオーバラップの状況は実行時にしかわからない */ /* しかし、わかる場合もある */ if (is_same_type(e2,e4)) { - if(cadr(e2)>cadr(e4)) { offset=sz; sz=-sz;} - else offset=0; + if(cadr(e2)>cadr(e4)) { + if (!(sz==1 || sz==2 || sz==3 || (lp64 && sz==8))) { + offset=sz; sz=-sz; + } + } else offset=0; det=1; } else { det = 0; offset=0;