< prev index next >

src/cpu/x86/vm/interp_masm_x86.cpp

Print this page

*** 1,7 **** /* ! * Copyright (c) 1997, 2016, Oracle and/or its affiliates. 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 1997, 2017, Oracle and/or its affiliates. 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 507,524 **** Register tmp = index; // reuse shll(tmp, LogBytesPerHeapOop); get_constant_pool(result); // load pointer for resolved_references[] objArray ! movptr(result, Address(result, ConstantPool::resolved_references_offset_in_bytes())); // JNIHandles::resolve(obj); movptr(result, Address(result, 0)); // Add in the index addptr(result, tmp); load_heap_oop(result, Address(result, arrayOopDesc::base_offset_in_bytes(T_OBJECT))); } // Generate a subtype check: branch to ok_is_subtype if sub_klass is a // subtype of super_klass. // // Args: --- 507,533 ---- Register tmp = index; // reuse shll(tmp, LogBytesPerHeapOop); get_constant_pool(result); // load pointer for resolved_references[] objArray ! movptr(result, Address(result, ConstantPool::cache_offset_in_bytes())); ! movptr(result, Address(result, ConstantPoolCache::resolved_references_offset_in_bytes())); // JNIHandles::resolve(obj); movptr(result, Address(result, 0)); // Add in the index addptr(result, tmp); load_heap_oop(result, Address(result, arrayOopDesc::base_offset_in_bytes(T_OBJECT))); } + // load cpool->resolved_klass_at(index) + void InterpreterMacroAssembler::load_resolved_klass_at_index(Register cpool, + Register index, Register klass) { + movw(index, Address(cpool, index, Address::times_ptr, sizeof(ConstantPool))); + Register resolved_klasses = cpool; + movptr(resolved_klasses, Address(cpool, ConstantPool::resolved_klasses_offset_in_bytes())); + movptr(klass, Address(resolved_klasses, index, Address::times_ptr, Array<Klass*>::base_offset_in_bytes())); + } // Generate a subtype check: branch to ok_is_subtype if sub_klass is a // subtype of super_klass. // // Args:
< prev index next >