Mercurial > hg > graal-jvmci-8
comparison src/cpu/x86/vm/stubGenerator_x86_32.cpp @ 6084:6759698e3140
7133857: exp() and pow() should use the x87 ISA on x86
Summary: use x87 instructions to implement exp() and pow() in interpreter/c1/c2.
Reviewed-by: kvn, never, twisti
author | roland |
---|---|
date | Tue, 15 May 2012 10:10:23 +0200 |
parents | 22cee0ee8927 |
children | 1d7922586cf6 |
comparison
equal
deleted
inserted
replaced
6057:8f972594effc | 6084:6759698e3140 |
---|---|
2134 | 2134 |
2135 __ fld_d(Address(rsp, 4)); | 2135 __ fld_d(Address(rsp, 4)); |
2136 __ trigfunc('t'); | 2136 __ trigfunc('t'); |
2137 __ ret(0); | 2137 __ ret(0); |
2138 } | 2138 } |
2139 | 2139 { |
2140 // The intrinsic version of these seem to return the same value as | 2140 StubCodeMark mark(this, "StubRoutines", "exp"); |
2141 // the strict version. | 2141 StubRoutines::_intrinsic_exp = (double (*)(double)) __ pc(); |
2142 StubRoutines::_intrinsic_exp = SharedRuntime::dexp; | 2142 |
2143 StubRoutines::_intrinsic_pow = SharedRuntime::dpow; | 2143 __ fld_d(Address(rsp, 4)); |
2144 __ exp_with_fallback(0); | |
2145 __ ret(0); | |
2146 } | |
2147 { | |
2148 StubCodeMark mark(this, "StubRoutines", "pow"); | |
2149 StubRoutines::_intrinsic_pow = (double (*)(double,double)) __ pc(); | |
2150 | |
2151 __ fld_d(Address(rsp, 12)); | |
2152 __ fld_d(Address(rsp, 4)); | |
2153 __ pow_with_fallback(0); | |
2154 __ ret(0); | |
2155 } | |
2144 } | 2156 } |
2145 | 2157 |
2146 public: | 2158 public: |
2147 // Information about frame layout at time of blocking runtime call. | 2159 // Information about frame layout at time of blocking runtime call. |
2148 // Note that we only have to preserve callee-saved registers since | 2160 // Note that we only have to preserve callee-saved registers since |