summaryrefslogtreecommitdiff
path: root/src/jit/emit.h
diff options
context:
space:
mode:
authorBrian Sullivan <briansul@microsoft.com>2016-07-12 13:52:20 -0700
committerBrian Sullivan <briansul@microsoft.com>2016-07-26 16:16:51 -0700
commitfeb33b9085f202ac9e6331fdf4dc02751d89cf8d (patch)
tree6b4305ad73b35818bfaa6249b671aff082c32c59 /src/jit/emit.h
parent35e1d3bea2446a3ad6d5470b685a612b022052ad (diff)
downloadcoreclr-feb33b9085f202ac9e6331fdf4dc02751d89cf8d.tar.gz
coreclr-feb33b9085f202ac9e6331fdf4dc02751d89cf8d.tar.bz2
coreclr-feb33b9085f202ac9e6331fdf4dc02751d89cf8d.zip
Enable multireg returns on Arm64
Added method IsMultiRegPassedType and updated IsMultiRegReturnType Switched these methods to using getArgTypeForStruct and getReturnTypeForStruct Removed IsRegisterPassable and used IsMultiRegReturned instead. Converted lvIsMultiregStruct to use getArgTypeForStruct Renamed varDsc->lvIsMultiregStruct() to compiler->lvaIsMultiregStruct(varDsc) Skip calling getPrimitiveTypeForStruct when we have a struct larger than 8 bytes Refactored ReturnTypeDesc::InitializeReturnType Fixed missing SPK_ByReference case in InitializeReturnType Fixes for RyiJIt x86 TYP_LONG return types and additional ARM64 work for full multireg support Added ARM64 guard the uses of MAX_RET_MULTIREG_BYTES with FEATURE_MULTIREG_RET Fixes for multireg returns in Arm64 Codegen Added dumping of lvIsMultiRegArg and lvIsMultiRegRet in the assembly output Added check and set of compFloatingPointUsed to InitializeStructReturnType Fixes to handle JIT helper calls that say they return a TYP_STRUCT with no class handle available Placed all of the second GC return reg under MULTIREG_HAS_SECOND_GC_RET ifdefs Added the Arm64 VM changes from Rahul's PR 5175 Update getArgTypeForStruct for x86/arm32 so that it returns TYP_STRUCT for all pass by value cases Fixes for the passing of 3,5,6 or 7 byte sized structs Fix issue on ARM64 where we would back fill into x7 after passing a 16-byte struct on the stack Implemented register shuffling for multi reg Call returns on Arm64 Fixed regression on Arm32 for struct args that are not multi regs Updated Tests.Lst with 23 additional passing tests Changes from codereview feedback
Diffstat (limited to 'src/jit/emit.h')
-rw-r--r--src/jit/emit.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/jit/emit.h b/src/jit/emit.h
index c8de077dc1..e3eee557d4 100644
--- a/src/jit/emit.h
+++ b/src/jit/emit.h
@@ -1241,14 +1241,12 @@ protected:
regMaskTP idcByrefRegs; // ... byref registers
unsigned idcArgCnt; // ... lots of args or (<0 ==> caller pops args)
-#ifdef FEATURE_UNIX_AMD64_STRUCT_PASSING
+#if MULTIREG_HAS_SECOND_GC_RET
// This method handle the GC-ness of the second register in a 2 register returned struct on System V.
GCtype idSecondGCref() const { return (GCtype)_idcSecondRetRegGCType; }
void idSecondGCref(GCtype gctype) { _idcSecondRetRegGCType = gctype; }
-#endif // FEATURE_UNIX_AMD64_STRUCT_PASSING
private:
-#ifdef FEATURE_UNIX_AMD64_STRUCT_PASSING
// This member stores the GC-ness of the second register in a 2 register returned struct on System V.
// It is added to the call struct since it is not needed by the base instrDesc struct, which keeps GC-ness
// of the first register for the instCall nodes.
@@ -1257,7 +1255,7 @@ protected:
// since the GC-ness of the second register is only needed for call instructions.
// The base struct's member keeping the GC-ness of the first return register is _idGCref.
GCtype _idcSecondRetRegGCType : 2; // ... GC type for the second return register.
-#endif // FEATURE_UNIX_AMD64_STRUCT_PASSING
+#endif // MULTIREG_HAS_SECOND_GC_RET
};
struct instrDescArmFP : instrDesc
@@ -1640,9 +1638,9 @@ private:
regNumber emitSyncThisObjReg; // where is "this" enregistered for synchronized methods?
-#ifdef FEATURE_UNIX_AMD64_STRUCT_PASSING
+#if MULTIREG_HAS_SECOND_GC_RET
void emitSetSecondRetRegGCType(instrDescCGCA* id, emitAttr secondRetSize);
-#endif // FEATURE_UNIX_AMD64_STRUCT_PASSING
+#endif // MULTIREG_HAS_SECOND_GC_RET
static void emitEncodeCallGCregs(regMaskTP regs, instrDesc *id);
static unsigned emitDecodeCallGCregs(instrDesc *id);