diff options
author | Andrew Au <cshung@gmail.com> | 2018-07-02 15:39:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-02 15:39:03 -0700 |
commit | 5f306d6823b85ea65e1e955a490853f68dcca2a3 (patch) | |
tree | 5cbe62ac96dd879727c69cb585e7636aab4a9b07 /src/pal | |
parent | b3b9d08529baaa7afdc38b3ede5dde1e456360b2 (diff) | |
download | coreclr-5f306d6823b85ea65e1e955a490853f68dcca2a3.tar.gz coreclr-5f306d6823b85ea65e1e955a490853f68dcca2a3.tar.bz2 coreclr-5f306d6823b85ea65e1e955a490853f68dcca2a3.zip |
Debug registers cannot be copied in user mode (#18730)
Diffstat (limited to 'src/pal')
-rw-r--r-- | src/pal/src/arch/amd64/context2.S | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/src/pal/src/arch/amd64/context2.S b/src/pal/src/arch/amd64/context2.S index 46c941f2ad..4fc32582b2 100644 --- a/src/pal/src/arch/amd64/context2.S +++ b/src/pal/src/arch/amd64/context2.S @@ -76,22 +76,6 @@ LOCAL_LABEL(Done_CONTEXT_CONTROL): fxsave [rdi + CONTEXT_FltSave] LOCAL_LABEL(Done_CONTEXT_FLOATING_POINT): - test BYTE PTR [rdi + CONTEXT_ContextFlags], CONTEXT_DEBUG_REGISTERS - je LOCAL_LABEL(Done_CONTEXT_DEBUG_REGISTERS) - mov rdx, dr0 - mov [rdi + CONTEXT_Dr0], rdx - mov rdx, dr1 - mov [rdi + CONTEXT_Dr1], rdx - mov rdx, dr2 - mov [rdi + CONTEXT_Dr2], rdx - mov rdx, dr3 - mov [rdi + CONTEXT_Dr3], rdx - mov rdx, dr6 - mov [rdi + CONTEXT_Dr6], rdx - mov rdx, dr7 - mov [rdi + CONTEXT_Dr7], rdx -LOCAL_LABEL(Done_CONTEXT_DEBUG_REGISTERS): - free_stack 8 ret LEAF_END CONTEXT_CaptureContext, _TEXT @@ -107,31 +91,15 @@ LEAF_ENTRY RtlRestoreContext, _TEXT #ifdef HAS_ASAN test BYTE PTR [rdi + CONTEXT_ContextFlags], CONTEXT_CONTROL - je LOCAL_LABEL(Restore_CONTEXT_DEBUG_REGISTERS) + je LOCAL_LABEL(Restore_CONTEXT_FLOATING_POINT) push_nonvol_reg rdi push_nonvol_reg rsi call EXTERNAL_C_FUNC(__asan_handle_no_return) pop_nonvol_reg rsi pop_nonvol_reg rdi -LOCAL_LABEL(Restore_CONTEXT_DEBUG_REGISTERS): +LOCAL_LABEL(Restore_CONTEXT_FLOATING_POINT): #endif - test BYTE PTR [rdi + CONTEXT_ContextFlags], CONTEXT_DEBUG_REGISTERS - je LOCAL_LABEL(Done_Restore_CONTEXT_DEBUG_REGISTERS) - mov rdx, [rdi + CONTEXT_Dr0] - mov dr0, rdx - mov rdx, [rdi + CONTEXT_Dr1] - mov dr1, rdx - mov rdx, [rdi + CONTEXT_Dr2] - mov dr2, rdx - mov rdx, [rdi + CONTEXT_Dr3] - mov dr3, rdx - mov rdx, [rdi + CONTEXT_Dr6] - mov dr6, rdx - mov rdx, [rdi + CONTEXT_Dr7] - mov dr7, rdx -LOCAL_LABEL(Done_Restore_CONTEXT_DEBUG_REGISTERS): - test BYTE PTR [rdi + CONTEXT_ContextFlags], CONTEXT_FLOATING_POINT je LOCAL_LABEL(Done_Restore_CONTEXT_FLOATING_POINT) fxrstor [rdi + CONTEXT_FltSave] |