Mercurial > hg > CbC > old > device
diff mc-code-powerpc.c @ 716:21f770a3b298
*** empty log message ***
author | kono |
---|---|
date | Fri, 16 Nov 2007 21:46:20 +0900 |
parents | 83e18db76c96 |
children | c1542a2482b1 |
line wrap: on
line diff
--- a/mc-code-powerpc.c Wed Nov 14 19:36:55 2007 +0900 +++ b/mc-code-powerpc.c Fri Nov 16 21:46:20 2007 +0900 @@ -305,7 +305,8 @@ }; #endif -#define round4(i) ((i+(SIZE_OF_INT-1))&~(SIZE_OF_INT-1)) +#define round4(i) align(i,4) +#define round16(i) align(i,16) #define register_name(i) reg_name[i] #define fregister_name(i) reg_name[i] @@ -509,7 +510,6 @@ #endif #define CALLER_ARG(l) ((l)+arg_offset1) -#define round16(a) ((a+0xf)&~0xf) void code_offset_set() @@ -742,6 +742,7 @@ size_of_double = SIZE_OF_DOUBLE; size_of_longlong = SIZE_OF_LONGLONG; endian = ENDIAN; + struct_align = 16; regv_l(RET_LREGISTER) = RET_LREGISTER_L; regv_h(RET_LREGISTER) = RET_LREGISTER_H; @@ -2684,15 +2685,7 @@ printf("\tmtctr %s\n",jrn); printf("\tbctrl\n"); } - for(;reg_arg_list;reg_arg_list=cadr(reg_arg_list)) { - arg = car(reg_arg_list); - if (car(arg)==REGISTER||car(arg)==DREGISTER||car(arg)==FREGISTER - ||car(arg)==LREGISTER) { -// if (car(arg)==LREGISTER) -// printf("## lreg freeing %d %s %s\n",cadr(arg), lregister_name_high(cadr(arg)), lregister_name_low(cadr(arg))); - free_register(cadr(arg)); - } else if (car(arg)==LVAR&&cadr(arg)<0) free_lvar(cadr(arg)); - } + free_register_var(reg_arg_list); if (ret_type==DOUBLE||ret_type==FLOAT) { set_freg(RET_FREGISTER,0); } else if (ret_type==ULONGLONG||ret_type==LONGLONG) { @@ -3746,7 +3739,7 @@ } void -align(int t) +code_align(int t) { int d; switch(t) {