Mercurial > hg > truffle
diff src/share/vm/c1/c1_LIR.cpp @ 953:ff1a29907b6c
6855215: Calculation error (NaN) after about 1500 calculations
Reviewed-by: kvn
author | never |
---|---|
date | Mon, 31 Aug 2009 17:07:53 -0700 |
parents | dc7f315e41f7 |
children | 3cf667df43ef |
line wrap: on
line diff
--- a/src/share/vm/c1/c1_LIR.cpp Mon Aug 31 08:31:45 2009 -0700 +++ b/src/share/vm/c1/c1_LIR.cpp Mon Aug 31 17:07:53 2009 -0700 @@ -567,8 +567,6 @@ case lir_rem: case lir_sqrt: case lir_abs: - case lir_log: - case lir_log10: case lir_logic_and: case lir_logic_or: case lir_logic_xor: @@ -644,13 +642,16 @@ case lir_tan: case lir_sin: - case lir_cos: { + case lir_cos: + case lir_log: + case lir_log10: { assert(op->as_Op2() != NULL, "must be"); LIR_Op2* op2 = (LIR_Op2*)op; - // sin and cos need two temporary fpu stack slots, so register - // two temp operands. Register input operand as temp to - // guarantee that they do not overlap + // On x86 tan/sin/cos need two temporary fpu stack slots and + // log/log10 need one so handle opr2 and tmp as temp inputs. + // Register input operand as temp to guarantee that it doesn't + // overlap with the input. assert(op2->_info == NULL, "not used"); assert(op2->_opr1->is_valid(), "used"); do_input(op2->_opr1); do_temp(op2->_opr1);