RFR (XS): Use actual byte value instead of (int)true in C1 matrix barrier

Zhengyu Gu zgu at redhat.com
Mon Mar 13 19:43:05 UTC 2017


+void MacroAssembler::testbool(Address dst) {
+ if(sizeof(bool) == 1) {
+ testb(dst, 0xff);
+ } else {
+ // unsupported
+ ShouldNotReachHere();
+ }
+}


Also a left-over?

Thanks,

-Zhengyu


On 03/13/2017 03:12 PM, Aleksey Shipilev wrote:
> Found one left-over from bool->char switch:
>
> $ hg diff
> diff -r cba65b85b10c src/share/vm/c1/c1_LIRGenerator.cpp
> --- a/src/share/vm/c1/c1_LIRGenerator.cpp	Mon Mar 13 13:14:37 2017 +0100
> +++ b/src/share/vm/c1/c1_LIRGenerator.cpp	Mon Mar 13 20:10:30 2017 +0100
> @@ -1688,7 +1688,7 @@
>     __ move(matrix_elem_addr, tmp5);
>     __ cmp(lir_cond_notEqual, tmp5, LIR_OprFact::intConst(0));
>     __ branch(lir_cond_notEqual, T_BYTE, L_done->label());
> -  __ move(LIR_OprFact::intConst((int) true), matrix_elem_addr);
> +  __ move(LIR_OprFact::intConst(1), matrix_elem_addr);
>     __ branch_destination(L_done->label());
>   }
>
> Current code should be safe under C++ rules, but better to be safe.
>
> Thanks,
> -Aleksey
>



More information about the shenandoah-dev mailing list