fix(java-input): fix dup2_x1 stack to regs conversion for wide types (#2755)

This commit is contained in:
Skylot
2026-01-26 18:51:39 +00:00
parent ad267e1618
commit 4e82233cbc
2 changed files with 27 additions and 1 deletions
@@ -0,0 +1,26 @@
package jadx.tests.integration.jbc;
import jadx.tests.api.IntegrationTest;
import jadx.tests.api.extensions.profiles.TestProfile;
import jadx.tests.api.extensions.profiles.TestWithProfiles;
import static jadx.tests.api.utils.assertj.JadxAssertions.assertThat;
public class TestDup2x1 extends IntegrationTest {
@SuppressWarnings({ "FieldCanBeLocal", "checkstyle:InnerAssignment", "unused" })
public static class TestCls {
private long value;
public long setValue(long v) {
return this.value = v;
}
}
@TestWithProfiles(TestProfile.JAVA11)
public void test() {
assertThat(getClassNode(TestCls.class))
.code()
.containsOne("this.value = v;");
}
}
@@ -310,7 +310,7 @@ public class JavaInsnsRegister {
s.peekFrom(4, 8).peekFrom(1, 9);
} else {
s.insn().setRegsCount(6);
s.insert(2, WIDE);
s.insert(1, WIDE);
s.peekFrom(0, 0).peekFrom(1, 1);
s.peekFrom(1, 2).peekFrom(2, 3);
s.peekFrom(2, 4).peekFrom(0, 5);