Mercurial > hg > CbC > old > device
changeset 244:39e28d6cfa56 ia32-long-long-done
ia32 long long done
author | kono |
---|---|
date | Thu, 06 May 2004 01:02:06 +0900 |
parents | c311c26e006a |
children | 8a72b0afccfc |
files | mc-code-ia32.c test/long.c |
diffstat | 2 files changed, 11 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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)