[aarch64-port-dev ] Fix address overflow in MDO.

Andrew Haley aph at redhat.com
Tue Dec 31 04:51:24 PST 2013


Just another offset out of range.

In the new year I'll think of a generic way to fix all of these.

Andrew.


# HG changeset patch
# User aph
# Date 1388494040 0
# Node ID 95878f303a4614d45117420765b31667a34ce1a9
# Parent  0dca803e21acce6d715414c4f4591f4eec53a4d2
Fix address overflow in MDO.

diff -r 0dca803e21ac -r 95878f303a46 src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
--- a/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp	Mon Dec 30 15:35:59 2013 +0000
+++ b/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp	Tue Dec 31 12:47:20 2013 +0000
@@ -1376,9 +1376,10 @@
       __ mov_metadata(mdo, md->constant_encoding());
       Address data_addr(mdo, md->byte_offset_of_slot(data, DataLayout::header_offset()));
       int header_bits = DataLayout::flag_mask_to_header_mask(BitData::null_seen_byte_constant());
-      __ ldrw(rscratch1, data_addr);
+      __ lea(rscratch2, data_addr);
+      __ ldrw(rscratch1, Address(rscratch2));
       __ orrw(rscratch1, rscratch1, header_bits);
-      __ strw(rscratch1, data_addr);
+      __ strw(rscratch1, Address(rscratch2));
       __ b(*obj_is_null);
       __ bind(not_null);
     } else {


More information about the aarch64-port-dev mailing list