1435 void ld_constant(Register dest, const Address &const_addr) {
1436 if (NearCpool) {
1437 ld(dest, const_addr);
1438 } else {
1439 InternalAddress target(const_addr.target());
1440 relocate(target.rspec(), [&] {
1441 int32_t offset;
1442 la_patchable(dest, target, offset);
1443 ld(dest, Address(dest, offset));
1444 });
1445 }
1446 }
1447
1448 int bitset_to_regs(unsigned int bitset, unsigned char* regs);
1449 Address add_memory_helper(const Address dst, Register tmp);
1450
1451 void load_reserved(Register addr, enum operand_size size, Assembler::Aqrl acquire);
1452 void store_conditional(Register addr, Register new_val, enum operand_size size, Assembler::Aqrl release);
1453
1454 public:
1455 void lightweight_lock(Register obj, Register hdr, Register tmp1, Register tmp2, Label& slow);
1456 void lightweight_unlock(Register obj, Register hdr, Register tmp1, Register tmp2, Label& slow);
1457 };
1458
1459 #ifdef ASSERT
1460 inline bool AbstractAssembler::pd_check_instruction_mark() { return false; }
1461 #endif
1462
1463 /**
1464 * class SkipIfEqual:
1465 *
1466 * Instantiating this class will result in assembly code being output that will
1467 * jump around any code emitted between the creation of the instance and it's
1468 * automatic destruction at the end of a scope block, depending on the value of
1469 * the flag passed to the constructor, which will be checked at run-time.
1470 */
1471 class SkipIfEqual {
1472 private:
1473 MacroAssembler* _masm;
1474 Label _label;
1475
1476 public:
|
1435 void ld_constant(Register dest, const Address &const_addr) {
1436 if (NearCpool) {
1437 ld(dest, const_addr);
1438 } else {
1439 InternalAddress target(const_addr.target());
1440 relocate(target.rspec(), [&] {
1441 int32_t offset;
1442 la_patchable(dest, target, offset);
1443 ld(dest, Address(dest, offset));
1444 });
1445 }
1446 }
1447
1448 int bitset_to_regs(unsigned int bitset, unsigned char* regs);
1449 Address add_memory_helper(const Address dst, Register tmp);
1450
1451 void load_reserved(Register addr, enum operand_size size, Assembler::Aqrl acquire);
1452 void store_conditional(Register addr, Register new_val, enum operand_size size, Assembler::Aqrl release);
1453
1454 public:
1455 void lightweight_lock(Register obj, Register tmp1, Register tmp2, Register tmp3, Label& slow);
1456 void lightweight_unlock(Register obj, Register tmp1, Register tmp2, Register tmp3, Label& slow);
1457 };
1458
1459 #ifdef ASSERT
1460 inline bool AbstractAssembler::pd_check_instruction_mark() { return false; }
1461 #endif
1462
1463 /**
1464 * class SkipIfEqual:
1465 *
1466 * Instantiating this class will result in assembly code being output that will
1467 * jump around any code emitted between the creation of the instance and it's
1468 * automatic destruction at the end of a scope block, depending on the value of
1469 * the flag passed to the constructor, which will be checked at run-time.
1470 */
1471 class SkipIfEqual {
1472 private:
1473 MacroAssembler* _masm;
1474 Label _label;
1475
1476 public:
|