X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=ia32rtools.git;a=blobdiff_plain;f=tests%2Fx87_s.expect.c;h=e9056427ac7c48b92655916f39da081be9c6fd3c;hp=6b01b42e7f1814a635aa0ba49d4374780b226b9e;hb=16057ce1aaef8f239faf0209ef7af813d949713c;hpb=622eb2eff8349fa0a6675ce3213ab8f8fb1c1798 diff --git a/tests/x87_s.expect.c b/tests/x87_s.expect.c index 6b01b42..e905642 100644 --- a/tests/x87_s.expect.c +++ b/tests/x87_s.expect.c @@ -1,8 +1,6 @@ -int sub_test() +double sub_test() { union { u32 d[1]; u8 b[4]; double q[1]; } sf; - u32 eax; - u32 edx; float f_st[8]; int f_stp = 0; @@ -23,8 +21,8 @@ int sub_test() { float t = f_st[f_stp & 7]; f_st[f_stp & 7] = f_st[(f_stp + 6) & 7]; f_st[(f_stp + 6) & 7] = t; } // fxch f_st[f_stp & 7] = -f_st[f_stp & 7]; f_st[(f_stp + 1) & 7] = atanf(f_st[(f_stp + 1) & 7] / f_st[f_stp & 7]); f_stp++; + sf.d[0] = (s32)f_st[f_stp & 7]; // var_4 fist *((float *)(u32)&sf.d[0]) = f_st[f_stp & 7]; f_stp++; // var_4 fst - eax = (s32)f_st[f_stp & 7]; f_stp++; // ftol - return eax; + return f_st[f_stp & 7]; }