src/cpu/x86/vm/jniFastGetField_x86_32.cpp

changeset 9669
32bc598624bd
parent 8316
626f594dffa6
child 9703
2fdf635bcf28
     1.1 --- a/src/cpu/x86/vm/jniFastGetField_x86_32.cpp	Thu Nov 05 11:42:42 2015 +0100
     1.2 +++ b/src/cpu/x86/vm/jniFastGetField_x86_32.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 @@ -79,14 +79,17 @@
    1.11      __ mov(rax, rcx);
    1.12      __ andptr(rax, 1);                         // rax, must end up 0
    1.13      __ movptr(rdx, Address(rsp, rax, Address::times_1, 2*wordSize));
    1.14 -                                              // obj, notice rax, is 0.
    1.15 -                                              // rdx is data dependent on rcx.
    1.16 +                                               // obj, notice rax, is 0.
    1.17 +                                               // rdx is data dependent on rcx.
    1.18    } else {
    1.19 -    __ movptr (rdx, Address(rsp, 2*wordSize));  // obj
    1.20 +    __ movptr (rdx, Address(rsp, 2*wordSize)); // obj
    1.21    }
    1.22    __ movptr(rax, Address(rsp, 3*wordSize));  // jfieldID
    1.23 +
    1.24 +  __ clear_jweak_tag(rdx);
    1.25 +
    1.26    __ movptr(rdx, Address(rdx, 0));           // *obj
    1.27 -  __ shrptr (rax, 2);                         // offset
    1.28 +  __ shrptr (rax, 2);                        // offset
    1.29  
    1.30    assert(count < LIST_CAPACITY, "LIST_CAPACITY too small");
    1.31    speculative_load_pclist[count] = __ pc();
    1.32 @@ -194,14 +197,17 @@
    1.33    __ jcc (Assembler::notZero, slow);
    1.34    if (os::is_MP()) {
    1.35      __ mov(rax, rcx);
    1.36 -    __ andptr(rax, 1);                         // rax, must end up 0
    1.37 +    __ andptr(rax, 1);                        // rax, must end up 0
    1.38      __ movptr(rdx, Address(rsp, rax, Address::times_1, 3*wordSize));
    1.39                                                // obj, notice rax, is 0.
    1.40                                                // rdx is data dependent on rcx.
    1.41    } else {
    1.42 -    __ movptr(rdx, Address(rsp, 3*wordSize));  // obj
    1.43 +    __ movptr(rdx, Address(rsp, 3*wordSize)); // obj
    1.44    }
    1.45    __ movptr(rsi, Address(rsp, 4*wordSize));  // jfieldID
    1.46 +
    1.47 +  __ clear_jweak_tag(rdx);
    1.48 +
    1.49    __ movptr(rdx, Address(rdx, 0));           // *obj
    1.50    __ shrptr(rsi, 2);                         // offset
    1.51  
    1.52 @@ -283,7 +289,7 @@
    1.53    __ jcc (Assembler::notZero, slow);
    1.54    if (os::is_MP()) {
    1.55      __ mov(rax, rcx);
    1.56 -    __ andptr(rax, 1);                         // rax, must end up 0
    1.57 +    __ andptr(rax, 1);                        // rax, must end up 0
    1.58      __ movptr(rdx, Address(rsp, rax, Address::times_1, 2*wordSize));
    1.59                                                // obj, notice rax, is 0.
    1.60                                                // rdx is data dependent on rcx.
    1.61 @@ -291,6 +297,9 @@
    1.62      __ movptr(rdx, Address(rsp, 2*wordSize)); // obj
    1.63    }
    1.64    __ movptr(rax, Address(rsp, 3*wordSize));  // jfieldID
    1.65 +
    1.66 +  __ clear_jweak_tag(rdx);
    1.67 +
    1.68    __ movptr(rdx, Address(rdx, 0));           // *obj
    1.69    __ shrptr(rax, 2);                         // offset
    1.70  

mercurial