Changeset 224171 in webkit


Ignore:
Timestamp:
Oct 30, 2017 1:16:44 AM (6 years ago)
Author:
zandobersek@gmail.com
Message:

[ARM64][Linux] Re-enable Gigacage
https://bugs.webkit.org/show_bug.cgi?id=178130

Reviewed by Michael Catanzaro.

Source/bmalloc:

  • bmalloc/Gigacage.h: Re-enable Gigacage on ARM64 Linux.

Source/JavaScriptCore:

Guard the current globaladdr opcode implementation for ARM64 with
OS(DARWIN) as it's only usable for Mach-O.

For OS(LINUX), ELF-supported :got: and :got_lo12: relocation specifiers
have to be used. The .loh directive can't be used as it's not supported
in GCC or the ld linker.

On every other OS target, a compilation error is thrown.

  • offlineasm/arm64.rb:
Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r224142 r224171  
     12017-10-30  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        [ARM64][Linux] Re-enable Gigacage
     4        https://bugs.webkit.org/show_bug.cgi?id=178130
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Guard the current globaladdr opcode implementation for ARM64 with
     9        OS(DARWIN) as it's only usable for Mach-O.
     10
     11        For OS(LINUX), ELF-supported :got: and :got_lo12: relocation specifiers
     12        have to be used. The .loh directive can't be used as it's not supported
     13        in GCC or the ld linker.
     14
     15        On every other OS target, a compilation error is thrown.
     16
     17        * offlineasm/arm64.rb:
     18
    1192017-10-27  Devin Rousso  <webkit@devinrousso.com>
    220
  • trunk/Source/JavaScriptCore/offlineasm/arm64.rb

    r223239 r224171  
    933933        when "globaladdr"
    934934            uid = $asm.newUID
     935
     936            # On Darwin, use Macho-O GOT relocation specifiers, along with
     937            # the labels required for the .loh directive.
     938            $asm.putStr("#if OS(DARWIN)")
    935939            $asm.puts "L_offlineasm_loh_adrp_#{uid}:"
    936940            $asm.puts "adrp #{operands[1].arm64Operand(:ptr)}, #{operands[0].asmLabel}@GOTPAGE"
    937941            $asm.puts "L_offlineasm_loh_ldr_#{uid}:"
    938942            $asm.puts "ldr #{operands[1].arm64Operand(:ptr)}, [#{operands[1].arm64Operand(:ptr)}, #{operands[0].asmLabel}@GOTPAGEOFF]"
     943
     944            # On Linux, use ELF GOT relocation specifiers.
     945            $asm.putStr("#elif OS(LINUX)")
     946            $asm.puts "adrp #{operands[1].arm64Operand(:ptr)}, :got:#{operands[0].asmLabel}"
     947            $asm.puts "ldr #{operands[1].arm64Operand(:ptr)}, [#{operands[1].arm64Operand(:ptr)}, :got_lo12:#{operands[0].asmLabel}]"
     948
     949            # Throw a compiler error everywhere else.
     950            $asm.putStr("#else")
     951            $asm.putStr("#error Missing globaladdr implementation")
     952            $asm.putStr("#endif")
     953
    939954            $asm.deferAction {
     955                # On Darwin, also include the .loh directive using the generated labels.
     956                $asm.putStr("#if OS(DARWIN)")
    940957                $asm.puts ".loh AdrpLdrGot L_offlineasm_loh_adrp_#{uid}, L_offlineasm_loh_ldr_#{uid}"
     958                $asm.putStr("#endif")
    941959            }
    942960        else
  • trunk/Source/bmalloc/ChangeLog

    r223965 r224171  
     12017-10-30  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        [ARM64][Linux] Re-enable Gigacage
     4        https://bugs.webkit.org/show_bug.cgi?id=178130
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        * bmalloc/Gigacage.h: Re-enable Gigacage on ARM64 Linux.
     9
    1102017-10-25  Commit Queue  <commit-queue@webkit.org>
    211
  • trunk/Source/bmalloc/bmalloc/Gigacage.h

    r223950 r224171  
    5353#define STRING_GIGACAGE_MASK GIGACAGE_SIZE_TO_MASK(STRING_GIGACAGE_SIZE)
    5454
    55 #if (BOS(DARWIN) && (BCPU(ARM64) || BCPU(X86_64))) || (BOS(LINUX) && BCPU(X86_64))
     55#if (BOS(DARWIN) || BOS(LINUX)) && (BCPU(ARM64) || BCPU(X86_64))
    5656#define GIGACAGE_ENABLED 1
    5757#else
Note: See TracChangeset for help on using the changeset viewer.