-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
ARM THUMB: cpy instruction mustn't be emitted by default #1760
Comments
A possible solution for this bug is to emit 'mov' instead of 'cpy'. The problem Cheng? |
If all mov are changed to cpy, the backend emits wrong code:
|
The proper fix is to model CC as explicit register(s). Then you can fix the scheduler and register allocator, Perhaps it's ok to just add instruction properties that tells us whether a instruction sets / reads CC. It's |
removing me from cc list. I am aka unassignedbugs@nondot, so I'm getting two copies :) |
FWIW, I think that it is about time we start modelling CC's correctly. This would require, at the minimum, |
It's better to model each flag individually e.g. N, Z, C, V, Q, the GE bits (collectively) etc. That way you can correctly model instructions that set N and Z but leave C and V unaffected. This allows you to move a MOV in between a CMP and a BCS, or between an ADDS and an ADC. |
This was fixed by r216138: Author: Jonathan Roelofs jonathan@codesourcery.com
AsmParser also doesn't permit MOV lo, lo (or CPY, as it used to be known), so you can't use it in embedded asm, but MC does permit it, so using clang to assemble a .s file with --target=thumbv4t-none-eabi gives no error but should. That's less of a problem though. |
mentioned in issue llvm/llvm-bugzilla-archive#1401 |
Extended Description
The cpy instruction is only defined in ARMv6.
The text was updated successfully, but these errors were encountered: