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

            Bug ID: 45092
           Summary: [SystemZ] - Valid instructions are rejected with "%r0
                    used in an address"
           Product: libraries
           Version: 9.0
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: SystemZ
          Assignee: unassignedb...@nondot.org
          Reporter: slavomir.kuc...@broadcom.com
                CC: llvm-bugs@lists.llvm.org

Inline assembler parser for SystemZ rejects valid instructions when %r0 is used
as an operands.

Examples of this would be:
- basr %r2,%r0
- bsm  %r2,%r0
- lae  %r2,0(%r14,%r0) 

https://godbolt.org/z/wY8VqC

- All of these examples are valid and have a use-case, 
- GCC accepts them,
- in AR-mode the order of index and base register actually matters (0(%r14,%r0)
operates on primary, 0(%r0,%r14) operates on whatever ar14 points to).
- the instructions can be coded e.g. as templates (like targets for EX/EXRL).

My preferred solution is to just remove the checks in the parser
(SystemZAsmParser.cpp).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to