Mercurial > hg > CbC > old > device
diff test/code-gen.c @ 280:affb054fe920
lrexpr fix. rexpr in MIPS fix.
author | kono |
---|---|
date | Sun, 23 May 2004 15:27:25 +0900 |
parents | ebaec1ae566e |
children | ce7b4d90bc24 |
line wrap: on
line diff
--- a/test/code-gen.c Sat May 22 13:00:03 2004 +0900 +++ b/test/code-gen.c Sun May 23 15:27:25 2004 +0900 @@ -297,40 +297,77 @@ void code_gt() { + int reg; if (i1>i2) printf("code_gt 1\n"); else printf("code_gt 0\n"); + for (reg=-3;reg<7;reg++) { + if (0<reg && reg<3) + printf("reg=%d code_gt 0<reg && reg <3\n",reg); + } + for (reg=-3;reg<7;reg++) { + if (-2<reg && reg<0) + printf("reg=%d code_gt -2<reg && reg <0\n",reg); + } + } // code_ugt(int cond) void code_ugt() { + int reg; if (ui1>ui2) printf("code_ugt 1\n"); else printf("code_ugt 0\n"); + for (reg=0;reg<7;reg++) { + if (0<reg && reg<3) + printf("reg=%d code_ugt 0<reg && reg <3\n",reg); + } + for (reg=0;reg<7;reg++) { + if (1<reg && reg<5) + printf("reg=%d code_ugt 1<reg && reg <5\n",reg); + } } // code_ge(int cond) void code_ge() { + int reg; if (i1>=i2) printf("code_ge 1\n"); else printf("code_ge 0\n"); + for (reg=-3;reg<7;reg++) { + if (0<=reg && reg<=3) + printf("reg=%d code_ge 0<=reg && reg <=3\n",reg); + } + for (reg=-3;reg<7;reg++) { + if (-2<=reg && reg<=0) + printf("reg=%d code_ge -2<=reg && reg <=0\n",reg); + } } // code_uge(int cond) void code_uge() { + unsigned reg; if (ui1>=ui2) printf("code_uge 1\n"); else printf("code_uge 0\n"); + for (reg=0;reg<7;reg++) { + if (0<=reg && reg<=3) + printf("reg=%d code_uge 0<=reg && reg <=3\n",reg); + } + for (reg=0;reg<7;reg++) { + if (1<=reg && reg<=5) + printf("reg=%d code_uge 1<=reg && reg <=5\n",reg); + } } // code_eq(int cond) @@ -1418,40 +1455,76 @@ void code_dgt() { + double reg; if (d0>d1) printf("code_dgt 1\n"); else printf("code_dgt 0\n"); + for (reg=-3;reg<7;reg++) { + if (0<reg && reg<3) + printf("reg=%g code_dgt 0<reg && reg <3\n",reg); + } + for (reg=-3;reg<7;reg++) { + if (-2<reg && reg<0) + printf("reg=%g code_dgt -2<reg && reg <0\n",reg); + } } // code_ugt(int cond) void code_fgt() { + float reg; if (f0>f1) printf("code_fgt 1\n"); else printf("code_fgt 0\n"); + for (reg=-3;reg<7;reg++) { + if (0<reg && reg<3) + printf("reg=%g code_fgt 0<reg && reg <3\n",reg); + } + for (reg=-3;reg<7;reg++) { + if (-2<reg && reg<0) + printf("reg=%g code_fgt -2<reg && reg <0\n",reg); + } } // code_ge(int cond) void code_dge() { + double reg; if (d0>=d1) printf("code_dge 1\n"); else printf("code_dge 0\n"); + for (reg=-3;reg<7;reg++) { + if (0<=reg && reg<=3) + printf("reg=%g code_dge 0<reg && reg <=3\n",reg); + } + for (reg=-3;reg<7;reg++) { + if (-2<=reg && reg<=0) + printf("reg=%g code_dge -2<reg && reg <=0\n",reg); + } } // code_uge(int cond) void code_fge() { + float reg; if (f0>=f1) printf("code_fge 1\n"); else printf("code_fge 0\n"); + for (reg=-3;reg<7;reg++) { + if (0<=reg && reg<=3) + printf("reg=%g code_fge 0<=reg && reg <=3\n",reg); + } + for (reg=-3;reg<7;reg++) { + if (-2<=reg && reg<=0) + printf("reg=%g code_fge -2<=reg && reg <=0\n",reg); + } } // code_eq(int cond) @@ -2412,40 +2485,76 @@ void code_lgt() { + long long reg; if (l0>l1) printf("code_lgt 1\n"); else printf("code_lgt 0\n"); + for (reg=-3;reg<7;reg++) { + if (0<reg && reg<3) + printf("reg=%lld code_lgt 0<reg && reg <3\n",reg); + } + for (reg=-3;reg<7;reg++) { + if (-2<reg && reg<0) + printf("reg=%lld code_lgt -2<reg && reg <0\n",reg); + } } // code_lugt(int cond) void code_lugt() { + unsigned long long reg; if (ul0>ul1) printf("code_lugt 1\n"); else printf("code_lugt 0\n"); + for (reg=0;reg<7;reg++) { + if (2<reg && reg<4) + printf("reg=%llu code_lugt 2<reg && reg <4\n",reg); + } + for (reg=0;reg<7;reg++) { + if (2<reg && reg<4) + printf("reg=%llu code_lugt 2<reg && reg <4\n",reg); + } } // code_lge(int cond) void code_lge() { + long long reg; if (l0>=l1) printf("code_lge 1\n"); else printf("code_lge 0\n"); + for (reg=-3;reg<7;reg++) { + if (0<=reg && reg<=3) + printf("reg=%lld code_lge 0<=reg && reg <=3\n",reg); + } + for (reg=-3;reg<7;reg++) { + if (-2<=reg && reg<=0) + printf("reg=%lld code_lge -2<=reg && reg <=0\n",reg); + } } // code_luge(int cond) void code_luge() { + unsigned long long reg; if (ul0>=ul1) printf("code_luge 1\n"); else printf("code_luge 0\n"); + for (reg=0;reg<7;reg++) { + if (2<reg && reg<4) + printf("reg=%llu code_luge 2<reg && reg <4\n",reg); + } + for (reg=0;reg<7;reg++) { + if (2<reg && reg<4) + printf("reg=%llu code_luge 2<reg && reg <4\n",reg); + } } // code_leq(int cond)