1.1 --- a/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp Mon Jan 11 13:41:45 2016 -0800 1.2 +++ b/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp Fri Jan 15 22:33:15 2016 +0000 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -343,7 +343,7 @@ 1.11 length.set_instruction(x->length()); 1.12 length.load_item(); 1.13 } 1.14 - if (needs_store_check) { 1.15 + if (needs_store_check || x->check_boolean()) { 1.16 value.load_item(); 1.17 } else { 1.18 value.load_for_store(x->elt_type()); 1.19 @@ -388,7 +388,8 @@ 1.20 pre_barrier(LIR_OprFact::address(array_addr), LIR_OprFact::illegalOpr /* pre_val */, 1.21 true /* do_load */, false /* patch */, NULL); 1.22 } 1.23 - __ move(value.result(), array_addr, null_check_info); 1.24 + LIR_Opr result = maybe_mask_boolean(x, array.result(), value.result(), null_check_info); 1.25 + __ move(result, array_addr, null_check_info); 1.26 if (obj_store) { 1.27 // Precise card mark 1.28 post_barrier(LIR_OprFact::address(array_addr), value.result());