Details
- Reviewers
myhsu - Commits
- rG64d326c33c6d: [M68k] Add MC support for link/unlk
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thank you for working on these instructions. I will recommend to add codegen support in this patch as well.
llvm/lib/Target/M68k/M68kInstrData.td | ||
---|---|---|
446 | According to https://m680x0.github.io/ref/integer-instructions.html#pfd7 , LINK pushes register onto the stack, so I think the address register should be the input. |
llvm/lib/Target/M68k/M68kInstrData.td | ||
---|---|---|
446 | It does read and write to the register. So I guess it should be both input and output ? |
Adopt link/unlink in stack prologue/epilogue
Something worth noting about:
- I guess the ".cfi_*" stuff may be wrong. Not sure about it.
- The assembly in link-unlink.ll, other than link/unlink itself, seems to be wrong. Bugs may exist somewhere.
LGTM
Thank you! I only have some minor comments.
Yeah we can fix those later.
llvm/test/CodeGen/M68k/link-unlnk.ll | ||
---|---|---|
3 | Can we have checks for cases in the absence of frame pointer, too? One way to do this is using the command line flag -frame-pointer=none/all to toggle frame pointer instead of using the function attribute (i.e. #0). | |
llvm/test/MC/M68k/Data/Classes/MxLink.s | ||
2 | nit: remove -assemble |
update diff with the following modification:
- test file link-unlink.ll has been updated to cover the cases with or without frame-pointer
- test file MxLink.s has been updated as per the suggestion by min.
According to https://m680x0.github.io/ref/integer-instructions.html#pfd7 , LINK pushes register onto the stack, so I think the address register should be the input.