diff --git a/src/coreclr/jit/lsrabuild.cpp b/src/coreclr/jit/lsrabuild.cpp index 89fd0433e346b..5e0473ca906a4 100644 --- a/src/coreclr/jit/lsrabuild.cpp +++ b/src/coreclr/jit/lsrabuild.cpp @@ -619,16 +619,6 @@ RefPosition* LinearScan::newRefPosition(Interval* theInterval, // Spill info newRP->isFixedRegRef = isFixedRegister; -#ifndef TARGET_AMD64 - // We don't need this for AMD because the PInvoke method epilog code is explicit - // at register allocation time. - if (theInterval != nullptr && theInterval->isLocalVar && compiler->compMethodRequiresPInvokeFrame() && - theInterval->varNum == compiler->genReturnLocal) - { - mask &= ~(RBM_PINVOKE_TCB | RBM_PINVOKE_FRAME).GetRegSetForType(theInterval->registerType); - noway_assert(mask != RBM_NONE); - } -#endif // !TARGET_AMD64 newRP->registerAssignment = mask; newRP->setMultiRegIdx(multiRegIdx); diff --git a/src/coreclr/jit/targetamd64.h b/src/coreclr/jit/targetamd64.h index 1575177643eb1..f9c4e9369422a 100644 --- a/src/coreclr/jit/targetamd64.h +++ b/src/coreclr/jit/targetamd64.h @@ -383,14 +383,6 @@ #define REG_SECRET_STUB_PARAM REG_R10 #define RBM_SECRET_STUB_PARAM RBM_R10 - // Registers used by PInvoke frame setup - #define REG_PINVOKE_FRAME REG_EDI - #define RBM_PINVOKE_FRAME RBM_EDI - #define REG_PINVOKE_TCB REG_EAX - #define RBM_PINVOKE_TCB RBM_EAX - #define REG_PINVOKE_SCRATCH REG_EAX - #define RBM_PINVOKE_SCRATCH RBM_EAX - // The following defines are useful for iterating a regNumber #define REG_FIRST REG_EAX #define REG_INT_FIRST REG_EAX diff --git a/src/coreclr/jit/targetarm64.h b/src/coreclr/jit/targetarm64.h index 366a8e80fe08f..24448466d4715 100644 --- a/src/coreclr/jit/targetarm64.h +++ b/src/coreclr/jit/targetarm64.h @@ -224,14 +224,6 @@ // JMP Indirect call register #define REG_INDIRECT_CALL_TARGET_REG REG_IP0 - // Registers used by PInvoke frame setup - #define REG_PINVOKE_FRAME REG_R9 - #define RBM_PINVOKE_FRAME RBM_R9 - #define REG_PINVOKE_TCB REG_R10 - #define RBM_PINVOKE_TCB RBM_R10 - #define REG_PINVOKE_SCRATCH REG_R10 - #define RBM_PINVOKE_SCRATCH RBM_R10 - // The following defines are useful for iterating a regNumber #define REG_FIRST REG_R0 #define REG_INT_FIRST REG_R0 diff --git a/src/coreclr/jit/targetloongarch64.h b/src/coreclr/jit/targetloongarch64.h index dcc87944beb16..8a5fc86951bec 100644 --- a/src/coreclr/jit/targetloongarch64.h +++ b/src/coreclr/jit/targetloongarch64.h @@ -194,14 +194,6 @@ #define REG_INDIRECT_CALL_TARGET_REG REG_T6 - // Registers used by PInvoke frame setup - #define REG_PINVOKE_FRAME REG_T0 - #define RBM_PINVOKE_FRAME RBM_T0 - #define REG_PINVOKE_TCB REG_T1 - #define RBM_PINVOKE_TCB RBM_T1 - #define REG_PINVOKE_SCRATCH REG_T1 - #define RBM_PINVOKE_SCRATCH RBM_T1 - // The following defines are useful for iterating a regNumber #define REG_FIRST REG_R0 #define REG_INT_FIRST REG_R0 diff --git a/src/coreclr/jit/targetriscv64.h b/src/coreclr/jit/targetriscv64.h index a0d5254dc5d17..0fd6e1410016c 100644 --- a/src/coreclr/jit/targetriscv64.h +++ b/src/coreclr/jit/targetriscv64.h @@ -173,14 +173,6 @@ // JMP Indirect call register #define REG_INDIRECT_CALL_TARGET_REG REG_T5 - // Registers used by PInvoke frame setup - #define REG_PINVOKE_FRAME REG_T0 - #define RBM_PINVOKE_FRAME RBM_T0 - #define REG_PINVOKE_TCB REG_T1 - #define RBM_PINVOKE_TCB RBM_T1 - #define REG_PINVOKE_SCRATCH REG_T1 - #define RBM_PINVOKE_SCRATCH RBM_T1 - // The following defines are useful for iterating a regNumber #define REG_FIRST REG_R0 #define REG_INT_FIRST REG_R0