comparison mc-code-arm.c @ 410:5a3b1b65c6a8

ARM self compile almost passed.
author kono
date Tue, 19 Oct 2004 16:01:15 +0900
parents b72682778d75
children 32c1914308db
comparison
equal deleted inserted replaced
409:b72682778d75 410:5a3b1b65c6a8
476 476
477 static char *init_src0 = "\ 477 static char *init_src0 = "\
478 /* #define __builtin_va_list int */\n\ 478 /* #define __builtin_va_list int */\n\
479 /* #define __builtin_va_start(ap,arg) ap=(((int)(&arg))+sizeof(arg)) */\n\ 479 /* #define __builtin_va_start(ap,arg) ap=(((int)(&arg))+sizeof(arg)) */\n\
480 /* #define __builtin_va_arg(ap,type) (*((type *)ap)++) */\n\ 480 /* #define __builtin_va_arg(ap,type) (*((type *)ap)++) */\n\
481 #define __builtin_next_arg(arg) (__gnuc_va_list)((char *)(&arg) + __va_rounded_size (typeof(arg))) 481 #define __builtin_next_arg(arg) (__gnuc_va_list)((char *)(&arg) + __va_rounded_size (typeof(arg)))\n\
482 #define __arm__ 1\n\ 482 #define __arm__ 1\n\
483 #define __LITTLE_ENDIAN__ 1\n\
484 #define __inline__\n\ 483 #define __inline__\n\
485 #define __STDC__ 1\n\ 484 #define __STDC__ 1\n\
486 #define __SIZE_TYPE__ int\n\ 485 #define __SIZE_TYPE__ int\n\
487 #define __attribute__(a)\n\ 486 #define __attribute__(a)\n\
488 #define __flexarr\n\ 487 #define __flexarr\n\
3409 case FLOAT: use_float(0,reg); break; 3408 case FLOAT: use_float(0,reg); break;
3410 case LONGLONG: case ULONGLONG: use_longlong(reg); break; 3409 case LONGLONG: case ULONGLONG: use_longlong(reg); break;
3411 default: 3410 default:
3412 if (reg==USE_CREG) { 3411 if (reg==USE_CREG) {
3413 if (regs[CREG_REGISTER]==0||regs[CREG_REGISTER]==PTRC_REG) { 3412 if (regs[CREG_REGISTER]==0||regs[CREG_REGISTER]==PTRC_REG) {
3413 set_ireg(CREG_REGISTER,is_int_reg(creg)&&regs[creg]==USING_REG);
3414 return CREG_REGISTER; 3414 return CREG_REGISTER;
3415 } 3415 }
3416 } 3416 }
3417 use_int(reg); 3417 use_int(reg);
3418 break; 3418 break;
3870 3870
3871 static void 3871 static void
3872 dconst(int l,int h,double value) 3872 dconst(int l,int h,double value)
3873 { 3873 {
3874 #if ENDIAN==0 3874 #if ENDIAN==0
3875 code_const(code_d1(value),l);
3876 code_const(code_d2(value),h);
3877 #else
3875 code_const(code_d1(value),h); 3878 code_const(code_d1(value),h);
3876 code_const(code_d2(value),l); 3879 code_const(code_d2(value),l);
3877 #else
3878 code_const(code_d1(value),l);
3879 code_const(code_d2(value),h);
3880 #endif 3880 #endif
3881 } 3881 }
3882 3882
3883 static void 3883 static void
3884 fconst(int reg,double value) 3884 fconst(int reg,double value)
4930 r = get_ptr_cache((NMTBL*)caddr(e2)); 4930 r = get_ptr_cache((NMTBL*)caddr(e2));
4931 #if ENDIAN==0 4931 #if ENDIAN==0
4932 code_ldf(cstore(0),lregister_name_low(creg),cadr(e2),r,""); 4932 code_ldf(cstore(0),lregister_name_low(creg),cadr(e2),r,"");
4933 code_ldf(cstore(0),lregister_name_high(creg),cadr(e2)+SIZE_OF_INT,r,""); 4933 code_ldf(cstore(0),lregister_name_high(creg),cadr(e2)+SIZE_OF_INT,r,"");
4934 #else 4934 #else
4935 code_ldf(cstore(0),lregister_name_high(creg),cadr(e2),r); 4935 code_ldf(cstore(0),lregister_name_high(creg),cadr(e2),r,"");
4936 code_ldf(cstore(0),lregister_name_low(creg),cadr(e2)+SIZE_OF_INT,r,""); 4936 code_ldf(cstore(0),lregister_name_low(creg),cadr(e2)+SIZE_OF_INT,r,"");
4937 #endif 4937 #endif
4938 } 4938 }
4939 4939
4940 void 4940 void
5020 r = get_ptr_cache((NMTBL*)caddr(e1)); 5020 r = get_ptr_cache((NMTBL*)caddr(e1));
5021 #if ENDIAN==0 5021 #if ENDIAN==0
5022 code_ldf("ldr",crn_l,cadr(e1),r,""); 5022 code_ldf("ldr",crn_l,cadr(e1),r,"");
5023 code_ldf("ldr",crn_h,cadr(e1)+SIZE_OF_INT,r,""); 5023 code_ldf("ldr",crn_h,cadr(e1)+SIZE_OF_INT,r,"");
5024 #else 5024 #else
5025 code_ldf("ldr",crn_h,cadr(e1),r); 5025 code_ldf("ldr",crn_h,cadr(e1),r,"");
5026 code_ldf("ldr",crn_l,cadr(e1)+SIZE_OF_INT,r,""); 5026 code_ldf("ldr",crn_l,cadr(e1)+SIZE_OF_INT,r,"");
5027 #endif 5027 #endif
5028 } 5028 }
5029 5029
5030 void 5030 void