[llvm] [SPARC][IAS] Add `illtrap` alias for `unimp` (PR #105928)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 24 01:04:48 PDT 2024
koachan wrote:
> It looks like GNU as doesn't allow it when targeting V8:
>
> ```
> test.s: Assembler messages:
> test.s:2: Error: Architecture mismatch on "illtrap ".
> test.s:2: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is v8.)
> ```
Oh, interesting. Seems like using `unimp` in V9 is fine but using `illtrap` in V8 is not.
On the other hand Solaris does allow both mnemonics even when explicitly targeting V8:
```
$ cat unimp.s
u:
unimp
unimp 0
illtrap
illtrap 0
retl
nop
$ as -m32 -xarch=v8 unimp.s && dis unimp.o
disassembly for unimp.o
section .text
0x0: 00 00 00 00 unimp 0x0
0x4: 00 00 00 00 unimp 0x0
0x8: 00 00 00 00 unimp 0x0
0xc: 00 00 00 00 unimp 0x0
0x10: 81 c3 e0 08 retl
0x14: 01 00 00 00 nop
```
I'm slightly leaning towards using Solaris behavior in this particular case but in any case either choice is okay by me.
https://github.com/llvm/llvm-project/pull/105928
More information about the llvm-commits
mailing list