Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 4039c10

Browse files
committed
Use C_FUNC where appropriate
1 parent 46d084e commit 4039c10

File tree

4 files changed

+39
-39
lines changed

4 files changed

+39
-39
lines changed

src/debug/ee/arm/dbghelpers.S

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ NESTED_ENTRY FuncEvalHijack, _TEXT, FuncEvalHijackPersonalityRoutine
2727
CHECK_STACK_ALIGNMENT
2828

2929
// FuncEvalHijackWorker returns the address we should jump to.
30-
bl FuncEvalHijackWorker
30+
bl C_FUNC(FuncEvalHijackWorker)
3131

3232
// effective NOP to terminate unwind
3333
mov r2, r2
@@ -53,7 +53,7 @@ NESTED_ENTRY ExceptionHijack, _TEXT, ExceptionHijackPersonalityRoutine
5353
CHECK_STACK_ALIGNMENT
5454

5555
// make the call
56-
bl ExceptionHijackWorker
56+
bl C_FUNC(ExceptionHijackWorker)
5757

5858
// effective NOP to terminate unwind
5959
mov r3, r3

src/vm/arm/asmhelpers.S

+34-34
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ LOCAL_LABEL(LReturnDone):
212212
// Here's the pretend call (make it real so the unwinder
213213
// doesn't think we're in the prolog)
214214
//
215-
bl TailCallHelperStub
215+
bl C_FUNC(TailCallHelperStub)
216216
//
217217
// with the real return address pointing to this real epilog
218218
//
@@ -230,7 +230,7 @@ C_FUNC(JIT_TailCallHelperStub_ReturnAddress):
230230
ldr r2, [r7, #-0x0C]
231231
cmp r2, r3
232232
beq LOCAL_LABEL(GoodGSCookie)
233-
bl DoJITFailFast
233+
bl C_FUNC(DoJITFailFast)
234234
LOCAL_LABEL(GoodGSCookie):
235235
#endif // _DEBUG
236236

@@ -279,7 +279,7 @@ LOCAL_LABEL(GoodGSCookie):
279279

280280
LOCAL_LABEL(LNullThis):
281281
mov r0, #CORINFO_NullReferenceException_ASM
282-
b JIT_InternalThrow
282+
b C_FUNC(JIT_InternalThrow)
283283

284284
LEAF_END SinglecastDelegateInvokeStub, _TEXT
285285

@@ -294,7 +294,7 @@ LOCAL_LABEL(LNullThis):
294294
CHECK_STACK_ALIGNMENT
295295

296296
mov r0, r12
297-
bl TheUMEntryPrestubWorker
297+
bl C_FUNC(TheUMEntryPrestubWorker)
298298

299299
// Record real target address in r12.
300300
mov r12, r0
@@ -321,7 +321,7 @@ UMThunkStub_StackArgs = 10*4
321321

322322
CHECK_STACK_ALIGNMENT
323323

324-
bl GetThread
324+
bl C_FUNC(GetThread)
325325
cbz r0, LOCAL_LABEL(UMThunkStub_DoThreadSetup)
326326

327327
LOCAL_LABEL(UMThunkStub_HaveThread):
@@ -382,7 +382,7 @@ LOCAL_LABEL(UMThunkStub_PostCall):
382382
LOCAL_LABEL(UMThunkStub_DoThreadSetup):
383383
sub sp, #SIZEOF__FloatArgumentRegisters
384384
vstm sp, {d0-d7}
385-
bl CreateThreadBlockThrow
385+
bl C_FUNC(CreateThreadBlockThrow)
386386
vldm sp, {d0-d7}
387387
add sp, #SIZEOF__FloatArgumentRegisters
388388
b LOCAL_LABEL(UMThunkStub_HaveThread)
@@ -392,7 +392,7 @@ LOCAL_LABEL(UMThunkStub_DoTrapReturningThreads):
392392
vstm sp, {d0-d7}
393393
mov r0, r5 // Thread* pThread
394394
ldr r1, [r7, #UMThunkStub_HiddenArg] // UMEntryThunk* pUMEntry
395-
bl UMThunkStubRareDisableWorker
395+
bl C_FUNC(UMThunkStubRareDisableWorker)
396396
vldm sp, {d0-d7}
397397
add sp, #SIZEOF__FloatArgumentRegisters
398398
b LOCAL_LABEL(UMThunkStub_InCooperativeMode)
@@ -404,7 +404,7 @@ LOCAL_LABEL(UMThunkStub_WrongAppDomain):
404404
ldr r0, [r7, #UMThunkStub_HiddenArg] // UMEntryThunk* pUMEntry
405405
mov r2, r7 // void * pArgs
406406
// remaining arguments are unused
407-
bl UM2MDoADCallBack
407+
bl C_FUNC(UM2MDoADCallBack)
408408

409409
// Restore non-FP return value.
410410
ldr r0, [r7, #0]
@@ -495,7 +495,7 @@ LOCAL_LABEL(UM2MThunk_WrapperHelper_ArgumentsSetup):
495495
add r0, sp, #__PWTB_TransitionBlock // pTransitionBlock
496496
mov r1, r12 // pMethodDesc
497497

498-
bl PreStubWorker
498+
bl C_FUNC(PreStubWorker)
499499

500500
mov r12, r0
501501

@@ -524,7 +524,7 @@ ThePreStubPatchLabel:
524524
CHECK_STACK_ALIGNMENT
525525

526526
mov r0, r12
527-
bl NDirectImportWorker
527+
bl C_FUNC(NDirectImportWorker)
528528
mov r12, r0
529529

530530
vpop {d0-d7}
@@ -555,7 +555,7 @@ ThePreStubPatchLabel:
555555
add r12,r0,r1,lsl #2
556556

557557
pop {r0-r1}
558-
b ThePreStub
558+
b C_FUNC(ThePreStub)
559559

560560
NESTED_END PrecodeFixupThunk, _TEXT
561561

@@ -574,7 +574,7 @@ ThePreStubPatchLabel:
574574
bic r1, r4, #3 // indirection cell
575575
and r3, r4, #3 // flags
576576

577-
bl VSD_ResolveWorker
577+
bl C_FUNC(VSD_ResolveWorker)
578578

579579
mov r12, r0
580580

@@ -588,7 +588,7 @@ ThePreStubPatchLabel:
588588
NESTED_ENTRY ResolveWorkerChainLookupAsmStub, _TEXT, NoHandler
589589

590590
// ARMSTUB TODO: implement chained lookup
591-
b ResolveWorkerAsmStub
591+
b C_FUNC(ResolveWorkerAsmStub)
592592

593593
NESTED_END ResolveWorkerChainLookupAsmStub, _TEXT
594594

@@ -753,7 +753,7 @@ RedirectedHandledJITCaseFor\reason\()_StubEnd:
753753
bcc LOCAL_LABEL(checkStack_neg) // if r12 is less then 0 set it to 0
754754
LOCAL_LABEL(checkStack_label1):
755755
cmp r12, r4
756-
bcc stackProbe // must probe to extend guardpage if r12 is beyond stackLimit
756+
bcc C_FUNC(stackProbe) // must probe to extend guardpage if r12 is beyond stackLimit
757757
sub r4, sp, r12 // restore value of r4
758758
bx lr
759759
LOCAL_LABEL(checkStack_neg):
@@ -813,7 +813,7 @@ LOCAL_LABEL(stackProbe_loop):
813813
// Call the helper in the VM to perform the actual fixup
814814
// and tell us where to tail call. R0 already contains
815815
// the this pointer.
816-
bl VirtualMethodFixupWorker
816+
bl C_FUNC(VirtualMethodFixupWorker)
817817

818818
// On return, R0 contains the target to tailcall to
819819
mov r12, r0
@@ -856,7 +856,7 @@ LOCAL_LABEL(stackProbe_loop):
856856

857857
mov r2, #0 // sectionIndex
858858
mov r3, #0 // pModule
859-
bl ExternalMethodFixupWorker
859+
bl C_FUNC(ExternalMethodFixupWorker)
860860

861861
// mov the address we patched to in R12 so that we can tail call to it
862862
mov r12, r0
@@ -889,7 +889,7 @@ LOCAL_LABEL(stackProbe_loop):
889889
mov r2, #0 // sectionIndex
890890
mov r3, #0 // pModule
891891

892-
bl StubDispatchFixupWorker
892+
bl C_FUNC(StubDispatchFixupWorker)
893893

894894
// mov the address we patched to in R12 so that we can tail call to it
895895
mov r12, r0
@@ -912,7 +912,7 @@ LOCAL_LABEL(stackProbe_loop):
912912

913913
CHECK_STACK_ALIGNMENT
914914

915-
bl JIT_RareDisableHelperWorker
915+
bl C_FUNC(JIT_RareDisableHelperWorker)
916916

917917
vpop {d0-d3}
918918
pop {r0-r1, r11, pc}
@@ -940,7 +940,7 @@ LOCAL_LABEL(stackProbe_loop):
940940

941941
LOCAL_LABEL(CallCppHelper1):
942942
// Tail call JIT_GetSharedNonGCStaticBase_Helper
943-
b JIT_GetSharedNonGCStaticBase_Helper
943+
b C_FUNC(JIT_GetSharedNonGCStaticBase_Helper)
944944
LEAF_END JIT_GetSharedNonGCStaticBase_SingleAppDomain, _TEXT
945945

946946

@@ -969,7 +969,7 @@ LOCAL_LABEL(CallCppHelper1):
969969

970970
LOCAL_LABEL(CallCppHelper3):
971971
// Tail call Jit_GetSharedGCStaticBase_Helper
972-
b JIT_GetSharedGCStaticBase_Helper
972+
b C_FUNC(JIT_GetSharedGCStaticBase_Helper)
973973
LEAF_END JIT_GetSharedGCStaticBase_SingleAppDomain, _TEXT
974974

975975

@@ -1006,16 +1006,16 @@ LOCAL_LABEL(CallCppHelper3):
10061006
ldr r3, [r2] // r3 = val->GetMethodTable()
10071007
ldr r12, [r12, #MethodTable__m_ElementType] // array->GetArrayElementTypeHandle()
10081008
cmp r3, r12
1009-
beq JIT_Stelem_DoWrite
1009+
beq C_FUNC(JIT_Stelem_DoWrite)
10101010

10111011
// Types didnt match but allow writing into an array of objects
10121012
ldr r3, =g_pObjectClass
10131013
ldr r3, [r3] // r3 = *g_pObjectClass
10141014
cmp r3, r12 // array type matches with Object*
1015-
beq JIT_Stelem_DoWrite
1015+
beq C_FUNC(JIT_Stelem_DoWrite)
10161016

10171017
// array type and val type do not exactly match. Raise frame and do detailed match
1018-
b JIT_Stelem_Ref_NotExactMatch
1018+
b C_FUNC(JIT_Stelem_Ref_NotExactMatch)
10191019

10201020
LOCAL_LABEL(AssigningNull):
10211021
// Assigning null doesn't need write barrier
@@ -1026,12 +1026,12 @@ LOCAL_LABEL(AssigningNull):
10261026
LOCAL_LABEL(ThrowNullReferenceException):
10271027
// Tail call JIT_InternalThrow(NullReferenceException)
10281028
ldr r0, =CORINFO_NullReferenceException_ASM
1029-
b JIT_InternalThrow
1029+
b C_FUNC(JIT_InternalThrow)
10301030

10311031
LOCAL_LABEL(ThrowIndexOutOfRangeException):
10321032
// Tail call JIT_InternalThrow(NullReferenceException)
10331033
ldr r0, =CORINFO_IndexOutOfRangeException_ASM
1034-
b JIT_InternalThrow
1034+
b C_FUNC(JIT_InternalThrow)
10351035

10361036
LEAF_END JIT_Stelem_Ref, _TEXT
10371037

@@ -1050,20 +1050,20 @@ LOCAL_LABEL(ThrowIndexOutOfRangeException):
10501050
// call ObjIsInstanceOfNoGC(val, array->GetArrayElementTypeHandle())
10511051
mov r1, r12 // array->GetArrayElementTypeHandle()
10521052
mov r0, r2
1053-
bl ObjIsInstanceOfNoGC
1053+
bl C_FUNC(ObjIsInstanceOfNoGC)
10541054
cmp r0, TypeHandle_CanCast
10551055
beq LOCAL_LABEL(DoWrite) // ObjIsInstance returned TypeHandle::CanCast
10561056

10571057
// check via raising frame
10581058
LOCAL_LABEL(NeedFrame):
1059-
mov r1, sp // r1 = &array
1060-
adds r0, sp, #8 // r0 = &val
1061-
bl ArrayStoreCheck // ArrayStoreCheck(&val, &array)
1059+
mov r1, sp // r1 = &array
1060+
adds r0, sp, #8 // r0 = &val
1061+
bl C_FUNC(ArrayStoreCheck) // ArrayStoreCheck(&val, &array)
10621062
10631063
LOCAL_LABEL(DoWrite):
10641064
pop {r0-r2}
10651065
pop {lr}
1066-
b JIT_Stelem_DoWrite
1066+
b C_FUNC(JIT_Stelem_DoWrite)
10671067

10681068
NESTED_END JIT_Stelem_Ref_NotExactMatch, _TEXT
10691069

@@ -1078,7 +1078,7 @@ LOCAL_LABEL(DoWrite):
10781078

10791079
// Branch to the write barrier (which is already correctly overwritten with
10801080
// single or multi-proc code based on the current CPU
1081-
b JIT_WriteBarrier
1081+
b C_FUNC(JIT_WriteBarrier)
10821082

10831083
LEAF_END JIT_Stelem_DoWrite, _TEXT
10841084
@@ -1284,15 +1284,15 @@ DelayLoad_MethodCall:
12841284
mov r2, r6 // sectionIndex
12851285
mov r3, r5 // pModule
12861286

1287-
bl ExternalMethodFixupWorker
1287+
bl C_FUNC(ExternalMethodFixupWorker)
12881288

12891289
// mov the address we patched to in R12 so that we can tail call to it
12901290
mov r12, r0
12911291

12921292
EPILOG_WITH_TRANSITION_BLOCK_TAILCALL
12931293

12941294
// Share the patch label
1295-
b ExternalMethodFixupPatchLabel
1295+
b C_FUNC(ExternalMethodFixupPatchLabel)
12961296

12971297
NESTED_END DelayLoad_MethodCall_FakeProlog, _TEXT
12981298

@@ -1333,7 +1333,7 @@ DelayLoad_Helper\suffix:
13331333
mov r4, \frameFlags
13341334
str r4, [sp,#0]
13351335

1336-
bl DynamicHelperWorker
1336+
bl C_FUNC(DynamicHelperWorker)
13371337

13381338
cbnz r0, 0f
13391339
ldr r0, [sp,#(__PWTB_TransitionBlock+9*4)] // The result is stored in the argument area of the transition block

src/vm/arm/ehhelpers.S

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ OFFSET_OF_FRAME=(4 + SIZEOF__GSCookie)
6464
// stack must be 8 byte aligned
6565
CHECK_STACK_ALIGNMENT
6666
67-
bl \TARGET
67+
bl C_FUNC(\TARGET)
6868

6969
// Target should not return.
7070
EMIT_BREAKPOINT
@@ -84,7 +84,7 @@ OFFSET_OF_FRAME=(4 + SIZEOF__GSCookie)
8484
// On entry:
8585
//
8686
// R0 = Address of FaultingExceptionFrame
87-
bl LinkFrameAndThrow
87+
bl C_FUNC(LinkFrameAndThrow)
8888

8989
// Target should not return.
9090
EMIT_BREAKPOINT

src/vm/arm/patchedcode.S

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
.align 4
3232
LEAF_ENTRY ClrFlsGetBlock, _TEXT
3333
// This will be overwritten at runtime with optimized ClrFlsGetBlock implementation
34-
b GetTLSDummy
34+
b C_FUNC(GetTLSDummy)
3535
// Just allocate space that will be filled in at runtime
3636
.space (TLS_GETTER_MAX_SIZE_ASM - 2)
3737
LEAF_END ClrFlsGetBlock, _TEXT

0 commit comments

Comments
 (0)