mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8149689: [JVMCI] CodeInstaller::pd_patch_DataSectionReference should be able to throw exceptions
Reviewed-by: kvn
This commit is contained in:
parent
272bd6a401
commit
477e23c17f
6 changed files with 10 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -71,7 +71,7 @@ void CodeInstaller::pd_patch_MetaspaceConstant(int pc_offset, Handle constant, T
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, int data_offset) {
|
void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, int data_offset, TRAPS) {
|
||||||
address pc = _instructions->start() + pc_offset;
|
address pc = _instructions->start() + pc_offset;
|
||||||
NativeInstruction* inst = nativeInstruction_at(pc);
|
NativeInstruction* inst = nativeInstruction_at(pc);
|
||||||
if (inst->is_adr_aligned()) {
|
if (inst->is_adr_aligned()) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -42,7 +42,7 @@ void CodeInstaller::pd_patch_MetaspaceConstant(int pc_offset, Handle constant, T
|
||||||
Unimplemented();
|
Unimplemented();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, int data_offset) {
|
void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, int data_offset, TRAPS) {
|
||||||
Unimplemented();
|
Unimplemented();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -85,7 +85,7 @@ void CodeInstaller::pd_patch_MetaspaceConstant(int pc_offset, Handle constant, T
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, int data_offset) {
|
void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, int data_offset, TRAPS) {
|
||||||
address pc = _instructions->start() + pc_offset;
|
address pc = _instructions->start() + pc_offset;
|
||||||
NativeInstruction* inst = nativeInstruction_at(pc);
|
NativeInstruction* inst = nativeInstruction_at(pc);
|
||||||
NativeInstruction* inst1 = nativeInstruction_at(pc + 4);
|
NativeInstruction* inst1 = nativeInstruction_at(pc + 4);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -101,7 +101,7 @@ void CodeInstaller::pd_patch_MetaspaceConstant(int pc_offset, Handle constant, T
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, int data_offset) {
|
void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, int data_offset, TRAPS) {
|
||||||
address pc = _instructions->start() + pc_offset;
|
address pc = _instructions->start() + pc_offset;
|
||||||
|
|
||||||
address operand = Assembler::locate_operand(pc, Assembler::disp32_operand);
|
address operand = Assembler::locate_operand(pc, Assembler::disp32_operand);
|
||||||
|
|
|
@ -1091,7 +1091,7 @@ void CodeInstaller::site_DataPatch(CodeBuffer& buffer, jint pc_offset, Handle si
|
||||||
} else if (reference->is_a(site_DataSectionReference::klass())) {
|
} else if (reference->is_a(site_DataSectionReference::klass())) {
|
||||||
int data_offset = site_DataSectionReference::offset(reference);
|
int data_offset = site_DataSectionReference::offset(reference);
|
||||||
if (0 <= data_offset && data_offset < _constants_size) {
|
if (0 <= data_offset && data_offset < _constants_size) {
|
||||||
pd_patch_DataSectionReference(pc_offset, data_offset);
|
pd_patch_DataSectionReference(pc_offset, data_offset, CHECK);
|
||||||
} else {
|
} else {
|
||||||
JVMCI_ERROR("data offset 0x%X points outside data section (size 0x%X)", data_offset, _constants_size);
|
JVMCI_ERROR("data offset 0x%X points outside data section (size 0x%X)", data_offset, _constants_size);
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,7 +156,7 @@ private:
|
||||||
jint pd_next_offset(NativeInstruction* inst, jint pc_offset, Handle method, TRAPS);
|
jint pd_next_offset(NativeInstruction* inst, jint pc_offset, Handle method, TRAPS);
|
||||||
void pd_patch_OopConstant(int pc_offset, Handle constant, TRAPS);
|
void pd_patch_OopConstant(int pc_offset, Handle constant, TRAPS);
|
||||||
void pd_patch_MetaspaceConstant(int pc_offset, Handle constant, TRAPS);
|
void pd_patch_MetaspaceConstant(int pc_offset, Handle constant, TRAPS);
|
||||||
void pd_patch_DataSectionReference(int pc_offset, int data_offset);
|
void pd_patch_DataSectionReference(int pc_offset, int data_offset, TRAPS);
|
||||||
void pd_relocate_ForeignCall(NativeInstruction* inst, jlong foreign_call_destination, TRAPS);
|
void pd_relocate_ForeignCall(NativeInstruction* inst, jlong foreign_call_destination, TRAPS);
|
||||||
void pd_relocate_JavaMethod(Handle method, jint pc_offset, TRAPS);
|
void pd_relocate_JavaMethod(Handle method, jint pc_offset, TRAPS);
|
||||||
void pd_relocate_poll(address pc, jint mark, TRAPS);
|
void pd_relocate_poll(address pc, jint mark, TRAPS);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue