Browse Source

x64: Improve accuracy of x^-k.

Mike Pall 14 years ago
parent
commit
d437086c5a
4 changed files with 1644 additions and 1647 deletions
  1. 544 544
      src/buildvm_x64.h
  2. 540 541
      src/buildvm_x64win.h
  3. 3 5
      src/buildvm_x86.dasc
  4. 557 557
      src/buildvm_x86.h

File diff suppressed because it is too large
+ 544 - 544
src/buildvm_x64.h


File diff suppressed because it is too large
+ 540 - 541
src/buildvm_x64win.h


+ 3 - 5
src/buildvm_x86.dasc

@@ -3074,14 +3074,12 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
   |6:
   |  je <5				// x^1 ==> x
   |  jb >7
-  |  push RDa
+  |  neg eax
+  |  call <1
   |  sseconst_1 xmm1, RDa
   |  divsd xmm1, xmm0
-  |  pop RDa
   |  movaps xmm0, xmm1
-  |  neg eax
-  |  cmp eax, 1; je <5			// x^-1 ==> 1/x
-  |  jmp <1				// x^-i ==> (1/x)^i
+  |  ret
   |7:
   |  sseconst_1 xmm0, RDa
   |  ret

File diff suppressed because it is too large
+ 557 - 557
src/buildvm_x86.h


Some files were not shown because too many files changed in this diff