comparison src/cpu/ppc/vm/vtableStubs_ppc_64.cpp @ 17807:71a71b0bc844

8037915: PPC64/AIX: Several smaller fixes Reviewed-by: kvn
author goetz
date Thu, 20 Mar 2014 11:03:06 +0100
parents 67fa91961822
children
comparison
equal deleted inserted replaced
17806:9200402b42d5 17807:71a71b0bc844
1 /* 1 /*
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
3 * Copyright 2012, 2013 SAP AG. All rights reserved. 3 * Copyright 2012, 2014 SAP AG. All rights reserved.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * 5 *
6 * This code is free software; you can redistribute it and/or modify it 6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as 7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
77 77
78 // We might implicit NULL fault here. 78 // We might implicit NULL fault here.
79 address npe_addr = __ pc(); // npe = null pointer exception 79 address npe_addr = __ pc(); // npe = null pointer exception
80 __ load_klass_with_trap_null_check(rcvr_klass, R3); 80 __ load_klass_with_trap_null_check(rcvr_klass, R3);
81 81
82 // Set methodOop (in case of interpreted method), and destination address. 82 // Set method (in case of interpreted method), and destination address.
83 int entry_offset = InstanceKlass::vtable_start_offset() + vtable_index*vtableEntry::size(); 83 int entry_offset = InstanceKlass::vtable_start_offset() + vtable_index*vtableEntry::size();
84 84
85 #ifndef PRODUCT 85 #ifndef PRODUCT
86 if (DebugVtables) { 86 if (DebugVtables) {
87 Label L; 87 Label L;
159 159
160 // We might implicit NULL fault here. 160 // We might implicit NULL fault here.
161 address npe_addr = __ pc(); // npe = null pointer exception 161 address npe_addr = __ pc(); // npe = null pointer exception
162 __ load_klass_with_trap_null_check(rcvr_klass, R3_ARG1); 162 __ load_klass_with_trap_null_check(rcvr_klass, R3_ARG1);
163 163
164 //__ ld(rcvr_klass, oopDesc::klass_offset_in_bytes(), R3_ARG1);
165
166 BLOCK_COMMENT("Load start of itable entries into itable_entry."); 164 BLOCK_COMMENT("Load start of itable entries into itable_entry.");
167 __ lwz(vtable_len, InstanceKlass::vtable_length_offset() * wordSize, rcvr_klass); 165 __ lwz(vtable_len, InstanceKlass::vtable_length_offset() * wordSize, rcvr_klass);
168 __ slwi(vtable_len, vtable_len, exact_log2(vtableEntry::size() * wordSize)); 166 __ slwi(vtable_len, vtable_len, exact_log2(vtableEntry::size() * wordSize));
169 __ add(itable_entry_addr, vtable_len, rcvr_klass); 167 __ add(itable_entry_addr, vtable_len, rcvr_klass);
170 168
197 const int vtable_offset_offset = (itableOffsetEntry::offset_offset_in_bytes() - 195 const int vtable_offset_offset = (itableOffsetEntry::offset_offset_in_bytes() -
198 itableOffsetEntry::interface_offset_in_bytes()) - 196 itableOffsetEntry::interface_offset_in_bytes()) -
199 itable_offset_search_inc; 197 itable_offset_search_inc;
200 __ lwz(vtable_offset, vtable_offset_offset, itable_entry_addr); 198 __ lwz(vtable_offset, vtable_offset_offset, itable_entry_addr);
201 199
202 // Compute itableMethodEntry and get methodOop and entry point for compiler. 200 // Compute itableMethodEntry and get method and entry point for compiler.
203 const int method_offset = (itableMethodEntry::size() * wordSize * vtable_index) + 201 const int method_offset = (itableMethodEntry::size() * wordSize * vtable_index) +
204 itableMethodEntry::method_offset_in_bytes(); 202 itableMethodEntry::method_offset_in_bytes();
205 203
206 __ add(itable_method, rcvr_klass, vtable_offset); 204 __ add(itable_method, rcvr_klass, vtable_offset);
207 __ ld(R19_method, method_offset, itable_method); 205 __ ld(R19_method, method_offset, itable_method);
209 #ifndef PRODUCT 207 #ifndef PRODUCT
210 if (DebugVtables) { 208 if (DebugVtables) {
211 Label ok; 209 Label ok;
212 __ cmpd(CCR0, R19_method, 0); 210 __ cmpd(CCR0, R19_method, 0);
213 __ bne(CCR0, ok); 211 __ bne(CCR0, ok);
214 __ stop("methodOop is null", 103); 212 __ stop("method is null", 103);
215 __ bind(ok); 213 __ bind(ok);
216 } 214 }
217 #endif 215 #endif
218 216
219 // If the vtable entry is null, the method is abstract. 217 // If the vtable entry is null, the method is abstract.