[NativeWrapper] stack_guard_state_offset: fix unaligned lwu

Sun, 08 May 2016 12:25:24 -0400

author
Jin
date
Sun, 08 May 2016 12:25:24 -0400
changeset 5
7e3d3484b275
parent 4
87ed97bc0867
child 6
fbd9470e188d

[NativeWrapper] stack_guard_state_offset: fix unaligned lwu

When running d.java from http://10.2.5.28/dev/wiki/JDK-test-programs,

the unaligned counter growes at 1656301 /s

An enum type should be read with LW, not LD.

Effect:
* d.java: 0 unaligned access

src/cpu/mips/vm/sharedRuntime_mips_64.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/cpu/mips/vm/sharedRuntime_mips_64.cpp	Sat May 07 07:38:03 2016 -0400
     1.2 +++ b/src/cpu/mips/vm/sharedRuntime_mips_64.cpp	Sun May 08 12:25:24 2016 -0400
     1.3 @@ -2701,7 +2701,7 @@
     1.4    __ bind(after_transition);
     1.5  	Label reguard;
     1.6  	Label reguard_done;
     1.7 -	__ ld(AT, thread, in_bytes(JavaThread::stack_guard_state_offset())); 
     1.8 +	__ lw(AT, thread, in_bytes(JavaThread::stack_guard_state_offset())); 
     1.9  	__ addi(AT, AT, -JavaThread::stack_guard_yellow_disabled); 
    1.10  	__ beq(AT, R0, reguard);
    1.11  	__ delayed()->nop();  

mercurial