Skip to content

Should JIT_UpdateWriteBarrierState be in the patchable section or not? #92554

Description

@filipnavara

In the .S file (non-Windows) the function is defined outside of JIT_PatchedCodeStart block:

WRITE_BARRIER_ENTRY JIT_UpdateWriteBarrierState

In the .asm file (Windows) the function is defined inside the patchable block:

; ------------------------------------------------------------------
; Start of the writeable code region
LEAF_ENTRY JIT_PatchedCodeStart
ret lr
LEAF_END
;-----------------------------------------------------------------------------
; void JIT_UpdateWriteBarrierState(bool skipEphemeralCheck, size_t writeableOffset)
;
; Update shadow copies of the various state info required for barrier
;
; State info is contained in a literal pool at the end of the function
; Placed in text section so that it is close enough to use ldr literal and still
; be relocatable. Eliminates need for PREPARE_EXTERNAL_VAR in hot code.
;
; Align and group state info together so it fits in a single cache line
; and each entry can be written atomically
;
WRITE_BARRIER_ENTRY JIT_UpdateWriteBarrierState

Which one is correct?

Ref: #92520 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions