mirror of
https://github.com/openjdk/jdk.git
synced 2026-07-29 12:23:39 +00:00
8022574: remove HaltNode code after uncommon trap calls
Reviewed-by: thartmann, mdoerr, simonis
This commit is contained in:
parent
cc47d0aa61
commit
52e1bec7bc
@ -15285,9 +15285,9 @@ instruct ShouldNotReachHere() %{
|
||||
format %{ "ShouldNotReachHere" %}
|
||||
|
||||
ins_encode %{
|
||||
// +1 so NativeInstruction::is_sigill_zombie_not_entrant() doesn't
|
||||
// return true
|
||||
__ dpcs1(0xdead + 1);
|
||||
if (is_reachable()) {
|
||||
__ dpcs1(0xdead + 1);
|
||||
}
|
||||
%}
|
||||
|
||||
ins_pipe(pipe_class_default);
|
||||
|
||||
@ -8959,11 +8959,12 @@ instruct ShouldNotReachHere( )
|
||||
match(Halt);
|
||||
ins_cost(CALL_COST);
|
||||
|
||||
size(4);
|
||||
// Use the following format syntax
|
||||
format %{ "ShouldNotReachHere" %}
|
||||
ins_encode %{
|
||||
__ udf(0xdead);
|
||||
if (is_reachable()) {
|
||||
__ udf(0xdead);
|
||||
}
|
||||
%}
|
||||
ins_pipe(tail_call);
|
||||
%}
|
||||
|
||||
@ -15136,10 +15136,11 @@ instruct ShouldNotReachHere() %{
|
||||
ins_cost(CALL_COST);
|
||||
|
||||
format %{ "ShouldNotReachHere" %}
|
||||
size(4);
|
||||
ins_encode %{
|
||||
// TODO: PPC port $archOpcode(ppc64Opcode_tdi);
|
||||
__ trap_should_not_reach_here();
|
||||
if (is_reachable()) {
|
||||
// TODO: PPC port $archOpcode(ppc64Opcode_tdi);
|
||||
__ trap_should_not_reach_here();
|
||||
}
|
||||
%}
|
||||
ins_pipe(pipe_class_default);
|
||||
%}
|
||||
|
||||
@ -9886,9 +9886,12 @@ instruct RethrowException() %{
|
||||
instruct ShouldNotReachHere() %{
|
||||
match(Halt);
|
||||
ins_cost(CALL_COST);
|
||||
size(2);
|
||||
format %{ "ILLTRAP; ShouldNotReachHere" %}
|
||||
ins_encode %{ __ z_illtrap(); %}
|
||||
ins_encode %{
|
||||
if (is_reachable()) {
|
||||
__ z_illtrap();
|
||||
}
|
||||
%}
|
||||
ins_pipe(pipe_class_dummy);
|
||||
%}
|
||||
|
||||
|
||||
@ -2341,9 +2341,11 @@ operand cmpOp_vcmppd() %{
|
||||
|
||||
instruct ShouldNotReachHere() %{
|
||||
match(Halt);
|
||||
format %{ "ud2\t# ShouldNotReachHere" %}
|
||||
format %{ "stop\t# ShouldNotReachHere" %}
|
||||
ins_encode %{
|
||||
__ stop(_halt_reason);
|
||||
if (is_reachable()) {
|
||||
__ stop(_halt_reason);
|
||||
}
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
@ -3941,6 +3941,7 @@ void ArchDesc::buildMachNode(FILE *fp_cpp, InstructForm *inst, const char *inden
|
||||
}
|
||||
if (inst->is_ideal_halt()) {
|
||||
fprintf(fp_cpp, "%s node->_halt_reason = _leaf->as_Halt()->_halt_reason;\n", indent);
|
||||
fprintf(fp_cpp, "%s node->_reachable = _leaf->as_Halt()->_reachable;\n", indent);
|
||||
}
|
||||
if (inst->is_ideal_jump()) {
|
||||
fprintf(fp_cpp, "%s node->_probs = _leaf->as_Jump()->_probs;\n", indent);
|
||||
|
||||
@ -2113,7 +2113,8 @@ void GraphKit::uncommon_trap(int trap_request,
|
||||
// The debug info is the only real input to this call.
|
||||
|
||||
// Halt-and-catch fire here. The above call should never return!
|
||||
HaltNode* halt = new HaltNode(control(), frameptr(), "uncommon trap returned which should never happen");
|
||||
HaltNode* halt = new HaltNode(control(), frameptr(), "uncommon trap returned which should never happen"
|
||||
PRODUCT_ONLY(COMMA /*reachable*/false));
|
||||
_gvn.set_type_bottom(halt);
|
||||
root()->add_req(halt);
|
||||
|
||||
|
||||
@ -1010,8 +1010,12 @@ public:
|
||||
// Machine-specific versions of halt nodes
|
||||
class MachHaltNode : public MachReturnNode {
|
||||
public:
|
||||
bool _reachable;
|
||||
const char* _halt_reason;
|
||||
virtual JVMState* jvms() const;
|
||||
bool is_reachable() const {
|
||||
return _reachable;
|
||||
}
|
||||
};
|
||||
|
||||
class MachMemBarNode : public MachNode {
|
||||
|
||||
@ -62,7 +62,8 @@ Node *RootNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
HaltNode::HaltNode(Node* ctrl, Node* frameptr, const char* halt_reason) : Node(TypeFunc::Parms), _halt_reason(halt_reason) {
|
||||
HaltNode::HaltNode(Node* ctrl, Node* frameptr, const char* halt_reason, bool reachable)
|
||||
: Node(TypeFunc::Parms), _halt_reason(halt_reason), _reachable(reachable) {
|
||||
init_class_id(Class_Halt);
|
||||
Node* top = Compile::current()->top();
|
||||
init_req(TypeFunc::Control, ctrl );
|
||||
|
||||
@ -52,7 +52,8 @@ public:
|
||||
class HaltNode : public Node {
|
||||
public:
|
||||
const char* _halt_reason;
|
||||
HaltNode(Node* ctrl, Node* frameptr, const char* halt_reason);
|
||||
bool _reachable;
|
||||
HaltNode(Node* ctrl, Node* frameptr, const char* halt_reason, bool reachable = true);
|
||||
virtual int Opcode() const;
|
||||
virtual bool pinned() const { return true; };
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user