changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: gs: arm64 support

changeset 7192: 4dc782a90f0b
parent 7191: 753613b3b8c4
child 7193: 0a3e02e613ad
author: cinap_lenrek@felloff.net
date: Fri, 03 May 2019 21:10:45 +0200
files: sys/src/cmd/gs/amd64.h sys/src/cmd/gs/arch.h sys/src/cmd/gs/default.amd64.h sys/src/cmd/gs/default.arm64.h
description: gs: arm64 support
     1.1--- a/sys/src/cmd/gs/arch.h
     1.2+++ b/sys/src/cmd/gs/arch.h
     1.3@@ -10,6 +10,8 @@
     1.4 #include "mips.h"
     1.5 #elif Tarm
     1.6 #include "arm.h"
     1.7+#elif Tarm64
     1.8+#include "arm64.h"
     1.9 #elif Tamd64
    1.10 #include "amd64.h"
    1.11 #else
     2.1rename from sys/src/cmd/gs/amd64.h
     2.2rename to sys/src/cmd/gs/default.amd64.h
     3.1new file mode 100644
     3.2--- /dev/null
     3.3+++ b/sys/src/cmd/gs/default.arm64.h
     3.4@@ -0,0 +1,44 @@
     3.5+/* Parameters derived from machine and compiler architecture */
     3.6+
     3.7+	 /* ---------------- Scalar alignments ---------------- */
     3.8+
     3.9+#define ARCH_ALIGN_SHORT_MOD 2
    3.10+#define ARCH_ALIGN_INT_MOD 4
    3.11+#define ARCH_ALIGN_LONG_MOD 4
    3.12+#define ARCH_ALIGN_PTR_MOD 8
    3.13+#define ARCH_ALIGN_FLOAT_MOD 4
    3.14+#define ARCH_ALIGN_DOUBLE_MOD 8
    3.15+#define ARCH_ALIGN_STRUCT_MOD 8
    3.16+
    3.17+	 /* ---------------- Scalar sizes ---------------- */
    3.18+
    3.19+#define ARCH_LOG2_SIZEOF_SHORT 1
    3.20+#define ARCH_LOG2_SIZEOF_INT 2
    3.21+#define ARCH_LOG2_SIZEOF_LONG 2
    3.22+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
    3.23+#define ARCH_SIZEOF_PTR 8
    3.24+#define ARCH_SIZEOF_FLOAT 4
    3.25+#define ARCH_SIZEOF_DOUBLE 8
    3.26+#define ARCH_FLOAT_MANTISSA_BITS 24
    3.27+#define ARCH_DOUBLE_MANTISSA_BITS 53
    3.28+
    3.29+	 /* ---------------- Unsigned max values ---------------- */
    3.30+
    3.31+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
    3.32+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
    3.33+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
    3.34+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
    3.35+
    3.36+	 /* ---------------- Cache sizes ---------------- */
    3.37+
    3.38+#define ARCH_CACHE1_SIZE 1048576
    3.39+#define ARCH_CACHE2_SIZE 1048576
    3.40+
    3.41+	 /* ---------------- Miscellaneous ---------------- */
    3.42+
    3.43+#define ARCH_IS_BIG_ENDIAN 0
    3.44+#define ARCH_PTRS_ARE_SIGNED 0
    3.45+#define ARCH_FLOATS_ARE_IEEE 1
    3.46+#define ARCH_ARITH_RSHIFT 2
    3.47+#define ARCH_CAN_SHIFT_FULL_LONG 1
    3.48+#define ARCH_DIV_NEG_POS_TRUNCATES 1