changeset 675:ba7110017db5 ps3-pcc-done

*** empty log message ***
author kono
date Sat, 05 May 2007 14:50:39 +0900
parents 68d70527b0c0
children 5e71527f9fd6
files Changes mc-code-ia32.c test/long.c
diffstat 3 files changed, 21 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Changes	Sat May 05 13:45:55 2007 +0900
+++ b/Changes	Sat May 05 14:50:39 2007 +0900
@@ -9276,4 +9276,7 @@
 いや、これは引数の呼び出し順序の問題ですね。これを
 変えるのは不可能ではないのだが...
 
-
+ia32 のmake diff が通らないのは、「まだ」stack frame がずれ
+ているからだ。%edi を壊しているね。
+
+
--- a/mc-code-ia32.c	Sat May 05 13:45:55 2007 +0900
+++ b/mc-code-ia32.c	Sat May 05 14:50:39 2007 +0900
@@ -3983,6 +3983,19 @@
 void code_d2ll(int reg)
 {
     use_longlong(reg);
+#if 1
+        printf("\tsubl    $64, %%esp\n");
+        printf("\tfnstcw  34(%%esp)\n");
+        printf("\tmovzwl  34(%%esp), %%eax\n");
+        printf("\tmovb    $12, %%ah\n");
+        printf("\tmovw    %%ax, 32(%%esp)\n");
+        printf("\tfldcw   32(%%esp)\n");
+        printf("\tfistpll 52(%%esp)\n");
+        printf("\tfldcw   34(%%esp)\n");
+        printf("\tmovl    52(%%esp), %%eax\n");
+        printf("\tmovl    56(%%esp), %%edx\n");
+        printf("\taddl    $64, %%esp\n");
+#else
         printf("\tsubl $40,%%esp\n");
         printf("\tfnstcw 2(%%esp)\n");
         printf("\tmovw 2(%%esp),%%ax\n");
@@ -3994,6 +4007,8 @@
         printf("\tmovl 12(%%esp),%%eax\n");
         printf("\tmovl 16(%%esp),%%edx\n");
         printf("\taddl $40,%%esp\n");
+#endif
+	check_lreg(reg);
 }
 
 void code_d2ull(int reg)
--- a/test/long.c	Sat May 05 13:45:55 2007 +0900
+++ b/test/long.c	Sat May 05 14:50:39 2007 +0900
@@ -196,9 +196,9 @@
 f2ull((unsigned long long ) 34234234234234LL),
 d2ull((unsigned long long ) 34234234234234LL),
 ll2f((float )  2342423423423424234LL),
-ll2d((double ) 2344234234244234234LL),
+ll2d((double ) 234423423424423423LL),
 ull2f((float ) 2344234234244234234LL),
-ull2d((double )2332342343234234234LL)
+ull2d((double )233234234323423423LL)
 );
 
 }