Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch Add SLJIT to aarch64.



details:   https://anonhg.NetBSD.org/src/rev/59a3301a7fae
branches:  trunk
changeset: 834742:59a3301a7fae
user:      rjs <rjs%NetBSD.org@localhost>
date:      Sun Aug 26 21:06:46 2018 +0000

description:
Add SLJIT to aarch64.

diffstat:

 sys/arch/aarch64/include/sljit_machdep.h |  53 ++++++++++++++++++++++++++++++++
 sys/arch/evbarm/conf/files.generic64     |   8 ++++-
 sys/arch/evbarm/include/sljit_machdep.h  |   6 +++-
 3 files changed, 65 insertions(+), 2 deletions(-)

diffs (88 lines):

diff -r 9c0f5fb1c50c -r 59a3301a7fae sys/arch/aarch64/include/sljit_machdep.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/aarch64/include/sljit_machdep.h  Sun Aug 26 21:06:46 2018 +0000
@@ -0,0 +1,53 @@
+/*     $NetBSD: sljit_machdep.h,v 1.1 2018/08/26 21:06:46 rjs Exp $    */
+
+/*-
+ * Copyright (c) 2014 Alexander Nasonov.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _AARCH64_SLJITARCH_H
+#define _AARCH64_SLJITARCH_H
+
+#include <sys/cdefs.h>
+
+#ifdef _KERNEL
+#include <machine/types.h>
+#include <aarch64/cpufunc.h>
+#else
+#include <stddef.h>
+#include <stdint.h>
+#include <aarch64/sysarch.h>
+#endif
+
+#define SLJIT_CONFIG_ARM_64 1
+
+#ifdef _KERNEL
+#define SLJIT_CACHE_FLUSH(from, to) \
+       cpu_icache_sync_range((vaddr_t)(from), (vsize_t)((to) - (from)))
+#else
+#define SLJIT_CACHE_FLUSH(from, to) \
+       (void)aarch64_sync_icache((uintptr_t)(from), (size_t)((to) - (from)))
+#endif
+
+#endif
diff -r 9c0f5fb1c50c -r 59a3301a7fae sys/arch/evbarm/conf/files.generic64
--- a/sys/arch/evbarm/conf/files.generic64      Sun Aug 26 21:04:16 2018 +0000
+++ b/sys/arch/evbarm/conf/files.generic64      Sun Aug 26 21:06:46 2018 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.generic64,v 1.3 2018/06/16 00:19:04 jmcneill Exp $
+#      $NetBSD: files.generic64,v 1.4 2018/08/26 21:06:46 rjs Exp $
 #
 
 defparam opt_arm_debug.h       EARLYCONS
@@ -15,3 +15,9 @@
 include "arch/arm/rockchip/files.rockchip"
 include "arch/arm/sunxi/files.sunxi"
 include "arch/arm/virt/files.virt"
+
+#
+# Stack-less Just-In-Time compiler
+#
+
+include        "external/bsd/sljit/conf/files.sljit"
diff -r 9c0f5fb1c50c -r 59a3301a7fae sys/arch/evbarm/include/sljit_machdep.h
--- a/sys/arch/evbarm/include/sljit_machdep.h   Sun Aug 26 21:04:16 2018 +0000
+++ b/sys/arch/evbarm/include/sljit_machdep.h   Sun Aug 26 21:06:46 2018 +0000
@@ -1,3 +1,7 @@
-/*     $NetBSD: sljit_machdep.h,v 1.1 2014/07/23 18:19:43 alnsn Exp $  */
+/*     $NetBSD: sljit_machdep.h,v 1.2 2018/08/26 21:06:46 rjs Exp $    */
 
+#ifdef __aarch64__
+#include <aarch64/sljit_machdep.h>
+#else
 #include <arm/sljit_machdep.h>
+#endif



Home | Main Index | Thread Index | Old Index