< prev index next >

src/hotspot/cpu/ppc/templateTable_ppc_64.cpp

Print this page
rev 51881 : 8211145: [ppc] [s390]: Build fails due to -Werror=switch (introduced with JDK-8211029)
Reviewed-by:


2221 // Call into the VM if call site is not yet resolved
2222 //
2223 // Input regs:
2224 //   - None, all passed regs are outputs.
2225 //
2226 // Returns:
2227 //   - Rcache:  The const pool cache entry that contains the resolved result.
2228 //   - Rresult: Either noreg or output for f1/f2.
2229 //
2230 // Kills:
2231 //   - Rscratch
2232 void TemplateTable::resolve_cache_and_index(int byte_no, Register Rcache, Register Rscratch, size_t index_size) {
2233 
2234   __ get_cache_and_index_at_bcp(Rcache, 1, index_size);
2235   Label Lresolved, Ldone;
2236 
2237   Bytecodes::Code code = bytecode();
2238   switch (code) {
2239   case Bytecodes::_nofast_getfield: code = Bytecodes::_getfield; break;
2240   case Bytecodes::_nofast_putfield: code = Bytecodes::_putfield; break;

2241   }
2242 
2243   assert(byte_no == f1_byte || byte_no == f2_byte, "byte_no out of range");
2244   // We are resolved if the indices offset contains the current bytecode.
2245 #if defined(VM_LITTLE_ENDIAN)
2246   __ lbz(Rscratch, in_bytes(ConstantPoolCache::base_offset() + ConstantPoolCacheEntry::indices_offset()) + byte_no + 1, Rcache);
2247 #else
2248   __ lbz(Rscratch, in_bytes(ConstantPoolCache::base_offset() + ConstantPoolCacheEntry::indices_offset()) + 7 - (byte_no + 1), Rcache);
2249 #endif
2250   // Acquire by cmp-br-isync (see below).
2251   __ cmpdi(CCR0, Rscratch, (int)code);
2252   __ beq(CCR0, Lresolved);
2253 
2254   address entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_from_cache);
2255   __ li(R4_ARG2, code);
2256   __ call_VM(noreg, entry, R4_ARG2, true);
2257 
2258   // Update registers with resolved info.
2259   __ get_cache_and_index_at_bcp(Rcache, 1, index_size);
2260   __ b(Ldone);




2221 // Call into the VM if call site is not yet resolved
2222 //
2223 // Input regs:
2224 //   - None, all passed regs are outputs.
2225 //
2226 // Returns:
2227 //   - Rcache:  The const pool cache entry that contains the resolved result.
2228 //   - Rresult: Either noreg or output for f1/f2.
2229 //
2230 // Kills:
2231 //   - Rscratch
2232 void TemplateTable::resolve_cache_and_index(int byte_no, Register Rcache, Register Rscratch, size_t index_size) {
2233 
2234   __ get_cache_and_index_at_bcp(Rcache, 1, index_size);
2235   Label Lresolved, Ldone;
2236 
2237   Bytecodes::Code code = bytecode();
2238   switch (code) {
2239   case Bytecodes::_nofast_getfield: code = Bytecodes::_getfield; break;
2240   case Bytecodes::_nofast_putfield: code = Bytecodes::_putfield; break;
2241   default: break;
2242   }
2243 
2244   assert(byte_no == f1_byte || byte_no == f2_byte, "byte_no out of range");
2245   // We are resolved if the indices offset contains the current bytecode.
2246 #if defined(VM_LITTLE_ENDIAN)
2247   __ lbz(Rscratch, in_bytes(ConstantPoolCache::base_offset() + ConstantPoolCacheEntry::indices_offset()) + byte_no + 1, Rcache);
2248 #else
2249   __ lbz(Rscratch, in_bytes(ConstantPoolCache::base_offset() + ConstantPoolCacheEntry::indices_offset()) + 7 - (byte_no + 1), Rcache);
2250 #endif
2251   // Acquire by cmp-br-isync (see below).
2252   __ cmpdi(CCR0, Rscratch, (int)code);
2253   __ beq(CCR0, Lresolved);
2254 
2255   address entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_from_cache);
2256   __ li(R4_ARG2, code);
2257   __ call_VM(noreg, entry, R4_ARG2, true);
2258 
2259   // Update registers with resolved info.
2260   __ get_cache_and_index_at_bcp(Rcache, 1, index_size);
2261   __ b(Ldone);


< prev index next >