@@ -371,12 +371,11 @@ endm
371
371
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
372
372
NESTED_ENTRY RhpCallCatchFunclet , _TEXT
373
373
374
- FUNCLET_CALL_PROLOGUE 3 , 0
374
+ FUNCLET_CALL_PROLOGUE 2 , 1
375
375
376
376
;; locals
377
377
rsp_offsetof_thread = rsp_offsetof_locals
378
378
rsp_offsetof_resume_ip = rsp_offsetof_locals + 8 ;
379
- rsp_offsetof_is_handling_thread_abort = rsp_offsetof_locals + 16 ;
380
379
381
380
mov [ rsp + rsp_offsetof_arguments + 0h ], rcx ;; save arguments for later
382
381
mov [ rsp + rsp_offsetof_arguments + 8h ], rdx
@@ -386,9 +385,6 @@ NESTED_ENTRY RhpCallCatchFunclet, _TEXT
386
385
INLINE_GETTHREAD rax , rbx ;; rax <- Thread*, rbx is trashed
387
386
mov [ rsp + rsp_offsetof_thread ], rax ;; save Thread* for later
388
387
389
- cmp rcx , [ rax + OFFSETOF__Thread__m_threadAbortException ]
390
- setz byte ptr [ rsp + rsp_offsetof_is_handling_thread_abort ]
391
-
392
388
;; Clear the DoNotTriggerGc state before calling out to our managed catch funclet.
393
389
lock and dword ptr [ rax + OFFSETOF__Thread__m_ThreadStateFlags ], NOT TSF_DoNotTriggerGc
394
390
@@ -508,20 +504,8 @@ endif
508
504
xor r9 , r9 ;; r9 <- 0
509
505
endif
510
506
511
- test [ RhpTrapThreads ], TrapThreadsFlags_AbortInProgress
512
- jz @f
513
-
514
- ;; test if the exception handled by the catch was the ThreadAbortException
515
- cmp byte ptr [ rsp + rsp_offsetof_is_handling_thread_abort ], 0
516
- je @f
517
-
518
- ;; It was the ThreadAbortException, so rethrow it
519
- mov rcx , STATUS_NATIVEAOT_THREAD_ABORT
520
- mov rdx , rax ;; rdx <- continuation address as exception RIP
521
- lea rax , [ RhpThrowHwEx ] ;; Throw the ThreadAbortException as a special kind of hardware exception
522
-
523
507
;; reset RSP and jump to RAX
524
- @@: mov rsp , r8 ;; reset the SP to resume SP value
508
+ mov rsp , r8 ;; reset the SP to resume SP value
525
509
526
510
;; if have shadow stack, then we need to reconcile it with the rsp change we have just made. (r11 must contain target SSP)
527
511
rdsspq r9 ;; NB, r9 == 0 prior to this
0 commit comments