src/hotspot/cpu/x86/gc/shared/modRefBarrierSetAssembler_x86.cpp
changeset 58273 08a5148e7c4e
parent 54755 de34f4b370b0
equal deleted inserted replaced
58272:e27564cd10e3 58273:08a5148e7c4e
     1 /*
     1 /*
     2  * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    32                                                    Register src, Register dst, Register count) {
    32                                                    Register src, Register dst, Register count) {
    33   bool checkcast = (decorators & ARRAYCOPY_CHECKCAST) != 0;
    33   bool checkcast = (decorators & ARRAYCOPY_CHECKCAST) != 0;
    34   bool disjoint = (decorators & ARRAYCOPY_DISJOINT) != 0;
    34   bool disjoint = (decorators & ARRAYCOPY_DISJOINT) != 0;
    35   bool obj_int = type == T_OBJECT LP64_ONLY(&& UseCompressedOops);
    35   bool obj_int = type == T_OBJECT LP64_ONLY(&& UseCompressedOops);
    36 
    36 
    37   if (type == T_OBJECT || type == T_ARRAY) {
    37   if (is_reference_type(type)) {
    38 #ifdef _LP64
    38 #ifdef _LP64
    39     if (!checkcast) {
    39     if (!checkcast) {
    40       if (!obj_int) {
    40       if (!obj_int) {
    41         // Save count for barrier
    41         // Save count for barrier
    42         __ movptr(r11, count);
    42         __ movptr(r11, count);
    59   bool checkcast = (decorators & ARRAYCOPY_CHECKCAST) != 0;
    59   bool checkcast = (decorators & ARRAYCOPY_CHECKCAST) != 0;
    60   bool disjoint = (decorators & ARRAYCOPY_DISJOINT) != 0;
    60   bool disjoint = (decorators & ARRAYCOPY_DISJOINT) != 0;
    61   bool obj_int = type == T_OBJECT LP64_ONLY(&& UseCompressedOops);
    61   bool obj_int = type == T_OBJECT LP64_ONLY(&& UseCompressedOops);
    62   Register tmp = rax;
    62   Register tmp = rax;
    63 
    63 
    64   if (type == T_OBJECT || type == T_ARRAY) {
    64   if (is_reference_type(type)) {
    65 #ifdef _LP64
    65 #ifdef _LP64
    66     if (!checkcast) {
    66     if (!checkcast) {
    67       if (!obj_int) {
    67       if (!obj_int) {
    68         // Save count for barrier
    68         // Save count for barrier
    69         count = r11;
    69         count = r11;
    83   }
    83   }
    84 }
    84 }
    85 
    85 
    86 void ModRefBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
    86 void ModRefBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
    87                                          Address dst, Register val, Register tmp1, Register tmp2) {
    87                                          Address dst, Register val, Register tmp1, Register tmp2) {
    88   if (type == T_OBJECT || type == T_ARRAY) {
    88   if (is_reference_type(type)) {
    89     oop_store_at(masm, decorators, type, dst, val, tmp1, tmp2);
    89     oop_store_at(masm, decorators, type, dst, val, tmp1, tmp2);
    90   } else {
    90   } else {
    91     BarrierSetAssembler::store_at(masm, decorators, type, dst, val, tmp1, tmp2);
    91     BarrierSetAssembler::store_at(masm, decorators, type, dst, val, tmp1, tmp2);
    92   }
    92   }
    93 }
    93 }