src/cpu/x86/vm/c1_LIRGenerator_x86.cpp

changeset 3846
8b0a4867acf0
parent 3787
6759698e3140
child 3848
e2fe93124108
     1.1 --- a/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp	Tue Jun 12 09:47:23 2012 -0700
     1.2 +++ b/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp	Tue Jun 12 14:31:44 2012 -0700
     1.3 @@ -718,35 +718,6 @@
     1.4  }
     1.5  
     1.6  
     1.7 -void LIRGenerator::do_AttemptUpdate(Intrinsic* x) {
     1.8 -  assert(x->number_of_arguments() == 3, "wrong type");
     1.9 -  LIRItem obj       (x->argument_at(0), this);  // AtomicLong object
    1.10 -  LIRItem cmp_value (x->argument_at(1), this);  // value to compare with field
    1.11 -  LIRItem new_value (x->argument_at(2), this);  // replace field with new_value if it matches cmp_value
    1.12 -
    1.13 -  // compare value must be in rdx,eax (hi,lo); may be destroyed by cmpxchg8 instruction
    1.14 -  cmp_value.load_item_force(FrameMap::long0_opr);
    1.15 -
    1.16 -  // new value must be in rcx,ebx (hi,lo)
    1.17 -  new_value.load_item_force(FrameMap::long1_opr);
    1.18 -
    1.19 -  // object pointer register is overwritten with field address
    1.20 -  obj.load_item();
    1.21 -
    1.22 -  // generate compare-and-swap; produces zero condition if swap occurs
    1.23 -  int value_offset = sun_misc_AtomicLongCSImpl::value_offset();
    1.24 -  LIR_Opr addr = new_pointer_register();
    1.25 -  __ leal(LIR_OprFact::address(new LIR_Address(obj.result(), value_offset, T_LONG)), addr);
    1.26 -  LIR_Opr t1 = LIR_OprFact::illegalOpr;  // no temp needed
    1.27 -  LIR_Opr t2 = LIR_OprFact::illegalOpr;  // no temp needed
    1.28 -  __ cas_long(addr, cmp_value.result(), new_value.result(), t1, t2);
    1.29 -
    1.30 -  // generate conditional move of boolean result
    1.31 -  LIR_Opr result = rlock_result(x);
    1.32 -  __ cmove(lir_cond_equal, LIR_OprFact::intConst(1), LIR_OprFact::intConst(0), result, T_LONG);
    1.33 -}
    1.34 -
    1.35 -
    1.36  void LIRGenerator::do_CompareAndSwap(Intrinsic* x, ValueType* type) {
    1.37    assert(x->number_of_arguments() == 4, "wrong type");
    1.38    LIRItem obj   (x->argument_at(0), this);  // object

mercurial