Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

[x86/Linux] Adjust the definition of FnStaticBaseHelper for x86 #8390

Merged
merged 2 commits into from
Dec 2, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/vm/fcall.h
Original file line number Diff line number Diff line change
Expand Up @@ -1134,6 +1134,7 @@ struct FCSigCheck {
#define HCCALL5(funcname, a1, a2, a3, a4, a5) funcname(0, a2, a1, a5, a4, a3)
#define HCCALL1_PTR(rettype, funcptr, a1) rettype (F_CALL_CONV * funcptr)(int /* EAX */, int /* EDX */, a1)
#define HCCALL2_PTR(rettype, funcptr, a1, a2) rettype (F_CALL_CONV * funcptr)(int /* EAX */, a2, a1)
#define HCCALL2_TYPEDEF(rettype, ty, a1, a2) typedef rettype (F_CALL_CONV * ty)(int /* EAX */, a2, a1)
#else

#define HCIMPL0(rettype, funcname) rettype F_CALL_CONV funcname() { HCIMPL_PROLOG(funcname)
Expand All @@ -1157,6 +1158,7 @@ struct FCSigCheck {
#define HCCALL5(funcname, a1, a2, a3, a4, a5) funcname(a1, a2, a5, a4, a3)
#define HCCALL1_PTR(rettype, funcptr, a1) rettype (F_CALL_CONV * funcptr)(a1)
#define HCCALL2_PTR(rettype, funcptr, a1, a2) rettype (F_CALL_CONV * funcptr)(a1, a2)
#define HCCALL2_TYPEDEF(rettype, ty, a1, a2) typedef rettype (F_CALL_CONV * ty)(a1, a2)
Copy link
Member

Choose a reason for hiding this comment

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

You can just use the existing HCCALL2_PTR macro for this - check what's done for the same problem in vm\gchelpers.h


#endif

Expand Down Expand Up @@ -1186,6 +1188,7 @@ struct FCSigCheck {
#define HCCALL5(funcname, a1, a2, a3, a4, a5) funcname(a1, a2, a3, a4, a5)
#define HCCALL1_PTR(rettype, funcptr, a1) rettype (F_CALL_CONV * funcptr)(a1)
#define HCCALL2_PTR(rettype, funcptr, a1, a2) rettype (F_CALL_CONV * funcptr)(a1, a2)
#define HCCALL2_TYPEDEF(rettype, ty, a1, a2) typedef rettype (F_CALL_CONV * ty)(a1, a2)

#endif

Expand Down
2 changes: 1 addition & 1 deletion src/vm/jitinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -1655,7 +1655,7 @@ struct VirtualFunctionPointerArgs

FCDECL2(CORINFO_MethodPtr, JIT_VirtualFunctionPointer_Dynamic, Object * objectUNSAFE, VirtualFunctionPointerArgs * pArgs);

typedef TADDR (F_CALL_CONV * FnStaticBaseHelper)(TADDR arg0, TADDR arg1);
HCCALL2_TYPEDEF(TADDR, FnStaticBaseHelper, TADDR arg0, TADDR arg1);

struct StaticFieldAddressArgs
{
Expand Down