1.1 --- a/src/cpu/sparc/vm/assembler_sparc.hpp Thu Mar 19 09:13:24 2009 -0700 1.2 +++ b/src/cpu/sparc/vm/assembler_sparc.hpp Fri Mar 20 23:19:36 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 @@ -1088,8 +1088,8 @@ 1.11 inline void add( Register s1, Register s2, Register d ); 1.12 inline void add( Register s1, int simm13a, Register d, relocInfo::relocType rtype = relocInfo::none); 1.13 inline void add( Register s1, int simm13a, Register d, RelocationHolder const& rspec); 1.14 - inline void add( Register s1, RegisterConstant s2, Register d, int offset = 0); 1.15 - inline void add( const Address& a, Register d, int offset = 0); 1.16 + inline void add( Register s1, RegisterOrConstant s2, Register d, int offset = 0); 1.17 + inline void add( const Address& a, Register d, int offset = 0); 1.18 1.19 void addcc( Register s1, Register s2, Register d ) { emit_long( op(arith_op) | rd(d) | op3(add_op3 | cc_bit_op3) | rs1(s1) | rs2(s2) ); } 1.20 void addcc( Register s1, int simm13a, Register d ) { emit_long( op(arith_op) | rd(d) | op3(add_op3 | cc_bit_op3) | rs1(s1) | immed(true) | simm(simm13a, 13) ); } 1.21 @@ -1305,15 +1305,15 @@ 1.22 inline void ld( const Address& a, Register d, int offset = 0 ); 1.23 inline void ldd( const Address& a, Register d, int offset = 0 ); 1.24 1.25 - inline void ldub( Register s1, RegisterConstant s2, Register d ); 1.26 - inline void ldsb( Register s1, RegisterConstant s2, Register d ); 1.27 - inline void lduh( Register s1, RegisterConstant s2, Register d ); 1.28 - inline void ldsh( Register s1, RegisterConstant s2, Register d ); 1.29 - inline void lduw( Register s1, RegisterConstant s2, Register d ); 1.30 - inline void ldsw( Register s1, RegisterConstant s2, Register d ); 1.31 - inline void ldx( Register s1, RegisterConstant s2, Register d ); 1.32 - inline void ld( Register s1, RegisterConstant s2, Register d ); 1.33 - inline void ldd( Register s1, RegisterConstant s2, Register d ); 1.34 + inline void ldub( Register s1, RegisterOrConstant s2, Register d ); 1.35 + inline void ldsb( Register s1, RegisterOrConstant s2, Register d ); 1.36 + inline void lduh( Register s1, RegisterOrConstant s2, Register d ); 1.37 + inline void ldsh( Register s1, RegisterOrConstant s2, Register d ); 1.38 + inline void lduw( Register s1, RegisterOrConstant s2, Register d ); 1.39 + inline void ldsw( Register s1, RegisterOrConstant s2, Register d ); 1.40 + inline void ldx( Register s1, RegisterOrConstant s2, Register d ); 1.41 + inline void ld( Register s1, RegisterOrConstant s2, Register d ); 1.42 + inline void ldd( Register s1, RegisterOrConstant s2, Register d ); 1.43 1.44 // pp 177 1.45 1.46 @@ -1535,12 +1535,12 @@ 1.47 inline void st( Register d, const Address& a, int offset = 0 ); 1.48 inline void std( Register d, const Address& a, int offset = 0 ); 1.49 1.50 - inline void stb( Register d, Register s1, RegisterConstant s2 ); 1.51 - inline void sth( Register d, Register s1, RegisterConstant s2 ); 1.52 - inline void stw( Register d, Register s1, RegisterConstant s2 ); 1.53 - inline void stx( Register d, Register s1, RegisterConstant s2 ); 1.54 - inline void std( Register d, Register s1, RegisterConstant s2 ); 1.55 - inline void st( Register d, Register s1, RegisterConstant s2 ); 1.56 + inline void stb( Register d, Register s1, RegisterOrConstant s2 ); 1.57 + inline void sth( Register d, Register s1, RegisterOrConstant s2 ); 1.58 + inline void stw( Register d, Register s1, RegisterOrConstant s2 ); 1.59 + inline void stx( Register d, Register s1, RegisterOrConstant s2 ); 1.60 + inline void std( Register d, Register s1, RegisterOrConstant s2 ); 1.61 + inline void st( Register d, Register s1, RegisterOrConstant s2 ); 1.62 1.63 // pp 177 1.64 1.65 @@ -1859,7 +1859,7 @@ 1.66 // Functions for isolating 64 bit shifts for LP64 1.67 inline void sll_ptr( Register s1, Register s2, Register d ); 1.68 inline void sll_ptr( Register s1, int imm6a, Register d ); 1.69 - inline void sll_ptr( Register s1, RegisterConstant s2, Register d ); 1.70 + inline void sll_ptr( Register s1, RegisterOrConstant s2, Register d ); 1.71 inline void srl_ptr( Register s1, Register s2, Register d ); 1.72 inline void srl_ptr( Register s1, int imm6a, Register d ); 1.73 1.74 @@ -1965,26 +1965,26 @@ 1.75 // st_ptr will perform st for 32 bit VM's and stx for 64 bit VM's 1.76 inline void ld_ptr( Register s1, Register s2, Register d ); 1.77 inline void ld_ptr( Register s1, int simm13a, Register d); 1.78 - inline void ld_ptr( Register s1, RegisterConstant s2, Register d ); 1.79 + inline void ld_ptr( Register s1, RegisterOrConstant s2, Register d ); 1.80 inline void ld_ptr( const Address& a, Register d, int offset = 0 ); 1.81 inline void st_ptr( Register d, Register s1, Register s2 ); 1.82 inline void st_ptr( Register d, Register s1, int simm13a); 1.83 - inline void st_ptr( Register d, Register s1, RegisterConstant s2 ); 1.84 + inline void st_ptr( Register d, Register s1, RegisterOrConstant s2 ); 1.85 inline void st_ptr( Register d, const Address& a, int offset = 0 ); 1.86 1.87 // ld_long will perform ld for 32 bit VM's and ldx for 64 bit VM's 1.88 // st_long will perform st for 32 bit VM's and stx for 64 bit VM's 1.89 inline void ld_long( Register s1, Register s2, Register d ); 1.90 inline void ld_long( Register s1, int simm13a, Register d ); 1.91 - inline void ld_long( Register s1, RegisterConstant s2, Register d ); 1.92 + inline void ld_long( Register s1, RegisterOrConstant s2, Register d ); 1.93 inline void ld_long( const Address& a, Register d, int offset = 0 ); 1.94 inline void st_long( Register d, Register s1, Register s2 ); 1.95 inline void st_long( Register d, Register s1, int simm13a ); 1.96 - inline void st_long( Register d, Register s1, RegisterConstant s2 ); 1.97 + inline void st_long( Register d, Register s1, RegisterOrConstant s2 ); 1.98 inline void st_long( Register d, const Address& a, int offset = 0 ); 1.99 1.100 // Loading values by size and signed-ness 1.101 - void load_sized_value(Register s1, RegisterConstant s2, Register d, 1.102 + void load_sized_value(Register s1, RegisterOrConstant s2, Register d, 1.103 int size_in_bytes, bool is_signed); 1.104 1.105 // Helpers for address formation. 1.106 @@ -1994,11 +1994,11 @@ 1.107 // is required, and becomes the result. 1.108 // If dest is a register and src is a non-simm13 constant, 1.109 // the temp argument is required, and is used to materialize the constant. 1.110 - void regcon_inc_ptr( RegisterConstant& dest, RegisterConstant src, 1.111 + void regcon_inc_ptr( RegisterOrConstant& dest, RegisterOrConstant src, 1.112 Register temp = noreg ); 1.113 - void regcon_sll_ptr( RegisterConstant& dest, RegisterConstant src, 1.114 + void regcon_sll_ptr( RegisterOrConstant& dest, RegisterOrConstant src, 1.115 Register temp = noreg ); 1.116 - RegisterConstant ensure_rs2(RegisterConstant rs2, Register sethi_temp) { 1.117 + RegisterOrConstant ensure_rs2(RegisterOrConstant rs2, Register sethi_temp) { 1.118 guarantee(sethi_temp != noreg, "constant offset overflow"); 1.119 if (is_simm13(rs2.constant_or_zero())) 1.120 return rs2; // register or short constant 1.121 @@ -2322,7 +2322,7 @@ 1.122 // interface method calling 1.123 void lookup_interface_method(Register recv_klass, 1.124 Register intf_klass, 1.125 - RegisterConstant itable_index, 1.126 + RegisterOrConstant itable_index, 1.127 Register method_result, 1.128 Register temp_reg, Register temp2_reg, 1.129 Label& no_such_interface); 1.130 @@ -2341,7 +2341,7 @@ 1.131 Label* L_success, 1.132 Label* L_failure, 1.133 Label* L_slow_path, 1.134 - RegisterConstant super_check_offset = RegisterConstant(-1), 1.135 + RegisterOrConstant super_check_offset = RegisterOrConstant(-1), 1.136 Register instanceof_hack = noreg); 1.137 1.138 // The rest of the type check; must be wired to a corresponding fast path. 1.139 @@ -2381,7 +2381,7 @@ 1.140 // stack overflow + shadow pages. Clobbers tsp and scratch registers. 1.141 void bang_stack_size(Register Rsize, Register Rtsp, Register Rscratch); 1.142 1.143 - virtual RegisterConstant delayed_value(intptr_t* delayed_value_addr, Register tmp, int offset); 1.144 + virtual RegisterOrConstant delayed_value_impl(intptr_t* delayed_value_addr, Register tmp, int offset); 1.145 1.146 void verify_tlab(); 1.147