[mc][gfx8] Disassembler appends "_e64" for many VI opcodes like v_bfm_b32
| 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
Fixed in r303070
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.