# HG changeset patch # User kono # Date 1083772926 -32400 # Node ID 39e28d6cfa563e663b95f5418c6b56ff8077b2dc # Parent c311c26e006ad5bfb91bf805ee91cb34b2f3d0f1 ia32 long long done diff -r c311c26e006a -r 39e28d6cfa56 mc-code-ia32.c --- a/mc-code-ia32.c Thu May 06 00:01:40 2004 +0900 +++ b/mc-code-ia32.c Thu May 06 01:02:06 2004 +0900 @@ -30,12 +30,6 @@ int code_lassop_p = 0; -int size_of_int = 4; -int size_of_short = 2; -int size_of_float = 4; -int size_of_double = 8; -int size_of_longlong = 8; -int endian = 0; static int MAX_REGISTER=6; /* intel386のレジスタを6つまで使う*/ #define REAL_MAX_REGISTER 8 /* intel386のレジスタが8つということ*/ static int MAX_DATA_REG=4; @@ -81,10 +75,10 @@ arg2 12 4 see enter/enter1/leave see code_enter */ -static int arg_offset = 8; -static int disp_offset = -12; -static int func_disp_offset = -12; -static int code_disp_offset = 0; +// static int arg_offset = 8; +// static int disp_offset = -12; +#define func_disp_offset -12 +#define code_disp_offset 0 // static int jump_offset = 0; static int code_disp_label; @@ -219,9 +213,13 @@ macro_define("__gnuc_va_list int*\n"); arg_offset = 8; - func_disp_offset = -12; + // func_disp_offset = -12; disp_offset = -12; size_of_int = 4; + size_of_short = 2; + size_of_float = 4; + size_of_double = 8; + size_of_longlong = 8; endian = 0; MAX_REGISTER=6; MAX_DATA_REG=4; diff -r c311c26e006a -r 39e28d6cfa56 test/long.c --- a/test/long.c Thu May 06 00:01:40 2004 +0900 +++ b/test/long.c Thu May 06 01:02:06 2004 +0900 @@ -187,12 +187,12 @@ void test3() { - printf("%g %g %g %g %lld %lld %llu %llu\n", + printf("test3-1:%g\ntest3-2:%g\ntest3-3:%g\ntest3-4:%g\ntest3-5:%lld\ntest3-6:%lld\ntest3-7:%llu\ntest3-8:%llu\n", f2ll((long long ) -3423423234234LL), d2ll((long long ) -3423423234234LL), f2ull((unsigned long long ) 34234234234234LL), d2ull((unsigned long long ) 34234234234234LL), -ll2f((float ) 2342423423423424234LL), +ll2f((float ) 2342423423423424234LL), ll2d((double ) 2344234234244234234LL), ull2f((float ) 2344234234244234234LL), ull2d((double )2332342343234234234LL)