This repository was archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[ARM64/Unix] #9500
Merged
Merged
[ARM64/Unix] #9500
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
0e778d7
[Arm64/Unix] Update arm64 *.S files to match *.asm
sdmaclea 6caae84
[Arm64/Unix] Fix CONTEXTToNativeContext()
sdmaclea 2e7f2d1
[Arm64/Unix] ThrowExceptionFromContextInternal
sdmaclea 86cfff3
[Arm64/Unix] Preserve x8 argument register
sdmaclea 2fad44a
[ARM64/Unix] Add CFI directives
sdmaclea 011e693
[Arm64/Unix] Fix RtlRestoreContext
sdmaclea efb5663
[Arm64/Unix] Restore FP from CurrentContextPointers
sdmaclea 745ae83
[Arm64/Unix] fix pointer math
sdmaclea da3093a
[Arm64/Unix] Fix CallDescrWorkerInternal personality
sdmaclea d05be2c
[Arm64/Unix] More Fp fixups
sdmaclea 6e4d219
[Arm64/Unix] CallEHFunclet machine state
sdmaclea 775fd5a
[Arm64/Unix] CallDescrWorkerInternal
sdmaclea da460d6
[Arm64/Unix] RtlVirtualUnwind update pointers
sdmaclea dfca815
[Arm64] LazyMachState fixes
sdmaclea dccb0d3
[Arm64/Unix] disable USE_REDIRECT_FOR_GCSTRESS
sdmaclea 1bf23c0
[Arm64] ClearRegDisplayArgumentAndScratchRegisters()
sdmaclea 72a3896
[Arm64] Remove unnecesary copy in TransitionFrame
sdmaclea 3e9676c
[Arm64/Unix] Fix comment per review
sdmaclea b8be0a5
[Arm64/Unix] move constants per review
sdmaclea fb41fca
[Arm64/Unix] Use ldp per review
sdmaclea 1f5e9a7
[Arm64/Unix] Fix indentation per review
sdmaclea ce64cbb
[Arm64/Unix] Remove m_Unwound per review comments
sdmaclea 87b96cb
[Arm64/Unix] Use PREPARE_EXTERNAL_VAR to access globals
sdmaclea d18c6d3
[Arm64/Unix] Fix more whitespace per earlier review comments
sdmaclea File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,50 @@ | ||
//Licensed to the .NET Foundation under one or more agreements. | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
#include "asmconstants.h" | ||
#include "unixasmmacros.inc" | ||
|
||
NESTED_ENTRY FuncEvalHijack, _TEXT, FuncEvalHijackPersonalityRoutine | ||
// | ||
// hijacking stub used to perform a func-eval, see Debugger::FuncEvalSetup() for use. | ||
// | ||
// on entry: | ||
// x0 : pointer to DebuggerEval object | ||
// | ||
|
||
// NOTE: FuncEvalHijackPersonalityRoutine is dependent on the stack layout so if | ||
// you change the prolog you will also need to update the personality routine. | ||
// @dbgtodo- once we port Funceval, use the ExceptionHijack stub instead of this func-eval stub. | ||
NESTED_ENTRY FuncEvalHijack, _TEXT, UnhandledExceptionHandlerUnix | ||
|
||
// push arg to the stack so our personality routine can find it | ||
// push lr to get good stacktrace in debugger | ||
// NOTE: FuncEvalHijackPersonalityRoutine is dependent on the stack layout so if | ||
// you change the prolog you will also need to update the personality routine. | ||
|
||
PROLOG_SAVE_REG_PAIR fp, lr, #-32 | ||
// push arg to the stack so our personality routine can find it | ||
// push lr to get good stacktrace in debugger | ||
PROLOG_SAVE_REG_PAIR_INDEXED fp, lr, -32 | ||
str x0, [sp, #16] | ||
// FuncEvalHijackWorker returns the address we should jump to. | ||
bl FuncEvalHijackWorker | ||
|
||
EPILOG_STACK_FREE 32 | ||
EPILOG_BRANCH_REG x0 | ||
NESTED_END FuncEvalHijack | ||
|
||
// This is the general purpose hijacking stub. The DacDbi Hijack primitive will | ||
// set up the stack and then set the IP here, and so this just makes the call. | ||
NESTED_ENTRY ExceptionHijack, _TEXT, UnhandledExceptionHandlerUnix | ||
|
||
// make the call | ||
bl ExceptionHijackWorker | ||
|
||
// effective NOP to terminate unwind | ||
mov x3, x3 | ||
|
||
// *** should never get here *** | ||
EMIT_BREAKPOINT | ||
|
||
// exported label so the debugger knows where the end of this function is | ||
PATCH_LABEL ExceptionHijackEnd | ||
|
||
NESTED_END ExceptionHijack, _TEXT | ||
|
||
str x0, [sp, #16] | ||
// FuncEvalHijackWorker returns the address we should jump to. | ||
bl FuncEvalHijackWorker | ||
|
||
EPILOG_STACK_FREE 32 | ||
EPILOG_BRANCH_REG x0 | ||
NESTED_END FuncEvalHijack, _TEXT | ||
|
||
//NESTED_ENTRY ExceptionHijack,,ExceptionHijackPersonalityRoutine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this change necessary? We have the .global before the label on amd64, so if it was just a cosmetic change, I would prefer reverting it to keep the look consistent with amd64.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the time I was trying to remove cosmetic difference between amd64 and arm64. I'll take a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just confirmed that this currently matches amd64.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am sorry, you're right. I don't know at what I was looking before.