Mercurial > hg > CbC > old > device
diff test/code-gen.c @ 276:ebaec1ae566e
MIPS double/longlong lib operand register conflict
author | kono |
---|---|
date | Fri, 21 May 2004 18:59:56 +0900 |
parents | 8f09f8bbc494 |
children | affb054fe920 |
line wrap: on
line diff
--- a/test/code-gen.c Fri May 21 14:00:02 2004 +0900 +++ b/test/code-gen.c Fri May 21 18:59:56 2004 +0900 @@ -352,10 +352,21 @@ void code_bool() { + int i1l,i2l; + unsigned int ui1l,ui2l; + printf("code_bool > gvar %d %d %d %d %d %d\n", i1>i2,ui1>ui2,i1>=i2,ui1>=ui2,ui1==ui2,i1!=i2); printf("code_bool < gvar %d %d %d %d %d %d\n", i1<i2,ui1<ui2,i1<=i2,ui1<=ui2,ui1==ui2,i1!=i2); + + i1l=i2l=i1; + ui1l=ui2l=ui1; + + printf("code_bool eq > lvar %d %d %d %d %d %d\n", + i1l>i2l,ui1l>ui2l,i1l>=i2l,ui1l>=ui2l,ui1l==ui2l,i1l!=i2l); + printf("code_bool eq < lvar %d %d %d %d %d %d\n", + i1l<i2l,ui1l<ui2l,i1l<=i2l,ui1l<=ui2l,ui1l==ui2l,i1l!=i2l); } void @@ -1082,9 +1093,10 @@ void code_d2i() { - double d; + double d,z; int i; d = 0.1; + z = 555; i = d; printf("code_d2i %d\n",i); } @@ -1093,8 +1105,9 @@ code_i2d() { double d; - int i; + int i,z; i = 242342342; + z = -1; d = i; printf("code_i2d %g\n",d); } @@ -1102,9 +1115,10 @@ void code_d2u() { - double d; + double d,z; unsigned int i; d = 0.1; + z = 555; i = d; printf("code_d2u %ud\n",i); } @@ -1113,8 +1127,9 @@ code_u2d() { double d; - unsigned int i; + unsigned int i,z; i = 242342342; + z = 3; d = i; printf("code_u2d %g\n",d); } @@ -1122,9 +1137,10 @@ void code_f2i() { - float d; + float d,z; int i; d = 0.1; + z = 555; i = d; printf("code_d2i %d\n",i); } @@ -1133,8 +1149,9 @@ code_i2f() { float d; - int i; + int i,z; i = 24234342; + z = 555; d = i; printf("code_i2f %g\n",d); } @@ -1142,9 +1159,10 @@ void code_f2u() { - float d; + float d,z; unsigned int i; d = 0.1; + z = 555; i = d; printf("code_f2u %ud\n",i); } @@ -1153,8 +1171,9 @@ code_u2f() { float d; - unsigned int i; + unsigned int i,z; i = 242342342; + z = 555; d = i; printf("code_u2f %g\n",d); } @@ -1454,6 +1473,9 @@ void code_dbool() { + float lf0,lf1; + double ld0,ld1; + 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", @@ -1462,6 +1484,19 @@ 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); + + lf0=lf1=f0; + ld0=ld1=d0; + + printf("code_bool eq > float %d %d %d %d\n", + lf0>lf1,lf0>=lf1,lf0==lf1,lf0!=lf1); + printf("code_bool eq > double %d %d %d %d\n", + ld0>ld1,ld0>=ld1,ld0==ld1,ld0!=ld1); + printf("code_bool eq < float %d %d %d %d\n", + lf0<lf1,lf0<=lf1,lf0==lf1,lf0!=lf1); + printf("code_bool eq < double %d %d %d %d\n", + ld0<ld1,ld0<=ld1,ld0==ld1,ld0!=ld1); + } #endif @@ -1471,10 +1506,22 @@ void code_lbool() { + long long l0l,l1l; + unsigned long long ul0l,ul1l; + printf("code_bool > long long %d %d %d %d %d %d\n", l1>l0,ul1>ul0,l1>=l0,ul1>=ul0,ul1==ul0,l1!=l0); printf("code_bool < long long %d %d %d %d %d %d\n", l1<l0,ul1<ul0,l1<=l0,ul1<=ul0,ul1==ul0,l1!=l0); + + l0l=l1l=l0; + ul0l=ul1l=ul0; + + printf("code_bool eq > long long %d %d %d %d %d %d\n", + l1l>l0l,ul1l>ul0l,l1l>=l0l,ul1l>=ul0l,ul1l==ul0l,l1l!=l0l); + printf("code_bool eq < long long %d %d %d %d %d %d\n", + l1l<l0l,ul1l<ul0l,l1l<=l0l,ul1l<=ul0l,ul1l==ul0l,l1l!=l0l); + } // int lpop_register()