AArch64 support 20/26220/1 accepted/tizen_3.0.2014.q3_common accepted/tizen_3.0.m14.3_ivi tizen_3.0.2014.q3_common tizen_3.0.m14.3_ivi submit/tizen/20140822.095856 tizen_3.0.2014.q3_common_release tizen_3.0.m14.3_ivi_release
authorVyacheslav Barinov <v.barinov@samsung.com>
Tue, 19 Aug 2014 08:28:24 +0000 (12:28 +0400)
committerVyacheslav Barinov <v.barinov@samsung.com>
Tue, 19 Aug 2014 10:18:25 +0000 (14:18 +0400)
Imported patch from Fedora community to support cacheFlush on AArch64.
Switched off jit because there is no support yet

Change-Id: Ia741a05949f07df65acf5faaef6d629b1124ea0b
Signed-off-by: Vyacheslav Barinov <v.barinov@samsung.com>
js/src/Makefile.in
js/src/assembler/jit/ExecutableAllocator.h
js/src/assembler/wtf/Platform.h
js/src/configure.in
packaging/js.spec

index 7ead392..60fb926 100644 (file)
@@ -382,7 +382,7 @@ CPPSRCS +=  checks.cc \
 # END enclude sources for V8 dtoa
 #############################################
 
-ifeq (,$(filter-out powerpc powerpc64 s390 s390x,$(TARGET_CPU)))
+ifeq (,$(filter-out aarch64 powerpc powerpc64 s390 s390x,$(TARGET_CPU)))
 
 VPATH +=       $(srcdir)/assembler \
                $(srcdir)/assembler/wtf \
index 511aebf..f17af9b 100644 (file)
@@ -391,6 +391,12 @@ public:
     {
         CacheRangeFlush(code, size, CACHE_SYNC_ALL);
     }
+#elif WTF_CPU_AARCH64 && WTF_PLATFORM_LINUX
+    static void cacheFlush(void* code, size_t size)
+    {
+        intptr_t end = reinterpret_cast<intptr_t>(code) + size;
+        __builtin___clear_cache(reinterpret_cast<char*>(code), reinterpret_cast<char*>(end));
+    }
 #else
     #error "The cacheFlush support is missing on this platform."
 #endif
index 3dfad2a..3d1d031 100644 (file)
 
 #endif /* ARM */
 
+/* CPU(AArch64) - 64-bit ARM */
+#if defined(__aarch64__)
+#define WTF_CPU_AARCH64 1
+#endif
 
 
 /* Operating systems - low-level dependencies */
index e9f3bb1..711ce06 100644 (file)
@@ -1534,6 +1534,10 @@ arm*)
     CPU_ARCH=arm
     ;;
 
+aarch64)
+    CPU_ARCH=aarch64
+    ;;
+
 mips|mipsel)
     CPU_ARCH="mips"
     ;;
index c9083df..4c2995c 100644 (file)
@@ -52,7 +52,12 @@ you will need to install %{name}-devel.
 export MOZILLA_VERSION=%{version}
 cd js
 pushd src
-%configure --with-system-nspr --enable-threadsafe
+%ifarch aarch64
+export CPPFLAGS+=" -DENABLE_JIT=0 "
+export JIT_CONFIG_OPT="--disable-tracejit --disable-methodjit"
+%endif
+%configure --with-system-nspr --enable-threadsafe $JIT_CONFIG_OPT
+
 popd
 export BUILD_OPT=1
 %{__make} %{?_smp_mflags} -C src \