From 555cb57d4df5bb48b8e1f80d4f1a837a068ba65f Mon Sep 17 00:00:00 2001 From: Lars T Hansen Date: Tue, 21 Apr 2015 06:39:12 +0200 Subject: [PATCH] Bug 1156386 - UXTH instruction. r=dougc --- js/src/jit/arm/Simulator-arm.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/js/src/jit/arm/Simulator-arm.cpp b/js/src/jit/arm/Simulator-arm.cpp index b391a30915d4..fd00b46b9fad 100644 --- a/js/src/jit/arm/Simulator-arm.cpp +++ b/js/src/jit/arm/Simulator-arm.cpp @@ -3108,6 +3108,19 @@ Simulator::decodeType3(SimInstruction* instr) instr->bits(11, 10)); set_register(rd, rn_val + (rm_val & 0xFF)); } + } else if ((instr->bit(20) == 1) && (instr->bits(9, 6) == 1)) { + if (instr->bits(19, 16) == 0xF) { + // Uxth. + uint32_t rm_val = rotateBytes(get_register(instr->rmValue()), + instr->bits(11, 10)); + set_register(rd, (rm_val & 0xFFFF)); + } else { + // Uxtah. + uint32_t rn_val = get_register(rn); + uint32_t rm_val = rotateBytes(get_register(instr->rmValue()), + instr->bits(11, 10)); + set_register(rd, rn_val + (rm_val & 0xFFFF)); + } } else { MOZ_CRASH(); }