Skip to content

Commit

Permalink
New platform lia6gc (Linux, ARM64, GCC).
Browse files Browse the repository at this point in the history
  • Loading branch information
gareth-rees committed Jun 3, 2021
1 parent ff8d9a3 commit 598a57e
Show file tree
Hide file tree
Showing 11 changed files with 103 additions and 6 deletions.
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ matrix:
exclude:
- os: osx
compiler: gcc
exclude:
- os: linux
arch: arm64
compiler: gcc
notifications:
email:
- mps-travis@ravenbrook.com
Expand Down
1 change: 1 addition & 0 deletions code/.p4ignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ fri3gc
fri3ll
fri6gc
fri6ll
lia6gc
lia6ll
lii3gc
lii6gc
Expand Down
55 changes: 55 additions & 0 deletions code/lia6gc.gmk
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# -*- makefile -*-
#
# lia6gc.gmk: BUILD FOR LINUX/ARM64/GCC PLATFORM
#
# $Id$
# Copyright (c) 2001-2021 Ravenbrook Limited. See end of file for license.

PFM = lia6gc

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 gc.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.

4 changes: 2 additions & 2 deletions code/mps.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@
#include "prmcfri6.c" /* x86-64 for FreeBSD mutator context */
#include "span.c" /* generic stack probe */

/* Linux on ARM64 with Clang */
/* Linux on ARM64 with GCC or Clang */

#elif defined(MPS_PF_LIA6LL)
#elif defined(MPS_PF_LIA6GC) || defined(MPS_PF_LIA6LL)

#include "lockix.c" /* Posix locks */
#include "thix.c" /* Posix threading */
Expand Down
19 changes: 19 additions & 0 deletions code/mpstd.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,25 @@
#define MPS_PF_ALIGN 8


/* GCC 7.5, gcc -E -dM */

#elif defined(__linux__) && defined(__aarch64__) && defined(__GNUC__) \
&& !defined(__clang__)
#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_LIA6GC)
#error "specified CONFIG_PF_... inconsistent with detected lia6gc"
#endif
#define MPS_PF_LIA6GC
#define MPS_PF_STRING "lia6gc"
#define MPS_OS_LI
#define MPS_ARCH_A6
#define MPS_BUILD_GC
#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


/* Clang/LLVM 10.0, clang -E -dM */

#elif defined(__linux__) && defined(__aarch64__) && defined(__GNUC__) \
Expand Down
8 changes: 8 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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*/no)
{ $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=gc
PFMCFLAGS="$CFLAGS_GC"
;;
aarch64-*-linux*/yes)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Linux ARM64" >&5
$as_echo "Linux ARM64" >&6; }
Expand Down
7 changes: 7 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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*/no)
AC_MSG_RESULT([Linux ARM64])
MPS_OS_NAME=li
MPS_ARCH_NAME=a6
MPS_BUILD_NAME=gc
PFMCFLAGS="$CFLAGS_GC"
;;
aarch64-*-linux*/yes)
AC_MSG_RESULT([Linux ARM64])
MPS_OS_NAME=li
Expand Down
1 change: 1 addition & 0 deletions manual/build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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``
``lia6gc`` Linux ARM64 GCC ``lia6gc.gmk``
``lia6ll`` Linux ARM64 Clang ``lia6ll.gmk``
``lii3gc`` Linux IA-32 GCC ``lii3gc.gmk``
``lii6gc`` Linux x86-64 GCC ``lii6gc.gmk``
Expand Down
1 change: 1 addition & 0 deletions manual/source/code-index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -385,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).
lia6gc.gmk GNU makefile for platform LIA6GC.
lia6ll.gmk GNU makefile for platform LIA6LL.
lii3gc.gmk GNU makefile for platform LII3GC.
lii6gc.gmk GNU makefile for platform LII6GC.
Expand Down
1 change: 1 addition & 0 deletions manual/source/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ New features

#. New supported platforms:

* ``lia6gc`` (Linux, ARM64, GCC).
* ``lia6ll`` (Linux, ARM64, Clang/LLVM).
* ``xca6ll`` (macOS, ARM64, Clang/LLVM).

Expand Down
8 changes: 8 additions & 0 deletions manual/source/topic/platform.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,13 @@ Platform interface
x86-64 processor architecture, and the Clang/LLVM compiler.


.. c:macro:: MPS_PF_LIA6GC
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 GCC compiler.


.. c:macro:: MPS_PF_LIA6LL
A :term:`C` preprocessor macro that indicates, if defined, that
Expand Down Expand Up @@ -377,6 +384,7 @@ Platform Status
``fri6ll`` Supported
``i5m2cc`` *Not supported*
``iam4cc`` *Not supported*
``lia6gc`` Supported
``lia6ll`` Supported
``lii3eg`` *Not supported*
``lii3gc`` Supported
Expand Down

0 comments on commit 598a57e

Please sign in to comment.