[Interpreter] ProfileInterpreter: fix unaligned lwu

Sat, 07 May 2016 07:38:03 -0400

author
Jin
date
Sat, 07 May 2016 07:38:03 -0400
changeset 4
87ed97bc0867
parent 3
ef5b28e8d433
child 5
7e3d3484b275

[Interpreter] ProfileInterpreter: fix unaligned lwu

When running compress in debug mode,

/mnt/j2sdk-image/bin/java \
-Xmx68M -Xms68M \
-XX:CompileCommand="compileonly,spec/benchmarks/compress/Decompressor\$SuffixTable.of1" \
-XX:+PrintCompilation \
-XX:-CICompileNatives \
-XX:+ProfileInterpreter \
-XX:-UseTLAB \
-XX:+UseLoopCounter \
-XX:+UseOnStackReplacement \
-XX:+UseSerialGC \
-jar SPECjvm2008.jar -ikv -coe -ict -bt 1 \
compress

Though no method is compiled, the unaligned counter reaches 779990 /s.

This error doesn't exist in product version.

Effect:
- compress + debug + +ProfileInterpreter: 0 unaligned access

src/cpu/mips/vm/interp_masm_mips_64.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/cpu/mips/vm/interp_masm_mips_64.cpp	Thu May 05 17:04:35 2016 -0400
     1.2 +++ b/src/cpu/mips/vm/interp_masm_mips_64.cpp	Sat May 07 07:38:03 2016 -0400
     1.3 @@ -1377,7 +1377,7 @@
     1.4  
     1.5    // If the mdp is valid, it will point to a DataLayout header which is
     1.6    // consistent with the bcp.  The converse is highly probable also.
     1.7 -  lwu(tmp, mdp, in_bytes(DataLayout::bci_offset()));
     1.8 +  lhu(tmp, mdp, in_bytes(DataLayout::bci_offset()));
     1.9    ld(AT, method, in_bytes(Method::const_offset()));
    1.10    daddu(tmp, tmp, AT);
    1.11    daddiu(tmp, tmp, in_bytes(ConstMethod::codes_offset()));

mercurial