From 14769da54642d9065c3039a182ec643b0e2f44bb Mon Sep 17 00:00:00 2001 From: Almaz Mingaleev Date: Mon, 4 Nov 2024 10:22:54 +0000 Subject: Check that immediate is 32b in andl. Analogous to andq. AND in x86 supports only 32b immediates. Bug: 297147201 Test: ./art/test/testrunner/testrunner.py -b --host --64 Test: m test-art-host-gtest Change-Id: I2d4324fa93d08b7fcf7645a833ab50c0f8e990ce --- compiler/utils/x86_64/assembler_x86_64.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/utils') diff --git a/compiler/utils/x86_64/assembler_x86_64.cc b/compiler/utils/x86_64/assembler_x86_64.cc index 89a1d0923a..91bc4fe6e3 100644 --- a/compiler/utils/x86_64/assembler_x86_64.cc +++ b/compiler/utils/x86_64/assembler_x86_64.cc @@ -4265,6 +4265,7 @@ void X86_64Assembler::andl(CpuRegister reg, const Address& address) { void X86_64Assembler::andl(CpuRegister dst, const Immediate& imm) { AssemblerBuffer::EnsureCapacity ensured(&buffer_); + CHECK(imm.is_int32()); // andl only supports 32b immediate. EmitOptionalRex32(dst); EmitComplex(4, Operand(dst), imm); } -- cgit v1.2.3-59-g8ed1b