llvm-project/llvm/lib/Target/AMDGPU/MCTargetDesc
Dmitry Preobrazhensky 0b8fd77ad9 [AMDGPU][MC] Corrected decoding of 16-bit literals
16-bit literals are encoded as 32-bit values. If high 16-bits of the value is 0xFFFF, the decoded instruction cannot be reassembled.

For example, the following code

0xff,0x04,0x04,0x52,0xcd,0xab,0xff,0xff

was decoded as

v_mul_lo_u16_e32 v2, 0xffffabcd, v2

However this literal is actually a 64-bit constant 0x00000000ffffabcd which violates requirements described in the documentation - the truncation is not safe.

This change corrects decoding to make reassembly possible.

Reviewers: arsenm, rampitec

Differential Revision: https://reviews.llvm.org/D84098
2020-07-22 17:20:43 +03:00
..
AMDGPUAsmBackend.cpp [MC][Bugfix] Remove redundant parameter for relaxInstruction 2020-04-21 11:06:55 +08:00
AMDGPUELFObjectWriter.cpp [AMDGPU][MC] Corrected branch relocation handling to detect undefined labels 2020-05-18 14:04:58 +03:00
AMDGPUELFStreamer.cpp
AMDGPUELFStreamer.h
AMDGPUFixupKinds.h
AMDGPUInstPrinter.cpp [AMDGPU][MC] Corrected decoding of 16-bit literals 2020-07-22 17:20:43 +03:00
AMDGPUInstPrinter.h [AMDGPU][MC] Corrected decoding of 16-bit literals 2020-07-22 17:20:43 +03:00
AMDGPUMCAsmInfo.cpp [MC] Add UseIntegratedAssembler = false. NFC 2020-04-11 10:13:49 -07:00
AMDGPUMCAsmInfo.h [Mips] Use appropriate private label prefix based on Mips ABI 2019-10-23 12:24:35 +02:00
AMDGPUMCCodeEmitter.cpp
AMDGPUMCCodeEmitter.h [AMDGPU][MC][GFX9+] Enabled 21-bit signed offsets for SMEM instructions 2020-05-06 14:13:10 +03:00
AMDGPUMCTargetDesc.cpp Implement wave32 DWARF register mapping 2020-03-23 10:24:16 -04:00
AMDGPUMCTargetDesc.h Implement wave32 DWARF register mapping 2020-03-23 10:24:16 -04:00
AMDGPUTargetStreamer.cpp [Alignment][NFC] Migrate AMDGPU backend to Align 2020-06-29 11:56:06 +00:00
AMDGPUTargetStreamer.h [Alignment][NFC] Migrate AMDGPU backend to Align 2020-06-29 11:56:06 +00:00
CMakeLists.txt [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
LLVMBuild.txt
R600MCCodeEmitter.cpp [NFC] Add 'override' keyword where missing in include/ and lib/. 2020-07-14 09:47:29 -07:00
R600MCTargetDesc.cpp
SIMCCodeEmitter.cpp AMDGPU: Don't use 16-bit FP inline constants in integer operands 2020-06-17 19:14:10 -04:00