• Sigurd Schneider's avatar
    [turbofan] Use relative calls/jumps on arm for builtins · 23dbb81d
    Sigurd Schneider authored
    This CL uses pc-relative jumps and calls (B/BL) for calls from embedded
    builtins to embedded builtins. To make this work, the code range size is
    limited to 32MB on arm during mksnapshot, which ensures that all builtin
    to builtin offsets for jumps/calls fit into the B/BL immediate. At code
    generation time, we put a placeholder into the instruction offset which
    we resolve to the right code object when the code is copied to the heap.
    We use a new relocation mode RELATIVE_CODE_TARGET for these relative jumps.
    The relocation mode RELATIVE_CODE_TARGET should never appear after
    generating the snapshot.
    
    We modify the target_address/set_target_address methods of RelocInfo
    such that they return the absolute target addresses for pc-relative B/BL
    instructions. This ensures that the GC can treat RELATIVE_CODE_TARGET in
    the same way as code targets. This, however, only matters during
    snapshot creation time, and production code never contains
    RELATIVE_CODE_TARGET relocations.
    
    Bug: v8:6666
    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: If7eab83ad588859ca87c654a5ddc3e37caea884c
    Reviewed-on: https://chromium-review.googlesource.com/1117181Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
    Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#54320}
    23dbb81d
constants-x64.h 630 Bytes