summaryrefslogtreecommitdiff
path: root/src/jit/emitarm.h
diff options
context:
space:
mode:
authorSujin Kim <sjsujin.kim@samsung.com>2017-03-31 05:37:13 +0900
committerBruce Forstall <brucefo@microsoft.com>2017-03-30 13:37:13 -0700
commitf9380e912b105030cee06544338d6068fb7e97e7 (patch)
tree06ae0897988f7bb0b3af1a98d6f367f134770bcc /src/jit/emitarm.h
parent0278c8561f68937b010e091fe0f8acd8c1b6910d (diff)
downloadcoreclr-f9380e912b105030cee06544338d6068fb7e97e7.tar.gz
coreclr-f9380e912b105030cee06544338d6068fb7e97e7.tar.bz2
coreclr-f9380e912b105030cee06544338d6068fb7e97e7.zip
[Ryujit/ARM32] Implement NYI related with overflow for ARM (#10491)
* Implement NYI(overflow checks) for ARM On last comment of #8496, the NYI message of overflow checks is printed after running the CodeGenBringUpTests. That was the message about temp register setup for overflow checks. It was referenced https://github.com/dotnet/coreclr/blob/master/src/jit/lsraarm64.cpp#L399 I think it doesn't make any problem even though writing it the same as arm64. * modifiy for coding convention * Implement NYI : Unimplmented GT_CAST:int <--> int with overflow I think it doesn't make any problem even though writing it the same as arm64. So I copied parts of CodeGen::genIntToIntCast() and modified some below codes. ``` if (emitter::emitIns_valid_imm_for_cmp(castInfo.typeMax, cmpSize)) ``` --> ``` if (emitter::emitIns_valid_imm_for_cmp(castInfo.typeMax, INS_FLAGS_DONT_CARE)) ``` * Implement NYI : genLongToIntCast: overflow check I copied and pasted codes from codegenxarch.cpp. But It seemed be necessary that conditional execution values are changed by each architectures. So I used 'genJumpKindForOper' for getting the emitJumpKind value. The sample app has been checked to work well. * Modify the implementation of emitter::emitIns_valid_imm_for_cmp According to reference manual, I figured out CMP and ADD have different mechanisms on ARM unlike ARM64. So I defined "...for_cmp" function not just use "..for_add" in the function likes ARM64.
Diffstat (limited to 'src/jit/emitarm.h')
-rw-r--r--src/jit/emitarm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/jit/emitarm.h b/src/jit/emitarm.h
index 6c153a1a33..8ad1268310 100644
--- a/src/jit/emitarm.h
+++ b/src/jit/emitarm.h
@@ -243,6 +243,7 @@ static bool emitIns_valid_imm_for_alu(int imm);
static bool emitIns_valid_imm_for_mov(int imm);
static bool emitIns_valid_imm_for_small_mov(regNumber reg, int imm, insFlags flags);
static bool emitIns_valid_imm_for_add(int imm, insFlags flags);
+static bool emitIns_valid_imm_for_cmp(int imm, insFlags flags);
static bool emitIns_valid_imm_for_add_sp(int imm);
void emitIns(instruction ins);