# HG changeset patch # User kono # Date 1085299270 -32400 # Node ID 1d60bbd8d3f87127093f8c4a5a357a27f86d3dbb # Parent affb054fe920785ca1e9ba12409fbe245833e293 MIPS self compile passed. diff -r affb054fe920 -r 1d60bbd8d3f8 mc-code-mips.c --- 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; }