< prev index next >

src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp

Print this page

        

*** 1,8 **** /* * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. ! * Copyright (c) 2014, Red Hat Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,8 ---- /* * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. ! * Copyright (c) 2014, 2018, Red Hat, Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 708,729 **** LIR_Opr LIRGenerator::atomic_cmpxchg(BasicType type, LIR_Opr addr, LIRItem& cmp_value, LIRItem& new_value) { LIR_Opr ill = LIR_OprFact::illegalOpr; // for convenience new_value.load_item(); cmp_value.load_item(); - LIR_Opr result = new_register(T_INT); if (type == T_OBJECT || type == T_ARRAY) { ! __ cas_obj(addr, cmp_value.result(), new_value.result(), new_register(T_INT), new_register(T_INT), result); } else if (type == T_INT) { __ cas_int(addr->as_address_ptr()->base(), cmp_value.result(), new_value.result(), ill, ill); } else if (type == T_LONG) { __ cas_long(addr->as_address_ptr()->base(), cmp_value.result(), new_value.result(), ill, ill); } else { ShouldNotReachHere(); Unimplemented(); } ! __ logical_xor(FrameMap::r8_opr, LIR_OprFact::intConst(1), result); return result; } LIR_Opr LIRGenerator::atomic_xchg(BasicType type, LIR_Opr addr, LIRItem& value) { bool is_oop = type == T_OBJECT || type == T_ARRAY; --- 708,730 ---- LIR_Opr LIRGenerator::atomic_cmpxchg(BasicType type, LIR_Opr addr, LIRItem& cmp_value, LIRItem& new_value) { LIR_Opr ill = LIR_OprFact::illegalOpr; // for convenience new_value.load_item(); cmp_value.load_item(); if (type == T_OBJECT || type == T_ARRAY) { ! __ cas_obj(addr, cmp_value.result(), new_value.result(), new_register(T_INT), new_register(T_INT)); } else if (type == T_INT) { __ cas_int(addr->as_address_ptr()->base(), cmp_value.result(), new_value.result(), ill, ill); } else if (type == T_LONG) { __ cas_long(addr->as_address_ptr()->base(), cmp_value.result(), new_value.result(), ill, ill); } else { ShouldNotReachHere(); Unimplemented(); } ! LIR_Opr result = new_register(T_INT); ! __ cmove(lir_cond_equal, LIR_OprFact::intConst(1), LIR_OprFact::intConst(0), ! result, type); return result; } LIR_Opr LIRGenerator::atomic_xchg(BasicType type, LIR_Opr addr, LIRItem& value) { bool is_oop = type == T_OBJECT || type == T_ARRAY;
*** 939,948 **** --- 940,953 ---- LIR_Opr tmp = new_register(T_LONG); __ convert(Bytecodes::_i2l, index, tmp); index = tmp; } + if (is_updateBytes) { + base_op = access_resolve_for_read(IN_HEAP, base_op, NULL); + } + if (offset) { LIR_Opr tmp = new_pointer_register(); __ add(base_op, LIR_OprFact::intConst(offset), tmp); base_op = tmp; offset = 0;
< prev index next >