< prev index next >

src/hotspot/cpu/ppc/macroAssembler_ppc.hpp

Print this page
rev 56646 : 8231757: [ppc] Fix VerifyOops. Errors show since 8231058.
Summary: Also make the checks print the wrong value and where a failure occurred.


 897   void asm_assert(bool check_equal, const char* msg, int id);
 898   void asm_assert_eq(const char* msg, int id) { asm_assert(true, msg, id); }
 899   void asm_assert_ne(const char* msg, int id) { asm_assert(false, msg, id); }
 900 
 901  private:
 902   void asm_assert_mems_zero(bool check_equal, int size, int mem_offset, Register mem_base,
 903                             const char* msg, int id);
 904 
 905  public:
 906 
 907   void asm_assert_mem8_is_zero(int mem_offset, Register mem_base, const char* msg, int id) {
 908     asm_assert_mems_zero(true,  8, mem_offset, mem_base, msg, id);
 909   }
 910   void asm_assert_mem8_isnot_zero(int mem_offset, Register mem_base, const char* msg, int id) {
 911     asm_assert_mems_zero(false, 8, mem_offset, mem_base, msg, id);
 912   }
 913 
 914   // Verify R16_thread contents.
 915   void verify_thread();
 916 



 917   // Emit code to verify that reg contains a valid oop if +VerifyOops is set.
 918   void verify_oop(Register reg, const char* s = "broken oop");
 919   void verify_oop_addr(RegisterOrConstant offs, Register base, const char* s = "contains broken oop");
 920 
 921   // TODO: verify method and klass metadata (compare against vptr?)
 922   void _verify_method_ptr(Register reg, const char * msg, const char * file, int line) {}
 923   void _verify_klass_ptr(Register reg, const char * msg, const char * file, int line) {}
 924 
 925   // Convenience method returning function entry. For the ELFv1 case
 926   // creates function descriptor at the current address and returs
 927   // the pointer to it. For the ELFv2 case returns the current address.
 928   inline address function_entry();
 929 
 930 #define verify_method_ptr(reg) _verify_method_ptr(reg, "broken method " #reg, __FILE__, __LINE__)
 931 #define verify_klass_ptr(reg) _verify_klass_ptr(reg, "broken klass " #reg, __FILE__, __LINE__)
 932 
 933  private:
 934 
 935   enum {
 936     stop_stop                = 0,




 897   void asm_assert(bool check_equal, const char* msg, int id);
 898   void asm_assert_eq(const char* msg, int id) { asm_assert(true, msg, id); }
 899   void asm_assert_ne(const char* msg, int id) { asm_assert(false, msg, id); }
 900 
 901  private:
 902   void asm_assert_mems_zero(bool check_equal, int size, int mem_offset, Register mem_base,
 903                             const char* msg, int id);
 904 
 905  public:
 906 
 907   void asm_assert_mem8_is_zero(int mem_offset, Register mem_base, const char* msg, int id) {
 908     asm_assert_mems_zero(true,  8, mem_offset, mem_base, msg, id);
 909   }
 910   void asm_assert_mem8_isnot_zero(int mem_offset, Register mem_base, const char* msg, int id) {
 911     asm_assert_mems_zero(false, 8, mem_offset, mem_base, msg, id);
 912   }
 913 
 914   // Verify R16_thread contents.
 915   void verify_thread();
 916 
 917   // Calls verify_oop. If UseCompressedOops is on, decodes the oop.
 918   // Preserves reg.
 919   void verify_coop(Register reg, const char*);
 920   // Emit code to verify that reg contains a valid oop if +VerifyOops is set.
 921   void verify_oop(Register reg, const char* s = "broken oop");
 922   void verify_oop_addr(RegisterOrConstant offs, Register base, const char* s = "contains broken oop");
 923 
 924   // TODO: verify method and klass metadata (compare against vptr?)
 925   void _verify_method_ptr(Register reg, const char * msg, const char * file, int line) {}
 926   void _verify_klass_ptr(Register reg, const char * msg, const char * file, int line) {}
 927 
 928   // Convenience method returning function entry. For the ELFv1 case
 929   // creates function descriptor at the current address and returs
 930   // the pointer to it. For the ELFv2 case returns the current address.
 931   inline address function_entry();
 932 
 933 #define verify_method_ptr(reg) _verify_method_ptr(reg, "broken method " #reg, __FILE__, __LINE__)
 934 #define verify_klass_ptr(reg) _verify_klass_ptr(reg, "broken klass " #reg, __FILE__, __LINE__)
 935 
 936  private:
 937 
 938   enum {
 939     stop_stop                = 0,


< prev index next >