src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp

changeset 4037
da91efe96a93
parent 3391
069ab3f976d3
child 4159
8e47bac5643a
     1.1 --- a/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp	Fri Aug 31 16:39:35 2012 -0700
     1.2 +++ b/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp	Sat Sep 01 13:25:18 2012 -0400
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -186,7 +186,7 @@
    1.11      set((intx)markOopDesc::prototype(), t1);
    1.12    }
    1.13    st_ptr(t1, obj, oopDesc::mark_offset_in_bytes());
    1.14 -  if (UseCompressedOops) {
    1.15 +  if (UseCompressedKlassPointers) {
    1.16      // Save klass
    1.17      mov(klass, t1);
    1.18      encode_heap_oop_not_null(t1);
    1.19 @@ -194,8 +194,10 @@
    1.20    } else {
    1.21      st_ptr(klass, obj, oopDesc::klass_offset_in_bytes());
    1.22    }
    1.23 -  if (len->is_valid()) st(len, obj, arrayOopDesc::length_offset_in_bytes());
    1.24 -  else if (UseCompressedOops) {
    1.25 +  if (len->is_valid()) {
    1.26 +    st(len, obj, arrayOopDesc::length_offset_in_bytes());
    1.27 +  } else if (UseCompressedKlassPointers) {
    1.28 +    // otherwise length is in the class gap
    1.29      store_klass_gap(G0, obj);
    1.30    }
    1.31  }

mercurial