llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[mc][gfx8] Disassembler appends "_e64" for many VI opcodes like v_bfm_b32

Open dpreobra opened this issue 9 years ago • 2 comments

Bugzilla Link 32936
Resolution FIXED
Resolved on May 16, 2017 05:15
Version trunk
OS All
CC @atamazov,@arsenm

Extended Description

In VI these instructions can only be encoded using VOP3 format (VOP2/VOP3 in CI). However disassembler appends "_e64" suffix which is misleading for VI ISA.

Full list of opcodes affected by this issue:

v_bcnt_u32_b32 v_bfm_b32 v_cvt_pk_i16_i32 v_cvt_pk_u16_u32 v_cvt_pkaccum_u8_f32 v_cvt_pknorm_i16_f32 v_cvt_pknorm_u16_f32 v_cvt_pkrtz_f16_f32 v_ldexp_f32 v_mbcnt_hi_u32_b32 v_mbcnt_lo_u32_b32

dpreobra avatar May 05 '17 10:05 dpreobra

Fixed in r303070

dpreobra avatar May 16 '17 12:05 dpreobra

Some subtle details.

If we have valid CI ISA with VOP3 instructions (from the list above), then disassembly for CI yields text with _e64 suffixes. The text would be assembled for VI without any problems, in spite of assembler does not require _e64 for VI.

However, the suffix is not simply ignored. Disassembled CI ISA with VOP2 (text with _e32) would not be assembled for VI.

This approach is used to maintain compatibility of the source code among different AMDGPU ISA generations.

atamazov avatar May 12 '17 11:05 atamazov