diff options
| author | 2024-11-04 10:22:54 +0000 | |
|---|---|---|
| committer | 2024-11-04 11:52:06 +0000 | |
| commit | 14769da54642d9065c3039a182ec643b0e2f44bb (patch) | |
| tree | 22bcbfef4cc7eb7ec0c9c6839557708ae6b3827e /compiler/utils | |
| parent | 6ffbee21288cb2902119f8611c62b7ab59729b34 (diff) | |
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
Diffstat (limited to 'compiler/utils')
| -rw-r--r-- | compiler/utils/x86_64/assembler_x86_64.cc | 1 |
1 files changed, 1 insertions, 0 deletions
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); } |