Mercurial > hg > CbC > old > device
changeset 281:1d60bbd8d3f8 mips-self-compile-passed
MIPS self compile passed.
author | kono |
---|---|
date | Sun, 23 May 2004 17:01:10 +0900 |
parents | affb054fe920 |
children | d61cf7a9b469 |
files | mc-code-mips.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mc-code-mips.c Sun May 23 15:27:25 2004 +0900 +++ b/mc-code-mips.c Sun May 23 17:01:10 2004 +0900 @@ -784,6 +784,7 @@ } else { if (i<0||i>=MAX_INPUT_REGISTER_VAR) return 0; i = i+MIN_TMP_REG; + if (i%2==1) i++; } #if ENDIAN==0 regv_l(ll)=i; @@ -3104,7 +3105,11 @@ #if FLOAT_CODE } else if(t==DOUBLE) { d = dcadr(e); +#if (ENDIAN==0) + printf("\t.long\t0x%x,0x%x\n",code_d1(d),code_d2(d)); +#else printf("\t.long\t0x%x,0x%x\n",code_d2(d),code_d1(d)); +#endif } else if(t==FLOAT) { f = dcadr(e); printf("\t.long\t0x%x\n",*(int *)&f); @@ -3121,7 +3126,8 @@ if (car(n->ty)!=ARRAY || cadr(n->ty)!=CHAR) { l = fwdlabel(); printf("\t.long $L_%d\n",l); - // printf(".cstring\n\t.align 2\n"); + // should put on diffirent segement + printf("\t.rdata\n\t.align 2\n"); printf("$L_%d:\n",l); output_mode = RODATA_EMIT_MODE; }