< prev index next >

src/cpu/x86/vm/macroAssembler_x86.hpp

Print this page




 566   // Simplified, combined version, good for typical uses.
 567   // Falls through on failure.
 568   void check_klass_subtype(Register sub_klass,
 569                            Register super_klass,
 570                            Register temp_reg,
 571                            Label& L_success);
 572 
 573   // method handles (JSR 292)
 574   Address argument_address(RegisterOrConstant arg_slot, int extra_slot_offset = 0);
 575 
 576   //----
 577   void set_word_if_not_zero(Register reg); // sets reg to 1 if not zero, otherwise 0
 578 
 579   // Debugging
 580 
 581   // only if +VerifyOops
 582   // TODO: Make these macros with file and line like sparc version!
 583   void verify_oop(Register reg, const char* s = "broken oop");
 584   void verify_oop_addr(Address addr, const char * s = "broken oop addr");
 585 




 586   // TODO: verify method and klass metadata (compare against vptr?)
 587   void _verify_method_ptr(Register reg, const char * msg, const char * file, int line) {}
 588   void _verify_klass_ptr(Register reg, const char * msg, const char * file, int line){}
 589 
 590 #define verify_method_ptr(reg) _verify_method_ptr(reg, "broken method " #reg, __FILE__, __LINE__)
 591 #define verify_klass_ptr(reg) _verify_klass_ptr(reg, "broken klass " #reg, __FILE__, __LINE__)
 592 
 593   // only if +VerifyFPU
 594   void verify_FPU(int stack_depth, const char* s = "illegal FPU state");
 595 
 596   // Verify or restore cpu control state after JNI call
 597   void restore_cpu_control_state_after_jni();
 598 
 599   // prints msg, dumps registers and stops execution
 600   void stop(const char* msg);
 601 
 602   // prints msg and continues
 603   void warn(const char* msg);
 604 
 605   // dumps registers and other state


1261   void mul_add_128_x_32_loop(Register out, Register in, Register offset, Register len, Register tmp1,
1262                Register tmp2, Register tmp3, Register tmp4, Register tmp5, Register rdxReg,
1263                Register raxReg);
1264   void mul_add(Register out, Register in, Register offset, Register len, Register k, Register tmp1,
1265                Register tmp2, Register tmp3, Register tmp4, Register tmp5, Register rdxReg,
1266                Register raxReg);
1267 #endif
1268 
1269   // CRC32 code for java.util.zip.CRC32::updateBytes() instrinsic.
1270   void update_byte_crc32(Register crc, Register val, Register table);
1271   void kernel_crc32(Register crc, Register buf, Register len, Register table, Register tmp);
1272   // Fold 128-bit data chunk
1273   void fold_128bit_crc32(XMMRegister xcrc, XMMRegister xK, XMMRegister xtmp, Register buf, int offset);
1274   void fold_128bit_crc32(XMMRegister xcrc, XMMRegister xK, XMMRegister xtmp, XMMRegister xbuf);
1275   // Fold 8-bit data
1276   void fold_8bit_crc32(Register crc, Register table, Register tmp);
1277   void fold_8bit_crc32(XMMRegister crc, Register table, XMMRegister xtmp, Register tmp);
1278 
1279 #undef VIRTUAL
1280 


1281 };
1282 
1283 /**
1284  * class SkipIfEqual:
1285  *
1286  * Instantiating this class will result in assembly code being output that will
1287  * jump around any code emitted between the creation of the instance and it's
1288  * automatic destruction at the end of a scope block, depending on the value of
1289  * the flag passed to the constructor, which will be checked at run-time.
1290  */
1291 class SkipIfEqual {
1292  private:
1293   MacroAssembler* _masm;
1294   Label _label;
1295 
1296  public:
1297    SkipIfEqual(MacroAssembler*, const bool* flag_addr, bool value);
1298    ~SkipIfEqual();
1299 };
1300 


 566   // Simplified, combined version, good for typical uses.
 567   // Falls through on failure.
 568   void check_klass_subtype(Register sub_klass,
 569                            Register super_klass,
 570                            Register temp_reg,
 571                            Label& L_success);
 572 
 573   // method handles (JSR 292)
 574   Address argument_address(RegisterOrConstant arg_slot, int extra_slot_offset = 0);
 575 
 576   //----
 577   void set_word_if_not_zero(Register reg); // sets reg to 1 if not zero, otherwise 0
 578 
 579   // Debugging
 580 
 581   // only if +VerifyOops
 582   // TODO: Make these macros with file and line like sparc version!
 583   void verify_oop(Register reg, const char* s = "broken oop");
 584   void verify_oop_addr(Address addr, const char * s = "broken oop addr");
 585 
 586 #if INCLUDE_ALL_GCS
 587   void in_heap_check(Register raddr, Register tmp, Label& done);
 588 #endif
 589 
 590   // TODO: verify method and klass metadata (compare against vptr?)
 591   void _verify_method_ptr(Register reg, const char * msg, const char * file, int line) {}
 592   void _verify_klass_ptr(Register reg, const char * msg, const char * file, int line){}
 593 
 594 #define verify_method_ptr(reg) _verify_method_ptr(reg, "broken method " #reg, __FILE__, __LINE__)
 595 #define verify_klass_ptr(reg) _verify_klass_ptr(reg, "broken klass " #reg, __FILE__, __LINE__)
 596 
 597   // only if +VerifyFPU
 598   void verify_FPU(int stack_depth, const char* s = "illegal FPU state");
 599 
 600   // Verify or restore cpu control state after JNI call
 601   void restore_cpu_control_state_after_jni();
 602 
 603   // prints msg, dumps registers and stops execution
 604   void stop(const char* msg);
 605 
 606   // prints msg and continues
 607   void warn(const char* msg);
 608 
 609   // dumps registers and other state


1265   void mul_add_128_x_32_loop(Register out, Register in, Register offset, Register len, Register tmp1,
1266                Register tmp2, Register tmp3, Register tmp4, Register tmp5, Register rdxReg,
1267                Register raxReg);
1268   void mul_add(Register out, Register in, Register offset, Register len, Register k, Register tmp1,
1269                Register tmp2, Register tmp3, Register tmp4, Register tmp5, Register rdxReg,
1270                Register raxReg);
1271 #endif
1272 
1273   // CRC32 code for java.util.zip.CRC32::updateBytes() instrinsic.
1274   void update_byte_crc32(Register crc, Register val, Register table);
1275   void kernel_crc32(Register crc, Register buf, Register len, Register table, Register tmp);
1276   // Fold 128-bit data chunk
1277   void fold_128bit_crc32(XMMRegister xcrc, XMMRegister xK, XMMRegister xtmp, Register buf, int offset);
1278   void fold_128bit_crc32(XMMRegister xcrc, XMMRegister xK, XMMRegister xtmp, XMMRegister xbuf);
1279   // Fold 8-bit data
1280   void fold_8bit_crc32(Register crc, Register table, Register tmp);
1281   void fold_8bit_crc32(XMMRegister crc, Register table, XMMRegister xtmp, Register tmp);
1282 
1283 #undef VIRTUAL
1284 
1285   void save_vector_registers();
1286   void restore_vector_registers();
1287 };
1288 
1289 /**
1290  * class SkipIfEqual:
1291  *
1292  * Instantiating this class will result in assembly code being output that will
1293  * jump around any code emitted between the creation of the instance and it's
1294  * automatic destruction at the end of a scope block, depending on the value of
1295  * the flag passed to the constructor, which will be checked at run-time.
1296  */
1297 class SkipIfEqual {
1298  private:
1299   MacroAssembler* _masm;
1300   Label _label;
1301 
1302  public:
1303    SkipIfEqual(MacroAssembler*, const bool* flag_addr, bool value);
1304    ~SkipIfEqual();
1305 };
1306 
< prev index next >