1df9330b5SEd Maste.\" Copyright (c) 2016 The FreeBSD Foundation. All rights reserved. 2df9330b5SEd Maste.\" 3df9330b5SEd Maste.\" This documentation was created by Ed Maste under sponsorship of 4df9330b5SEd Maste.\" The FreeBSD Foundation. 5df9330b5SEd Maste.\" 6df9330b5SEd Maste.\" Redistribution and use in source and binary forms, with or without 7df9330b5SEd Maste.\" modification, are permitted provided that the following conditions 8df9330b5SEd Maste.\" are met: 9df9330b5SEd Maste.\" 1. Redistributions of source code must retain the above copyright 10df9330b5SEd Maste.\" notice, this list of conditions and the following disclaimer. 11df9330b5SEd Maste.\" 2. Redistributions in binary form must reproduce the above copyright 12df9330b5SEd Maste.\" notice, this list of conditions and the following disclaimer in the 13df9330b5SEd Maste.\" documentation and/or other materials provided with the distribution. 14df9330b5SEd Maste.\" 15df9330b5SEd Maste.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND 16df9330b5SEd Maste.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17df9330b5SEd Maste.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18df9330b5SEd Maste.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE 19df9330b5SEd Maste.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20df9330b5SEd Maste.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21df9330b5SEd Maste.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22df9330b5SEd Maste.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23df9330b5SEd Maste.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24df9330b5SEd Maste.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25df9330b5SEd Maste.\" SUCH DAMAGE. 26df9330b5SEd Maste.\" 27df9330b5SEd Maste.\" $FreeBSD$ 28df9330b5SEd Maste.\" 29*6554316cSKonstantin Belousov.Dd May 2, 2017 30df9330b5SEd Maste.Dt ARCH 7 31df9330b5SEd Maste.Os 32df9330b5SEd Maste.Sh NAME 33df9330b5SEd Maste.Nm arch 34df9330b5SEd Maste.Nd Architecture-specific details 35df9330b5SEd Maste.Sh DESCRIPTION 36df9330b5SEd MasteDifferences between CPU architectures and platforms supported by 37df9330b5SEd Maste.Fx . 38df9330b5SEd Maste.Pp 39df9330b5SEd Maste.Ss Type sizes 40df9330b5SEd MasteOn all supported architectures, 41df9330b5SEd Maste.Bl -column -offset -indent "long long" "Size" 42df9330b5SEd Maste.It Sy Type Ta Sy Size 43df9330b5SEd Maste.It short Ta 2 44df9330b5SEd Maste.It int Ta 4 45df9330b5SEd Maste.It long Ta sizeof(void*) 46df9330b5SEd Maste.It long long Ta 8 47df9330b5SEd Maste.It float Ta 4 48df9330b5SEd Maste.It double Ta 8 49df9330b5SEd Maste.El 50*6554316cSKonstantin Belousov.Bl -column -offset indent "Sy Architecture" "Sy sizeof(void *)" "Sy sizeof(long double)" "Sy sizeof(time_t)" 51*6554316cSKonstantin Belousov.It Sy Architecture Ta Sy sizeof(void *) Ta Sy sizeof(long double) Ta Sy sizeof(time_t) 52*6554316cSKonstantin Belousov.It amd64 Ta 8 Ta 16 Ta 8 53*6554316cSKonstantin Belousov.It arm Ta 4 Ta 8 Ta 8 54*6554316cSKonstantin Belousov.It armeb Ta 4 Ta 8 Ta 8 55*6554316cSKonstantin Belousov.It armv6 Ta 4 Ta 8 Ta 8 56*6554316cSKonstantin Belousov.It arm64 Ta 8 Ta 16 Ta 8 57*6554316cSKonstantin Belousov.It i386 Ta 4 Ta 12 Ta 4 58*6554316cSKonstantin Belousov.It mips Ta 4 Ta 8 Ta 8 59*6554316cSKonstantin Belousov.It mipsel Ta 4 Ta 8 Ta 8 60*6554316cSKonstantin Belousov.It mipselhf Ta 4 Ta 8 Ta 8 61*6554316cSKonstantin Belousov.It mipshf Ta 4 Ta 8 Ta 8 62*6554316cSKonstantin Belousov.It mipsn32 Ta 4 Ta 8 Ta 8 63*6554316cSKonstantin Belousov.It mips64 Ta 8 Ta 8 Ta 8 64*6554316cSKonstantin Belousov.It mips64el Ta 8 Ta 8 Ta 8 65*6554316cSKonstantin Belousov.It mips64elhf Ta 8 Ta 8 Ta 8 66*6554316cSKonstantin Belousov.It mips64hf Ta 8 Ta 8 Ta 8 67*6554316cSKonstantin Belousov.It powerpc Ta 4 Ta 8 Ta 4 68*6554316cSKonstantin Belousov.It powerpc64 Ta 8 Ta 8 Ta 8 69*6554316cSKonstantin Belousov.It riscv Ta 8 Ta 16 Ta 8 70*6554316cSKonstantin Belousov.It sparc64 Ta 8 Ta 16 Ta 8 71df9330b5SEd Maste.El 72df9330b5SEd Maste.Ss Endianness and Char Signedness 7342e83752SKonstantin Belousov.Bl -column -offset indent "Sy Architecture" "Sy Endianness" "Sy char Signedness" 74df9330b5SEd Maste.It Sy Architecture Ta Sy Endianness Ta Sy char Signedness 75df9330b5SEd Maste.It amd64 Ta little Ta signed 76df9330b5SEd Maste.It arm Ta little Ta unsigned 77df9330b5SEd Maste.It armeb Ta big Ta unsigned 78df9330b5SEd Maste.It armv6 Ta little Ta unsigned 79df9330b5SEd Maste.It arm64 Ta little Ta unsigned 80df9330b5SEd Maste.It i386 Ta little Ta signed 818395cdc1SEd Maste.It mips Ta big Ta signed 828395cdc1SEd Maste.It mipsel Ta little Ta signed 835bca2215SRuslan Bukin.It mipselhf Ta little Ta signed 845bca2215SRuslan Bukin.It mipshf Ta big Ta signed 858395cdc1SEd Maste.It mipsn32 Ta big Ta signed 868395cdc1SEd Maste.It mips64 Ta big Ta signed 87df9330b5SEd Maste.It mips64el Ta little Ta signed 885bca2215SRuslan Bukin.It mips64elhf Ta little Ta signed 895bca2215SRuslan Bukin.It mips64hf Ta big Ta signed 90df9330b5SEd Maste.It powerpc Ta big Ta unsigned 91df9330b5SEd Maste.It powerpc64 Ta big Ta unsigned 92df9330b5SEd Maste.It riscv Ta little Ta signed 93df9330b5SEd Maste.It sparc64 Ta big Ta signed 94df9330b5SEd Maste.El 95df9330b5SEd Maste.Ss Page Size 961859c867SKonstantin Belousov.Bl -column -offset indent "Sy Architecture" "Sy Page Sizes" 97df9330b5SEd Maste.It Sy Architecture Ta Sy Page Sizes 98df9330b5SEd Maste.It amd64 Ta 4K, 2M, 1G 99df9330b5SEd Maste.It arm Ta 4K 100df9330b5SEd Maste.It armeb Ta 4K 101780586e8SEd Maste.It armv6 Ta 4K, 1M 102df9330b5SEd Maste.It arm64 Ta 4K, 2M, 1G 103df9330b5SEd Maste.It i386 Ta 4K, 2M (PAE), 4M 104df9330b5SEd Maste.It mips Ta 4K 105df9330b5SEd Maste.It mipsel Ta 4K 1065bca2215SRuslan Bukin.It mipselhf Ta 4K 1075bca2215SRuslan Bukin.It mipshf Ta 4K 108df9330b5SEd Maste.It mipsn32 Ta 4K 109df9330b5SEd Maste.It mips64 Ta 4K 110df9330b5SEd Maste.It mips64el Ta 4K 1115bca2215SRuslan Bukin.It mips64elhf Ta 4K 1125bca2215SRuslan Bukin.It mips64hf Ta 4K 113df9330b5SEd Maste.It powerpc Ta 4K 114df9330b5SEd Maste.It powerpc64 Ta 4K 115df9330b5SEd Maste.It riscv Ta 4K 116df9330b5SEd Maste.It sparc64 Ta 8K 117df9330b5SEd Maste.El 118df9330b5SEd Maste.Ss Floating Point 1191859c867SKonstantin Belousov.Bl -column -offset indent "Sy Architecture" "Sy float, double" "Sy long double" 120df9330b5SEd Maste.It Sy Architecture Ta Sy float, double Ta Sy long double 121df9330b5SEd Maste.It amd64 Ta hard Ta hard, 80 bit 122df9330b5SEd Maste.It arm Ta soft Ta soft, double precision 123df9330b5SEd Maste.It armeb Ta soft Ta soft, double precision 124df9330b5SEd Maste.It armv6 Ta hard Ta hard, double precision 125df9330b5SEd Maste.It arm64 Ta hard Ta soft, quad precision 126df9330b5SEd Maste.It i386 Ta hard Ta hard, 80 bit 127df9330b5SEd Maste.It mips Ta soft Ta identical to double 128df9330b5SEd Maste.It mipsel Ta soft Ta identical to double 1295bca2215SRuslan Bukin.It mipselhf Ta hard Ta identical to double 1305bca2215SRuslan Bukin.It mipshf Ta hard Ta identical to double 131df9330b5SEd Maste.It mipsn32 Ta soft Ta identical to double 132df9330b5SEd Maste.It mips64 Ta soft Ta identical to double 133df9330b5SEd Maste.It mips64el Ta soft Ta identical to double 1345bca2215SRuslan Bukin.It mips64elhf Ta hard Ta identical to double 1355bca2215SRuslan Bukin.It mips64hf Ta hard Ta identical to double 136df9330b5SEd Maste.It powerpc Ta hard Ta hard, double precision 137df9330b5SEd Maste.It powerpc64 Ta hard Ta hard, double precision 138cb8c6df4SKevin Lo.It riscv64 Ta hard Ta hard, double precision 139cb8c6df4SKevin Lo.It riscv64sf Ta soft Ta soft, double precision 140df9330b5SEd Maste.It sparc64 Ta hard Ta hard, quad precision 141df9330b5SEd Maste.El 142df9330b5SEd Maste.Ss Predefined Macros 143df9330b5SEd MasteThe compiler provides a number of predefined macros. 144df9330b5SEd MasteSome of these provide architecture-specific details and are explained below. 145df9330b5SEd MasteOther macros, including those required by the language standard, are not 146df9330b5SEd Masteincluded here. 147df9330b5SEd Maste.Pp 148df9330b5SEd MasteThe full set of predefined macros can be obtained with this command: 149df9330b5SEd Maste.Bd -literal -offset indent 1508e71e112SEd Mastecc -x c -dM -E /dev/null 151df9330b5SEd Maste.Ed 152df9330b5SEd Maste.Pp 153df9330b5SEd MasteCommon type size and endianness macros: 1541859c867SKonstantin Belousov.Bl -column -offset indent "BYTE_ORDER" "Sy Meaning" 155df9330b5SEd Maste.It Sy Macro Ta Sy Meaning 156df9330b5SEd Maste.It Dv __LP64__ Ta 64-bit (8-byte) long and pointer, 32-bit (4-byte) int 157df9330b5SEd Maste.It Dv __ILP32__ Ta 32-bit (4-byte) int, long and pointer 158df9330b5SEd Maste.It Dv BYTE_ORDER Ta Either Dv BIG_ENDIAN or Dv LITTLE_ENDIAN . 1591859c867SKonstantin Belousov.Dv PDP11_ENDIAN 1601859c867SKonstantin Belousovis not used on 1611859c867SKonstantin Belousov.Fx . 162df9330b5SEd Maste.El 163df9330b5SEd Maste.Pp 164df9330b5SEd MasteArchitecture-specific macros: 1651859c867SKonstantin Belousov.Bl -column -offset indent "Sy Architecture" "Sy Predefined macros" 166df9330b5SEd Maste.It Sy Architecture Ta Sy Predefined macros 167df9330b5SEd Maste.It amd64 Ta Dv __amd64__, Dv __x86_64__ 168df9330b5SEd Maste.It arm Ta Dv __arm__ 169df9330b5SEd Maste.It armeb Ta Dv __arm__ 170df9330b5SEd Maste.It armv6 Ta Dv __arm__, Dv __ARM_ARCH >= 6 171df9330b5SEd Maste.It arm64 Ta Dv __aarch64__ 172df9330b5SEd Maste.It i386 Ta Dv __i386__ 173df9330b5SEd Maste.It mips Ta Dv __mips__, Dv __MIPSEB__, Dv __mips_o32 174df9330b5SEd Maste.It mipsel Ta Dv __mips__, Dv __mips_o32 1755bca2215SRuslan Bukin.It mipselhf Ta Dv __mips__, Dv __mips_o32 1765bca2215SRuslan Bukin.It mipshf Ta Dv __mips__, Dv __MIPSEB__, Dv __mips_o32 177df9330b5SEd Maste.It mipsn32 Ta Dv __mips__, Dv __MIPSEB__, Dv __mips_n32 178df9330b5SEd Maste.It mips64 Ta Dv __mips__, Dv __MIPSEB__, Dv __mips_n64 179df9330b5SEd Maste.It mips64el Ta Dv __mips__, Dv __mips_n64 1805bca2215SRuslan Bukin.It mips64elhf Ta Dv __mips__, Dv __mips_n64 1815bca2215SRuslan Bukin.It mips64hf Ta Dv __mips__, Dv __MIPSEB__, Dv __mips_n64 182df9330b5SEd Maste.It powerpc Ta Dv __powerpc__ 183df9330b5SEd Maste.It powerpc64 Ta Dv __powerpc__, Dv __powerpc64__ 184df9330b5SEd Maste.It riscv Ta Dv __riscv__, Dv __riscv64 185df9330b5SEd Maste.It sparc64 Ta Dv __sparc64__ 186df9330b5SEd Maste.El 187df9330b5SEd Maste.Sh SEE ALSO 188df9330b5SEd Maste.Xr src.conf 5 , 189df9330b5SEd Maste.Xr build 7 190df9330b5SEd Maste.Sh HISTORY 191df9330b5SEd MasteAn 192df9330b5SEd Maste.Nm 193df9330b5SEd Mastemanual page appeared in 194df9330b5SEd Maste.Fx 12 . 195