diff options
author | 2014-07-18 16:50:27 +0000 | |
---|---|---|
committer | 2014-07-17 22:33:42 +0000 | |
commit | 72b660ec5df56cad8ff6d526b4377a462fc53ce5 (patch) | |
tree | 7d0d907d741f803322a7023ce3e60e653f018b8e | |
parent | 027fd2f21c24100f14c584f18dbe39ec2c4fb6aa (diff) | |
parent | 8e3acdd132aef1391676a5db2696804900aacd8e (diff) |
Merge "x86_64: Fix GenDalvikArgsRange for 64-bit ref"
-rwxr-xr-x | compiler/dex/quick/x86/target_x86.cc | 2 | ||||
-rw-r--r-- | test/700-LoadArgRegs/expected.txt | 1 | ||||
-rw-r--r-- | test/700-LoadArgRegs/src/Main.java | 11 |
3 files changed, 13 insertions, 1 deletions
diff --git a/compiler/dex/quick/x86/target_x86.cc b/compiler/dex/quick/x86/target_x86.cc index c56637ea30..451ae8bc19 100755 --- a/compiler/dex/quick/x86/target_x86.cc +++ b/compiler/dex/quick/x86/target_x86.cc @@ -2497,7 +2497,7 @@ int X86Mir2Lir::GenDalvikArgsRange(CallInfo* info, int call_state, in_to_reg_storage_mapping.Initialize(info->args, info->num_arg_words, &mapper); const int last_mapped_in = in_to_reg_storage_mapping.GetMaxMappedIn(); const int size_of_the_last_mapped = last_mapped_in == -1 ? 1 : - in_to_reg_storage_mapping.Get(last_mapped_in).Is64BitSolo() ? 2 : 1; + info->args[last_mapped_in].wide ? 2 : 1; int regs_left_to_pass_via_stack = info->num_arg_words - (last_mapped_in + size_of_the_last_mapped); // Fisrt of all, check whether it make sense to use bulk copying diff --git a/test/700-LoadArgRegs/expected.txt b/test/700-LoadArgRegs/expected.txt index 4977df691e..c0d5eeec9f 100644 --- a/test/700-LoadArgRegs/expected.txt +++ b/test/700-LoadArgRegs/expected.txt @@ -74,3 +74,4 @@ a, b, c, d, e, f, g -91, -92, -93, -94, -95, -96, -97, -98, -99 -1, -91, -92, -93, -94, -95, -96, -97, -98, -99 1, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 2, 3, 4, 5, 6 +1234605616436508552, -8613303245920329199, 1234605616436508552 diff --git a/test/700-LoadArgRegs/src/Main.java b/test/700-LoadArgRegs/src/Main.java index 0e6de737b3..4649d05b22 100644 --- a/test/700-LoadArgRegs/src/Main.java +++ b/test/700-LoadArgRegs/src/Main.java @@ -274,6 +274,14 @@ public class Main { System.out.println(i1+", "+d1+", "+d2+", "+d3+", "+d4+", "+d5+", "+d6+", "+d7+", "+d8+", "+d9+", "+i2+", "+i3+", "+i4+", "+i5+", "+i6); } + static void testRefs1(Object o1, Object o2, Object o3, Object o4, Object o5, long l1, long l2, long l3) { + System.out.println(l1 + ", " + l2 + ", " + l3); + } + + static void testRefs(Object o1, Object o2, Object o3, Object o4, Object o5, long l1, long l2, long l3) { + testRefs1(o1, o2, o3, o4, o5, l1, l2, l3); + } + static public void main(String[] args) throws Exception { testI(); testB(); @@ -288,5 +296,8 @@ public class Main { testLL(); testMore(1, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 2, 3, 4, 5, 6); + + Object obj = new Object(); + testRefs(obj, obj, obj, obj, obj, 0x1122334455667788L, 0x8877665544332211L, 0x1122334455667788L); } } |