Mercurial > hg > graal-jvmci-8
comparison src/share/vm/c1/c1_LIRGenerator.cpp @ 23660:b5f3a471e646
Merge.
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 01 Jun 2016 00:11:44 +0200 |
parents | dd9cc155639c 32b682649973 |
children | f13e777eb255 |
comparison
equal
deleted
inserted
replaced
23411:d7cf78885a3a | 23660:b5f3a471e646 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2005, 2016, 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. |
3644 case lir_membar_storeload : __ membar_storeload(); break; | 3644 case lir_membar_storeload : __ membar_storeload(); break; |
3645 default : ShouldNotReachHere(); break; | 3645 default : ShouldNotReachHere(); break; |
3646 } | 3646 } |
3647 } | 3647 } |
3648 } | 3648 } |
3649 | |
3650 LIR_Opr LIRGenerator::maybe_mask_boolean(StoreIndexed* x, LIR_Opr array, LIR_Opr value, CodeEmitInfo*& null_check_info) { | |
3651 if (x->check_boolean()) { | |
3652 LIR_Opr value_fixed = rlock_byte(T_BYTE); | |
3653 if (TwoOperandLIRForm) { | |
3654 __ move(value, value_fixed); | |
3655 __ logical_and(value_fixed, LIR_OprFact::intConst(1), value_fixed); | |
3656 } else { | |
3657 __ logical_and(value, LIR_OprFact::intConst(1), value_fixed); | |
3658 } | |
3659 LIR_Opr klass = new_register(T_METADATA); | |
3660 __ move(new LIR_Address(array, oopDesc::klass_offset_in_bytes(), T_ADDRESS), klass, null_check_info); | |
3661 null_check_info = NULL; | |
3662 LIR_Opr layout = new_register(T_INT); | |
3663 __ move(new LIR_Address(klass, in_bytes(Klass::layout_helper_offset()), T_INT), layout); | |
3664 int diffbit = Klass::layout_helper_boolean_diffbit(); | |
3665 __ logical_and(layout, LIR_OprFact::intConst(diffbit), layout); | |
3666 __ cmp(lir_cond_notEqual, layout, LIR_OprFact::intConst(0)); | |
3667 __ cmove(lir_cond_notEqual, value_fixed, value, value_fixed, T_BYTE); | |
3668 value = value_fixed; | |
3669 } | |
3670 return value; | |
3671 } |