< prev index next >

src/hotspot/cpu/riscv/macroAssembler_riscv.hpp

Print this page

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

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