comparison mc-code-mips.c @ 314:2e1012a8852a

MIPS GNUC 2 define fix
author kono
date Tue, 15 Jun 2004 00:24:42 +0900
parents f73b93de216a
children 84df3dd8cc3d
comparison
equal deleted inserted replaced
313:f73b93de216a 314:2e1012a8852a
443 code_lvar(int e2,int reg) { 443 code_lvar(int e2,int reg) {
444 use_int(reg); 444 use_int(reg);
445 lvar_address(e2,reg); 445 lvar_address(e2,reg);
446 } 446 }
447 447
448
449 // va_start, va_arg is wrong, use va_mips.h
450
448 char *init_src = "\ 451 char *init_src = "\
449 #define __builtin_va_list int\n\ 452 /* #define __builtin_va_list int */\n\
450 #define __builtin_va_start(ap,arg) ap=(((int)(&arg))+sizeof(arg))\n\ 453 /* #define __builtin_va_start(ap,arg) ap=(((int)(&arg))+sizeof(arg)) */\n\
451 #define __builtin_va_arg(ap,type) (*((type *)ap)++)\n\ 454 /* #define __builtin_va_arg(ap,type) (*((type *)ap)++) */\n\
452 #define __builtin_next_arg(arg) ap=((void *)(&arg)),va_arg(ap,typeof(arg))\n\ 455 #define __builtin_next_arg(arg) ap=((void *)(&arg)),va_arg(ap,typeof(arg))\n\
453 #define __mips__ 1\n\ 456 #define __mips__ 1\n\
454 #define __LITTLE_ENDIAN__ 1\n\ 457 #define __LITTLE_ENDIAN__ 1\n\
455 #define __STDC__ 1\n\ 458 #define __STDC__ 1\n\
456 #define __SIZE_TYPE__ int\n\ 459 #define __SIZE_TYPE__ int\n\
457 #define __externsion__\n\ 460 #define __externsion__\n\
461 #define __attribute__(a)\n\
458 #define __flexarr\n\ 462 #define __flexarr\n\
459 #define __WCHAR_TYPE__ int\n\ 463 #define __WCHAR_TYPE__ int\n\
460 #define __alignof__(type) (sizeof(type)==1?1:sizeof(type)==2?2:sizeof(type)<=4?4:8)\n\ 464 #define __alignof__(type) (sizeof(type)==1?1:sizeof(type)==2?2:sizeof(type)<=4?4:8)\n\
461 #define __PTRDIFF_TYPE__ int\n\ 465 #define __PTRDIFF_TYPE__ int\n\
462 #define __GNUC__ 2\n\ 466 #define __GNUC__ 2\n\
467 #define __const const\n\
463 #define alloca __builtin_alloca\n\ 468 #define alloca __builtin_alloca\n\
464 "; 469 ";
465 470
466 void 471 void
467 code_init(void) 472 code_init(void)