Request for reviews (S): 7177923: SIGBUS on sparc in compiled code for java.util.Calendar.clear()

Vladimir Kozlov vladimir.kozlov at oracle.com
Mon Jun 18 21:14:20 PDT 2012


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.

Also fixed incorrect matching rules in x86.ad and re-factored method 
vector_width_in_bytes().

Tested with failing tests on sparc.

Thanks,
Vladimir


More information about the hotspot-compiler-dev mailing list