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

AEON: make bn.beqi immediate signed #1285

Merged
merged 1 commit into from
Sep 3, 2023
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: 1 addition & 1 deletion src/Arch/OpenRISC/Aeon/AeonDisassembler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ private static Decoder<AeonDisassembler, Mnemonic, AeonInstruction> Create24bitI

var decode001000 = Mask(0, 2, " 8",
// branch if reg == imm
Instr(Mnemonic.bn_beqi__, InstrClass.ConditionalTransfer, R13, uimm10_3, disp2_8), // guess
Instr(Mnemonic.bn_beqi__, InstrClass.ConditionalTransfer, R13, simm10_3, disp2_8), // guess
Instr(Mnemonic.bn_bf, InstrClass.ConditionalTransfer, disp2_16), // chenxing(mod), source
Instr(Mnemonic.bn_bnei__, InstrClass.ConditionalTransfer, R13, uimm10_3, disp2_8),
Instr(Mnemonic.bn_bnf__, InstrClass.ConditionalTransfer, disp2_16));
Expand Down
11 changes: 10 additions & 1 deletion src/UnitTests/Arch/OpenRISC/AeonRewriterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,16 @@ public void AeonRw_bn_beqi__()
Given_HexString("2061E0");
AssertCode( // bn.beqi? r3,0x0,00100078
"0|T--|00100000(3): 1 instructions",
"1|T--|if (r3 == 0<32>) branch 00100078");
"1|T--|if (r3 == 0<i32>) branch 00100078");
}

[Test]
public void AeonRw_bn_beqi___negative()
{
Given_HexString("207C68");
AssertCode( // bn.beqi? r3,-0x1,0010001A
"0|T--|00100000(3): 1 instructions",
"1|T--|if (r3 == -1<i32>) branch 0010001A");
}

[Test]
Expand Down
Loading