src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 51963 8f0f7f2ae20b
child 58679 9c3209ff7550
equal deleted inserted replaced
58677:13588c901957 58678:9cf78a70fa4f
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
     3  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
     4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5  *
     5  *
     6  * This code is free software; you can redistribute it and/or modify it
     6  * This code is free software; you can redistribute it and/or modify it
     7  * under the terms of the GNU General Public License version 2 only, as
     7  * under the terms of the GNU General Public License version 2 only, as
   424   LIR_Opr tmp = LIR_OprFact::illegalOpr;
   424   LIR_Opr tmp = LIR_OprFact::illegalOpr;
   425   if (x->is_strictfp() && (x->op() == Bytecodes::_dmul || x->op() == Bytecodes::_ddiv)) {
   425   if (x->is_strictfp() && (x->op() == Bytecodes::_dmul || x->op() == Bytecodes::_ddiv)) {
   426     tmp = new_register(T_DOUBLE);
   426     tmp = new_register(T_DOUBLE);
   427   }
   427   }
   428 
   428 
   429   arithmetic_op_fpu(x->op(), reg, left.result(), right.result(), NULL);
   429   arithmetic_op_fpu(x->op(), reg, left.result(), right.result(), x->is_strictfp());
   430 
   430 
   431   set_result(x, round_item(reg));
   431   set_result(x, round_item(reg));
   432 }
   432 }
   433 
   433 
   434 // for  _ladd, _lmul, _lsub, _ldiv, _lrem
   434 // for  _ladd, _lmul, _lsub, _ldiv, _lrem
   731 LIR_Opr LIRGenerator::atomic_cmpxchg(BasicType type, LIR_Opr addr, LIRItem& cmp_value, LIRItem& new_value) {
   731 LIR_Opr LIRGenerator::atomic_cmpxchg(BasicType type, LIR_Opr addr, LIRItem& cmp_value, LIRItem& new_value) {
   732   LIR_Opr ill = LIR_OprFact::illegalOpr;  // for convenience
   732   LIR_Opr ill = LIR_OprFact::illegalOpr;  // for convenience
   733   new_value.load_item();
   733   new_value.load_item();
   734   cmp_value.load_item();
   734   cmp_value.load_item();
   735   LIR_Opr result = new_register(T_INT);
   735   LIR_Opr result = new_register(T_INT);
   736   if (type == T_OBJECT || type == T_ARRAY) {
   736   if (is_reference_type(type)) {
   737     __ cas_obj(addr, cmp_value.result(), new_value.result(), new_register(T_INT), new_register(T_INT), result);
   737     __ cas_obj(addr, cmp_value.result(), new_value.result(), new_register(T_INT), new_register(T_INT), result);
   738   } else if (type == T_INT) {
   738   } else if (type == T_INT) {
   739     __ cas_int(addr->as_address_ptr()->base(), cmp_value.result(), new_value.result(), ill, ill);
   739     __ cas_int(addr->as_address_ptr()->base(), cmp_value.result(), new_value.result(), ill, ill);
   740   } else if (type == T_LONG) {
   740   } else if (type == T_LONG) {
   741     __ cas_long(addr->as_address_ptr()->base(), cmp_value.result(), new_value.result(), ill, ill);
   741     __ cas_long(addr->as_address_ptr()->base(), cmp_value.result(), new_value.result(), ill, ill);
   746   __ logical_xor(FrameMap::r8_opr, LIR_OprFact::intConst(1), result);
   746   __ logical_xor(FrameMap::r8_opr, LIR_OprFact::intConst(1), result);
   747   return result;
   747   return result;
   748 }
   748 }
   749 
   749 
   750 LIR_Opr LIRGenerator::atomic_xchg(BasicType type, LIR_Opr addr, LIRItem& value) {
   750 LIR_Opr LIRGenerator::atomic_xchg(BasicType type, LIR_Opr addr, LIRItem& value) {
   751   bool is_oop = type == T_OBJECT || type == T_ARRAY;
   751   bool is_oop = is_reference_type(type);
   752   LIR_Opr result = new_register(type);
   752   LIR_Opr result = new_register(type);
   753   value.load_item();
   753   value.load_item();
   754   assert(type == T_INT || is_oop LP64_ONLY( || type == T_LONG ), "unexpected type");
   754   assert(type == T_INT || is_oop LP64_ONLY( || type == T_LONG ), "unexpected type");
   755   LIR_Opr tmp = new_register(T_INT);
   755   LIR_Opr tmp = new_register(T_INT);
   756   __ xchg(addr, value.result(), result, tmp);
   756   __ xchg(addr, value.result(), result, tmp);