public final class AMD64MathLog10Op extends AMD64MathIntrinsicUnaryOp
ALGORITHM DESCRIPTION - LOG10()
---------------------
Let x=2^k * mx, mx in [1,2)
Get B~1/mx based on the output of rcpss instruction (B0)
B = int((B0*LH*2^7+0.5))/2^7
LH is a short approximation for log10(e)
Reduced argument: r=B*mx-LH (computed accurately in high and low parts)
Result: k*log10(2) - log(B) + p(r)
p(r) is a degree 7 polynomial
-log(B) read from data table (high, low parts)
Result is formed from high and low parts.
Special cases:
log10(0) = -INF with divide-by-zero exception raised
log10(1) = +0
log10(x) = NaN with invalid exception raised if x < -0, including -INF
log10(+INF) = +INF
LIRInstruction.Alive, LIRInstruction.Def, LIRInstruction.OperandFlag, LIRInstruction.OperandMode, LIRInstruction.State, LIRInstruction.Temp, LIRInstruction.Use| Modifier and Type | Field and Description |
|---|---|
static LIRInstructionClass<AMD64MathLog10Op> |
TYPE |
input, output, tempsADDRESS_FLAGS, ALLOWED_FLAGS| Constructor and Description |
|---|
AMD64MathLog10Op() |
| Modifier and Type | Method and Description |
|---|---|
void |
emitCode(CompilationResultBuilder crb,
AMD64MacroAssembler masm) |
emitLIRWrapperemitCodeaddStackSlotsToTemporaries, destroysCallerSavedRegisters, forEachAlive, forEachAlive, forEachInput, forEachInput, forEachOutput, forEachOutput, forEachRegisterHint, forEachRegisterHint, forEachState, forEachState, forEachState, forEachState, forEachTemp, forEachTemp, getComment, getLIRInstructionClass, getPosition, hashCode, hasOperands, hasState, id, isLoadConstantOp, isMoveOp, isValueMoveOp, name, needsClearUpperVectorRegisters, setComment, setId, setPosition, toString, toString, toStringWithIdPrefix, verify, visitEachAlive, visitEachAlive, visitEachInput, visitEachInput, visitEachOutput, visitEachOutput, visitEachState, visitEachState, visitEachTemp, visitEachTemppublic static final LIRInstructionClass<AMD64MathLog10Op> TYPE
public void emitCode(CompilationResultBuilder crb, AMD64MacroAssembler masm)
emitCode in class AMD64LIRInstruction