src/cpu/x86/vm/jniFastGetField_x86_64.cpp

changeset 9669
32bc598624bd
parent 8316
626f594dffa6
child 9703
2fdf635bcf28
     1.1 --- a/src/cpu/x86/vm/jniFastGetField_x86_64.cpp	Thu Nov 05 11:42:42 2015 +0100
     1.2 +++ b/src/cpu/x86/vm/jniFastGetField_x86_64.cpp	Tue May 07 20:38:26 2019 +0000
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2004, 2017, 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 @@ -76,13 +76,16 @@
    1.11    __ jcc (Assembler::notZero, slow);
    1.12    if (os::is_MP()) {
    1.13      __ xorptr(robj, rcounter);
    1.14 -    __ xorptr(robj, rcounter);                   // obj, since
    1.15 +    __ xorptr(robj, rcounter);                  // obj, since
    1.16                                                  // robj ^ rcounter ^ rcounter == robj
    1.17                                                  // robj is data dependent on rcounter.
    1.18    }
    1.19 -  __ movptr(robj, Address(robj, 0));             // *obj
    1.20 +
    1.21 +  __ clear_jweak_tag(robj);
    1.22 +
    1.23 +  __ movptr(robj, Address(robj, 0));            // *obj
    1.24    __ mov   (roffset, c_rarg2);
    1.25 -  __ shrptr(roffset, 2);                         // offset
    1.26 +  __ shrptr(roffset, 2);                        // offset
    1.27  
    1.28    assert(count < LIST_CAPACITY, "LIST_CAPACITY too small");
    1.29    speculative_load_pclist[count] = __ pc();
    1.30 @@ -174,13 +177,16 @@
    1.31    __ jcc (Assembler::notZero, slow);
    1.32    if (os::is_MP()) {
    1.33      __ xorptr(robj, rcounter);
    1.34 -    __ xorptr(robj, rcounter);                   // obj, since
    1.35 +    __ xorptr(robj, rcounter);                  // obj, since
    1.36                                                  // robj ^ rcounter ^ rcounter == robj
    1.37                                                  // robj is data dependent on rcounter.
    1.38    }
    1.39 -  __ movptr(robj, Address(robj, 0));             // *obj
    1.40 +
    1.41 +  __ clear_jweak_tag(robj);
    1.42 +
    1.43 +  __ movptr(robj, Address(robj, 0));            // *obj
    1.44    __ mov   (roffset, c_rarg2);
    1.45 -  __ shrptr(roffset, 2);                         // offset
    1.46 +  __ shrptr(roffset, 2);                        // offset
    1.47  
    1.48    assert(count < LIST_CAPACITY, "LIST_CAPACITY too small");
    1.49    speculative_load_pclist[count] = __ pc();

mercurial