Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llvm assembler does not recognise powerpc paddi, pla, psubi extended mnemonics #62373

Closed
npiggin opened this issue Apr 26, 2023 · 6 comments
Closed

Comments

@npiggin
Copy link

npiggin commented Apr 26, 2023

Some Power ISA v3.1 extended mnemonics for paddi including pla, 3-operand form of paddi, and psubi are not recognised by llvm-mc (EDIT: llvm-as -> llvm-mc here and fixed title).

@llvmbot
Copy link
Collaborator

llvmbot commented Apr 26, 2023

@llvm/issue-subscribers-backend-powerpc

@ecnelises
Copy link
Member

I guess you mean the native assembler from LLVM, not llvm-as (tool to convert text IR into bitcode IR)? The native assembler (and disassembler) should be llvm-mc.

You can have a look at: https://github.com/llvm/llvm-project/blob/main/llvm/test/MC/PowerPC/ppc64-reloc-directive-pcrel.s and test functionality of llvm-mc.

@npiggin
Copy link
Author

npiggin commented Apr 26, 2023

Oh, right yes I meant the LLVM assembler.

clang doesn't emit those extended mnemonics when generating pcrel code, but we have some Linux kernel asm code that uses them. Adding one to that test case:

ppc64-reloc-directive-pcrel.S:19:2: error: invalid instruction, did you mean: bla, la, lha, lwa, pld, plha, pli, plwa?
pla 3, vec@got@pcrel
^

(gas does assemble this)

@npiggin
Copy link
Author

npiggin commented Apr 26, 2023

Ah, it doesn't recognise the 2-operand pld extended mnemonics either. Must be a bunch of things missing.

@npiggin npiggin changed the title llvm-as does not recognise powerpc paddi, pla, psubi extended mnemonics llvm assembler does not recognise powerpc paddi, pla, psubi extended mnemonics Apr 26, 2023
@stefanp-ibm stefanp-ibm self-assigned this Sep 21, 2023
@stefanp-ibm
Copy link
Contributor

I've added a patch now that will hopefully cover a whole set of missing Power 10 extended mnemonics.
#73003

@stefanp-ibm
Copy link
Contributor

The patch has been merged: #73003

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants