From 4cdb8103d1d3dbc68577f22c73b1d8112e9706bc Mon Sep 17 00:00:00 2001 From: mikedn Date: Thu, 7 Jun 2018 08:18:59 +0300 Subject: Fix ARM cast codegen (#18063) * Fix ARM cast codegen ARM cast codegen is rather convoluted and sometimes does the wrong thing by applying GTF_UNSIGNED to the destination type even though this flag is only about the source type. * Add more conversion tests These tests are intended to support casts with contained operands. They're also useful to catch issues caused by load nodes having small types and generally improve test coverage for casts. --- src/jit/emitarm.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/jit/emitarm.cpp') diff --git a/src/jit/emitarm.cpp b/src/jit/emitarm.cpp index 89de34aa0d..81381fe25f 100644 --- a/src/jit/emitarm.cpp +++ b/src/jit/emitarm.cpp @@ -2199,12 +2199,12 @@ void emitter::emitIns_R_R( case INS_sxtb: case INS_uxtb: - assert(size == EA_1BYTE); + assert(size == EA_4BYTE); goto EXTEND_COMMON; case INS_sxth: case INS_uxth: - assert(size == EA_2BYTE); + assert(size == EA_4BYTE); EXTEND_COMMON: assert(insDoesNotSetFlags(flags)); if (isLowRegister(reg1) && isLowRegister(reg2)) @@ -2638,12 +2638,12 @@ void emitter::emitIns_R_R_I(instruction ins, case INS_sxtb: case INS_uxtb: - assert(size == EA_1BYTE); + assert(size == EA_4BYTE); goto EXTEND_COMMON; case INS_sxth: case INS_uxth: - assert(size == EA_2BYTE); + assert(size == EA_4BYTE); EXTEND_COMMON: assert(insOptsNone(opt)); assert(insDoesNotSetFlags(flags)); -- cgit v1.2.3