diff options
author | Brian Sullivan <briansul@microsoft.com> | 2016-06-09 10:46:57 -0700 |
---|---|---|
committer | Brian Sullivan <briansul@microsoft.com> | 2016-06-09 13:34:58 -0700 |
commit | 15690118463f18adc6411c3c4fb839e824e61a61 (patch) | |
tree | 0861efd63c746656894c504d89665f64010efc9e /src/jit/codegencommon.cpp | |
parent | ce40049d1a4d94a63581694cbb3fd18222e318aa (diff) | |
download | coreclr-15690118463f18adc6411c3c4fb839e824e61a61.tar.gz coreclr-15690118463f18adc6411c3c4fb839e824e61a61.tar.bz2 coreclr-15690118463f18adc6411c3c4fb839e824e61a61.zip |
Code review cleanup items and moved some items into LEGACY_BACKEND ifdefs
From Codereview feedback:
Use BAD_VAR_NUM in a couple places instead of (unsigned)-1
In struct InitVarDscInfo
Renamed hasRetBuf to hasRetBufArg
In struct RegState:
Moved field rsCurRegArmNum into LEGACY_BACKEND ifdef
Removed instance field RegState::rsMaxRegArgNum as it is unnecessary
Reordered the fields from largest to smallest
In struct GenTreeCall node:
Moved field gtCallRegUsedMask into LEGACY_BACKEND ifdef
Changes to genRegArgNext to work correct for X64/UNIX (where it is not currently used)
Document the behavaior when given REG_ARG_LAST
Diffstat (limited to 'src/jit/codegencommon.cpp')
-rwxr-xr-x | src/jit/codegencommon.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/jit/codegencommon.cpp b/src/jit/codegencommon.cpp index ae590e3924..aa2e8de45d 100755 --- a/src/jit/codegencommon.cpp +++ b/src/jit/codegencommon.cpp @@ -129,10 +129,12 @@ CodeGen::CodeGen(Compiler * theCompiler) : instInit(); +#ifdef LEGACY_BACKEND // TODO-Cleanup: These used to be set in rsInit() - should they be moved to RegSet?? // They are also accessed by the register allocators and fgMorphLclVar(). intRegState.rsCurRegArgNum = 0; floatRegState.rsCurRegArgNum = 0; +#endif // LEGACY_BACKEND #ifdef LATE_DISASM getDisAssembler().disInit(compiler); @@ -3765,7 +3767,7 @@ void CodeGen::genFnPrologCalleeRegArgs(regNumber xtraReg, // No need further action. return; } -#endif +#endif unsigned argMax; // maximum argNum value plus 1, (including the RetBuffArg) unsigned argNum; // current argNum, always in [0..argMax-1] @@ -4086,12 +4088,14 @@ void CodeGen::genFnPrologCalleeRegArgs(regNumber xtraReg, #ifdef _TARGET_ARM_ int lclSize = compiler->lvaLclSize(varNum); + if (lclSize > REGSIZE_BYTES) { + unsigned maxRegArgNum = doingFloat ? MAX_FLOAT_REG_ARG : MAX_REG_ARG; slots = lclSize / REGSIZE_BYTES; - if (regArgNum + slots > regState->rsMaxRegArgNum) + if (regArgNum + slots > maxRegArgNum) { - slots = regState->rsMaxRegArgNum - regArgNum; + slots = maxRegArgNum - regArgNum; } } C_ASSERT((char)MAX_REG_ARG == MAX_REG_ARG); @@ -10434,11 +10438,6 @@ void CodeGen::genRestoreCalleeSavedFltRegs(unsigned lclFrameSize) } #endif // defined(_TARGET_XARCH_) && !FEATURE_STACK_FP_X87 - -//------------------------------------------------------------------------ -// Methods used to support FEATURE_MULTIREG_ARGS_OR_RET and HFA support for ARM32 -//------------------------------------------------------------------------ - #ifdef FEATURE_UNIX_AMD64_STRUCT_PASSING bool Compiler::IsRegisterPassable(CORINFO_CLASS_HANDLE hClass) { @@ -10478,6 +10477,10 @@ bool Compiler::IsMultiRegReturnedType(CORINFO_CLASS_HANDLE hClass) } #endif // FEATURE_UNIX_AMD64_STRUCT_PASSING +//---------------------------------------------- +// Methods that support HFA's for ARM32/ARM64 +//---------------------------------------------- + bool Compiler::IsHfa(CORINFO_CLASS_HANDLE hClass) { #ifdef FEATURE_HFA |