[GTK] Add support for FTL JIT on ARM64
authordbatyai.u-szeged@partner.samsung.com <dbatyai.u-szeged@partner.samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Dec 2014 18:43:01 +0000 (18:43 +0000)
committerdbatyai.u-szeged@partner.samsung.com <dbatyai.u-szeged@partner.samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Dec 2014 18:43:01 +0000 (18:43 +0000)
https://bugs.webkit.org/show_bug.cgi?id=139677

Reviewed by Csaba Osztrogonác.

* gtk/jhbuild-optional.modules:
* gtk/patches/llvm-elf-add-stackmaps-arm64.patch: Added.
* gtk/patches/llvm-elf-allow-fde-references-outside-the-2gb-range-arm64.patch: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177505 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/gtk/jhbuild-optional.modules
Tools/gtk/patches/llvm-elf-add-stackmaps-arm64.patch [new file with mode: 0644]
Tools/gtk/patches/llvm-elf-allow-fde-references-outside-the-2gb-range-arm64.patch [new file with mode: 0644]

index d744be9..3efcdc0 100644 (file)
@@ -1,3 +1,14 @@
+2014-12-18  Dániel Bátyai  <dbatyai.u-szeged@partner.samsung.com>
+
+        [GTK] Add support for FTL JIT on ARM64
+        https://bugs.webkit.org/show_bug.cgi?id=139677
+
+        Reviewed by Csaba Osztrogonác.
+
+        * gtk/jhbuild-optional.modules:
+        * gtk/patches/llvm-elf-add-stackmaps-arm64.patch: Added.
+        * gtk/patches/llvm-elf-allow-fde-references-outside-the-2gb-range-arm64.patch: Added.
+
 2014-12-18  Adrian Perez de Castro  <aperez@igalia.com>
 
         [GTK] Implement webkit_web_view_is_playing_audio()
index 1218906..d986aa8 100644 (file)
@@ -50,7 +50,9 @@
             module="/releases/3.5.0/llvm-3.5.0.src.tar.xz" version="3.5.0" checkoutdir="llvm-3.5.0"
             hash="sha256:28e199f368ef0a4666708f31c7991ad3bcc3a578342b0306526dd35f07595c03">
       <patch file="llvm-elf-allow-fde-references-outside-the-2gb-range.patch" strip="1"/>
+      <patch file="llvm-elf-allow-fde-references-outside-the-2gb-range-arm64.patch" strip="1"/>
       <patch file="llvm-elf-add-stackmaps.patch" strip="1"/>
+      <patch file="llvm-elf-add-stackmaps-arm64.patch" strip="1"/>
     </branch>
   </autotools>
 
diff --git a/Tools/gtk/patches/llvm-elf-add-stackmaps-arm64.patch b/Tools/gtk/patches/llvm-elf-add-stackmaps-arm64.patch
new file mode 100644 (file)
index 0000000..caa8c1f
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/lib/Target/AArch64/AArch64AsmPrinter.cpp b/lib/Target/AArch64/AArch64AsmPrinter.cpp
+index 8bee4f5..bfbbaac 100644
+--- a/lib/Target/AArch64/AArch64AsmPrinter.cpp
++++ b/lib/Target/AArch64/AArch64AsmPrinter.cpp
+@@ -154,6 +154,8 @@ void AArch64AsmPrinter::EmitEndOfAsmFile(Module &M) {
+       }
+       Stubs.clear();
+     }
++
++    SM.serializeToStackMapSection();
+   }
+ }
diff --git a/Tools/gtk/patches/llvm-elf-allow-fde-references-outside-the-2gb-range-arm64.patch b/Tools/gtk/patches/llvm-elf-allow-fde-references-outside-the-2gb-range-arm64.patch
new file mode 100644 (file)
index 0000000..be4412a
--- /dev/null
@@ -0,0 +1,23 @@
+
+diff --git a/lib/MC/MCObjectFileInfo.cpp b/lib/MC/MCObjectFileInfo.cpp
+index 7886ab6..96929e5 100644
+--- a/lib/MC/MCObjectFileInfo.cpp
++++ b/lib/MC/MCObjectFileInfo.cpp
+@@ -284,6 +284,17 @@ void MCObjectFileInfo::InitELFMCObjectFileInfo(Triple T) {
+         ? dwarf::DW_EH_PE_udata4 : dwarf::DW_EH_PE_absptr;
+     }
+     break;
++  case Triple::aarch64:
++    if (RelocM == Reloc::PIC_) {
++      FDECFIEncoding = dwarf::DW_EH_PE_pcrel |
++        ((CMModel == CodeModel::Small || CMModel == CodeModel::Medium)
++         ? dwarf::DW_EH_PE_sdata4 : dwarf::DW_EH_PE_sdata8);
++    } else {
++      FDECFIEncoding =
++        (CMModel == CodeModel::Small || CMModel == CodeModel::Medium)
++        ? dwarf::DW_EH_PE_udata4 : dwarf::DW_EH_PE_absptr;
++    }
++    break;
+   default:
+     FDECFIEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4;
+     break;