mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-2789: Fix parsing of unsigned 64-bit immediates in assembler (Closes #4688)
This commit is contained in:
parent
b5537b91e5
commit
ed1ac1e46f
2 changed files with 12 additions and 1 deletions
|
@ -183,7 +183,7 @@ public class AssemblyNumericTerminal extends AssemblyTerminal {
|
|||
return Collections.emptySet();
|
||||
}
|
||||
try {
|
||||
long val = Long.parseLong(num, radix);
|
||||
long val = Long.parseUnsignedLong(num, radix);
|
||||
if (neg) {
|
||||
val = -val;
|
||||
}
|
||||
|
|
|
@ -186,6 +186,17 @@ public class x64AssemblyTest extends AbstractAssemblyTest {
|
|||
assertOneCompatRestExact("MOV RCX,qword ptr [R12]", "49:8b:0c:24");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAssemble_MOV_RDX_0xffffffffffffffff() {
|
||||
assertOneCompatRestExact("MOV RDX,0xffffffffffffffff", "48:ba:ff:ff:ff:ff:ff:ff:ff:ff",
|
||||
"MOV RDX,-0x1");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAssemble_MOV_RDX_n1() {
|
||||
assertOneCompatRestExact("MOV RDX,-0x1", "48:ba:ff:ff:ff:ff:ff:ff:ff:ff");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAssemble_MOV_mRBXm_R14W() {
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue