Merge remote-tracking branch 'origin/patch'

This commit is contained in:
Ryan Kurtz 2022-11-17 01:08:47 -05:00
commit 3e03c60035
2 changed files with 12 additions and 1 deletions

View File

@ -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;
}

View File

@ -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() {
/*