Skip to content

Commit 55c5946

Browse files
Fix Linker.Option.critical(true)
* Array addresses are passed in int registers * Fix shuffle index mask
1 parent d87238f commit 55c5946

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/runtime/panama/AbstractArgumentsCalculator.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,17 @@ protected AbstractArgumentsCalculator(Platform platform, VMStorage[] callIntRegs
4242

4343
protected static boolean isInt(Klass type) {
4444
return switch (type.getJavaKind()) {
45-
case Boolean, Byte, Char, Short, Int, Long -> true;
45+
case Boolean, Byte, Char, Short, Int, Long, Object -> true;
4646
case Float, Double -> false;
47-
case Void, Illegal, Object, ReturnAddress -> throw EspressoError.shouldNotReachHere(type.getJavaKind().toString());
47+
case Void, Illegal, ReturnAddress -> throw EspressoError.shouldNotReachHere(type.getJavaKind().toString());
4848
};
4949
}
5050

5151
protected static boolean isFloat(Klass type) {
5252
return switch (type.getJavaKind()) {
53-
case Boolean, Byte, Char, Short, Int, Long -> false;
53+
case Boolean, Byte, Char, Short, Int, Long, Object -> false;
5454
case Float, Double -> true;
55-
case Void, Illegal, Object, ReturnAddress -> throw EspressoError.shouldNotReachHere(type.getJavaKind().toString());
55+
case Void, Illegal, ReturnAddress -> throw EspressoError.shouldNotReachHere(type.getJavaKind().toString());
5656
};
5757
}
5858
}

espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/runtime/panama/DowncallStubs.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ public DowncallStub getStub(long downcallStub, EspressoContext ctx) {
245245

246246
public static final class Shuffle {
247247
private static final int POINTER_ARG_FLAG = 1 << 31;
248-
private static final int INDEX_ARG_MASK = 0x8FFF_FFFF;
248+
private static final int INDEX_ARG_MASK = 0x7FFF_FFFF;
249249

250250
private static int encode(int idx, NativeType type) {
251251
int res = idx;

0 commit comments

Comments
 (0)