Mercurial > hg > CbC > old > device
changeset 845:a97cd8b97434
minor fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 06 Dec 2010 16:23:42 +0900 |
parents | 11d784da0c7b |
children | ab4af28a1fa1 c0ad9d810b6c |
files | mc-code-i64.c mc-code-powerpc.c |
diffstat | 2 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mc-code-i64.c Mon Dec 06 15:43:25 2010 +0900 +++ b/mc-code-i64.c Mon Dec 06 16:23:42 2010 +0900 @@ -3705,7 +3705,8 @@ void code_dassign_dregister(int e,int d,int f) { use_float(d,f); - printf("\tmovapd %s,%s\n",fregister_name(f),fregister_name(e)); + if (f!=e) + printf("\tmovapd %s,%s\n",fregister_name(f),fregister_name(e)); } void code_dassign(int e2,int freg,int d) @@ -4413,7 +4414,8 @@ void code_lassign(int e1,int e2) { use_longlong(e2); - printf("\tmovq %s,(%s)\n",register_name(e2,0),register_name(e1,0)); + if (e2!=e1) + printf("\tmovq %s,(%s)\n",register_name(e2,0),register_name(e1,0)); } void code_lassign_gvar(int e1,int e2)
--- a/mc-code-powerpc.c Mon Dec 06 15:43:25 2010 +0900 +++ b/mc-code-powerpc.c Mon Dec 06 16:23:42 2010 +0900 @@ -2767,9 +2767,12 @@ } #endif reg_arg_list = list2(arg,reg_arg_list); - if (car(arg)==DREGISTER) - use_input_reg(cadr(arg),1); /* protect from input register free */ - g_expr_u(assign_expr0(arg,e4,t,t)); /* XXX */ + if (car(arg)==DREGISTER) { + set_freg(cadr(arg),0); + g_expr_u(assign_expr0(arg,e4,t,t)); + use_input_reg(cadr(arg),1); + } else + g_expr_u(assign_expr0(arg,e4,t,t)); } // structs are finished }