Skip to content

assembly: invalid bcopy parsing #18

@Emoun

Description

@Emoun

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"
  );
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions