Mercurial > hg > graal-compiler
comparison src/cpu/sparc/vm/sparc.ad @ 1016:d40f03b57795
6890984: Comparison of 2 arrays could cause VM crash
Summary: Restore original null checks.
Reviewed-by: never, cfang
author | kvn |
---|---|
date | Wed, 14 Oct 2009 15:03:32 -0700 |
parents | 1ce3281a8e93 |
children | f875b4f472f7 |
comparison
equal
deleted
inserted
replaced
1015:23862fc517bb | 1016:d40f03b57795 |
---|---|
3014 int length_offset = arrayOopDesc::length_offset_in_bytes(); | 3014 int length_offset = arrayOopDesc::length_offset_in_bytes(); |
3015 int base_offset = arrayOopDesc::base_offset_in_bytes(T_CHAR); | 3015 int base_offset = arrayOopDesc::base_offset_in_bytes(T_CHAR); |
3016 | 3016 |
3017 // return true if the same array | 3017 // return true if the same array |
3018 __ cmp(ary1_reg, ary2_reg); | 3018 __ cmp(ary1_reg, ary2_reg); |
3019 __ br(Assembler::equal, true, Assembler::pn, Ldone); | 3019 __ brx(Assembler::equal, true, Assembler::pn, Ldone); |
3020 __ delayed()->add(G0, 1, result_reg); // equal | 3020 __ delayed()->add(G0, 1, result_reg); // equal |
3021 | 3021 |
3022 __ br_null(ary1_reg, true, Assembler::pn, Ldone); | 3022 __ br_null(ary1_reg, true, Assembler::pn, Ldone); |
3023 __ delayed()->mov(G0, result_reg); // not equal | 3023 __ delayed()->mov(G0, result_reg); // not equal |
3024 | 3024 |