Skip to content

Commit

Permalink
fold in Don's Phobos2 math changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Walter Bright committed Jan 5, 2011
1 parent 7651bce commit 186802f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions std/math.d
Expand Up @@ -1090,7 +1090,6 @@ L_was_nan:
}
}
else version(Naked_D_InlineAsm_X86_64) {
enum { PARAMSIZE = real.sizeof }
asm {
/* exp2() for x87 80-bit reals, IEEE754-2008 conformant.
* Author: Don Clugston.
Expand Down Expand Up @@ -1135,7 +1134,7 @@ L_normal:
fld real ptr [RSP+8] ; // 2^rndint(x)
add RSP,24;
fmulp ST(1), ST;
ret PARAMSIZE;
ret;

L_subnormal:
// Result will be subnormal.
Expand Down Expand Up @@ -1169,7 +1168,7 @@ L_waslargenegative:
fmul ST(0), ST; // square it, to create havoc!
L_was_nan:
add RSP,24;
ret PARAMSIZE;
ret;
}
} else {
return std.c.math.exp2(x);
Expand Down

0 comments on commit 186802f

Please sign in to comment.