Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(0.20.0) AArch64: DDR: Implement StackWalker.java and MethodMetaData.java #9196

Merged
Show file tree
Hide file tree
Changes from all 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
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2009, 2019 IBM Corp. and others
* Copyright (c) 2009, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -516,6 +516,21 @@ public void jitAddSpilledRegisters(WalkState walkState, VoidPointer stackMap) th
}
while (! savedGPRs.eq(0));
}
} else if (J9ConfigFlags.arch_aarch64) {
savedGPRs = registerSaveDescription.bitAnd(0xFFFF0000L);

if (! savedGPRs.eq(0)) {
saveOffset = registerSaveDescription.bitAnd(0xFFFF);
saveCursor = walkState.bp.subOffset(saveOffset);
do {
if (savedGPRs.anyBitsIn(1)) {
walkState.registerEAs[mapCursor] = saveCursor;
saveCursor = saveCursor.add(1);
}
++mapCursor;
savedGPRs = savedGPRs.rightShift(1);
} while (! savedGPRs.eq(0));
}
}

jitPrintRegisterMapArray(walkState, "Frame");
Expand Down Expand Up @@ -569,6 +584,11 @@ public UDATA getJitDataResolvePushes() throws CorruptDataException {
12 slots saved integer registers
*/
return new UDATA(12);
} else if (J9ConfigFlags.arch_aarch64) {
/* AArch64 data resolve shape
* 29 integer registers (not saving x29/x30/x31)
*/
return new UDATA(29);
} else if (J9ConfigFlags.arch_s390) {
/* 390 data resolve shape
16 integer registers
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2009, 2019 IBM Corp. and others
* Copyright (c) 2009, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -272,6 +272,8 @@ public StackWalkResult walkStackFrames(WalkState walkState, UDATAPointer sp, UDA
/* esp */
javaSPName = "esp";
}
} else if (J9ConfigFlags.arch_aarch64) {
javaSPName = "r20";
} else {
throw new IllegalArgumentException("Unsupported platform");
}
Expand Down