1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-27 16:51:06 -07:00

New platform lia6ll (linux, arm64, clang/llvm).

This commit is contained in:
Gareth Rees 2021-01-16 13:37:43 +00:00
parent 992981c2d4
commit 331e8db191
15 changed files with 186 additions and 6 deletions

View file

@ -8,6 +8,7 @@ fri3gc
fri3ll
fri6gc
fri6ll
lia6ll
lii3gc
lii6gc
lii6ll

55
mps/code/lia6ll.gmk Normal file
View file

@ -0,0 +1,55 @@
# -*- makefile -*-
#
# lia6ll.gmk: BUILD FOR LINUX/ARM64/Clang PLATFORM
#
# $Id$
# Copyright (c) 2001-2021 Ravenbrook Limited. See end of file for license.
PFM = lia6ll
MPMPF = \
lockix.c \
prmcanan.c \
prmcix.c \
prmclia6.c \
protix.c \
protsgix.c \
pthrdext.c \
span.c \
thix.c \
vmix.c
LIBS = -lm -lpthread
include ll.gmk
include comm.gmk
# C. COPYRIGHT AND LICENSE
#
# Copyright (C) 2001-2021 Ravenbrook Limited <https://www.ravenbrook.com/>.
#
# 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 COPYRIGHT HOLDERS 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 COPYRIGHT
# HOLDER 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.

View file

@ -14,11 +14,11 @@ CFLAGSDEBUG = -O0 -g3
CFLAGSOPT = -O2 -g3
# Warnings that might be enabled by clients <design/config/#.warning.impl>.
# TODO: add -Wcomma when all our continuous integration platforms support it.
CFLAGSCOMPILER := \
-Waggregate-return \
-Wall \
-Wcast-qual \
-Wcomma \
-Wconversion \
-Wduplicate-enum \
-Werror \

View file

@ -182,6 +182,21 @@
#include "prmcfri6.c" /* x86-64 for FreeBSD mutator context */
#include "span.c" /* generic stack probe */
/* Linux on ARM64 with Clang */
#elif defined(MPS_PF_LIA6LL)
#include "lockix.c" /* Posix locks */
#include "thix.c" /* Posix threading */
#include "pthrdext.c" /* Posix thread extensions */
#include "vmix.c" /* Posix virtual memory */
#include "protix.c" /* Posix protection */
#include "protsgix.c" /* Posix signal handling */
#include "prmcanan.c" /* generic architecture mutator context */
#include "prmcix.c" /* Posix mutator context */
#include "prmclia6.c" /* x86-64 for Linux mutator context */
#include "span.c" /* generic stack probe */
/* Linux on IA-32 with GCC */
#elif defined(MPS_PF_LII3GC)

View file

@ -222,6 +222,25 @@
#define MPS_PF_ALIGN 8
/* Clang/LLVM 10.0, clang -E -dM */
#elif defined(__linux__) && defined(__aarch64__) && defined(__GNUC__) \
&& defined(__clang__)
#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_LIA6LL)
#error "specified CONFIG_PF_... inconsistent with detected lia6ll"
#endif
#define MPS_PF_LIA6LL
#define MPS_PF_STRING "lia6ll"
#define MPS_OS_LI
#define MPS_ARCH_A6
#define MPS_BUILD_LL
#define MPS_T_WORD unsigned long
#define MPS_T_ULONGEST unsigned long
#define MPS_WORD_WIDTH 64
#define MPS_WORD_SHIFT 6
#define MPS_PF_ALIGN 8
/* GCC 2.6.3, gcc -E -dM
* The actual granularity of GNU malloc is 8, but field alignments are
* all 4.

53
mps/code/prmclia6.c Normal file
View file

@ -0,0 +1,53 @@
/* prmclia6.c: MUTATOR CONTEXT ARM64 (LINUX)
*
* $Id$
* Copyright (c) 2001-2021 Ravenbrook Limited. See end of file for license.
*
* .purpose: Implement the mutator context module. <design/prmc>.
*/
#include "prmcix.h"
SRCID(prmclia6, "$Id$");
#if !defined(MPS_OS_LI) || !defined(MPS_ARCH_A6)
#error "prmclia6.c is specific to MPS_OS_LI and MPS_ARCH_A6"
#endif
Addr MutatorContextSP(MutatorContext context)
{
AVERT(MutatorContext, context);
return (Addr)context->ucontext->uc_mcontext.sp;
}
/* C. COPYRIGHT AND LICENSE
*
* Copyright (C) 2001-2021 Ravenbrook Limited <https://www.ravenbrook.com/>.
*
* 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 COPYRIGHT HOLDERS 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 COPYRIGHT
* HOLDER 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.
*/