You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.
Which is exactly the same as our code, since li and clr are the pseudo instructions equal to the adds. Running the code in pasim also executes successfully.
Therefore, we know that the compiler produces two 32-bit instructions. Their order should not matter, which means the original code should also compile.
The error could be caused by the compiler using a long immediate add if it sees the labeled add before the other add. Should this be the case, the compiler should be updated to use the short immediate format when possible, as it is in this case.
The text was updated successfully, but these errors were encountered:
As was discovered in t-crest/patmos#41, even though the compiler allows adding a label in the first slot, it will truncate the label's actuall address if the second slot is taken. Therefore, the compiler should just refuse to compile both cases:
this should fail to compile because the first instruction is a long immediate, which needs its own bundle. Currently, this compiles with the wrong value for _1.
patmos-clang
refuses to bundle two immediate adds, where the second add's immediate is a label.Take the following assembly program (we'll call it
main.s
):Trying to compile this program using the command
patmos-clang main.s
results in the error:We can work around this error by changing the order of the adds:
Looking at an objectdump of the resulting
main.o
we get:Which is exactly the same as our code, since
li
andclr
are the pseudo instructions equal to the adds. Running the code inpasim
also executes successfully.Therefore, we know that the compiler produces two 32-bit instructions. Their order should not matter, which means the original code should also compile.
The error could be caused by the compiler using a long immediate add if it sees the labeled add before the other add. Should this be the case, the compiler should be updated to use the short immediate format when possible, as it is in this case.
The text was updated successfully, but these errors were encountered: