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

Fix FIXME for M68k::MOV16dc #85686

Open
JomerDev opened this issue Mar 18, 2024 · 2 comments
Open

Fix FIXME for M68k::MOV16dc #85686

JomerDev opened this issue Mar 18, 2024 · 2 comments

Comments

@JomerDev
Copy link

There is a FIXME here for the MOVE from CCR instruction on 68000. From my understanding the way to fix it would be to use MOVE from SR instead, since CCR is just the lower byte of SR.
I looked at the code in an attempt to fix it myself but after trying to find a way for some time I just have no idea where to get the information from if the target is 68000 or 68010 in or around that function, so this is the best I can do right now

@llvmbot
Copy link
Member

llvmbot commented Mar 18, 2024

@llvm/issue-subscribers-backend-m68k

Author: Jomer (JomerDev)

There is a FIXME [here](https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/M68k/M68kInstrInfo.cpp#L497) for the `MOVE from CCR` instruction on 68000. From my understanding the way to fix it would be to use `MOVE from SR` instead, since CCR is just the lower byte of SR. I looked at the code in an attempt to fix it myself but after trying to find a way for some time I just have no idea where to get the information from if the target is 68000 or 68010 in or around that function, so this is the best I can do right now

@tclin914
Copy link
Contributor

I think it can call Subtarget.atLeastM68010() to get the cpu information.

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

4 participants