提交 7d0395d6 编写于 作者: I iveresov

7014247: CTW fails when compile sun/misc/AtomicLongCSImpl (REMOVED from JDK7)

Summary: Use lea to compute field address in AtomicLongCSImpl::attemptUpdate() intrinsic on x86.
Reviewed-by: never, kvn
上级 dfbd571a
/* /*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -733,8 +733,8 @@ void LIRGenerator::do_AttemptUpdate(Intrinsic* x) { ...@@ -733,8 +733,8 @@ void LIRGenerator::do_AttemptUpdate(Intrinsic* x) {
// generate compare-and-swap; produces zero condition if swap occurs // generate compare-and-swap; produces zero condition if swap occurs
int value_offset = sun_misc_AtomicLongCSImpl::value_offset(); int value_offset = sun_misc_AtomicLongCSImpl::value_offset();
LIR_Opr addr = obj.result(); LIR_Opr addr = new_pointer_register();
__ add(addr, LIR_OprFact::intConst(value_offset), addr); __ leal(LIR_OprFact::address(new LIR_Address(obj.result(), value_offset, T_LONG)), addr);
LIR_Opr t1 = LIR_OprFact::illegalOpr; // no temp needed LIR_Opr t1 = LIR_OprFact::illegalOpr; // no temp needed
LIR_Opr t2 = LIR_OprFact::illegalOpr; // no temp needed LIR_Opr t2 = LIR_OprFact::illegalOpr; // no temp needed
__ cas_long(addr, cmp_value.result(), new_value.result(), t1, t2); __ cas_long(addr, cmp_value.result(), new_value.result(), t1, t2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册