645 void br_null_short ( Register s1, Predict p, Label& L ); 646 void br_notnull_short( Register s1, Predict p, Label& L ); 647 648 // unconditional short branch 649 void ba_short(Label& L); 650 651 inline void bp( Condition c, bool a, CC cc, Predict p, address d, relocInfo::relocType rt = relocInfo::none ); 652 inline void bp( Condition c, bool a, CC cc, Predict p, Label& L ); 653 654 // Branch that tests xcc in LP64 and icc in !LP64 655 inline void brx( Condition c, bool a, Predict p, address d, relocInfo::relocType rt = relocInfo::none ); 656 inline void brx( Condition c, bool a, Predict p, Label& L ); 657 658 // unconditional branch 659 inline void ba( Label& L ); 660 661 // Branch that tests fp condition codes 662 inline void fbp( Condition c, bool a, CC cc, Predict p, address d, relocInfo::relocType rt = relocInfo::none ); 663 inline void fbp( Condition c, bool a, CC cc, Predict p, Label& L ); 664 665 // get PC the best way 666 inline int get_pc( Register d ); 667 668 // Sparc shorthands(pp 85, V8 manual, pp 289 V9 manual) 669 inline void cmp( Register s1, Register s2 ); 670 inline void cmp( Register s1, int simm13a ); 671 672 inline void jmp( Register s1, Register s2 ); 673 inline void jmp( Register s1, int simm13a, RelocationHolder const& rspec = RelocationHolder() ); 674 675 // Check if the call target is out of wdisp30 range (relative to the code cache) 676 static inline bool is_far_target(address d); 677 inline void call( address d, relocInfo::relocType rt = relocInfo::runtime_call_type ); 678 inline void call( address d, RelocationHolder const& rspec); 679 680 inline void call( Label& L, relocInfo::relocType rt = relocInfo::runtime_call_type ); 681 inline void call( Label& L, RelocationHolder const& rspec); 682 683 inline void callr( Register s1, Register s2 ); 684 inline void callr( Register s1, int simm13a, RelocationHolder const& rspec = RelocationHolder() ); 685 686 // Emits nothing on V8 687 inline void iprefetch( address d, relocInfo::relocType rt = relocInfo::none ); 1379 void array_equals(bool is_array_equ, Register ary1, Register ary2, 1380 Register limit, Register tmp, Register result, bool is_byte); 1381 // test for negative bytes in input string of a given size, result 0 if none 1382 void has_negatives(Register inp, Register size, Register result, 1383 Register t2, Register t3, Register t4, 1384 Register t5); 1385 1386 #endif 1387 1388 // Use BIS for zeroing 1389 void bis_zeroing(Register to, Register count, Register temp, Label& Ldone); 1390 1391 // Update CRC-32[C] with a byte value according to constants in table 1392 void update_byte_crc32(Register crc, Register val, Register table); 1393 1394 // Reverse byte order of lower 32 bits, assuming upper 32 bits all zeros 1395 void reverse_bytes_32(Register src, Register dst, Register tmp); 1396 void movitof_revbytes(Register src, FloatRegister dst, Register tmp1, Register tmp2); 1397 void movftoi_revbytes(FloatRegister src, Register dst, Register tmp1, Register tmp2); 1398 1399 // CRC32 code for java.util.zip.CRC32::updateBytes0() instrinsic. 1400 void kernel_crc32(Register crc, Register buf, Register len, Register table); 1401 // Fold 128-bit data chunk 1402 void fold_128bit_crc32(Register xcrc_hi, Register xcrc_lo, Register xK_hi, Register xK_lo, Register xtmp_hi, Register xtmp_lo, Register buf, int offset); 1403 void fold_128bit_crc32(Register xcrc_hi, Register xcrc_lo, Register xK_hi, Register xK_lo, Register xtmp_hi, Register xtmp_lo, Register xbuf_hi, Register xbuf_lo); 1404 // Fold 8-bit data 1405 void fold_8bit_crc32(Register xcrc, Register table, Register xtmp, Register tmp); 1406 void fold_8bit_crc32(Register crc, Register table, Register tmp); 1407 // CRC32C code for java.util.zip.CRC32C::updateBytes/updateDirectByteBuffer instrinsic. 1408 void kernel_crc32c(Register crc, Register buf, Register len, Register table); 1409 1410 }; 1411 1412 /** 1413 * class SkipIfEqual: 1414 * 1415 * Instantiating this class will result in assembly code being output that will 1416 * jump around any code emitted between the creation of the instance and it's 1417 * automatic destruction at the end of a scope block, depending on the value of 1418 * the flag passed to the constructor, which will be checked at run-time. 1419 */ 1420 class SkipIfEqual : public StackObj { 1421 private: 1422 MacroAssembler* _masm; 1423 Label _label; 1424 1425 public: 1426 // 'temp' is a temp register that this object can use (and trash) 1427 SkipIfEqual(MacroAssembler*, Register temp, | 645 void br_null_short ( Register s1, Predict p, Label& L ); 646 void br_notnull_short( Register s1, Predict p, Label& L ); 647 648 // unconditional short branch 649 void ba_short(Label& L); 650 651 inline void bp( Condition c, bool a, CC cc, Predict p, address d, relocInfo::relocType rt = relocInfo::none ); 652 inline void bp( Condition c, bool a, CC cc, Predict p, Label& L ); 653 654 // Branch that tests xcc in LP64 and icc in !LP64 655 inline void brx( Condition c, bool a, Predict p, address d, relocInfo::relocType rt = relocInfo::none ); 656 inline void brx( Condition c, bool a, Predict p, Label& L ); 657 658 // unconditional branch 659 inline void ba( Label& L ); 660 661 // Branch that tests fp condition codes 662 inline void fbp( Condition c, bool a, CC cc, Predict p, address d, relocInfo::relocType rt = relocInfo::none ); 663 inline void fbp( Condition c, bool a, CC cc, Predict p, Label& L ); 664 665 // Sparc shorthands(pp 85, V8 manual, pp 289 V9 manual) 666 inline void cmp( Register s1, Register s2 ); 667 inline void cmp( Register s1, int simm13a ); 668 669 inline void jmp( Register s1, Register s2 ); 670 inline void jmp( Register s1, int simm13a, RelocationHolder const& rspec = RelocationHolder() ); 671 672 // Check if the call target is out of wdisp30 range (relative to the code cache) 673 static inline bool is_far_target(address d); 674 inline void call( address d, relocInfo::relocType rt = relocInfo::runtime_call_type ); 675 inline void call( address d, RelocationHolder const& rspec); 676 677 inline void call( Label& L, relocInfo::relocType rt = relocInfo::runtime_call_type ); 678 inline void call( Label& L, RelocationHolder const& rspec); 679 680 inline void callr( Register s1, Register s2 ); 681 inline void callr( Register s1, int simm13a, RelocationHolder const& rspec = RelocationHolder() ); 682 683 // Emits nothing on V8 684 inline void iprefetch( address d, relocInfo::relocType rt = relocInfo::none ); 1376 void array_equals(bool is_array_equ, Register ary1, Register ary2, 1377 Register limit, Register tmp, Register result, bool is_byte); 1378 // test for negative bytes in input string of a given size, result 0 if none 1379 void has_negatives(Register inp, Register size, Register result, 1380 Register t2, Register t3, Register t4, 1381 Register t5); 1382 1383 #endif 1384 1385 // Use BIS for zeroing 1386 void bis_zeroing(Register to, Register count, Register temp, Label& Ldone); 1387 1388 // Update CRC-32[C] with a byte value according to constants in table 1389 void update_byte_crc32(Register crc, Register val, Register table); 1390 1391 // Reverse byte order of lower 32 bits, assuming upper 32 bits all zeros 1392 void reverse_bytes_32(Register src, Register dst, Register tmp); 1393 void movitof_revbytes(Register src, FloatRegister dst, Register tmp1, Register tmp2); 1394 void movftoi_revbytes(FloatRegister src, Register dst, Register tmp1, Register tmp2); 1395 1396 // CRC32 code for java.util.zip.CRC32::updateBytes0() intrinsic. 1397 void kernel_crc32(Register crc, Register buf, Register len, Register table); 1398 // Fold 128-bit data chunk 1399 void fold_128bit_crc32(Register xcrc_hi, Register xcrc_lo, Register xK_hi, Register xK_lo, Register xtmp_hi, Register xtmp_lo, Register buf, int offset); 1400 void fold_128bit_crc32(Register xcrc_hi, Register xcrc_lo, Register xK_hi, Register xK_lo, Register xtmp_hi, Register xtmp_lo, Register xbuf_hi, Register xbuf_lo); 1401 // Fold 8-bit data 1402 void fold_8bit_crc32(Register xcrc, Register table, Register xtmp, Register tmp); 1403 void fold_8bit_crc32(Register crc, Register table, Register tmp); 1404 // CRC32C code for java.util.zip.CRC32C::updateBytes/updateDirectByteBuffer intrinsic. 1405 void kernel_crc32c(Register crc, Register buf, Register len, Register table); 1406 1407 }; 1408 1409 /** 1410 * class SkipIfEqual: 1411 * 1412 * Instantiating this class will result in assembly code being output that will 1413 * jump around any code emitted between the creation of the instance and it's 1414 * automatic destruction at the end of a scope block, depending on the value of 1415 * the flag passed to the constructor, which will be checked at run-time. 1416 */ 1417 class SkipIfEqual : public StackObj { 1418 private: 1419 MacroAssembler* _masm; 1420 Label _label; 1421 1422 public: 1423 // 'temp' is a temp register that this object can use (and trash) 1424 SkipIfEqual(MacroAssembler*, Register temp, |