Skip to content
Permalink
Browse files
8256757: Incorrect MachCallRuntimeNode::ret_addr_offset() for CallLea…
…fNoFP on x86_32

Reviewed-by: jiefu, kvn
  • Loading branch information
shipilev committed Nov 27, 2020
1 parent 2215e5a commit 9a468d859997b9cb1589bc9a6c2536bafbe53399
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
@@ -308,7 +308,7 @@ static int sizeof_FFree_Float_Stack_All = -1;

int MachCallRuntimeNode::ret_addr_offset() {
assert(sizeof_FFree_Float_Stack_All != -1, "must have been emitted already");
return sizeof_FFree_Float_Stack_All + 5 + pre_call_resets_size();
return 5 + pre_call_resets_size() + (_leaf_no_fp ? 0 : sizeof_FFree_Float_Stack_All);
}

int MachCallNativeNode::ret_addr_offset() {
@@ -854,6 +854,7 @@ class CallLeafNoFPNode : public CallLeafNode {
const TypePtr* adr_type)
: CallLeafNode(tf, addr, name, adr_type)
{
init_class_id(Class_CallLeafNoFP);
}
virtual int Opcode() const;
};
@@ -994,6 +994,7 @@ class MachCallRuntimeNode : public MachCallNode {
virtual uint size_of() const; // Size is bigger
public:
const char *_name; // Printable name, if _method is NULL
bool _leaf_no_fp; // Is this CallLeafNoFP?
MachCallRuntimeNode() : MachCallNode() {
init_class_id(Class_MachCallRuntime);
}
@@ -1264,7 +1264,9 @@ MachNode *Matcher::match_sfpt( SafePointNode *sfpt ) {
call_java->as_CallDynamicJava()->_vtable_index;
}
else if( mcall->is_MachCallRuntime() ) {
mcall->as_MachCallRuntime()->_name = call->as_CallRuntime()->_name;
MachCallRuntimeNode* mach_call_rt = mcall->as_MachCallRuntime();
mach_call_rt->_name = call->as_CallRuntime()->_name;
mach_call_rt->_leaf_no_fp = call->is_CallLeafNoFP();
}
else if( mcall->is_MachCallNative() ) {
MachCallNativeNode* mach_call_native = mcall->as_MachCallNative();
@@ -49,6 +49,7 @@ class CMoveNode;
class CallDynamicJavaNode;
class CallJavaNode;
class CallLeafNode;
class CallLeafNoFPNode;
class CallNode;
class CallRuntimeNode;
class CallNativeNode;
@@ -627,6 +628,7 @@ class Node {
DEFINE_CLASS_ID(CallDynamicJava, CallJava, 1)
DEFINE_CLASS_ID(CallRuntime, Call, 1)
DEFINE_CLASS_ID(CallLeaf, CallRuntime, 0)
DEFINE_CLASS_ID(CallLeafNoFP, CallLeaf, 0)
DEFINE_CLASS_ID(Allocate, Call, 2)
DEFINE_CLASS_ID(AllocateArray, Allocate, 0)
DEFINE_CLASS_ID(AbstractLock, Call, 3)
@@ -821,6 +823,7 @@ class Node {
DEFINE_CLASS_QUERY(CallDynamicJava)
DEFINE_CLASS_QUERY(CallJava)
DEFINE_CLASS_QUERY(CallLeaf)
DEFINE_CLASS_QUERY(CallLeafNoFP)
DEFINE_CLASS_QUERY(CallRuntime)
DEFINE_CLASS_QUERY(CallStaticJava)
DEFINE_CLASS_QUERY(Catch)

1 comment on commit 9a468d8

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.