Mercurial > hg > graal-compiler
diff 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 |
line wrap: on
line diff
--- a/src/cpu/x86/vm/templateInterpreter_x86_32.cpp Wed Jan 13 23:05:52 2010 -0800 +++ b/src/cpu/x86/vm/templateInterpreter_x86_32.cpp Fri Jan 15 11:53:33 2010 -0800 @@ -1,5 +1,5 @@ /* - * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2010 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1431,6 +1431,23 @@ } +// These should never be compiled since the interpreter will prefer +// the compiled version to the intrinsic version. +bool AbstractInterpreter::can_be_compiled(methodHandle m) { + switch (method_kind(m)) { + case Interpreter::java_lang_math_sin : // fall thru + case Interpreter::java_lang_math_cos : // fall thru + case Interpreter::java_lang_math_tan : // fall thru + case Interpreter::java_lang_math_abs : // fall thru + case Interpreter::java_lang_math_log : // fall thru + case Interpreter::java_lang_math_log10 : // fall thru + case Interpreter::java_lang_math_sqrt : + return false; + default: + return true; + } +} + // How much stack a method activation needs in words. int AbstractInterpreter::size_top_interpreter_activation(methodOop method) {