https://bugs.llvm.org/show_bug.cgi?id=39332

            Bug ID: 39332
           Summary: [AMDGPU][MC][DISASSEMBLER][GFX8+] 64-bit instructions
                    cannot be reassembled when used with a 1/2pi literal
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: AMDGPU
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

To use 1/2pi literal with 64-bit instructions, it is necessary to specify this
literal as 0.159154943091895317852646485335 or use a hex constant. However
disassembler decodes it as 0.15915494 so the disassembled code cannot be
assembled again.

An example:

    v_add_f64 v[0:1], v[0:1], 0.159154943091895317852646485335

Correctly encoded as 

    0x00,0x00,0x80,0xd2,0x00,0xf1,0x01,0x00

However, when disassembled, the code results in 

    v_add_f64 v[0:1], v[0:1], 0.15915494

This is a different constant and the code will fail to assemble.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to