From 29bdb304cf3ee93f0f80f808f1707675eaf2e15f Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 25 Jul 2020 09:31:04 -0600 Subject: [PATCH] reduce duplication of OS & architecture info in "s/*.def" For example, if the number of floating-point registers in "x86_64.ss" changes, now only one ".def" file has to change instead of 14 ".def" files. original commit: c79524cc3eb516d9bee1708c06b80e3688fdd2ff --- IMPLEMENTATION.md | 12 +++++++----- s/Mf-a6fb | 2 +- s/Mf-a6le | 2 +- s/Mf-a6nb | 2 +- s/Mf-a6nt | 2 +- s/Mf-a6ob | 2 +- s/Mf-a6osx | 2 +- s/Mf-a6s2 | 2 +- s/Mf-arm32le | 4 +++- s/Mf-arm64le | 21 +++++++++++++++++++++ s/Mf-i3fb | 2 +- s/Mf-i3le | 2 +- s/Mf-i3nb | 2 +- s/Mf-i3nt | 2 +- s/Mf-i3ob | 2 +- s/Mf-i3osx | 2 +- s/Mf-i3s2 | 2 +- s/Mf-ppc32le | 4 +++- s/Mf-ta6fb | 3 +-- s/Mf-ta6le | 3 +-- s/Mf-ta6nb | 3 +-- s/Mf-ta6nt | 3 +-- s/Mf-ta6ob | 3 +-- s/Mf-ta6osx | 3 +-- s/Mf-ta6s2 | 3 +-- s/Mf-tarm32le | 3 +-- s/Mf-tarm64le | 3 +-- s/Mf-ti3nt | 3 +-- s/Mf-tppc32le | 3 +-- s/a6.def | 13 +++++++++++++ s/a6fb.def | 37 ++----------------------------------- s/a6le.def | 37 ++----------------------------------- s/a6nb.def | 37 ++----------------------------------- s/a6nt.def | 38 +++----------------------------------- s/a6ob.def | 37 ++----------------------------------- s/a6osx.def | 37 ++----------------------------------- s/a6s2.def | 37 ++----------------------------------- s/arm32.def | 14 ++++++++++++++ s/arm32le.def | 37 ++----------------------------------- s/arm64.def | 11 +++++++++++ s/arm64le.def | 6 ++++++ s/cmacros.ss | 9 +++++++++ s/default.def | 44 ++++++++++++++++++++++++++++++++++++++++++++ s/i3.def | 12 ++++++++++++ s/i3fb.def | 37 ++----------------------------------- s/i3le.def | 37 ++----------------------------------- s/i3nb.def | 37 ++----------------------------------- s/i3nt.def | 39 +++------------------------------------ s/i3ob.def | 37 ++----------------------------------- s/i3osx.def | 37 ++----------------------------------- s/i3qnx.def | 39 ++++----------------------------------- s/i3s2.def | 37 ++----------------------------------- s/nt.def | 13 +++++++++++++ s/pb.def | 33 +++++++++++++++------------------ s/ppc32.def | 14 ++++++++++++++ s/ppc32le.def | 37 ++----------------------------------- s/ta6fb.def | 37 ++----------------------------------- s/ta6le.def | 37 ++----------------------------------- s/ta6nb.def | 37 ++----------------------------------- s/ta6nt.def | 38 +++----------------------------------- s/ta6ob.def | 37 ++----------------------------------- s/ta6osx.def | 37 ++----------------------------------- s/ta6s2.def | 37 ++----------------------------------- s/tarm32le.def | 37 ++----------------------------------- s/tarm64le.def | 37 ++----------------------------------- s/ti3fb.def | 37 ++----------------------------------- s/ti3le.def | 37 ++----------------------------------- s/ti3nb.def | 37 ++----------------------------------- s/ti3nt.def | 39 +++------------------------------------ s/ti3ob.def | 37 ++----------------------------------- s/ti3osx.def | 37 ++----------------------------------- s/ti3s2.def | 37 ++----------------------------------- s/tppc32le.def | 37 ++----------------------------------- workarea | 44 ++++++++++++++++++++++++++++++++++++++++++++ 74 files changed, 328 insertions(+), 1253 deletions(-) create mode 100644 s/Mf-arm64le create mode 100644 s/a6.def create mode 100644 s/arm32.def create mode 100644 s/arm64.def create mode 100644 s/arm64le.def create mode 100644 s/default.def create mode 100644 s/i3.def create mode 100644 s/nt.def create mode 100644 s/ppc32.def diff --git a/IMPLEMENTATION.md b/IMPLEMENTATION.md index a97af4c224..9c6043c8f2 100644 --- a/IMPLEMENTATION.md +++ b/IMPLEMENTATION.md @@ -84,12 +84,14 @@ Scheme compiler the C kernel needs to do its job. Most of the work of porting to a new platform is producing a new "*machine-type*.def" file, which (except in simple ports to a new -operating system) will require a new "*isa*.ss" compiler backend. +operating system) will require a new "*ISA*.ss" compiler backend. You'll also have to set up all the "Mf-*machine-type*" makefiles and -update "configure", "cmacro.ss", and "version.h" (plus maybe other -files). Once you have all of the pieces working together, you -cross-compile boot files, then copy them over to the the new machine -to start compiling there. +update "configure", "cmacro.ss", and "version.h"---plus maybe other +files, such as "workarea" if you create new dependencies among "Mf-" +or ".def" files (e.g., "workarea" needs to know that "a6nt.def" uses +"a6.def" and "nt.def"). Once you have all of the pieces working +together, you cross-compile boot files, then copy them over to the the +new machine to start compiling there. You can port to a new operating system by imitating the files of a similar supported oerating system, but building a new backend for a diff --git a/s/Mf-a6fb b/s/Mf-a6fb index 9b5befa784..3a42a41cd6 100644 --- a/s/Mf-a6fb +++ b/s/Mf-a6fb @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -m = a6fb +m ?= a6fb archincludes = x86_64.ss include Mf-base diff --git a/s/Mf-a6le b/s/Mf-a6le index fa8d34fae4..7daf9348d3 100644 --- a/s/Mf-a6le +++ b/s/Mf-a6le @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -m = a6le +m ?= a6le archincludes = x86_64.ss include Mf-base diff --git a/s/Mf-a6nb b/s/Mf-a6nb index b28c50eb3c..1a04d4f2c0 100644 --- a/s/Mf-a6nb +++ b/s/Mf-a6nb @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -m = a6nb +m ?= a6nb archincludes = x86_64.ss include Mf-base diff --git a/s/Mf-a6nt b/s/Mf-a6nt index b96c364be8..29e08a5297 100644 --- a/s/Mf-a6nt +++ b/s/Mf-a6nt @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -m = a6nt +m ?= a6nt archincludes = x86_64.ss include Mf-base diff --git a/s/Mf-a6ob b/s/Mf-a6ob index 78eea7c1ee..64cc55aac0 100644 --- a/s/Mf-a6ob +++ b/s/Mf-a6ob @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -m = a6ob +m ?= a6ob archincludes = x86_64.ss include Mf-base diff --git a/s/Mf-a6osx b/s/Mf-a6osx index 18f16820ee..9bf0942ab8 100644 --- a/s/Mf-a6osx +++ b/s/Mf-a6osx @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -m = a6osx +m ?= a6osx archincludes = x86_64.ss include Mf-base diff --git a/s/Mf-a6s2 b/s/Mf-a6s2 index fdfd71b33d..0ac51751e2 100644 --- a/s/Mf-a6s2 +++ b/s/Mf-a6s2 @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -m = a6s2 +m ?= a6s2 archincludes = x86_64.ss include Mf-base diff --git a/s/Mf-arm32le b/s/Mf-arm32le index a0ef872b97..fd7b8fe43f 100644 --- a/s/Mf-arm32le +++ b/s/Mf-arm32le @@ -13,7 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -m = arm32le +m ?= arm32le archincludes = arm32.ss include Mf-base + +machine.def: arm32.def diff --git a/s/Mf-arm64le b/s/Mf-arm64le new file mode 100644 index 0000000000..74195ef2ba --- /dev/null +++ b/s/Mf-arm64le @@ -0,0 +1,21 @@ +# Mf-tarm64le +# Copyright 1984-2017 Cisco Systems, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +m ?= arm64le +archincludes = arm64.ss + +include Mf-base + +machine.def: arm64.def diff --git a/s/Mf-i3fb b/s/Mf-i3fb index 911d0d1760..f96b9eabd7 100644 --- a/s/Mf-i3fb +++ b/s/Mf-i3fb @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -m = i3fb +m ?= i3fb archincludes = x86.ss include Mf-base diff --git a/s/Mf-i3le b/s/Mf-i3le index a44436a9a9..1caf899063 100644 --- a/s/Mf-i3le +++ b/s/Mf-i3le @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -m = i3le +m ?= i3le archincludes = x86.ss include Mf-base diff --git a/s/Mf-i3nb b/s/Mf-i3nb index bb40f31082..ed037cdedd 100644 --- a/s/Mf-i3nb +++ b/s/Mf-i3nb @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -m = i3nb +m ?= i3nb archincludes = x86.ss include Mf-base diff --git a/s/Mf-i3nt b/s/Mf-i3nt index cef318a0bf..e5752ad38e 100644 --- a/s/Mf-i3nt +++ b/s/Mf-i3nt @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -m = i3nt +m ?= i3nt archincludes = x86.ss include Mf-base diff --git a/s/Mf-i3ob b/s/Mf-i3ob index 7376ace8c3..a8d5612c6e 100644 --- a/s/Mf-i3ob +++ b/s/Mf-i3ob @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -m = i3ob +m ?= i3ob archincludes = x86.ss include Mf-base diff --git a/s/Mf-i3osx b/s/Mf-i3osx index 985ab33bcd..d97028f7b6 100644 --- a/s/Mf-i3osx +++ b/s/Mf-i3osx @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -m = i3osx +m ?= i3osx archincludes = x86.ss include Mf-base diff --git a/s/Mf-i3s2 b/s/Mf-i3s2 index 6954fafdf5..96c5857831 100644 --- a/s/Mf-i3s2 +++ b/s/Mf-i3s2 @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -m = i3s2 +m ?= i3s2 archincludes = x86.ss include Mf-base diff --git a/s/Mf-ppc32le b/s/Mf-ppc32le index 2cab982344..95f0b5551b 100644 --- a/s/Mf-ppc32le +++ b/s/Mf-ppc32le @@ -13,7 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -m = ppc32le +m ?= ppc32le archincludes = ppc32.ss include Mf-base + +machine.def: ppc32.def diff --git a/s/Mf-ta6fb b/s/Mf-ta6fb index a0ddca203e..8987a6a1dd 100644 --- a/s/Mf-ta6fb +++ b/s/Mf-ta6fb @@ -14,6 +14,5 @@ # limitations under the License. m = ta6fb -archincludes = x86_64.ss -include Mf-base +include Mf-a6fb diff --git a/s/Mf-ta6le b/s/Mf-ta6le index 50398a0ebc..d213041e53 100644 --- a/s/Mf-ta6le +++ b/s/Mf-ta6le @@ -14,6 +14,5 @@ # limitations under the License. m = ta6le -archincludes = x86_64.ss -include Mf-base +include Mf-a6le diff --git a/s/Mf-ta6nb b/s/Mf-ta6nb index 3e77c0f29c..51bc03527e 100644 --- a/s/Mf-ta6nb +++ b/s/Mf-ta6nb @@ -14,6 +14,5 @@ # limitations under the License. m = ta6nb -archincludes = x86_64.ss -include Mf-base +include Mf-a6nb diff --git a/s/Mf-ta6nt b/s/Mf-ta6nt index 098a92f729..3bc5e1dfb0 100644 --- a/s/Mf-ta6nt +++ b/s/Mf-ta6nt @@ -14,6 +14,5 @@ # limitations under the License. m = ta6nt -archincludes = x86_64.ss -include Mf-base +include Mf-a6nt diff --git a/s/Mf-ta6ob b/s/Mf-ta6ob index 2e1a793470..9a36fab922 100644 --- a/s/Mf-ta6ob +++ b/s/Mf-ta6ob @@ -14,6 +14,5 @@ # limitations under the License. m = ta6ob -archincludes = x86_64.ss -include Mf-base +include Mf-a6ob diff --git a/s/Mf-ta6osx b/s/Mf-ta6osx index 1fdf8dcdf0..5bf0f22875 100644 --- a/s/Mf-ta6osx +++ b/s/Mf-ta6osx @@ -14,6 +14,5 @@ # limitations under the License. m = ta6osx -archincludes = x86_64.ss -include Mf-base +include Mf-a6osx diff --git a/s/Mf-ta6s2 b/s/Mf-ta6s2 index 5432b44474..9351d8e0a1 100644 --- a/s/Mf-ta6s2 +++ b/s/Mf-ta6s2 @@ -14,6 +14,5 @@ # limitations under the License. m = ta6s2 -archincludes = x86_64.ss -include Mf-base +include Mf-a6s2 diff --git a/s/Mf-tarm32le b/s/Mf-tarm32le index 655c04a279..e3d9797bfd 100644 --- a/s/Mf-tarm32le +++ b/s/Mf-tarm32le @@ -14,6 +14,5 @@ # limitations under the License. m = tarm32le -archincludes = arm32.ss -include Mf-base +include Mf-arm32le diff --git a/s/Mf-tarm64le b/s/Mf-tarm64le index 420ba56c8e..c2bf17db01 100644 --- a/s/Mf-tarm64le +++ b/s/Mf-tarm64le @@ -14,6 +14,5 @@ # limitations under the License. m = tarm64le -archincludes = arm64.ss -include Mf-base +include Mf-arm64le diff --git a/s/Mf-ti3nt b/s/Mf-ti3nt index f2c1d1ff8a..83c9fbe8b3 100644 --- a/s/Mf-ti3nt +++ b/s/Mf-ti3nt @@ -14,6 +14,5 @@ # limitations under the License. m = ti3nt -archincludes = x86.ss -include Mf-base +include Mf-i3nt diff --git a/s/Mf-tppc32le b/s/Mf-tppc32le index 9c4f6a1a17..b1d4949922 100644 --- a/s/Mf-tppc32le +++ b/s/Mf-tppc32le @@ -14,6 +14,5 @@ # limitations under the License. m = tppc32le -archincludes = ppc32.ss -include Mf-base +include Mf-ppc32le diff --git a/s/a6.def b/s/a6.def new file mode 100644 index 0000000000..142c4e61ef --- /dev/null +++ b/s/a6.def @@ -0,0 +1,13 @@ +(define-constant architecture 'x86_64) +(define-constant ptr-bits 64) + +(define-constant asm-arg-reg-max 5) +(define-constant asm-arg-reg-cnt 3) +(define-constant asm-fpreg-max 2) + +(define-constant native-endianness 'little) + +(define-constant unaligned-floats #t) +(define-constant unaligned-integers #t) +(define-constant integer-divide-instruction #t) +(define-constant popcount-instruction #t) diff --git a/s/a6fb.def b/s/a6fb.def index 2ac6740a12..9ffa57618c 100644 --- a/s/a6fb.def +++ b/s/a6fb.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-a6fb)) -(define-constant architecture 'x86_64) -(define-constant address-bits 64) -(define-constant ptr-bits 64) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 64) -(define-constant long-long-bits 64) -(define-constant size_t-bits 64) -(define-constant ptrdiff_t-bits 64) -(define-constant wchar-bits 32) -(define-constant time-t-bits 64) -(define-constant max-float-alignment 8) -(define-constant max-integer-alignment 8) -(define-constant asm-arg-reg-max 5) -(define-constant asm-arg-reg-cnt 3) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "long int") -(define-constant typedef-uptr "unsigned long int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long") -(define-constant typedef-u64 "unsigned long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #t) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 3) (features iconv expeditor) +(include "a6.def") +(include "default.def") diff --git a/s/a6le.def b/s/a6le.def index dec9dc8148..0582d9a088 100644 --- a/s/a6le.def +++ b/s/a6le.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-a6le)) -(define-constant architecture 'x86_64) -(define-constant address-bits 64) -(define-constant ptr-bits 64) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 64) -(define-constant long-long-bits 64) -(define-constant size_t-bits 64) -(define-constant ptrdiff_t-bits 64) -(define-constant wchar-bits 32) -(define-constant time-t-bits 64) -(define-constant max-float-alignment 8) -(define-constant max-integer-alignment 8) -(define-constant asm-arg-reg-max 5) -(define-constant asm-arg-reg-cnt 3) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "long int") -(define-constant typedef-uptr "unsigned long int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long") -(define-constant typedef-u64 "unsigned long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #t) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 3) (features iconv expeditor) +(include "a6.def") +(include "default.def") diff --git a/s/a6nb.def b/s/a6nb.def index 6b16231122..ed48fcbcf1 100644 --- a/s/a6nb.def +++ b/s/a6nb.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-a6nb)) -(define-constant architecture 'x86_64) -(define-constant address-bits 64) -(define-constant ptr-bits 64) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 64) -(define-constant long-long-bits 64) -(define-constant size_t-bits 64) -(define-constant ptrdiff_t-bits 64) -(define-constant wchar-bits 32) -(define-constant time-t-bits 64) -(define-constant max-float-alignment 8) -(define-constant max-integer-alignment 8) -(define-constant asm-arg-reg-max 5) -(define-constant asm-arg-reg-cnt 3) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "long int") -(define-constant typedef-uptr "unsigned long int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long") -(define-constant typedef-u64 "unsigned long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #t) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 3) (features iconv expeditor) +(include "a6.def") +(include "default.def") diff --git a/s/a6nt.def b/s/a6nt.def index 4d6044e2ad..d90994f0ce 100644 --- a/s/a6nt.def +++ b/s/a6nt.def @@ -14,39 +14,7 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-a6nt)) -(define-constant architecture 'x86_64) -(define-constant address-bits 64) -(define-constant ptr-bits 64) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 32) -(define-constant long-long-bits 64) -(define-constant size_t-bits 64) -(define-constant ptrdiff_t-bits 64) -(define-constant wchar-bits 16) -(define-constant time-t-bits 64) -(define-constant max-float-alignment 8) -(define-constant max-integer-alignment 8) -(define-constant asm-arg-reg-max 5) -(define-constant asm-arg-reg-cnt 3) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "long long int") -(define-constant typedef-uptr "unsigned long long int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long long") -(define-constant typedef-u64 "unsigned long long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #t) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 3) (features iconv expeditor windows) +(include "a6.def") +(include "nt.def") +(include "default.def") diff --git a/s/a6ob.def b/s/a6ob.def index d845fd00fe..98d86057e5 100644 --- a/s/a6ob.def +++ b/s/a6ob.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-a6ob)) -(define-constant architecture 'x86_64) -(define-constant address-bits 64) -(define-constant ptr-bits 64) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 64) -(define-constant long-long-bits 64) -(define-constant size_t-bits 64) -(define-constant ptrdiff_t-bits 64) -(define-constant wchar-bits 32) -(define-constant time-t-bits 64) -(define-constant max-float-alignment 8) -(define-constant max-integer-alignment 8) -(define-constant asm-arg-reg-max 5) -(define-constant asm-arg-reg-cnt 3) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "long int") -(define-constant typedef-uptr "unsigned long int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long") -(define-constant typedef-u64 "unsigned long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #t) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 3) (features iconv expeditor) +(include "a6.def") +(include "default.def") diff --git a/s/a6osx.def b/s/a6osx.def index b5c4d8ae48..c447683c78 100644 --- a/s/a6osx.def +++ b/s/a6osx.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-a6osx)) -(define-constant architecture 'x86_64) -(define-constant address-bits 64) -(define-constant ptr-bits 64) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 64) -(define-constant long-long-bits 64) -(define-constant size_t-bits 64) -(define-constant ptrdiff_t-bits 64) -(define-constant wchar-bits 32) -(define-constant time-t-bits 64) -(define-constant max-float-alignment 8) -(define-constant max-integer-alignment 8) -(define-constant asm-arg-reg-max 5) -(define-constant asm-arg-reg-cnt 3) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "long int") -(define-constant typedef-uptr "unsigned long int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long") -(define-constant typedef-u64 "unsigned long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #t) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 3) (features iconv expeditor) +(include "a6.def") +(include "default.def") diff --git a/s/a6s2.def b/s/a6s2.def index fc53782722..2b8ccb6919 100644 --- a/s/a6s2.def +++ b/s/a6s2.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-a6s2)) -(define-constant architecture 'x86_64) -(define-constant address-bits 64) -(define-constant ptr-bits 64) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 64) -(define-constant long-long-bits 64) -(define-constant size_t-bits 64) -(define-constant ptrdiff_t-bits 64) -(define-constant wchar-bits 32) -(define-constant time-t-bits 64) -(define-constant max-float-alignment 8) -(define-constant max-integer-alignment 8) -(define-constant asm-arg-reg-max 5) -(define-constant asm-arg-reg-cnt 3) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "long int") -(define-constant typedef-uptr "unsigned long int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long") -(define-constant typedef-u64 "unsigned long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #t) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 3) (features iconv expeditor) +(include "a6.def") +(include "default.def") diff --git a/s/arm32.def b/s/arm32.def new file mode 100644 index 0000000000..842477885c --- /dev/null +++ b/s/arm32.def @@ -0,0 +1,14 @@ +(define-constant architecture 'arm32) +(define-constant ptr-bits 32) + +(define-constant asm-arg-reg-max 5) +(define-constant asm-arg-reg-cnt 3) +(define-constant asm-fpreg-max 2) + +(define-constant native-endianness 'little) + +(define-constant max-float-alignment 8) +(define-constant max-integer-alignment 8) + +(define-constant unaligned-floats #f) +(define-constant unaligned-integers #t) diff --git a/s/arm32le.def b/s/arm32le.def index cb03c253ab..eb4a036c6e 100644 --- a/s/arm32le.def +++ b/s/arm32le.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-arm32le)) -(define-constant architecture 'arm32) -(define-constant address-bits 32) -(define-constant ptr-bits 32) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 32) -(define-constant long-long-bits 64) -(define-constant size_t-bits 32) -(define-constant ptrdiff_t-bits 32) -(define-constant wchar-bits 32) -(define-constant time-t-bits 32) -(define-constant max-float-alignment 8) -(define-constant max-integer-alignment 8) -(define-constant asm-arg-reg-max 5) -(define-constant asm-arg-reg-cnt 3) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "int") -(define-constant typedef-uptr "unsigned int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long long") -(define-constant typedef-u64 "unsigned long long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #f) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #f) -(define-constant popcount-instruction #f) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 1) (features iconv expeditor) +(include "arm32.def") +(include "default.def") diff --git a/s/arm64.def b/s/arm64.def new file mode 100644 index 0000000000..de1504420d --- /dev/null +++ b/s/arm64.def @@ -0,0 +1,11 @@ +(define-constant architecture 'arm64) +(define-constant ptr-bits 64) + +(define-constant asm-arg-reg-max 9) +(define-constant asm-arg-reg-cnt 3) +(define-constant asm-fpreg-max 2) + +(define-constant native-endianness 'little) + +(define-constant unaligned-floats #f) +(define-constant unaligned-integers #t) diff --git a/s/arm64le.def b/s/arm64le.def new file mode 100644 index 0000000000..910081655b --- /dev/null +++ b/s/arm64le.def @@ -0,0 +1,6 @@ +;;; arm64le.def + +(define-constant machine-type (constant machine-type-arm64le)) +(features iconv expeditor) +(include "arm64.def") +(include "default.def") diff --git a/s/cmacros.ss b/s/cmacros.ss index 12cf4b8c30..52680f6e70 100644 --- a/s/cmacros.ss +++ b/s/cmacros.ss @@ -41,6 +41,15 @@ #'(eval-when (compile load eval) (putprop 'x '*constant* y)))))) +(define-syntax define-constant-default + (lambda (x) + (syntax-case x () + ((_ x y) + (identifier? #'x) + #'(eval-when (compile load eval) + (unless (getprop 'x '*constant* #f) + (putprop 'x '*constant* y))))))) + (eval-when (compile load eval) (define lookup-constant (let ([flag (box #f)]) diff --git a/s/default.def b/s/default.def new file mode 100644 index 0000000000..9181b5e59c --- /dev/null +++ b/s/default.def @@ -0,0 +1,44 @@ +;; types that are right for most platforms: +(define-constant-default int-bits 32) +(define-constant-default short-bits 16) +(define-constant-default typedef-ptr "void *") +(define-constant-default typedef-iptr "long") +(define-constant-default typedef-uptr "unsigned long") +(define-constant-default typedef-i8 "char") +(define-constant-default typedef-u8 "unsigned char") +(define-constant-default typedef-i16 "short") +(define-constant-default typedef-u16 "unsigned short") +(define-constant-default typedef-i32 "int") +(define-constant-default typedef-u32 "unsigned int") +(define-constant-default typedef-i64 (if (= 64 (constant ptr-bits)) + "long" + "long long")) +(define-constant-default typedef-u64 (if (= 64 (constant ptr-bits)) + "unsigned long" + "unsigned long long")) +(define-constant-default typedef-string-char "unsigned int") +(define-constant-default wchar-bits 32) + +;; derivations that are usually right +(define-constant-default address-bits (constant ptr-bits)) +(define-constant-default size_t-bits (constant ptr-bits)) +(define-constant-default ptrdiff_t-bits (constant ptr-bits)) +(define-constant-default long-bits (constant ptr-bits)) +(define-constant-default long-long-bits 64) +(define-constant-default max-float-alignment (if (= 64 (constant ptr-bits)) + 8 + 4)) +(define-constant-default max-integer-alignment (if (= 64 (constant ptr-bits)) + 8 + 4)) +(define-constant-default time-t-bits (constant ptr-bits)) +(define-constant-default segment-table-levels (if (= 64 (constant ptr-bits)) + 3 + 1)) + +;; instruction availability (defaults to unavailable) +(define-constant-default integer-divide-instruction #f) +(define-constant-default popcount-instruction #f) +(define-constant-default sqrt-instruction #f) +(define-constant-default fence-instruction #f) +(define-constant-default software-floating-point #f) diff --git a/s/i3.def b/s/i3.def new file mode 100644 index 0000000000..bfc1486205 --- /dev/null +++ b/s/i3.def @@ -0,0 +1,12 @@ +(define-constant architecture 'x86) +(define-constant ptr-bits 32) + +(define-constant asm-arg-reg-max 1) +(define-constant asm-arg-reg-cnt 1) +(define-constant asm-fpreg-max 2) + +(define-constant native-endianness 'little) + +(define-constant unaligned-floats #t) +(define-constant unaligned-integers #t) +(define-constant integer-divide-instruction #t) diff --git a/s/i3fb.def b/s/i3fb.def index a7ea2d5629..8f11c4db46 100644 --- a/s/i3fb.def +++ b/s/i3fb.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-i3fb)) -(define-constant architecture 'x86) -(define-constant address-bits 32) -(define-constant ptr-bits 32) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 32) -(define-constant long-long-bits 64) -(define-constant size_t-bits 32) -(define-constant ptrdiff_t-bits 32) -(define-constant wchar-bits 32) -(define-constant time-t-bits 32) -(define-constant max-float-alignment 4) -(define-constant max-integer-alignment 4) -(define-constant asm-arg-reg-max 1) -(define-constant asm-arg-reg-cnt 1) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "int") -(define-constant typedef-uptr "unsigned int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long long") -(define-constant typedef-u64 "unsigned long long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #f) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 1) (features iconv expeditor) +(include "i3.def") +(include "default.def") diff --git a/s/i3le.def b/s/i3le.def index 98ffafb924..7b77ecc303 100644 --- a/s/i3le.def +++ b/s/i3le.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-i3le)) -(define-constant architecture 'x86) -(define-constant address-bits 32) -(define-constant ptr-bits 32) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 32) -(define-constant long-long-bits 64) -(define-constant size_t-bits 32) -(define-constant ptrdiff_t-bits 32) -(define-constant wchar-bits 32) -(define-constant time-t-bits 32) -(define-constant max-float-alignment 4) -(define-constant max-integer-alignment 4) -(define-constant asm-arg-reg-max 1) -(define-constant asm-arg-reg-cnt 1) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "int") -(define-constant typedef-uptr "unsigned int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long long") -(define-constant typedef-u64 "unsigned long long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #f) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 1) (features iconv expeditor) +(include "i3.def") +(include "default.def") diff --git a/s/i3nb.def b/s/i3nb.def index e464c9f919..ae10180ed8 100644 --- a/s/i3nb.def +++ b/s/i3nb.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-i3nb)) -(define-constant architecture 'x86) -(define-constant address-bits 32) -(define-constant ptr-bits 32) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 32) -(define-constant long-long-bits 64) -(define-constant size_t-bits 32) -(define-constant ptrdiff_t-bits 32) -(define-constant wchar-bits 32) -(define-constant time-t-bits 32) -(define-constant max-float-alignment 4) -(define-constant max-integer-alignment 4) -(define-constant asm-arg-reg-max 1) -(define-constant asm-arg-reg-cnt 1) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "int") -(define-constant typedef-uptr "unsigned int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long long") -(define-constant typedef-u64 "unsigned long long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #f) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 1) (features iconv expeditor) +(include "i3.def") +(include "default.def") diff --git a/s/i3nt.def b/s/i3nt.def index 2acdb2716e..5efe5cf1a6 100644 --- a/s/i3nt.def +++ b/s/i3nt.def @@ -14,40 +14,7 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-i3nt)) -(define-constant architecture 'x86) -(define-constant address-bits 32) -(define-constant ptr-bits 32) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 32) -(define-constant long-long-bits 64) -(define-constant size_t-bits 32) -(define-constant ptrdiff_t-bits 32) -(define-constant wchar-bits 16) -(define-constant time-t-bits 64) -(define-constant max-float-alignment 8) -(define-constant max-integer-alignment 8) -(define-constant asm-arg-reg-max 1) -(define-constant asm-arg-reg-cnt 1) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "long") -(define-constant typedef-uptr "unsigned long") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long long") -(define-constant typedef-u64 "unsigned long long") -(define-constant typedef-string-char "unsigned int") -(define-constant thread-handle-uptrs 1) -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #f) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 1) (features iconv expeditor windows) +(include "i3.def") +(include "nt.def") +(include "default.def") diff --git a/s/i3ob.def b/s/i3ob.def index 7a8879ed36..36a8fc1dfc 100644 --- a/s/i3ob.def +++ b/s/i3ob.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-i3ob)) -(define-constant architecture 'x86) -(define-constant address-bits 32) -(define-constant ptr-bits 32) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 32) -(define-constant long-long-bits 64) -(define-constant size_t-bits 32) -(define-constant ptrdiff_t-bits 32) -(define-constant wchar-bits 32) -(define-constant time-t-bits 32) -(define-constant max-float-alignment 4) -(define-constant max-integer-alignment 4) -(define-constant asm-arg-reg-max 1) -(define-constant asm-arg-reg-cnt 1) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "int") -(define-constant typedef-uptr "unsigned int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long long") -(define-constant typedef-u64 "unsigned long long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #f) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 1) (features iconv expeditor) +(include "i3.def") +(include "default.def") diff --git a/s/i3osx.def b/s/i3osx.def index 02ecd7bf03..4c5baeac9b 100644 --- a/s/i3osx.def +++ b/s/i3osx.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-i3osx)) -(define-constant architecture 'x86) -(define-constant address-bits 32) -(define-constant ptr-bits 32) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 32) -(define-constant long-long-bits 64) -(define-constant size_t-bits 32) -(define-constant ptrdiff_t-bits 32) -(define-constant wchar-bits 32) -(define-constant time-t-bits 32) -(define-constant max-float-alignment 4) -(define-constant max-integer-alignment 4) -(define-constant asm-arg-reg-max 1) -(define-constant asm-arg-reg-cnt 1) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "int") -(define-constant typedef-uptr "unsigned int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long long") -(define-constant typedef-u64 "unsigned long long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #f) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 1) (features iconv expeditor) +(include "i3.def") +(include "default.def") diff --git a/s/i3qnx.def b/s/i3qnx.def index a0b291de2e..3c69c3f412 100644 --- a/s/i3qnx.def +++ b/s/i3qnx.def @@ -14,39 +14,8 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-i3qnx)) -(define-constant architecture 'x86) -(define-constant address-bits 32) -(define-constant ptr-bits 32) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 32) -(define-constant long-long-bits 64) -(define-constant size_t-bits 32) -(define-constant ptrdiff_t-bits 32) -(define-constant wchar-bits 32) -(define-constant time-t-bits 32) -(define-constant max-float-alignment 4) -(define-constant max-integer-alignment 8) -(define-constant asm-arg-reg-max 1) -(define-constant asm-arg-reg-cnt 1) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "int") -(define-constant typedef-uptr "unsigned int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long long") -(define-constant typedef-u64 "unsigned long long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #f) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 2) (features iconv expeditor) +(define-constant max-integer-alignment 8) +(define-constant segment-table-levels 2) +(include "i3.def") +(include "default.def") diff --git a/s/i3s2.def b/s/i3s2.def index a8f39705df..0acd01bd38 100644 --- a/s/i3s2.def +++ b/s/i3s2.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-i3s2)) -(define-constant architecture 'x86) -(define-constant address-bits 32) -(define-constant ptr-bits 32) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 32) -(define-constant long-long-bits 64) -(define-constant size_t-bits 32) -(define-constant ptrdiff_t-bits 32) -(define-constant wchar-bits 32) -(define-constant time-t-bits 32) -(define-constant max-float-alignment 4) -(define-constant max-integer-alignment 4) -(define-constant asm-arg-reg-max 1) -(define-constant asm-arg-reg-cnt 1) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "int") -(define-constant typedef-uptr "unsigned int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long long") -(define-constant typedef-u64 "unsigned long long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #f) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 1) (features iconv expeditor) +(include "i3.def") +(include "default.def") diff --git a/s/nt.def b/s/nt.def new file mode 100644 index 0000000000..4bdfcab1d0 --- /dev/null +++ b/s/nt.def @@ -0,0 +1,13 @@ +(define-constant wchar-bits 16) +(define-constant time-t-bits 64) +(define-constant max-float-alignment 8) +(define-constant max-integer-alignment 8) + +(define-constant typedef-iptr (if (= 64 (constant ptr-bits)) + "long long int" + "long")) +(define-constant typedef-uptr (if (= 64 (constant ptr-bits)) + "unsigned long long int" + "unsigned long")) + +(define-constant long-bits 32) diff --git a/s/pb.def b/s/pb.def index 13ade827ec..ccc646cd34 100644 --- a/s/pb.def +++ b/s/pb.def @@ -1,22 +1,11 @@ ;;; pb.def (define-constant machine-type (constant machine-type-pb)) +(features) + (define-constant architecture 'pb) -(define-constant address-bits 64) (define-constant ptr-bits 64) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 64) -(define-constant long-long-bits 64) -(define-constant size_t-bits 64) -(define-constant ptrdiff_t-bits 64) -(define-constant wchar-bits 32) -(define-constant time-t-bits 64) -(define-constant max-float-alignment 8) -(define-constant max-integer-alignment 8) -(define-constant asm-arg-reg-max 7) -(define-constant asm-arg-reg-cnt 3) -(define-constant asm-fpreg-max 8) + (define-constant typedef-ptr "uint64_t") ; not "void *" (define-constant typedef-iptr "int64_t") (define-constant typedef-uptr "uint64_t") @@ -29,11 +18,19 @@ (define-constant typedef-i64 "int64_t") (define-constant typedef-u64 "uint64_t") (define-constant typedef-string-char "uint32_t") + +(define-constant asm-arg-reg-max 7) +(define-constant asm-arg-reg-cnt 3) +(define-constant asm-fpreg-max 8) + +(define-constant max-float-alignment 8) +(define-constant max-integer-alignment 8) + (define-constant native-endianness 'unknown) + (define-constant unaligned-floats #f) (define-constant unaligned-integers #f) + (define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #f) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 3) -(features) + +(include "default.def") diff --git a/s/ppc32.def b/s/ppc32.def new file mode 100644 index 0000000000..9f24680ff9 --- /dev/null +++ b/s/ppc32.def @@ -0,0 +1,14 @@ +(define-constant architecture 'ppc32) +(define-constant ptr-bits 32) + +(define-constant asm-arg-reg-max 14) +(define-constant asm-arg-reg-cnt 3) +(define-constant asm-fpreg-max 2) + +(define-constant native-endianness 'big) + +(define-constant max-float-alignment 8) +(define-constant max-integer-alignment 8) + +(define-constant unaligned-floats #f) +(define-constant unaligned-integers #t) diff --git a/s/ppc32le.def b/s/ppc32le.def index 74015aa860..7417c64796 100644 --- a/s/ppc32le.def +++ b/s/ppc32le.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-ppc32le)) -(define-constant architecture 'ppc32) -(define-constant address-bits 32) -(define-constant ptr-bits 32) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 32) -(define-constant long-long-bits 64) -(define-constant size_t-bits 32) -(define-constant ptrdiff_t-bits 32) -(define-constant wchar-bits 32) -(define-constant time-t-bits 32) -(define-constant max-float-alignment 8) -(define-constant max-integer-alignment 8) -(define-constant asm-arg-reg-max 14) -(define-constant asm-arg-reg-cnt 3) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "int") -(define-constant typedef-uptr "unsigned int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long long") -(define-constant typedef-u64 "unsigned long long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'big) -(define-constant unaligned-floats #f) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #f) -(define-constant popcount-instruction #f) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 1) (features iconv expeditor) +(include "ppc32.def") +(include "default.def") diff --git a/s/ta6fb.def b/s/ta6fb.def index 72f79b4d44..741c288a9c 100644 --- a/s/ta6fb.def +++ b/s/ta6fb.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-ta6fb)) -(define-constant architecture 'x86_64) -(define-constant address-bits 64) -(define-constant ptr-bits 64) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 64) -(define-constant long-long-bits 64) -(define-constant size_t-bits 64) -(define-constant ptrdiff_t-bits 64) -(define-constant wchar-bits 32) -(define-constant time-t-bits 64) -(define-constant max-float-alignment 8) -(define-constant max-integer-alignment 8) -(define-constant asm-arg-reg-max 5) -(define-constant asm-arg-reg-cnt 3) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "long int") -(define-constant typedef-uptr "unsigned long int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long") -(define-constant typedef-u64 "unsigned long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #t) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 3) (features iconv expeditor pthreads) +(include "a6.def") +(include "default.def") diff --git a/s/ta6le.def b/s/ta6le.def index ecdc95ffad..53459a2f90 100644 --- a/s/ta6le.def +++ b/s/ta6le.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-ta6le)) -(define-constant architecture 'x86_64) -(define-constant address-bits 64) -(define-constant ptr-bits 64) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 64) -(define-constant long-long-bits 64) -(define-constant size_t-bits 64) -(define-constant ptrdiff_t-bits 64) -(define-constant wchar-bits 32) -(define-constant time-t-bits 64) -(define-constant max-float-alignment 8) -(define-constant max-integer-alignment 8) -(define-constant asm-arg-reg-max 5) -(define-constant asm-arg-reg-cnt 3) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "long int") -(define-constant typedef-uptr "unsigned long int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long") -(define-constant typedef-u64 "unsigned long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #t) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 3) (features iconv expeditor pthreads) +(include "a6.def") +(include "default.def") diff --git a/s/ta6nb.def b/s/ta6nb.def index 3cf1d39ad8..c87428012b 100644 --- a/s/ta6nb.def +++ b/s/ta6nb.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-ta6nb)) -(define-constant architecture 'x86_64) -(define-constant address-bits 64) -(define-constant ptr-bits 64) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 64) -(define-constant long-long-bits 64) -(define-constant size_t-bits 64) -(define-constant ptrdiff_t-bits 64) -(define-constant wchar-bits 32) -(define-constant time-t-bits 64) -(define-constant max-float-alignment 8) -(define-constant max-integer-alignment 8) -(define-constant asm-arg-reg-max 5) -(define-constant asm-arg-reg-cnt 3) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "long int") -(define-constant typedef-uptr "unsigned long int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long") -(define-constant typedef-u64 "unsigned long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #t) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 3) (features iconv expeditor pthreads) +(include "a6.def") +(include "default.def") diff --git a/s/ta6nt.def b/s/ta6nt.def index 8e4674bbb4..02f5690cd3 100644 --- a/s/ta6nt.def +++ b/s/ta6nt.def @@ -14,39 +14,7 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-ta6nt)) -(define-constant architecture 'x86_64) -(define-constant address-bits 64) -(define-constant ptr-bits 64) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 32) -(define-constant long-long-bits 64) -(define-constant size_t-bits 64) -(define-constant ptrdiff_t-bits 64) -(define-constant wchar-bits 16) -(define-constant time-t-bits 64) -(define-constant max-float-alignment 8) -(define-constant max-integer-alignment 8) -(define-constant asm-arg-reg-max 5) -(define-constant asm-arg-reg-cnt 3) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "long long int") -(define-constant typedef-uptr "unsigned long long int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long long") -(define-constant typedef-u64 "unsigned long long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #t) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 3) (features iconv expeditor pthreads windows) +(include "a6.def") +(include "nt.def") +(include "default.def") diff --git a/s/ta6ob.def b/s/ta6ob.def index 3d1e019f4d..0db2867d05 100644 --- a/s/ta6ob.def +++ b/s/ta6ob.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-ta6ob)) -(define-constant architecture 'x86_64) -(define-constant address-bits 64) -(define-constant ptr-bits 64) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 64) -(define-constant long-long-bits 64) -(define-constant size_t-bits 64) -(define-constant ptrdiff_t-bits 64) -(define-constant wchar-bits 32) -(define-constant time-t-bits 64) -(define-constant max-float-alignment 8) -(define-constant max-integer-alignment 8) -(define-constant asm-arg-reg-max 5) -(define-constant asm-arg-reg-cnt 3) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "long int") -(define-constant typedef-uptr "unsigned long int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long") -(define-constant typedef-u64 "unsigned long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #t) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 3) (features iconv expeditor pthreads) +(include "a6.def") +(include "default.def") diff --git a/s/ta6osx.def b/s/ta6osx.def index 438b13b681..4ed30d64ed 100644 --- a/s/ta6osx.def +++ b/s/ta6osx.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-ta6osx)) -(define-constant architecture 'x86_64) -(define-constant address-bits 64) -(define-constant ptr-bits 64) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 64) -(define-constant long-long-bits 64) -(define-constant size_t-bits 64) -(define-constant ptrdiff_t-bits 64) -(define-constant wchar-bits 32) -(define-constant time-t-bits 64) -(define-constant max-float-alignment 8) -(define-constant max-integer-alignment 8) -(define-constant asm-arg-reg-max 5) -(define-constant asm-arg-reg-cnt 3) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "long int") -(define-constant typedef-uptr "unsigned long int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long") -(define-constant typedef-u64 "unsigned long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #t) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 3) (features iconv expeditor pthreads) +(include "a6.def") +(include "default.def") diff --git a/s/ta6s2.def b/s/ta6s2.def index 4c91ab8d9c..845029686d 100644 --- a/s/ta6s2.def +++ b/s/ta6s2.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-ta6s2)) -(define-constant architecture 'x86_64) -(define-constant address-bits 64) -(define-constant ptr-bits 64) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 64) -(define-constant long-long-bits 64) -(define-constant size_t-bits 64) -(define-constant ptrdiff_t-bits 64) -(define-constant wchar-bits 32) -(define-constant time-t-bits 64) -(define-constant max-float-alignment 8) -(define-constant max-integer-alignment 8) -(define-constant asm-arg-reg-max 5) -(define-constant asm-arg-reg-cnt 3) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "long int") -(define-constant typedef-uptr "unsigned long int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long") -(define-constant typedef-u64 "unsigned long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #t) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 3) (features iconv expeditor pthreads) +(include "a6.def") +(include "default.def") diff --git a/s/tarm32le.def b/s/tarm32le.def index 5426a04e51..02dfc03992 100644 --- a/s/tarm32le.def +++ b/s/tarm32le.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-tarm32le)) -(define-constant architecture 'arm32) -(define-constant address-bits 32) -(define-constant ptr-bits 32) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 32) -(define-constant long-long-bits 64) -(define-constant size_t-bits 32) -(define-constant ptrdiff_t-bits 32) -(define-constant wchar-bits 32) -(define-constant time-t-bits 32) -(define-constant max-float-alignment 8) -(define-constant max-integer-alignment 8) -(define-constant asm-arg-reg-max 5) -(define-constant asm-arg-reg-cnt 3) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "int") -(define-constant typedef-uptr "unsigned int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long long") -(define-constant typedef-u64 "unsigned long long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #f) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #f) -(define-constant popcount-instruction #f) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 1) (features iconv expeditor pthreads) +(include "arm32.def") +(include "default.def") diff --git a/s/tarm64le.def b/s/tarm64le.def index 2a11ab0403..9d02ddcf37 100644 --- a/s/tarm64le.def +++ b/s/tarm64le.def @@ -1,39 +1,6 @@ ;;; tarm64le.def (define-constant machine-type (constant machine-type-tarm64le)) -(define-constant architecture 'arm64) -(define-constant address-bits 64) -(define-constant ptr-bits 64) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 64) -(define-constant long-long-bits 64) -(define-constant size_t-bits 64) -(define-constant ptrdiff_t-bits 64) -(define-constant wchar-bits 32) -(define-constant time-t-bits 64) -(define-constant max-float-alignment 8) -(define-constant max-integer-alignment 8) -(define-constant asm-arg-reg-max 9) -(define-constant asm-arg-reg-cnt 3) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "long") -(define-constant typedef-uptr "unsigned long") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long") -(define-constant typedef-u64 "unsigned long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #f) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #f) -(define-constant popcount-instruction #f) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 3) (features iconv expeditor pthreads) +(include "arm64.def") +(include "default.def") diff --git a/s/ti3fb.def b/s/ti3fb.def index 9752f79f2f..457f7d964d 100644 --- a/s/ti3fb.def +++ b/s/ti3fb.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-ti3fb)) -(define-constant architecture 'x86) -(define-constant address-bits 32) -(define-constant ptr-bits 32) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 32) -(define-constant long-long-bits 64) -(define-constant size_t-bits 32) -(define-constant ptrdiff_t-bits 32) -(define-constant wchar-bits 32) -(define-constant time-t-bits 32) -(define-constant max-float-alignment 4) -(define-constant max-integer-alignment 4) -(define-constant asm-arg-reg-max 1) -(define-constant asm-arg-reg-cnt 1) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "int") -(define-constant typedef-uptr "unsigned int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long long") -(define-constant typedef-u64 "unsigned long long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #f) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 1) (features iconv expeditor pthreads) +(include "i3.def") +(include "default.def") diff --git a/s/ti3le.def b/s/ti3le.def index a5db0b2b1f..0326d2b11f 100644 --- a/s/ti3le.def +++ b/s/ti3le.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-ti3le)) -(define-constant architecture 'x86) -(define-constant address-bits 32) -(define-constant ptr-bits 32) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 32) -(define-constant long-long-bits 64) -(define-constant size_t-bits 32) -(define-constant ptrdiff_t-bits 32) -(define-constant wchar-bits 32) -(define-constant time-t-bits 32) -(define-constant max-float-alignment 4) -(define-constant max-integer-alignment 4) -(define-constant asm-arg-reg-max 1) -(define-constant asm-arg-reg-cnt 1) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "int") -(define-constant typedef-uptr "unsigned int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long long") -(define-constant typedef-u64 "unsigned long long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #f) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 1) (features iconv expeditor pthreads) +(include "i3.def") +(include "default.def") diff --git a/s/ti3nb.def b/s/ti3nb.def index 4cd1fc60f4..c3b12ee830 100644 --- a/s/ti3nb.def +++ b/s/ti3nb.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-ti3nb)) -(define-constant architecture 'x86) -(define-constant address-bits 32) -(define-constant ptr-bits 32) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 32) -(define-constant long-long-bits 64) -(define-constant size_t-bits 32) -(define-constant ptrdiff_t-bits 32) -(define-constant wchar-bits 32) -(define-constant time-t-bits 32) -(define-constant max-float-alignment 4) -(define-constant max-integer-alignment 4) -(define-constant asm-arg-reg-max 1) -(define-constant asm-arg-reg-cnt 1) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "int") -(define-constant typedef-uptr "unsigned int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long long") -(define-constant typedef-u64 "unsigned long long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #f) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 1) (features iconv expeditor pthreads) +(include "i3.def") +(include "default.def") diff --git a/s/ti3nt.def b/s/ti3nt.def index 1c7c2751fd..b3f646efc2 100644 --- a/s/ti3nt.def +++ b/s/ti3nt.def @@ -14,40 +14,7 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-ti3nt)) -(define-constant architecture 'x86) -(define-constant address-bits 32) -(define-constant ptr-bits 32) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 32) -(define-constant long-long-bits 64) -(define-constant size_t-bits 32) -(define-constant ptrdiff_t-bits 32) -(define-constant wchar-bits 16) -(define-constant time-t-bits 64) -(define-constant max-float-alignment 8) -(define-constant max-integer-alignment 8) -(define-constant asm-arg-reg-max 1) -(define-constant asm-arg-reg-cnt 1) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "long") -(define-constant typedef-uptr "unsigned long") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long long") -(define-constant typedef-u64 "unsigned long long") -(define-constant typedef-string-char "unsigned int") -(define-constant thread-handle-uptrs 2) -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #f) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 1) (features iconv expeditor pthreads windows) +(include "i3.def") +(include "nt.def") +(include "default.def") diff --git a/s/ti3ob.def b/s/ti3ob.def index ba8fa99c1f..6e3d194e68 100644 --- a/s/ti3ob.def +++ b/s/ti3ob.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-ti3ob)) -(define-constant architecture 'x86) -(define-constant address-bits 32) -(define-constant ptr-bits 32) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 32) -(define-constant long-long-bits 64) -(define-constant size_t-bits 32) -(define-constant ptrdiff_t-bits 32) -(define-constant wchar-bits 32) -(define-constant time-t-bits 32) -(define-constant max-float-alignment 4) -(define-constant max-integer-alignment 4) -(define-constant asm-arg-reg-max 1) -(define-constant asm-arg-reg-cnt 1) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "int") -(define-constant typedef-uptr "unsigned int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long long") -(define-constant typedef-u64 "unsigned long long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #f) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 1) (features iconv expeditor pthreads) +(include "i3.def") +(include "default.def") diff --git a/s/ti3osx.def b/s/ti3osx.def index 47ffb4ed7f..99323c562b 100644 --- a/s/ti3osx.def +++ b/s/ti3osx.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-ti3osx)) -(define-constant architecture 'x86) -(define-constant address-bits 32) -(define-constant ptr-bits 32) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 32) -(define-constant long-long-bits 64) -(define-constant size_t-bits 32) -(define-constant ptrdiff_t-bits 32) -(define-constant wchar-bits 32) -(define-constant time-t-bits 32) -(define-constant max-float-alignment 4) -(define-constant max-integer-alignment 4) -(define-constant asm-arg-reg-max 1) -(define-constant asm-arg-reg-cnt 1) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "int") -(define-constant typedef-uptr "unsigned int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long long") -(define-constant typedef-u64 "unsigned long long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #f) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 1) (features iconv expeditor pthreads) +(include "i3.def") +(include "default.def") diff --git a/s/ti3s2.def b/s/ti3s2.def index 4b02a94bf6..2f140c218d 100644 --- a/s/ti3s2.def +++ b/s/ti3s2.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-ti3s2)) -(define-constant architecture 'x86) -(define-constant address-bits 32) -(define-constant ptr-bits 32) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 32) -(define-constant long-long-bits 64) -(define-constant size_t-bits 32) -(define-constant ptrdiff_t-bits 32) -(define-constant wchar-bits 32) -(define-constant time-t-bits 32) -(define-constant max-float-alignment 4) -(define-constant max-integer-alignment 4) -(define-constant asm-arg-reg-max 1) -(define-constant asm-arg-reg-cnt 1) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "int") -(define-constant typedef-uptr "unsigned int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long long") -(define-constant typedef-u64 "unsigned long long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'little) -(define-constant unaligned-floats #t) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #t) -(define-constant popcount-instruction #f) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 1) (features iconv expeditor pthreads) +(include "i3.def") +(include "default.def") diff --git a/s/tppc32le.def b/s/tppc32le.def index 5f6e225407..9a2d09df35 100644 --- a/s/tppc32le.def +++ b/s/tppc32le.def @@ -14,39 +14,6 @@ ;;; limitations under the License. (define-constant machine-type (constant machine-type-tppc32le)) -(define-constant architecture 'ppc32) -(define-constant address-bits 32) -(define-constant ptr-bits 32) -(define-constant int-bits 32) -(define-constant short-bits 16) -(define-constant long-bits 32) -(define-constant long-long-bits 64) -(define-constant size_t-bits 32) -(define-constant ptrdiff_t-bits 32) -(define-constant wchar-bits 32) -(define-constant time-t-bits 32) -(define-constant max-float-alignment 8) -(define-constant max-integer-alignment 8) -(define-constant asm-arg-reg-max 14) -(define-constant asm-arg-reg-cnt 3) -(define-constant asm-fpreg-max 2) -(define-constant typedef-ptr "void *") -(define-constant typedef-iptr "int") -(define-constant typedef-uptr "unsigned int") -(define-constant typedef-i8 "char") -(define-constant typedef-u8 "unsigned char") -(define-constant typedef-i16 "short") -(define-constant typedef-u16 "unsigned short") -(define-constant typedef-i32 "int") -(define-constant typedef-u32 "unsigned int") -(define-constant typedef-i64 "long long") -(define-constant typedef-u64 "unsigned long long") -(define-constant typedef-string-char "unsigned int") -(define-constant native-endianness 'big) -(define-constant unaligned-floats #f) -(define-constant unaligned-integers #t) -(define-constant integer-divide-instruction #f) -(define-constant popcount-instruction #f) -(define-constant software-floating-point #f) -(define-constant segment-table-levels 1) (features iconv expeditor pthreads) +(include "ppc32.def") +(include "default.def") diff --git a/workarea b/workarea index 75a7dd2d51..74d24e8077 100755 --- a/workarea +++ b/workarea @@ -79,6 +79,40 @@ case "$M" in *) echo "Unrecognized machine name $M"; exit 1 ;; esac +if [ "$Muni" != "" ] ; then + Muniarch=$Muni +else + Muniarch=$M +fi + +case "$Muniarch" in + a6fb) March=a6 ;; + a6le) March=a6 ;; + a6nb) March=a6 ;; + a6nt) March=a6 ;; + a6ob) March=a6 ;; + a6osx) March=a6 ;; + a6s2) March=a6 ;; + arm32le) March=arm32 ;; + arm64le) March=arm64 ;; + i3fb) March=i3 ;; + i3le) March=i3 ;; + i3nb) March=i3 ;; + i3nt) March=i3 ;; + i3ob) March=i3 ;; + i3osx) March=i3 ;; + i3qnx) March=i3 ;; + i3s2) March=i3 ;; + ppc32le) March=ppc32 ;; + *) March="" ;; +esac + +case "$Muniarch" in + a6nt) Mos=nt ;; + i3nt) Mos=nt ;; + *) Mos="" ;; +esac + if [ "$OS" = "Windows_NT" ] then ln="/bin/cp -R" @@ -160,10 +194,20 @@ esac workdir $W/s (cd $W/s; workln ../../s/Mf-$M Mf-$M) (cd $W/s; forceworkln Mf-$M Makefile) +if [ "$Muni" != "" ] ; then + (cd $W/s; workln ../../s/Mf-$Muni Mf-$Muni) +fi (cd $W/s; workln ../../s/Mf-base Mf-base) (cd $W/s; workln ../../s/Mf-cross Mf-cross) (cd $W/s; workln ../../s/$M.def $M.def) (cd $W/s; forceworkln2 $M.def machine.def) +if [ "$March" != "" ] ; then + (cd $W/s; workln ../../s/$March.def $March.def) +fi +if [ "$Mos" != "" ] ; then + (cd $W/s; workln ../../s/$Mos.def $Mos.def) +fi +(cd $W/s; workln ../../s/default.def default.def) workdir $W/mats (cd $W/mats; workln ../../mats/Mf-$M Mf-$M)