Skip to content

[SPARC][IAS] Add movr(n)e alias for movr(n)z #94252

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions llvm/lib/Target/Sparc/SparcInstrAliases.td
Original file line number Diff line number Diff line change
Expand Up @@ -400,9 +400,11 @@ defm : cp_cond_alias<"012", 0b1111>;
let EmitPriority = 0 in defm : cp_cond_alias<"", 0b1000>; // same as a; gnu asm, not in manual

defm : reg_cond_alias<"z", 0b001>;
defm : reg_cond_alias<"e", 0b001>;
defm : reg_cond_alias<"lez", 0b010>;
defm : reg_cond_alias<"lz", 0b011>;
defm : reg_cond_alias<"nz", 0b101>;
defm : reg_cond_alias<"ne", 0b101>;
defm : reg_cond_alias<"gz", 0b110>;
defm : reg_cond_alias<"gez", 0b111>;

Expand Down
8 changes: 8 additions & 0 deletions llvm/test/MC/Sparc/sparc64-ctrl-instructions.s
Original file line number Diff line number Diff line change
Expand Up @@ -1190,29 +1190,37 @@
! CHECK-NEXT: ! fixup A - offset: 0, value: .BB0, kind: fixup_sparc_br16
brz,a,pn %g1, .BB0

! CHECK: movrz %g1, %g2, %g3 ! encoding: [0x87,0x78,0x44,0x02]
! CHECK: movrz %g1, %g2, %g3 ! encoding: [0x87,0x78,0x44,0x02]
! CHECK: movrlez %g1, %g2, %g3 ! encoding: [0x87,0x78,0x48,0x02]
! CHECK: movrlz %g1, %g2, %g3 ! encoding: [0x87,0x78,0x4c,0x02]
! CHECK: movrnz %g1, %g2, %g3 ! encoding: [0x87,0x78,0x54,0x02]
! CHECK: movrnz %g1, %g2, %g3 ! encoding: [0x87,0x78,0x54,0x02]
! CHECK: movrgz %g1, %g2, %g3 ! encoding: [0x87,0x78,0x58,0x02]
! CHECK: movrgez %g1, %g2, %g3 ! encoding: [0x87,0x78,0x5c,0x02]
movrz %g1, %g2, %g3
movre %g1, %g2, %g3
movrlez %g1, %g2, %g3
movrlz %g1, %g2, %g3
movrnz %g1, %g2, %g3
movrne %g1, %g2, %g3
movrgz %g1, %g2, %g3
movrgez %g1, %g2, %g3

! CHECK: movrz %g1, 2, %g3 ! encoding: [0x87,0x78,0x64,0x02]
! CHECK: movrz %g1, 2, %g3 ! encoding: [0x87,0x78,0x64,0x02]
! CHECK: movrlez %g1, 2, %g3 ! encoding: [0x87,0x78,0x68,0x02]
! CHECK: movrlz %g1, 2, %g3 ! encoding: [0x87,0x78,0x6c,0x02]
! CHECK: movrnz %g1, 2, %g3 ! encoding: [0x87,0x78,0x74,0x02]
! CHECK: movrnz %g1, 2, %g3 ! encoding: [0x87,0x78,0x74,0x02]
! CHECK: movrgz %g1, 2, %g3 ! encoding: [0x87,0x78,0x78,0x02]
! CHECK: movrgez %g1, 2, %g3 ! encoding: [0x87,0x78,0x7c,0x02]
movrz %g1, 2, %g3
movre %g1, 2, %g3
movrlez %g1, 2, %g3
movrlz %g1, 2, %g3
movrnz %g1, 2, %g3
movrne %g1, 2, %g3
movrgz %g1, 2, %g3
movrgez %g1, 2, %g3

Expand Down
Loading