|
34 | 34 | #include "runtime/jniHandles.hpp" |
35 | 35 | #include "runtime/sharedRuntime.hpp" |
36 | 36 | #include "vmreg_aarch64.inline.hpp" |
| 37 | +#if INCLUDE_ZGC |
| 38 | +#include "gc/z/zBarrierSetAssembler.hpp" |
| 39 | +#endif |
37 | 40 |
|
38 | 41 | jint CodeInstaller::pd_next_offset(NativeInstruction* inst, jint pc_offset, JVMCI_TRAPS) { |
39 | 42 | if (inst->is_call() || inst->is_jump() || inst->is_blr()) { |
@@ -164,24 +167,35 @@ void CodeInstaller::pd_relocate_JavaMethod(CodeBuffer &cbuf, methodHandle& metho |
164 | 167 | } |
165 | 168 | } |
166 | 169 |
|
167 | | -void CodeInstaller::pd_relocate_poll(address pc, jint mark, JVMCI_TRAPS) { |
| 170 | +bool CodeInstaller::pd_relocate(address pc, jint mark) { |
168 | 171 | switch (mark) { |
169 | 172 | case POLL_NEAR: |
170 | | - JVMCI_ERROR("unimplemented"); |
171 | | - break; |
| 173 | + // This is unhandled and will be reported by the caller |
| 174 | + return false; |
172 | 175 | case POLL_FAR: |
173 | 176 | _instructions->relocate(pc, relocInfo::poll_type); |
174 | | - break; |
| 177 | + return true; |
175 | 178 | case POLL_RETURN_NEAR: |
176 | | - JVMCI_ERROR("unimplemented"); |
177 | | - break; |
| 179 | + // This is unhandled and will be reported by the caller |
| 180 | + return false; |
178 | 181 | case POLL_RETURN_FAR: |
179 | 182 | _instructions->relocate(pc, relocInfo::poll_return_type); |
180 | | - break; |
181 | | - default: |
182 | | - JVMCI_ERROR("invalid mark value"); |
183 | | - break; |
| 183 | + return true; |
| 184 | + case Z_BARRIER_RELOCATION_FORMAT_LOAD_GOOD_BEFORE_TB_X: |
| 185 | + _instructions->relocate(pc, barrier_Relocation::spec(), ZBarrierRelocationFormatLoadGoodBeforeTbX); |
| 186 | + return true; |
| 187 | + case Z_BARRIER_RELOCATION_FORMAT_MARK_BAD_BEFORE_MOV: |
| 188 | + _instructions->relocate(pc, barrier_Relocation::spec(), ZBarrierRelocationFormatMarkBadBeforeMov); |
| 189 | + return true; |
| 190 | + case Z_BARRIER_RELOCATION_FORMAT_STORE_GOOD_BEFORE_MOV: |
| 191 | + _instructions->relocate(pc, barrier_Relocation::spec(), ZBarrierRelocationFormatStoreGoodBeforeMov); |
| 192 | + return true; |
| 193 | + case Z_BARRIER_RELOCATION_FORMAT_STORE_BAD_BEFORE_MOV: |
| 194 | + _instructions->relocate(pc, barrier_Relocation::spec(), ZBarrierRelocationFormatStoreBadBeforeMov); |
| 195 | + return true; |
| 196 | + |
184 | 197 | } |
| 198 | + return false; |
185 | 199 | } |
186 | 200 |
|
187 | 201 | // convert JVMCI register indices (as used in oop maps) to HotSpot registers |
|
0 commit comments