1.1 --- a/src/cpu/sparc/vm/stubGenerator_sparc.cpp Mon Apr 20 14:48:03 2009 -0700 1.2 +++ b/src/cpu/sparc/vm/stubGenerator_sparc.cpp Tue Apr 21 11:16:30 2009 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. 1.6 + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -68,16 +68,9 @@ 1.11 #ifdef PRODUCT 1.12 #define inc_counter_np(a,b,c) (0) 1.13 #else 1.14 - void inc_counter_np_(int& counter, Register t1, Register t2) { 1.15 - Address counter_addr(t2, (address) &counter); 1.16 - __ sethi(counter_addr); 1.17 - __ ld(counter_addr, t1); 1.18 - __ inc(t1); 1.19 - __ st(t1, counter_addr); 1.20 - } 1.21 #define inc_counter_np(counter, t1, t2) \ 1.22 BLOCK_COMMENT("inc_counter " #counter); \ 1.23 - inc_counter_np_(counter, t1, t2); 1.24 + __ inc_counter(&counter, t1, t2); 1.25 #endif 1.26 1.27 //---------------------------------------------------------------------------------------------------- 1.28 @@ -325,9 +318,9 @@ 1.29 __ verify_thread(); 1.30 1.31 const Register& temp_reg = Gtemp; 1.32 - Address pending_exception_addr (G2_thread, 0, in_bytes(Thread::pending_exception_offset())); 1.33 - Address exception_file_offset_addr(G2_thread, 0, in_bytes(Thread::exception_file_offset ())); 1.34 - Address exception_line_offset_addr(G2_thread, 0, in_bytes(Thread::exception_line_offset ())); 1.35 + Address pending_exception_addr (G2_thread, Thread::pending_exception_offset()); 1.36 + Address exception_file_offset_addr(G2_thread, Thread::exception_file_offset ()); 1.37 + Address exception_line_offset_addr(G2_thread, Thread::exception_line_offset ()); 1.38 1.39 // set pending exception 1.40 __ verify_oop(Oexception); 1.41 @@ -340,8 +333,8 @@ 1.42 // complete return to VM 1.43 assert(StubRoutines::_call_stub_return_address != NULL, "must have been generated before"); 1.44 1.45 - Address stub_ret(temp_reg, StubRoutines::_call_stub_return_address); 1.46 - __ jump_to(stub_ret); 1.47 + AddressLiteral stub_ret(StubRoutines::_call_stub_return_address); 1.48 + __ jump_to(stub_ret, temp_reg); 1.49 __ delayed()->nop(); 1.50 1.51 return start; 1.52 @@ -366,7 +359,7 @@ 1.53 1.54 const Register& handler_reg = Gtemp; 1.55 1.56 - Address exception_addr (G2_thread, 0, in_bytes(Thread::pending_exception_offset())); 1.57 + Address exception_addr(G2_thread, Thread::pending_exception_offset()); 1.58 1.59 #ifdef ASSERT 1.60 // make sure that this code is only executed if there is a pending exception 1.61 @@ -456,8 +449,7 @@ 1.62 int frame_complete = __ offset(); 1.63 1.64 if (restore_saved_exception_pc) { 1.65 - Address saved_exception_pc(G2_thread, 0, in_bytes(JavaThread::saved_exception_pc_offset())); 1.66 - __ ld_ptr(saved_exception_pc, I7); 1.67 + __ ld_ptr(G2_thread, JavaThread::saved_exception_pc_offset(), I7); 1.68 __ sub(I7, frame::pc_return_offset, I7); 1.69 } 1.70 1.71 @@ -481,7 +473,7 @@ 1.72 #ifdef ASSERT 1.73 Label L; 1.74 1.75 - Address exception_addr(G2_thread, 0, in_bytes(Thread::pending_exception_offset())); 1.76 + Address exception_addr(G2_thread, Thread::pending_exception_offset()); 1.77 Register scratch_reg = Gtemp; 1.78 __ ld_ptr(exception_addr, scratch_reg); 1.79 __ br_notnull(scratch_reg, false, Assembler::pt, L); 1.80 @@ -835,7 +827,7 @@ 1.81 address start = __ pc(); 1.82 1.83 const int preserve_register_words = (64 * 2); 1.84 - Address preserve_addr(FP, 0, (-preserve_register_words * wordSize) + STACK_BIAS); 1.85 + Address preserve_addr(FP, (-preserve_register_words * wordSize) + STACK_BIAS); 1.86 1.87 Register Lthread = L7_thread_cache; 1.88 int i; 1.89 @@ -1106,21 +1098,19 @@ 1.90 __ srl_ptr(addr, CardTableModRefBS::card_shift, addr); 1.91 __ srl_ptr(count, CardTableModRefBS::card_shift, count); 1.92 __ sub(count, addr, count); 1.93 - Address rs(tmp, (address)ct->byte_map_base); 1.94 - __ load_address(rs); 1.95 + AddressLiteral rs(ct->byte_map_base); 1.96 + __ set(rs, tmp); 1.97 __ BIND(L_loop); 1.98 - __ stb(G0, rs.base(), addr); 1.99 + __ stb(G0, tmp, addr); 1.100 __ subcc(count, 1, count); 1.101 __ brx(Assembler::greaterEqual, false, Assembler::pt, L_loop); 1.102 __ delayed()->add(addr, 1, addr); 1.103 - 1.104 - } 1.105 + } 1.106 break; 1.107 case BarrierSet::ModRef: 1.108 break; 1.109 - default : 1.110 + default: 1.111 ShouldNotReachHere(); 1.112 - 1.113 } 1.114 } 1.115