[aarch64-port-dev ] Offsets in lookupswitch instructions should be signed.
Andrew Haley
aph at redhat.com
Thu Mar 27 08:07:59 UTC 2014
A thinko: offsets in lookupswitch instructions are 32-bit signed
quantities. I suppose we got away with it so far because Java
compilers don't often emit negative offsets.
Andrew.
# HG changeset patch
# User aph
# Date 1395907340 0
# Thu Mar 27 08:02:20 2014 +0000
# Node ID f2658ddb105cfbc1ca275609fe71e54d852c0624
# Parent 378b010e4b60a7a6023576001f20155971412b37
Offsets in lookupswitch instructions should be signed.
diff -r 378b010e4b60 -r f2658ddb105c src/cpu/aarch64/vm/templateTable_aarch64.cpp
--- a/src/cpu/aarch64/vm/templateTable_aarch64.cpp Wed Mar 26 06:38:29 2014 -0400
+++ b/src/cpu/aarch64/vm/templateTable_aarch64.cpp Thu Mar 27 08:02:20 2014 +0000
@@ -2042,8 +2042,8 @@
__ ldrw(j, Address(j, BytesPerInt));
__ profile_switch_case(i, key, array);
__ rev32(j, j);
- __ load_unsigned_byte(rscratch1, Address(rbcp, j, Address::uxtw(0)));
- __ lea(rbcp, Address(rbcp, j, Address::uxtw(0)));
+ __ load_unsigned_byte(rscratch1, Address(rbcp, j, Address::sxtw(0)));
+ __ lea(rbcp, Address(rbcp, j, Address::sxtw(0)));
__ dispatch_only(vtos);
// default case -> j = default offset
More information about the aarch64-port-dev
mailing list