From 6db9c856ea5b9fc5d97b70f5e062dae9bd666d44 Mon Sep 17 00:00:00 2001 From: Bruce Forstall Date: Mon, 22 Mar 2021 22:19:39 -0700 Subject: [PATCH] Stop using EA_PTRSIZE outside of emitter (#50066) --- src/coreclr/jit/importer.cpp | 2 +- src/coreclr/jit/typelist.h | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/coreclr/jit/importer.cpp b/src/coreclr/jit/importer.cpp index ce8cba5..0cd3755 100644 --- a/src/coreclr/jit/importer.cpp +++ b/src/coreclr/jit/importer.cpp @@ -19773,7 +19773,7 @@ void Compiler::impInlineInitVars(InlineInfo* pInlineInfo) return; } } - else if (genTypeSize(sigType) < EA_PTRSIZE) + else if (genTypeSize(sigType) < TARGET_POINTER_SIZE) { // Narrowing cast. if (inlArgNode->OperIs(GT_LCL_VAR)) diff --git a/src/coreclr/jit/typelist.h b/src/coreclr/jit/typelist.h index 5f12910..37a1db9 100644 --- a/src/coreclr/jit/typelist.h +++ b/src/coreclr/jit/typelist.h @@ -3,7 +3,8 @@ #define GCS EA_GCREF #define BRS EA_BYREF -#define PS EA_PTRSIZE +#define EPS EA_PTRSIZE +#define PS TARGET_POINTER_SIZE #define PST (TARGET_POINTER_SIZE / sizeof(int)) #ifdef TARGET_64BIT @@ -43,8 +44,8 @@ DEF_TP(USHORT ,"ushort" , TYP_INT, TI_SHORT, 2, 2, 4, 1, 2, VTF_INT|VT DEF_TP(INT ,"int" , TYP_INT, TI_INT, 4, 4, 4, 1, 4, VTF_INT|VTF_I32, TYPE_REF_INT) DEF_TP(UINT ,"uint" , TYP_INT, TI_INT, 4, 4, 4, 1, 4, VTF_INT|VTF_UNS|VTF_I32,TYPE_REF_INT) // Only used in GT_CAST nodes -DEF_TP(LONG ,"long" , TYP_LONG, TI_LONG, 8, PS, PS, 2, 8, VTF_INT|VTF_I64, TYPE_REF_LNG) -DEF_TP(ULONG ,"ulong" , TYP_LONG, TI_LONG, 8, PS, PS, 2, 8, VTF_INT|VTF_UNS|VTF_I64,TYPE_REF_LNG) // Only used in GT_CAST nodes +DEF_TP(LONG ,"long" , TYP_LONG, TI_LONG, 8,EPS,EPS, 2, 8, VTF_INT|VTF_I64, TYPE_REF_LNG) +DEF_TP(ULONG ,"ulong" , TYP_LONG, TI_LONG, 8,EPS,EPS, 2, 8, VTF_INT|VTF_UNS|VTF_I64,TYPE_REF_LNG) // Only used in GT_CAST nodes DEF_TP(FLOAT ,"float" , TYP_FLOAT, TI_FLOAT, 4, 4, 4, 1, 4, VTF_FLT, TYPE_REF_FLT) DEF_TP(DOUBLE ,"double" , TYP_DOUBLE, TI_DOUBLE,8, 8, 8, 2, 8, VTF_FLT, TYPE_REF_DBL) @@ -69,6 +70,7 @@ DEF_TP(UNKNOWN ,"unknown" ,TYP_UNKNOWN, TI_ERROR, 0, 0, 0, 0, 0, VTF_ANY, #undef GCS #undef BRS +#undef EPS #undef PS #undef PST #undef VTF_I32 -- 2.7.4