1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-23 07:12:12 -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

@ -5,6 +5,9 @@ language: c
os:
- linux
- osx
arch:
- amd64
- arm64
compiler:
- clang
- gcc
@ -12,6 +15,10 @@ matrix:
exclude:
- os: osx
compiler: gcc
exclude:
- os: linux
arch: arm64
compiler: gcc
notifications:
email:
- mps-travis@ravenbrook.com

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.
*/

8
mps/configure vendored
View file

@ -3454,6 +3454,14 @@ CLEAN_TARGET=clean-make-build
INSTALL_TARGET=install-make-build
TEST_TARGET=test-make-build
case $host/$CLANG in
aarch64-*-linux*/yes)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Linux ARM64" >&5
$as_echo "Linux ARM64" >&6; }
MPS_OS_NAME=li
MPS_ARCH_NAME=a6
MPS_BUILD_NAME=ll
PFMCFLAGS="$CFLAGS_LL"
;;
i*86-*-linux*/no)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Linux x86" >&5
$as_echo "Linux x86" >&6; }

View file

@ -45,6 +45,13 @@ CLEAN_TARGET=clean-make-build
INSTALL_TARGET=install-make-build
TEST_TARGET=test-make-build
case $host/$CLANG in
aarch64-*-linux*/yes)
AC_MSG_RESULT([Linux ARM64])
MPS_OS_NAME=li
MPS_ARCH_NAME=a6
MPS_BUILD_NAME=ll
PFMCFLAGS="$CFLAGS_LL"
;;
i*86-*-linux*/no)
AC_MSG_RESULT([Linux x86])
MPS_OS_NAME=li

View file

@ -178,8 +178,8 @@ Posix implementation
_`.impl.ix`: In ``prmcix.c`` and ``protsgix.c``, with
processor-specific parts in ``prmci3.c`` and ``prmci6.c``, and other
platform-specific parts in ``prmcfri3.c``, ``prmclii3.c``,
``prmcfri6.c``, and ``prmclii6.c``.
platform-specific parts in ``prmcfri3.c``, ``prmcfri6.c``,
``prmclia6.c``, ``prmclii3.c``, and ``prmclii6.c``.
_`.impl.ix.context`: The context consists of the |siginfo_t|_ and
|ucontext_t|_ structures. POSIX specifies some of the fields in

View file

@ -139,6 +139,7 @@ Platform OS Architecture Compiler Makefile
``fri3ll`` FreeBSD IA-32 Clang ``fri3ll.gmk``
``fri6gc`` FreeBSD x86-64 GCC ``fri6gc.gmk``
``fri6ll`` FreeBSD x86-64 Clang ``fri6ll.gmk``
``lia6ll`` Linux ARM64 Clang ``lia6ll.gmk``
``lii3gc`` Linux IA-32 GCC ``lii3gc.gmk``
``lii6gc`` Linux x86-64 GCC ``lii6gc.gmk``
``lii6ll`` Linux x86-64 Clang ``lii6ll.gmk``

View file

@ -175,6 +175,7 @@ prmci6.c Mutator context implementation for x86-64.
prmci6.h Mutator context interface for x86-64.
prmcix.c Mutator context implementation for POSIX.
prmcix.h Mutator context interface for POSIX.
prmclia6.c Mutator context implementation for Linux, ARM64.
prmclii3.c Mutator context implementation for Linux, IA-32.
prmclii6.c Mutator context implementation for Linux, x86-64.
prmcw3.c Mutator context implementation for Windows.
@ -384,6 +385,7 @@ fri6gc.gmk GNU makefile for platform FRI6GC.
fri6ll.gmk GNU makefile for platform FRI6LL.
gc.gmk GNU make fragment for GCC.
gp.gmk GNU make fragment for GCC/GProf (broken).
lia6ll.gmk GNU makefile for platform LIA6LL.
lii3gc.gmk GNU makefile for platform LII3GC.
lii6gc.gmk GNU makefile for platform LII6GC.
lii6ll.gmk GNU makefile for platform LII6LL.

View file

@ -12,7 +12,10 @@ Release 1.118.0
New features
............
#. New supported platform ``xca6ll`` (macOS, ARM64, Clang/LLVM).
#. New supported platforms:
* ``lia6ll`` (Linux, ARM64, Clang/LLVM).
* ``xca6ll`` (macOS, ARM64, Clang/LLVM).
#. The MPS no longer supports building for the xci3ll platform (macOS,
IA-32, Clang/LLVM) using Xcode. This is because Xcode 10.0 no

View file

@ -171,6 +171,13 @@ Platform interface
x86-64 processor architecture, and the Clang/LLVM compiler.
.. c:macro:: MPS_PF_LIA6LL
A :term:`C` preprocessor macro that indicates, if defined, that
the :term:`platform` consists of the Linux operating system, the
ARM64 processor architecture, and the Clang/LLVM compiler.
.. c:macro:: MPS_PF_LII3GC
A :term:`C` preprocessor macro that indicates, if defined, that
@ -370,6 +377,7 @@ Platform Status
``fri6ll`` Supported
``i5m2cc`` *Not supported*
``iam4cc`` *Not supported*
``lia6ll`` Supported
``lii3eg`` *Not supported*
``lii3gc`` Supported
``lii4gc`` Corrected to ``lii3gc``

View file

@ -76,8 +76,9 @@ usable.
stack` can be scanned.
See :ref:`design-prmc` for the design, and ``prmc.h`` for the
interface. There are implementations on Unix and Windows for
IA-32 and x86-64, and on macOS for IA-32, x86-64, and ARM64.
interface. There are implementations on FreeBSD and Windows for
IA-32 and x86-64, and on Linux and macOS for IA-32, x86-64, and
ARM64.
There is a generic implementation in ``prmcan.c``, which can't
provide these features, and so only supports a single thread.