Mercurial > hg > truffle
comparison src/cpu/x86/vm/templateInterpreter_x86_32.cpp @ 1174:ddb7834449d0
6849984: Value methods for platform dependent math functions constant fold incorrectly
Reviewed-by: kvn, twisti
author | never |
---|---|
date | Fri, 15 Jan 2010 11:53:33 -0800 |
parents | e66fd840cb6b |
children | 3cf667df43ef |
comparison
equal
deleted
inserted
replaced
1173:73b22f919c34 | 1174:ddb7834449d0 |
---|---|
1 /* | 1 /* |
2 * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright 1997-2010 Sun Microsystems, Inc. All Rights Reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
1429 | 1429 |
1430 return ((InterpreterGenerator*)this)->generate_normal_entry(synchronized); | 1430 return ((InterpreterGenerator*)this)->generate_normal_entry(synchronized); |
1431 | 1431 |
1432 } | 1432 } |
1433 | 1433 |
1434 // These should never be compiled since the interpreter will prefer | |
1435 // the compiled version to the intrinsic version. | |
1436 bool AbstractInterpreter::can_be_compiled(methodHandle m) { | |
1437 switch (method_kind(m)) { | |
1438 case Interpreter::java_lang_math_sin : // fall thru | |
1439 case Interpreter::java_lang_math_cos : // fall thru | |
1440 case Interpreter::java_lang_math_tan : // fall thru | |
1441 case Interpreter::java_lang_math_abs : // fall thru | |
1442 case Interpreter::java_lang_math_log : // fall thru | |
1443 case Interpreter::java_lang_math_log10 : // fall thru | |
1444 case Interpreter::java_lang_math_sqrt : | |
1445 return false; | |
1446 default: | |
1447 return true; | |
1448 } | |
1449 } | |
1450 | |
1434 // How much stack a method activation needs in words. | 1451 // How much stack a method activation needs in words. |
1435 int AbstractInterpreter::size_top_interpreter_activation(methodOop method) { | 1452 int AbstractInterpreter::size_top_interpreter_activation(methodOop method) { |
1436 | 1453 |
1437 const int stub_code = 4; // see generate_call_stub | 1454 const int stub_code = 4; // see generate_call_stub |
1438 // Save space for one monitor to get into the interpreted method in case | 1455 // Save space for one monitor to get into the interpreted method in case |