Re: [rvm-research] Bytecode merge is disabled for aload in Baseline compiler

Lingyu Zhu <[email protected]> Tue, 21 Nov 2017 16:08:25 +0800
Newsgroups gmane.comp.java.jikes.rvm.devel
Message-ID <CACFGcbZabPOu6=ET7Eww6Bz=ZN2cFkW5os9mbrH36wata037Jw@mail.gmail.com>
Hi, Erik
Should I provide one contributor statement for each patch I send in the
future or Is it one time thing?

STATEMENT OF ORIGIN FOR A SINGLE CONTRIBUTOR

I, Lingyu Zhu:

(a) represent that either:

  (i) I am the only author and owner of the contributed software
      (described as/entitled ) fixed an assertion bug,
      which was neither derived nor copied from any other software,
  or

 (ii) that any exception to (i) is software which was obtained under the
      EPL (Eclipse Public License),

and

(b)  hereby agree to license this contributed software under the EPL.


On Tue, Nov 21, 2017 at 1:44 PM, Erik Brangs <[email protected]> wrote:

> Hi,
>
> On 20.11.2017 16:56, Lingyu Zhu wrote:
> > I fixed the assertion by referencing emit_resolved_getfield().
> Prototype now can build and I ran dacapo bench, it also pass.
>
> Thank you. The patch looks good at first glance. I'll review it later.
>
> In the meantime, please provide us with a contributor statement. You can
> find them at the bottom of the page at http://www.jikesrvm.org/
> Contributions/ .
>
>
> 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
enable_merging_and_fix_assertion.diff (text/plain, 2.7 KB)
diff --git a/rvm/src/org/jikesrvm/compilers/baseline/BaselineCompiler.java b/rvm/src/org/jikesrvm/compilers/baseline/BaselineCompiler.java
index f9fcc0e..4152e78 100644
--- a/rvm/src/org/jikesrvm/compilers/baseline/BaselineCompiler.java
+++ b/rvm/src/org/jikesrvm/compilers/baseline/BaselineCompiler.java
@@ -431,7 +431,8 @@ public abstract class BaselineCompiler extends TemplateCompilerFramework {
     if (!mergeBytecodes || basicBlockBoundary()) {
       emit_regular_aload(index);
     } else {
-      int nextBC = JBC_nop; // bcodes.peekNextOpcode();
+      //int nextBC = JBC_nop;
+      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 a92c14e..23b9258 100644
--- a/rvm/src/org/jikesrvm/compilers/baseline/ia32/BaselineCompilerImpl.java
+++ b/rvm/src/org/jikesrvm/compilers/baseline/ia32/BaselineCompilerImpl.java
@@ -2629,7 +2629,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) {
@@ -2642,7 +2642,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()) {
@@ -2661,7 +2661,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