Re: [rvm-research] Bytecode merge is disabled for aload in Baseline compiler
Lingyu Zhu <[email protected]> Thu, 23 Nov 2017 23:18:07 +0800
| Newsgroups | gmane.comp.java.jikes.rvm.devel |
|---|---|
| Message-ID | <CACFGcbZhU3Xms8tcpmTVoi46=ekcFGk8DknT3fk=Kksn-NS7Lw@mail.gmail.com> |
I have fixed the issues and made a patch accroding to your requirement. Thanks for your patience. On Wed, Nov 22, 2017 at 4:19 AM, Erik Brangs <[email protected]> wrote: > Hi, > > On 21.11.2017 09:08, Lingyu Zhu wrote: > > Should I provide one contributor statement for each patch I send in the > future or Is it one time thing? > > If you don't want to provide a contributor statement for each patch, you > can use the "batch" contributor statement at > http://www.jikesrvm.org/files/batch-single-contrib.txt . > > > STATEMENT OF ORIGIN FOR A SINGLE CONTRIBUTOR > > [...] > > Thanks. > > I've reviewed the patch and it looks mostly correct. > > If you want to be listed as the author in the commit message (i.e. author > field in git log), please send a patch that can be applied with git am > (e.g. using git format-patch -1 HEAD). In that case, you should also remove > the unused import for JBC_nop from the BaselineCompiler and remove the > commented out line. Unused imports cause Checkstyle failures which makes > the pre-commit test run fail. If being mentioned in the commit message is > enough for you, I would just fix the remaining issues myself. > > > Kind regards, > > Erik Brangs > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Jikesrvm-researchers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Jikesrvm-researchers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
0001-enable-byte-code-merge-for-aload-and-fix-assertion-e.patch
(application/octet-stream, 3.6 KB)
From 5f7607b0dcbd9b3c095b3ec5294e427867681a73 Mon Sep 17 00:00:00 2001 From: Lingyu Zhu <[email protected]> Date: Thu, 23 Nov 2017 22:40:55 +0800 Subject: [PATCH] enable byte code merge for aload and fix assertion error --- rvm/src/org/jikesrvm/compilers/baseline/BaselineCompiler.java | 3 +-- .../org/jikesrvm/compilers/baseline/ia32/BaselineCompilerImpl.java | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/rvm/src/org/jikesrvm/compilers/baseline/BaselineCompiler.java b/rvm/src/org/jikesrvm/compilers/baseline/BaselineCompiler.java index f9fcc0e..d202783 100644 --- a/rvm/src/org/jikesrvm/compilers/baseline/BaselineCompiler.java +++ b/rvm/src/org/jikesrvm/compilers/baseline/BaselineCompiler.java @@ -20,7 +20,6 @@ import static org.jikesrvm.classloader.BytecodeConstants.JBC_ifgt; import static org.jikesrvm.classloader.BytecodeConstants.JBC_ifle; import static org.jikesrvm.classloader.BytecodeConstants.JBC_iflt; import static org.jikesrvm.classloader.BytecodeConstants.JBC_ifne; -import static org.jikesrvm.classloader.BytecodeConstants.JBC_nop; import static org.jikesrvm.runtime.ExitStatus.EXIT_STATUS_BOGUS_COMMAND_LINE_ARG; import static org.jikesrvm.runtime.UnboxedSizeConstants.LOG_BYTES_IN_ADDRESS; @@ -431,7 +430,7 @@ public abstract class BaselineCompiler extends TemplateCompilerFramework { if (!mergeBytecodes || basicBlockBoundary()) { emit_regular_aload(index); } else { - int nextBC = JBC_nop; // bcodes.peekNextOpcode(); + int nextBC = bcodes.peekNextOpcode(); switch (nextBC) { case JBC_getfield: { int gfIndex = bcodes.index(); diff --git a/rvm/src/org/jikesrvm/compilers/baseline/ia32/BaselineCompilerImpl.java b/rvm/src/org/jikesrvm/compilers/baseline/ia32/BaselineCompilerImpl.java index 1738cb9..e285f42 100644 --- a/rvm/src/org/jikesrvm/compilers/baseline/ia32/BaselineCompilerImpl.java +++ b/rvm/src/org/jikesrvm/compilers/baseline/ia32/BaselineCompilerImpl.java @@ -2669,7 +2669,7 @@ public final class BaselineCompilerImpl extends BaselineCompiler { asm.emitMOVZX_Reg_RegDisp_Word(T0, S0, fieldOffset); // T0 is field value asm.emitPUSH_Reg(T0); // place value on stack } else if (fieldType.isIntType() || fieldType.isFloatType() || - (VM.BuildFor32Addr && fieldType.isWordType())) { + (VM.BuildFor32Addr && fieldType.isWordLikeType())) { // 32bit load stackMoveHelper(S0, offset); // S0 is object reference if (VM.BuildFor32Addr) { @@ -2682,7 +2682,7 @@ public final class BaselineCompilerImpl extends BaselineCompiler { // 64bit load if (VM.VerifyAssertions) { VM._assert(fieldType.isLongType() || fieldType.isDoubleType() || - (VM.BuildFor64Addr && fieldType.isWordType())); + (VM.BuildFor64Addr && fieldType.isWordLikeType())); } stackMoveHelper(S0, offset); // S0 is object reference if (VM.BuildFor32Addr && field.isVolatile()) { @@ -2701,7 +2701,7 @@ public final class BaselineCompilerImpl extends BaselineCompiler { asm.emitPUSH_RegDisp(S0, fieldOffset.plus(ONE_SLOT)); // place high half on stack asm.emitPUSH_RegDisp(S0, fieldOffset); // place low half on stack } else { - if (!fieldType.isWordType()) { + if (!fieldType.isWordLikeType()) { adjustStack(-WORDSIZE, true); // add empty slot } asm.emitPUSH_RegDisp(S0, fieldOffset); // place value on stack -- 2.7.4