-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add/subtract imm (with tags) - Data processing (register, 1-source) - Add/subtract with carry - Rotate right into flags - Evaluate into flags - Floating point conversion to/from fixed point
- Loading branch information
1 parent
db7e28c
commit 72d9aca
Showing
6 changed files
with
346 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using Disarm.InternalDisassembly; | ||
using Xunit.Abstractions; | ||
|
||
namespace Disarm.Tests; | ||
|
||
public class FloatingPointTests : BaseDisarmTest | ||
{ | ||
public FloatingPointTests(ITestOutputHelper outputHelper) : base(outputHelper) | ||
{ | ||
} | ||
|
||
[Fact] | ||
public void FloatingToFromFixedTests() | ||
{ | ||
var insn = DisassembleAndCheckMnemonic(0x1E02C060, Arm64Mnemonic.SCVTF); | ||
|
||
Assert.Equal(Arm64OperandKind.Register, insn.Op0Kind); | ||
Assert.Equal(Arm64OperandKind.Register, insn.Op1Kind); | ||
Assert.Equal(Arm64OperandKind.Immediate, insn.Op2Kind); | ||
|
||
Assert.Equal(Arm64Register.S0, insn.Op0Reg); | ||
Assert.Equal(Arm64Register.W3, insn.Op1Reg); | ||
Assert.Equal(16, insn.Op2Imm); | ||
|
||
Assert.Equal("0x00000000 SCVTF S0, W3, 0x10", insn.ToString()); | ||
|
||
insn = DisassembleAndCheckMnemonic(0x1E18C060, Arm64Mnemonic.FCVTZS); | ||
|
||
Assert.Equal(Arm64OperandKind.Register, insn.Op0Kind); | ||
Assert.Equal(Arm64OperandKind.Register, insn.Op1Kind); | ||
Assert.Equal(Arm64OperandKind.Immediate, insn.Op2Kind); | ||
|
||
Assert.Equal(Arm64Register.W0, insn.Op0Reg); | ||
Assert.Equal(Arm64Register.S3, insn.Op1Reg); | ||
Assert.Equal(16, insn.Op2Imm); | ||
|
||
Assert.Equal("0x00000000 FCVTZS W0, S3, 0x10", insn.ToString()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.