X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fx87_f.expect.c;fp=tests%2Fx87_f.expect.c;h=b943c966fdab4768430f2a8f98b9c825c04b7b96;hb=fe18df39aa9dc0a3afc5a7474a27698672eceeca;hp=0000000000000000000000000000000000000000;hpb=497a6d6b4c2992fc9cbd2591985d108bc8859f72;p=ia32rtools.git diff --git a/tests/x87_f.expect.c b/tests/x87_f.expect.c new file mode 100644 index 0000000..b943c96 --- /dev/null +++ b/tests/x87_f.expect.c @@ -0,0 +1,17 @@ +int sub_test() +{ + union { u32 d[1]; u8 b[4]; } sf; + u32 eax; + u32 edx; + float f_st0; + float f_st1; + + sf.d[0] = 4; // var_4 + f_st0 = (float)(s32)sf.d[0]; // var_4 fild + f_st1 = f_st0; f_st0 = (float)(s32)sf.d[0]; // var_4 fild + f_st0 = sqrtf(f_st0); + f_st0 = atanf(f_st1 / f_st0); + eax = (s32)f_st0; // ftol + return eax; +} +