Mercurial > hg > CbC > old > device
changeset 785:33d9a4b05bc8
i64 decl_data
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 20 Nov 2010 18:04:11 +0900 |
parents | 3bc6c34bfa2e |
children | 3ebbec5a72dc |
files | mc-code-i64.c mc-codegen.c mc-inline.c |
diffstat | 3 files changed, 14 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/mc-code-i64.c Sat Nov 20 16:29:25 2010 +0900 +++ b/mc-code-i64.c Sat Nov 20 18:04:11 2010 +0900 @@ -1212,7 +1212,15 @@ /* process in reverse order */ n = ncadddr(args); type = n->ty; - if (scalar(type)) { + if (type==LONGLONG||type==ULONGLONG) { // scalar includes LONGLONG, check first + if ((reg = get_input_lregister_var(reg_var,n,is_code0))) { + n->sc = LREGISTER; + n->dsp = cadr(reg); + regs[n->dsp]= INPUT_REG; + reg_var+=1; + arg_offset_v += SIZE_OF_LONGLONG; // (caddr(args)=size(type)); + } + } else if (scalar(type)) { if ((reg = get_input_register_var(reg_var,n,is_code0))) { n->sc = (car(type)==POINTER && lp64) ?LREGISTER:REGISTER; n->dsp = cadr(reg); @@ -1236,14 +1244,6 @@ freg_var++; arg_offset_v += SIZE_OF_LONGLONG; // (caddr(args)=size(type)); } - } else if (type==LONGLONG||type==ULONGLONG) { - if ((reg = get_input_lregister_var(reg_var,n,is_code0))) { - n->sc = LREGISTER; - n->dsp = cadr(reg); - regs[n->dsp]= INPUT_REG; - reg_var+=1; - arg_offset_v += SIZE_OF_LONGLONG; // (caddr(args)=size(type)); - } } args = cadr(args); }
--- a/mc-codegen.c Sat Nov 20 16:29:25 2010 +0900 +++ b/mc-codegen.c Sat Nov 20 18:04:11 2010 +0900 @@ -3744,7 +3744,10 @@ data_alignment++; return; case LONGLONG: case ULONGLONG: - if (!(car(e)!=LCONST&&car(e)!=CONST)) { + if (car(e)==CONST) { + emit_longlong(llist2(LCONST,cadr(e))); + return; + } else if (car(e)==LCONST) { emit_longlong(e); return; }