Request for reviews (S): 7177923: SIGBUS on sparc in compiled code for java.util.Calendar.clear()
Christian Thalinger
christian.thalinger at oracle.com
Tue Jun 19 11:12:58 PDT 2012
On Jun 18, 2012, at 9:14 PM, Vladimir Kozlov wrote:
> http://cr.openjdk.java.net/~kvn/7177923/webrev
>
> 7177923: SIGBUS on sparc in compiled code for java.util.Calendar.clear()
>
> The code in clear() initialize 3 arrays in a loop. Two arrays are int[] and one is boolean[]. After 7119644 changes all 3 are vectorized. Pre-loop iterations are adjusted to align access for int[] arrays since there are more memory accesses to them. A vector on sparc contains 2 integer values so 2 iterations are executed in pre-loop which is not enough to align boolean[] array (which has 8 elements in vector). As result vector store into boolean[] throw SIGBUS in main loop.
>
> The solution is disable vectorization of a memory access with more elements per vector than one which is used for alignment if unaligned memory access is not allowed.
Looks good.
>
> Also fixed incorrect matching rules in x86.ad and re-factored method vector_width_in_bytes().
So the vectorization didn't work on x86?
-- Chris
>
> Tested with failing tests on sparc.
>
> Thanks,
> Vladimir
More information about the hotspot-compiler-dev
mailing list