Skip to content

Commit aaf921f

Browse files
teshullChristian Wimmer
authored andcommitted
Lower AArch64ReadNodes to proper AArch64Kinds.
1 parent 7461d76 commit aaf921f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/src/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64ArithmeticLIRGenerator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ public Value emitExtendMemory(boolean isSigned, AArch64Kind accessKind, int resu
121121
* Issue an extending load of the proper bit size and set the result to the proper kind.
122122
*/
123123
GraalError.guarantee(accessKind.isInteger(), "can only extend integer kinds");
124-
Variable result = getLIRGen().newVariable(LIRKind.value(resultBits == 32 ? AArch64Kind.DWORD : AArch64Kind.QWORD));
124+
AArch64Kind resultKind = resultBits <= 32 ? AArch64Kind.DWORD : AArch64Kind.QWORD;
125+
Variable result = getLIRGen().newVariable(LIRKind.value(resultKind));
125126

126-
int dstBitSize = resultBits <= 32 ? 32 : 64;
127127
AArch64Move.ExtendKind extend = isSigned ? AArch64Move.ExtendKind.SIGN_EXTEND : AArch64Move.ExtendKind.ZERO_EXTEND;
128-
getLIRGen().append(new AArch64Move.LoadOp(accessKind, dstBitSize, extend, result, address, state));
128+
getLIRGen().append(new AArch64Move.LoadOp(accessKind, resultKind.getSizeInBytes() * Byte.SIZE, extend, result, address, state));
129129
return result;
130130
}
131131

0 commit comments

Comments
 (0)