Changeset 224171 in webkit for trunk/Source/JavaScriptCore/offlineasm/arm64.rb
- Timestamp:
- Oct 30, 2017, 1:16:44 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/offlineasm/arm64.rb
r223239 r224171 933 933 when "globaladdr" 934 934 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)") 935 939 $asm.puts "L_offlineasm_loh_adrp_#{uid}:" 936 940 $asm.puts "adrp #{operands[1].arm64Operand(:ptr)}, #{operands[0].asmLabel}@GOTPAGE" 937 941 $asm.puts "L_offlineasm_loh_ldr_#{uid}:" 938 942 $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 939 954 $asm.deferAction { 955 # On Darwin, also include the .loh directive using the generated labels. 956 $asm.putStr("#if OS(DARWIN)") 940 957 $asm.puts ".loh AdrpLdrGot L_offlineasm_loh_adrp_#{uid}, L_offlineasm_loh_ldr_#{uid}" 958 $asm.putStr("#endif") 941 959 } 942 960 else
Note:
See TracChangeset
for help on using the changeset viewer.