< prev index next >

src/cpu/aarch64/vm/macroAssembler_aarch64.hpp

Print this page
rev 9032 : 8139041: Redundant DMB instructions
Summary: merge consecutive DMB intstructions
Reviewd-by: kvn


 135     code_section()->relocate(inst_mark(), a.rspec());
 136     a.lea(this, r);
 137   }
 138 
 139   void addmw(Address a, Register incr, Register scratch) {
 140     ldrw(scratch, a);
 141     addw(scratch, scratch, incr);
 142     strw(scratch, a);
 143   }
 144 
 145   // Add constant to memory word
 146   void addmw(Address a, int imm, Register scratch) {
 147     ldrw(scratch, a);
 148     if (imm > 0)
 149       addw(scratch, scratch, (unsigned)imm);
 150     else
 151       subw(scratch, scratch, (unsigned)-imm);
 152     strw(scratch, a);
 153   }
 154 







 155   // Frame creation and destruction shared between JITs.
 156   void build_frame(int framesize);
 157   void remove_frame(int framesize);
 158 
 159   virtual void _call_Unimplemented(address call_site) {
 160     mov(rscratch2, call_site);
 161     haltsim();
 162   }
 163 
 164 #define call_Unimplemented() _call_Unimplemented((address)__PRETTY_FUNCTION__)
 165 
 166   virtual void notify(int type);
 167 
 168   // aliases defined in AARCH64 spec
 169 
 170   template<class T>
 171   inline void cmpw(Register Rd, T imm)  { subsw(zr, Rd, imm); }
 172   inline void cmp(Register Rd, unsigned imm)  { subs(zr, Rd, imm); }
 173 
 174   inline void cmnw(Register Rd, unsigned imm) { addsw(zr, Rd, imm); }




 135     code_section()->relocate(inst_mark(), a.rspec());
 136     a.lea(this, r);
 137   }
 138 
 139   void addmw(Address a, Register incr, Register scratch) {
 140     ldrw(scratch, a);
 141     addw(scratch, scratch, incr);
 142     strw(scratch, a);
 143   }
 144 
 145   // Add constant to memory word
 146   void addmw(Address a, int imm, Register scratch) {
 147     ldrw(scratch, a);
 148     if (imm > 0)
 149       addw(scratch, scratch, (unsigned)imm);
 150     else
 151       subw(scratch, scratch, (unsigned)-imm);
 152     strw(scratch, a);
 153   }
 154 
 155   void bind(Label& L) {
 156     Assembler::bind(L);
 157     code()->clear_last_membar();
 158   }
 159 
 160   void membar(Membar_mask_bits order_constraint);
 161 
 162   // Frame creation and destruction shared between JITs.
 163   void build_frame(int framesize);
 164   void remove_frame(int framesize);
 165 
 166   virtual void _call_Unimplemented(address call_site) {
 167     mov(rscratch2, call_site);
 168     haltsim();
 169   }
 170 
 171 #define call_Unimplemented() _call_Unimplemented((address)__PRETTY_FUNCTION__)
 172 
 173   virtual void notify(int type);
 174 
 175   // aliases defined in AARCH64 spec
 176 
 177   template<class T>
 178   inline void cmpw(Register Rd, T imm)  { subsw(zr, Rd, imm); }
 179   inline void cmp(Register Rd, unsigned imm)  { subs(zr, Rd, imm); }
 180 
 181   inline void cmnw(Register Rd, unsigned imm) { addsw(zr, Rd, imm); }


< prev index next >