summaryrefslogtreecommitdiff
path: root/src/jit/emitarm.cpp
diff options
context:
space:
mode:
authorEgor Chesakov <Egor.Chesakov@microsoft.com>2018-08-27 11:00:01 -0700
committerGitHub <noreply@github.com>2018-08-27 11:00:01 -0700
commit38d416dd613ad10ac69e624096615a18214b5e53 (patch)
tree94a0174bf79ba764b9202f23789eacf81f7c6891 /src/jit/emitarm.cpp
parent57cdf454b123a44ef8d5944f4022b9502ce52d8a (diff)
downloadcoreclr-38d416dd613ad10ac69e624096615a18214b5e53.tar.gz
coreclr-38d416dd613ad10ac69e624096615a18214b5e53.tar.bz2
coreclr-38d416dd613ad10ac69e624096615a18214b5e53.zip
Deal with compilation warnings in JIT in cross-bitness scenario (#19590)
* Fix warnings due to "strlen return type is size_t" in src/jit/emitarm.cpp src/jit/unwindarm.cpp * Use ptrdiff_t disp in emitter::emitOutputInstr in src/jit/emitarm.cpp * Compiler::gtHashValue should depend on host-bitness in src/jit/gentree.cpp * Simplify checking using ImmedValNeedsReloc() in src/jit/lowerarmarch.cpp * Use target_ssize_t immVal in Lowering::IsContainableImmed in src/jit/lowerarmarch.cpp * Remove int offs and use BYTE* addr and %p specifier in emitter::emitDispInsHelp in IF_T2_J3 case in src/jit/emitarm.cpp * Cast gtIconVal to target_size_t in CodeGen::genLclHeap in src/jit/codegenarm.cpp * Use int argSize in CodeGen::genEmitCall in src/jit/codegen.h src/jit/codegenlinear.cpp * Use ssize_t disp in emitter::emitIns_Call in src/jit/emitarm.cpp src/jit/emitarm.h * Use int argSize in emitter::emitIns_Call in src/jit/emitarm.cpp src/jit/emitarm.h * Use target_size_t return type in Compiler::eeGetPageSize Compiler::getVeryLargeFrameSize in src/jit/codegencommon.cpp src/jit/compiler.h * Cast gtIconVal to unsigned in CodeGen::genCodeForShift CodeGen::genCodeForShiftLong in src/jit/codegenarm.cpp src/jit/codegenarmarch.cpp * Cast gtIconVal to unsigned in DecomposeLongs::DecomposeRotate in src/jit/decomposelongs.cpp * Use unsigned size in CodeGen::genConsumePutStructArgStk in src/jit/codegenlinear.cpp * Use target_ssize_t stmImm in cast in CodeGen::genZeroInitFrame in src/jit/codegencommon.cpp * Cast to target_ssize_t in Compiler::gtSetEvalOrder in src/jit/gentree.cpp * Address PR feedbask - use dspPtr(addr) in src/jit/emitarm.cpp
Diffstat (limited to 'src/jit/emitarm.cpp')
-rw-r--r--src/jit/emitarm.cpp33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/jit/emitarm.cpp b/src/jit/emitarm.cpp
index 40bde10a17..1a2e4a95e8 100644
--- a/src/jit/emitarm.cpp
+++ b/src/jit/emitarm.cpp
@@ -4402,7 +4402,7 @@ void emitter::emitIns_Call(EmitCallType callType,
CORINFO_METHOD_HANDLE methHnd, // used for pretty printing
INDEBUG_LDISASM_COMMA(CORINFO_SIG_INFO* sigInfo) // used to report call sites to the EE
void* addr,
- ssize_t argSize,
+ int argSize,
emitAttr retSize,
VARSET_VALARG_TP ptrVars,
regMaskTP gcrefRegs,
@@ -4411,7 +4411,7 @@ void emitter::emitIns_Call(EmitCallType callType,
regNumber ireg /* = REG_NA */,
regNumber xreg /* = REG_NA */,
unsigned xmul /* = 0 */,
- int disp /* = 0 */,
+ ssize_t disp /* = 0 */,
bool isJump /* = false */,
bool isNoGC /* = false */,
bool isProfLeaveCB /* = false */)
@@ -4487,8 +4487,8 @@ void emitter::emitIns_Call(EmitCallType callType,
}
#endif
- assert(argSize % (int)REGSIZE_BYTES == 0);
- argCnt = argSize / (int)REGSIZE_BYTES;
+ assert(argSize % REGSIZE_BYTES == 0);
+ argCnt = argSize / REGSIZE_BYTES;
/* Managed RetVal: emit sequence point for the call */
if (emitComp->opts.compDbgInfo && ilOffset != BAD_IL_OFFSET)
@@ -6268,10 +6268,10 @@ size_t emitter::emitOutputInstr(insGroup* ig, instrDesc* id, BYTE** dp)
addr = (BYTE*)((size_t)addr & ~1); // Clear the lowest bit from target address
/* Calculate PC relative displacement */
- int disp = addr - (dst + 4);
- bool S = (disp < 0);
- bool I1 = ((disp & 0x00800000) == 0);
- bool I2 = ((disp & 0x00400000) == 0);
+ ptrdiff_t disp = addr - (dst + 4);
+ bool S = (disp < 0);
+ bool I1 = ((disp & 0x00800000) == 0);
+ bool I2 = ((disp & 0x00400000) == 0);
if (S)
code |= (1 << 26); // S bit
@@ -6498,7 +6498,7 @@ static bool insAlwaysSetFlags(instruction ins)
void emitter::emitDispInst(instruction ins, insFlags flags)
{
const char* insstr = codeGen->genInsName(ins);
- int len = strlen(insstr);
+ size_t len = strlen(insstr);
/* Display the instruction name */
@@ -6882,7 +6882,6 @@ void emitter::emitDispInsHelp(
switch (fmt)
{
int imm;
- int offs;
const char* methodName;
case IF_T1_A: // None
@@ -7382,29 +7381,31 @@ void emitter::emitDispInsHelp(
break;
case IF_T2_J3:
+ {
+ BYTE* addr;
if (id->idIsCallAddr())
{
- offs = (ssize_t)id->idAddr()->iiaAddr;
+ addr = id->idAddr()->iiaAddr;
methodName = "";
}
else
{
- offs = 0;
+ addr = nullptr;
methodName = emitComp->eeGetMethodFullName((CORINFO_METHOD_HANDLE)id->idDebugOnlyInfo()->idMemCookie);
}
- if (offs)
+ if (addr)
{
if (id->idIsDspReloc())
printf("reloc ");
- printf("%08X", offs);
+ printf("%p", dspPtr(addr));
}
else
{
printf("%s", methodName);
}
-
- break;
+ }
+ break;
default:
printf("unexpected format %s", emitIfName(id->idInsFmt()));