19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
23 *
24 */
25
26 #include "precompiled.hpp"
27 #include "interp_masm_aarch64.hpp"
28 #include "interpreter/interpreter.hpp"
29 #include "interpreter/interpreterRuntime.hpp"
30 #include "logging/log.hpp"
31 #include "oops/arrayOop.hpp"
32 #include "oops/markOop.hpp"
33 #include "oops/method.hpp"
34 #include "oops/methodData.hpp"
35 #include "prims/jvmtiExport.hpp"
36 #include "prims/jvmtiThreadState.hpp"
37 #include "runtime/basicLock.hpp"
38 #include "runtime/biasedLocking.hpp"
39 #include "runtime/safepointMechanism.hpp"
40 #include "runtime/sharedRuntime.hpp"
41 #include "runtime/thread.inline.hpp"
42
43
44 void InterpreterMacroAssembler::narrow(Register result) {
45
46 // Get method->_constMethod->_result_type
47 ldr(rscratch1, Address(rfp, frame::interpreter_frame_method_offset * wordSize));
48 ldr(rscratch1, Address(rscratch1, Method::const_offset()));
49 ldrb(rscratch1, Address(rscratch1, ConstMethod::result_type_offset()));
50
51 Label done, notBool, notByte, notChar;
52
53 // common case first
54 cmpw(rscratch1, T_INT);
55 br(Assembler::EQ, done);
56
57 // mask integer result to narrower return type.
58 cmpw(rscratch1, T_BOOLEAN);
|
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
23 *
24 */
25
26 #include "precompiled.hpp"
27 #include "interp_masm_aarch64.hpp"
28 #include "interpreter/interpreter.hpp"
29 #include "interpreter/interpreterRuntime.hpp"
30 #include "logging/log.hpp"
31 #include "oops/arrayOop.hpp"
32 #include "oops/markOop.hpp"
33 #include "oops/method.hpp"
34 #include "oops/methodData.hpp"
35 #include "prims/jvmtiExport.hpp"
36 #include "prims/jvmtiThreadState.hpp"
37 #include "runtime/basicLock.hpp"
38 #include "runtime/biasedLocking.hpp"
39 #include "runtime/frame.inline.hpp"
40 #include "runtime/safepointMechanism.hpp"
41 #include "runtime/sharedRuntime.hpp"
42 #include "runtime/thread.inline.hpp"
43
44
45 void InterpreterMacroAssembler::narrow(Register result) {
46
47 // Get method->_constMethod->_result_type
48 ldr(rscratch1, Address(rfp, frame::interpreter_frame_method_offset * wordSize));
49 ldr(rscratch1, Address(rscratch1, Method::const_offset()));
50 ldrb(rscratch1, Address(rscratch1, ConstMethod::result_type_offset()));
51
52 Label done, notBool, notByte, notChar;
53
54 // common case first
55 cmpw(rscratch1, T_INT);
56 br(Assembler::EQ, done);
57
58 // mask integer result to narrower return type.
59 cmpw(rscratch1, T_BOOLEAN);
|