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

assembly: invalid bcopy parsing #18

Open
Emoun opened this issue Dec 25, 2018 · 1 comment
Open

assembly: invalid bcopy parsing #18

Emoun opened this issue Dec 25, 2018 · 1 comment

Comments

@Emoun
Copy link
Member

Emoun commented Dec 25, 2018

When compiling from assembly, the bcopy instruction either cannot be parsed or is parsed incorrectly.

Scenario 1:
If the instruction is written correctly, e.g. bcopy $26 = $25, 0, $p1, then compilation using patmos-clang throws the error:

error: too few operands for instruction
                         bcopy  $r26 = $r25, 0, $p1

Scenario 2:
If we add a comma to the end of the operand list, e.g. bcopy $26 = $25, 0, $p1, then compilation won't fail, but the instruction is not output to the final object file. I.e. its is just ignored.

Both scenarios also manifest in inline assembly, e.g:

int main(){
  asm(
    "bcopy  $r26 = $r25, 0, $p1"
  );
}
@Emoun
Copy link
Member Author

Emoun commented Oct 15, 2020

Just noticed that if the predicate operand is negated (i.e. bcopy $r26 = $r25, 0, !$p1) an error will not be thrown and it seems to be included in the object file correctly.

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

No branches or pull requests

1 participant