Mercurial > hg > CbC > old > device
changeset 531:19f5882997f5
*** empty log message ***
author | kono |
---|---|
date | Fri, 30 Dec 2005 13:01:41 +0900 |
parents | 58aceee8e4b4 |
children | cecf5103679e |
files | mc-code-powerpc.c mc-inline.c |
diffstat | 2 files changed, 13 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/mc-code-powerpc.c Fri Dec 30 12:21:27 2005 +0900 +++ b/mc-code-powerpc.c Fri Dec 30 13:01:41 2005 +0900 @@ -467,7 +467,7 @@ void code_gexpr(int e){ if (is_int_reg(creg) && creg!=ireg) error(-1); - register_usage("code_gexpr"); + // register_usage("code_gexpr"); } @@ -933,7 +933,7 @@ return 0; } -int lreg_count; +// int lreg_count; void register_usage(char *s) @@ -979,7 +979,7 @@ } for(j=0,i=0;i<REAL_MAX_LREGISTER;i++) if (regs[i+LREG_OFFSET]) j++; - lreg_count = j; +// lreg_count = j; if (j>USAGE_MAX) { printf("\n## lreg(%d):",j); for(i=0;i<REAL_MAX_LREGISTER;i++) { printf("%d",regs[i+LREG_OFFSET]); } @@ -4494,6 +4494,7 @@ { int dx = -1; int ox = -1; + int creg_mode = (reg==USE_CREG); char *orn_h,*crn_h,*drn_h; char *orn_l,*crn_l,*drn_l; // creg = creg op oreg @@ -4581,19 +4582,19 @@ break; case LDIV: code_ldiv_lib(reg,oreg); // ___divdi3$stub - check_lreg(reg); + if (!creg_mode) check_lreg(reg); break; case LUDIV: code_ludiv_lib(reg,oreg); // ___udivdi3$stub - check_lreg(reg); + if (!creg_mode) check_lreg(reg); break; case LMOD: code_lmod_lib(reg,oreg); // ___moddi3$stub - check_lreg(reg); + if (!creg_mode) check_lreg(reg); break; case LUMOD: code_lumod_lib(reg,oreg); // ___umoddi3$stub - check_lreg(reg); + if (!creg_mode) check_lreg(reg); break; default: error(-1);
--- a/mc-inline.c Fri Dec 30 12:21:27 2005 +0900 +++ b/mc-inline.c Fri Dec 30 13:01:41 2005 +0900 @@ -1010,7 +1010,7 @@ #define round4(i) ((i+(SIZE_OF_INT-1))&~(SIZE_OF_INT-1)) -extern int lreg_count; +// extern int lreg_count; extern int gen_inline(int e) @@ -1026,7 +1026,7 @@ int sret_reg_mode = ret_reg_mode; int sinline_lvars = inline_lvars; int slfree=lfree; - int slreg_count=lreg_count; + // int slreg_count=lreg_count; int narg,arg; NMTBL *n = (NMTBL*)cadr(cadr(e)); @@ -1115,9 +1115,9 @@ inline_lvars = sinline_lvars; lfree=slfree; - if (slreg_count!=lreg_count && lreg_count>0) { - printf("## lreg_count %d != %d\n", slreg_count,lreg_count); - } +// if (slreg_count!=lreg_count && lreg_count>0) { +// printf("## lreg_count %d != %d\n", slreg_count,lreg_count); +// } return ret_type; }