275
275
// where the tail - calling thread had saved LR , which may not match where we have saved LR.
276
276
277
277
ldr x1 , [ x2 , #OFFSETOF__Thread__m_pvHijackedReturnAddress ]
278
- cbz x1 , NotHijacked
278
+ cbz x1 , LOCAL_LABEL( NotHijacked)
279
279
280
280
ldr x3 , [ x2 , #OFFSETOF__Thread__m_ppvHijackedReturnAddressLocation ]
281
281
286
286
287
287
add x12 , sp , #(STACKSIZEOF_ExInfo + SIZEOF__PAL_LIMITED_CONTEXT) // re - compute SP at callsite
288
288
cmp x3 , x12 // if (m_ppvHijackedReturnAddressLocation < SP at callsite)
289
- blo TailCallWasHijacked
289
+ blo LOCAL_LABEL( TailCallWasHijacked)
290
290
291
291
// normal case where a valid return address location is hijacked
292
292
str x1 , [ x3 ]
293
- b ClearThreadState
293
+ b LOCAL_LABEL( ClearThreadState)
294
294
295
- TailCallWasHijacked:
295
+ LOCAL_LABEL( TailCallWasHijacked) :
296
296
297
297
// Abnormal case where the return address location is now invalid because we ended up here via a tail
298
298
// call . In this case , our hijacked return address should be the correct caller of this method.
@@ -302,13 +302,13 @@ TailCallWasHijacked:
302
302
str lr , [ sp , #(rsp_offsetof_Context + OFFSETOF__PAL_LIMITED_CONTEXT__LR) ]
303
303
str lr , [ sp , #(rsp_offsetof_Context + OFFSETOF__PAL_LIMITED_CONTEXT__IP) ]
304
304
305
- ClearThreadState:
305
+ LOCAL_LABEL( ClearThreadState) :
306
306
307
307
// clear the Thread's hijack state
308
308
str xzr , [ x2 , #OFFSETOF__Thread__m_ppvHijackedReturnAddressLocation ]
309
309
str xzr , [ x2 , #OFFSETOF__Thread__m_pvHijackedReturnAddress ]
310
310
311
- NotHijacked:
311
+ LOCAL_LABEL( NotHijacked) :
312
312
313
313
add x1 , sp , #rsp_offsetof_ExInfo // x1 < - ExInfo *
314
314
str xzr , [ x1 , #OFFSETOF__ExInfo__m_exception ] // pExInfo - >m_exception = null
@@ -429,13 +429,13 @@ NotHijacked:
429
429
430
430
add x12 , x5 , #OFFSETOF__Thread__m_ThreadStateFlags
431
431
432
- ClearRetry_Catch:
432
+ LOCAL_LABEL( ClearRetry_Catch) :
433
433
ldxr w4 , [ x12 ]
434
434
bic w4 , w4 , #TSF_DoNotTriggerGc
435
435
stxr w6 , w4 , [ x12 ]
436
- cbz w6 , ClearSuccess_Catch
437
- b ClearRetry_Catch
438
- ClearSuccess_Catch:
436
+ cbz w6 , LOCAL_LABEL( ClearSuccess_Catch)
437
+ b LOCAL_LABEL( ClearRetry_Catch)
438
+ LOCAL_LABEL( ClearSuccess_Catch) :
439
439
440
440
//
441
441
// set preserved regs to the values expected by the funclet
@@ -487,21 +487,21 @@ ClearSuccess_Catch:
487
487
ldr x3 , [ sp , #rsp_offset_x3 ] // x3 < - current ExInfo *
488
488
ldr x2 , [ x2 , #OFFSETOF__REGDISPLAY__SP ] // x2 < - resume SP value
489
489
490
- PopExInfoLoop:
490
+ LOCAL_LABEL( PopExInfoLoop) :
491
491
ldr x3 , [ x3 , #OFFSETOF__ExInfo__m_pPrevExInfo ] // x3 < - next ExInfo
492
- cbz x3 , DonePopping // if (pExInfo == null) { we're done }
492
+ cbz x3 , LOCAL_LABEL( DonePopping) // if (pExInfo == null) { we're done }
493
493
cmp x3 , x2
494
- blt PopExInfoLoop // if (pExInfo < resume SP } { keep going }
494
+ blt LOCAL_LABEL( PopExInfoLoop) // if (pExInfo < resume SP } { keep going }
495
495
496
- DonePopping:
496
+ LOCAL_LABEL( DonePopping) :
497
497
str x3 , [ x1 , #OFFSETOF__Thread__m_pExInfoStackHead ] // store the new head on the Thread
498
498
499
499
PREPARE_EXTERNAL_VAR_INDIRECT_W RhpTrapThreads , 3
500
500
501
- tbz x3 , #TrapThreadsFlags_AbortInProgress_Bit , NoAbort
501
+ tbz x3 , #TrapThreadsFlags_AbortInProgress_Bit , LOCAL_LABEL( NoAbort)
502
502
503
503
ldr x3 , [ sp , #rsp_offset_is_not_handling_thread_abort ]
504
- cbnz x3 , NoAbort
504
+ cbnz x3 , LOCAL_LABEL( NoAbort)
505
505
506
506
// It was the ThreadAbortException , so rethrow it
507
507
// reset SP
@@ -510,7 +510,7 @@ DonePopping:
510
510
mov sp , x2
511
511
b C_FUNC(RhpThrowHwEx)
512
512
513
- NoAbort:
513
+ LOCAL_LABEL( NoAbort) :
514
514
// reset SP and jump to continuation address
515
515
mov sp , x2
516
516
br x0
@@ -564,13 +564,13 @@ NoAbort:
564
564
565
565
add x12 , x2 , #OFFSETOF__Thread__m_ThreadStateFlags
566
566
567
- ClearRetry:
567
+ LOCAL_LABEL( ClearRetry) :
568
568
ldxr w4 , [ x12 ]
569
569
bic w4 , w4 , #TSF_DoNotTriggerGc
570
570
stxr w3 , w4 , [ x12 ]
571
- cbz w3 , ClearSuccess
572
- b ClearRetry
573
- ClearSuccess:
571
+ cbz w3 , LOCAL_LABEL( ClearSuccess)
572
+ b LOCAL_LABEL( ClearRetry)
573
+ LOCAL_LABEL( ClearSuccess) :
574
574
575
575
//
576
576
// set preserved regs to the values expected by the funclet
@@ -602,13 +602,13 @@ ClearSuccess:
602
602
ldr x2 , [ sp , rsp_FinallyFunclet_offset_thread ]
603
603
604
604
add x12 , x2 , #OFFSETOF__Thread__m_ThreadStateFlags
605
- SetRetry:
605
+ LOCAL_LABEL( SetRetry) :
606
606
ldxr w1 , [ x12 ]
607
607
orr w1 , w1 , #TSF_DoNotTriggerGc
608
608
stxr w3 , w1 , [ x12 ]
609
- cbz w3 , SetSuccess
610
- b SetRetry
611
- SetSuccess:
609
+ cbz w3 , LOCAL_LABEL( SetSuccess)
610
+ b LOCAL_LABEL( SetRetry)
611
+ LOCAL_LABEL( SetSuccess) :
612
612
613
613
ldp d8 , d9 , [ sp , # 0x00 ]
614
614
ldp d10 , d11 , [ sp , # 0x10 ]
@@ -707,13 +707,13 @@ SetSuccess:
707
707
708
708
add x12 , x5 , #OFFSETOF__Thread__m_ThreadStateFlags
709
709
710
- ClearRetry_Propagate:
710
+ LOCAL_LABEL( ClearRetry_Propagate) :
711
711
ldxr w4 , [ x12 ]
712
712
bic w4 , w4 , #TSF_DoNotTriggerGc
713
713
stxr w6 , w4 , [ x12 ]
714
- cbz w6 , ClearSuccess_Propagate
715
- b ClearRetry_Propagate
716
- ClearSuccess_Propagate:
714
+ cbz w6 , LOCAL_LABEL( ClearSuccess_Propagate)
715
+ b LOCAL_LABEL( ClearRetry_Propagate)
716
+ LOCAL_LABEL( ClearSuccess_Propagate) :
717
717
718
718
//
719
719
// set preserved regs to the values expected by the funclet
@@ -749,13 +749,13 @@ ClearSuccess_Propagate:
749
749
ldr x3 , [ sp , #rsp_offset_x3 ] // x3 < - current ExInfo *
750
750
ldr x2 , [ x2 , #OFFSETOF__REGDISPLAY__SP ] // x2 < - resume SP value
751
751
752
- Propagate_PopExInfoLoop:
752
+ LOCAL_LABEL( Propagate_PopExInfoLoop) :
753
753
ldr x3 , [ x3 , #OFFSETOF__ExInfo__m_pPrevExInfo ] // x3 < - next ExInfo
754
- cbz x3 , Propagate_DonePopping // if (pExInfo == null) { we're done }
754
+ cbz x3 , LOCAL_LABEL( Propagate_DonePopping) // if (pExInfo == null) { we're done }
755
755
cmp x3 , x2
756
- blt Propagate_PopExInfoLoop // if (pExInfo < resume SP } { keep going }
756
+ blt LOCAL_LABEL( Propagate_PopExInfoLoop) // if (pExInfo < resume SP } { keep going }
757
757
758
- Propagate_DonePopping:
758
+ LOCAL_LABEL( Propagate_DonePopping) :
759
759
str x3 , [ x1 , #OFFSETOF__Thread__m_pExInfoStackHead ] // store the new head on the Thread
760
760
761
761
// restore preemptive mode
0 commit comments