2189 2190 // to avoid hiding movl 2191 void mov32(AddressLiteral dst, Register src); 2192 void mov32(Register dst, AddressLiteral src); 2193 2194 // to avoid hiding movb 2195 void movbyte(ArrayAddress dst, int src); 2196 2197 // Can push value or effective address 2198 void pushptr(AddressLiteral src); 2199 2200 void pushptr(Address src) { LP64_ONLY(pushq(src)) NOT_LP64(pushl(src)); } 2201 void popptr(Address src) { LP64_ONLY(popq(src)) NOT_LP64(popl(src)); } 2202 2203 void pushoop(jobject obj); 2204 2205 // sign extend as need a l to ptr sized element 2206 void movl2ptr(Register dst, Address src) { LP64_ONLY(movslq(dst, src)) NOT_LP64(movl(dst, src)); } 2207 void movl2ptr(Register dst, Register src) { LP64_ONLY(movslq(dst, src)) NOT_LP64(if (dst != src) movl(dst, src)); } 2208 2209 2210 #undef VIRTUAL 2211 2212 }; 2213 2214 /** 2215 * class SkipIfEqual: 2216 * 2217 * Instantiating this class will result in assembly code being output that will 2218 * jump around any code emitted between the creation of the instance and it's 2219 * automatic destruction at the end of a scope block, depending on the value of 2220 * the flag passed to the constructor, which will be checked at run-time. 2221 */ 2222 class SkipIfEqual { 2223 private: 2224 MacroAssembler* _masm; 2225 Label _label; 2226 2227 public: 2228 SkipIfEqual(MacroAssembler*, const bool* flag_addr, bool value); 2229 ~SkipIfEqual(); | 2189 2190 // to avoid hiding movl 2191 void mov32(AddressLiteral dst, Register src); 2192 void mov32(Register dst, AddressLiteral src); 2193 2194 // to avoid hiding movb 2195 void movbyte(ArrayAddress dst, int src); 2196 2197 // Can push value or effective address 2198 void pushptr(AddressLiteral src); 2199 2200 void pushptr(Address src) { LP64_ONLY(pushq(src)) NOT_LP64(pushl(src)); } 2201 void popptr(Address src) { LP64_ONLY(popq(src)) NOT_LP64(popl(src)); } 2202 2203 void pushoop(jobject obj); 2204 2205 // sign extend as need a l to ptr sized element 2206 void movl2ptr(Register dst, Address src) { LP64_ONLY(movslq(dst, src)) NOT_LP64(movl(dst, src)); } 2207 void movl2ptr(Register dst, Register src) { LP64_ONLY(movslq(dst, src)) NOT_LP64(if (dst != src) movl(dst, src)); } 2208 2209 // IndexOf strings. 2210 void string_indexof(Register str1, Register str2, 2211 Register cnt1, Register cnt2, Register result, 2212 XMMRegister vec, Register tmp); 2213 2214 // Compare strings. 2215 void string_compare(Register str1, Register str2, 2216 Register cnt1, Register cnt2, Register result, 2217 XMMRegister vec1, XMMRegister vec2); 2218 2219 // Compare char[] arrays. 2220 void char_arrays_equals(bool is_array_equ, Register ary1, Register ary2, 2221 Register limit, Register result, Register chr, 2222 XMMRegister vec1, XMMRegister vec2); 2223 2224 #undef VIRTUAL 2225 2226 }; 2227 2228 /** 2229 * class SkipIfEqual: 2230 * 2231 * Instantiating this class will result in assembly code being output that will 2232 * jump around any code emitted between the creation of the instance and it's 2233 * automatic destruction at the end of a scope block, depending on the value of 2234 * the flag passed to the constructor, which will be checked at run-time. 2235 */ 2236 class SkipIfEqual { 2237 private: 2238 MacroAssembler* _masm; 2239 Label _label; 2240 2241 public: 2242 SkipIfEqual(MacroAssembler*, const bool* flag_addr, bool value); 2243 ~SkipIfEqual(); |