Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1033,8 +1033,8 @@ private boolean isNarrowOop(Value oopValue) {
return oopValue.getPlatformKind() != runtime.getHostJVMCIBackend().getTarget().arch.getWordKind();
}

private boolean isVector(Value vectorValue) {
return vectorValue.getPlatformKind().getVectorLength() > 1;
private boolean isVector(Value value) {
return value.getPlatformKind().getVectorLength() > 1;
}

private void writeJavaValue(JavaValue value, JavaKind kind) {
Expand All @@ -1047,12 +1047,30 @@ private void writeJavaValue(JavaValue value, JavaKind kind) {
writeTag(NULL_CONSTANT);
} else if (value instanceof RegisterValue) {
RegisterValue reg = (RegisterValue) value;
Tag tag = kind == JavaKind.Object ? (isVector(reg) ? REGISTER_VECTOR : isNarrowOop(reg) ? REGISTER_NARROW_OOP : REGISTER_OOP) : REGISTER_PRIMITIVE;
Tag tag;
if (kind == JavaKind.Object) {
if (isVector(reg)) {
tag = REGISTER_VECTOR;
} else {
tag = isNarrowOop(reg) ? REGISTER_NARROW_OOP : REGISTER_OOP;
}
} else {
tag = REGISTER_PRIMITIVE;
}
writeTag(tag);
writeRegister(reg.getRegister());
} else if (value instanceof StackSlot) {
StackSlot slot = (StackSlot) value;
Tag tag = kind == JavaKind.Object ? (isVector(slot) ? STACK_SLOT_VECTOR : isNarrowOop(slot) ? STACK_SLOT_NARROW_OOP : STACK_SLOT_OOP) : STACK_SLOT_PRIMITIVE;
Tag tag;
if (kind == JavaKind.Object) {
if (isVector(slot)) {
tag = STACK_SLOT_VECTOR;
} else {
tag = isNarrowOop(slot) ? STACK_SLOT_NARROW_OOP : STACK_SLOT_OOP;
}
} else {
tag = STACK_SLOT_PRIMITIVE;
}
writeTag(tag);
writeS2("offset", slot.getRawOffset());
writeBoolean("addRawFrameSize", slot.getRawAddFrameSize());
Expand Down