changeset 199:117772cc77b2

*** empty log message ***
author kono
date Thu, 08 Apr 2004 20:43:40 +0900
parents ef6f0c2d932f
children d83291712bf7
files test/code-gen.c
diffstat 1 files changed, 83 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/test/code-gen.c	Thu Apr 08 20:10:21 2004 +0900
+++ b/test/code-gen.c	Thu Apr 08 20:43:40 2004 +0900
@@ -1010,7 +1010,29 @@
 
 
 // code_dpreinc(int e1,int e2,int d,int reg) 
+void
+code_dpreinc()
+{
+    double i,j;
+    float ui,uj;
+    i = 123123123;j = 0;
+    printf("code_dpreinc %g %g\n",++i,--j);
+    ui = 123123123;uj = 0;
+    printf("code_dpreinc %g %g\n",++ui,--uj);
+}
+
 // code_dpostinc(int e1,int e2,int d,int reg) 
+void
+code_dpostinc()
+{
+    double i,j;
+    float ui,uj;
+    i = 123123123;j = 0;
+    printf("code_dpreinc %g %g\n",i--,j--);
+    ui = 123123123;uj = 0;
+    printf("code_dpreinc %g %g\n",ui++,uj--);
+}
+
 // drexpr(int e1, int e2,int l1, int op)
 
 // 	case DOP+GE:
@@ -1021,8 +1043,69 @@
 // 	case FOP+EQ:
 // 	case DOP+NEQ:
 // 	case FOP+NEQ:
+// code_gt(int cond) 
+
+void code_dgt()
+{
+    if (d0>d1)
+	printf("code_gt 1\n");
+    else
+	printf("code_gt 0\n");
+}
+
+// code_ugt(int cond) 
+void code_fgt()
+{
+    if (f0>f1)
+	printf("code_fgt 1\n");
+    else
+	printf("code_fgt 0\n");
+}
+
+// code_ge(int cond) 
+void code_dge()
+{
+    if (d0>=d1)
+	printf("code_dge 1\n");
+    else
+	printf("code_dge 0\n");
+}
+
+// code_uge(int cond) 
+void code_fge()
+{
+    if (f0>=f1)
+	printf("code_fge 1\n");
+    else
+	printf("code_fge 0\n");
+}
+
+// code_eq(int cond) 
+void code_deq()
+{
+    if (f0==f1)
+	printf("code_feq 1\n");
+    else
+	printf("code_feq 0\n");
+    if (d0!=d1)
+	printf("code_deq 1\n");
+    else
+	printf("code_deq 0\n");
+}
+
+// code_dbool(int e1) 
+
+void
+code_dbool()
+{
+    printf("code_bool float %d %d %d %d\n",
+	f0>f1,f0>=f1,f0==f1,f0!=f1);
+    printf("code_bool double %d %d %d %d\n",
+	d0>d1,d0>=d1,d0==d1,d0!=d1);
+}
 #endif
 
+
 #if LONGLONG_CODE
 // lrexpr(int e1, int e2,int l1, int op)
 // int lpop_register()