Mercurial > hg > CbC > old > device
changeset 866:043b9bd024a1
arg_order in inline.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 31 Mar 2014 21:11:16 +0900 |
parents | e12f4a4d796d |
children | 33d00c6b2a7e |
files | mc-code-i64.c |
diffstat | 1 files changed, 15 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/mc-code-i64.c Mon Mar 31 19:41:37 2014 +0900 +++ b/mc-code-i64.c Mon Mar 31 21:11:16 2014 +0900 @@ -436,7 +436,20 @@ #define ENDIAN_L 0 #define ENDIAN_D 0 -int eval_order = REVERSE; +/* + Eary implementation uses pushl arg for function call. gcc + use the same arguement evaluation order. Of course, the + order is unspecified in C language, but it is better to + use same argument evaluation order. Especially for test + program. + */ +#ifdef __llvm__ +// llvm on mavericks has different arg order evaluation +#define ARG_ORDER NORMAL +#else +#define ARG_ORDER REVERSE +#endif +int eval_order = ARG_ORDER; #define TEXT_EMIT_MODE 0 #define DATA_EMIT_MODE 1 @@ -1291,6 +1304,7 @@ register_usage(char *s) { int i; + if (!lsrc) return ; printf("## %d: %s:",lineno,s); if (creg) printf(" creg=%s ",register_name(creg,0)); for(i=1;i<MAX_REGISTER+1;i++) { @@ -2244,14 +2258,6 @@ } -/* - Eary implementation uses pushl arg for function call. gcc - use the same arguement evaluation order. Of course, the - order is unspecified in C language, but it is better to - use same argument evaluation order. Especially for test - program. - */ -#define ARG_ORDER 1 #if (ARG_ORDER==1) static int delayed_arg;