equal
deleted
inserted
replaced
89 JVMCI_ERROR_NULL("unaligned subregister offset %d in oop map", offset); |
89 JVMCI_ERROR_NULL("unaligned subregister offset %d in oop map", offset); |
90 } |
90 } |
91 } else { |
91 } else { |
92 // stack slot |
92 // stack slot |
93 if (offset % 4 == 0) { |
93 if (offset % 4 == 0) { |
94 return VMRegImpl::stack2reg(offset / 4); |
94 VMReg vmReg = VMRegImpl::stack2reg(offset / 4); |
|
95 if (!OopMapValue::legal_vm_reg_name(vmReg)) { |
|
96 // This restriction only applies to VMRegs that are used in OopMap but |
|
97 // since that's the only use of VMRegs it's simplest to put this test |
|
98 // here. This test should also be equivalent legal_vm_reg_name but JVMCI |
|
99 // clients can use max_oop_map_stack_stack_offset to detect this problem |
|
100 // directly. The asserts just ensure that the tests are in agreement. |
|
101 assert(offset > CompilerToVM::Data::max_oop_map_stack_offset(), "illegal VMReg"); |
|
102 JVMCI_ERROR_NULL("stack offset %d is too large to be encoded in OopMap (max %d)", |
|
103 offset, CompilerToVM::Data::max_oop_map_stack_offset()); |
|
104 } |
|
105 assert(OopMapValue::legal_vm_reg_name(vmReg), "illegal VMReg"); |
|
106 return vmReg; |
95 } else { |
107 } else { |
96 JVMCI_ERROR_NULL("unaligned stack offset %d in oop map", offset); |
108 JVMCI_ERROR_NULL("unaligned stack offset %d in oop map", offset); |
97 } |
109 } |
98 } |
110 } |
99 } |
111 } |