• Predrag Rudic's avatar
    MIPS: Port [turbofan] Use relative calls/jumps on arm for builtins · a1974d49
    Predrag Rudic authored
    Port commit 23dbb81d.
    
    Original CL message:
    
    >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/1117181
    >Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
    >Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
    >Reviewed-by: Jakob Gruber <jgruber@chromium.org>
    >Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
    >Cr-Commit-Position: refs/heads/master@{#54320}
    
    This CL is completed Miran's draft without MIPS64 port.
    (https://chromium-review.googlesource.com/c/v8/v8/+/1136640/3).
    
    Change-Id: I979378ac445548641755968d890f7f4a82dc7986
    Reviewed-on: https://chromium-review.googlesource.com/c/1221313
    Commit-Queue: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarIvica Bogosavljevic <ibogosavljevic@wavecomp.com>
    Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#56640}
    a1974d49
assembler-mips.cc 126 KB