<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki2025.debian.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Zeha</id>
	<title>Debian Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki2025.debian.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Zeha"/>
	<link rel="alternate" type="text/html" href="https://wiki2025.debian.org/wiki/Special:Contributions/Zeha"/>
	<updated>2026-05-06T12:16:09Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki2025.debian.org/index.php?title=LTS&amp;diff=14</id>
		<title>LTS</title>
		<link rel="alternate" type="text/html" href="https://wiki2025.debian.org/index.php?title=LTS&amp;diff=14"/>
		<updated>2025-07-18T22:39:53Z</updated>

		<summary type="html">&lt;p&gt;Zeha: Created page with &amp;quot;= Debian Long Term Support =  Debian Long Term Support (LTS) is a project to extend the lifetime of all Debian stable releases to (at least) 5 years. Debian LTS is not handled by the Debian Security and Release teams, but by a separate group of volunteers and companies interested in making it a success.  Thus the Debian LTS team takes over security maintenance of the various releases once the Debian Security team stops its work.  For more information see LTS/Bullseye...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debian Long Term Support =&lt;br /&gt;
&lt;br /&gt;
Debian Long Term Support (LTS) is a project to extend the lifetime of all Debian stable releases to (at least) 5 years. Debian LTS is not handled by the Debian Security and Release teams, but by a separate group of volunteers and companies interested in making it a success.&lt;br /&gt;
&lt;br /&gt;
Thus the Debian LTS team takes over security maintenance of the various releases once the Debian Security team stops its work.&lt;br /&gt;
&lt;br /&gt;
For more information see [[LTS/Bullseye]], [[LTS/Using]] and [[LTS/FAQ]].&lt;br /&gt;
&lt;br /&gt;
LTS schedule (last updated: August 14th, 2024)&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;border-style: none; border-width: 0;&amp;quot;&lt;br /&gt;
! Version&lt;br /&gt;
! supported architectures&lt;br /&gt;
! schedule&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#F06C47&amp;quot; colspan=3 | &amp;lt;u&amp;gt;Previous LTS Releases&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#F06C47&amp;quot; | Debian 6 &amp;quot;[[DebianSqueeze|Squeeze]]&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#F06C47&amp;quot; | i386 and amd64&lt;br /&gt;
| style=&amp;quot;background-color:#F06C47&amp;quot; | 2nd June 2014 to 29th of February 2016&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#F06C47&amp;quot; | Debian 7 &amp;quot;[[LTS/Wheezy|Wheezy]]&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#F06C47&amp;quot; | i386, amd64, armel and armhf&lt;br /&gt;
| style=&amp;quot;background-color:#F06C47&amp;quot; | 26th April 2016 to 31st May 2018&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#F06C47&amp;quot; | Debian 8 &amp;quot;[[LTS/Jessie|Jessie]]&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#F06C47&amp;quot; | i386, amd64, armel and armhf&lt;br /&gt;
| style=&amp;quot;background-color:#F06C47&amp;quot; | 17th June 2018 to June 30, 2020&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#F06C47&amp;quot; | Debian 9 &amp;quot;[[LTS/Stretch|Stretch]]&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#F06C47&amp;quot; | i386, amd64, armel, armhf and arm64&lt;br /&gt;
| style=&amp;quot;background-color:#F06C47&amp;quot; | July 6, 2020 to June 30, 2022&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#F06C47&amp;quot; | Debian 10 &amp;quot;[[LTS/Buster|Buster]]&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#F06C47&amp;quot; | i386, amd64, armhf and arm64&lt;br /&gt;
| style=&amp;quot;background-color:#F06C47&amp;quot; | August 1st, 2022 to June 30th, 2024&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#FCED77&amp;quot; colspan=3 | &#039;&#039;&#039;Current LTS Release(s)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#FCED77&amp;quot; | Debian 11 &amp;quot;[[LTS/Bullseye|Bullseye]]&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#FCED77&amp;quot; | i386, amd64, armhf and arm64&lt;br /&gt;
| style=&amp;quot;background-color:#FCED77&amp;quot; | August 15th, 2024 to August 31st, 2026&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#98fb98&amp;quot; colspan=3 | &amp;lt;u&amp;gt;Future LTS Release(s)&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color:#98fb98&amp;quot; | Debian 12 &amp;quot;[[DebianBookworm|Bookworm]]&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#98fb98&amp;quot; | i386, amd64, armhf and arm64&lt;br /&gt;
| style=&amp;quot;background-color:#98fb98&amp;quot; | June 11th, 2026 to June 30th, 2028&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| | &#039;&#039;&#039;Legend:&#039;&#039;&#039;&lt;br /&gt;
| style=&amp;quot;background-color:#F06C47&amp;quot; | End of life&lt;br /&gt;
| style=&amp;quot;background-color:#FCED77&amp;quot; | &#039;&#039;&#039;Supported by LTS team&#039;&#039;&#039;&lt;br /&gt;
| style=&amp;quot;background-color:#98fb98&amp;quot; |[[DebianOldStable|Supported by security and release teams]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- wiki comment/dotted &lt;br /&gt;
&lt;br /&gt;
LTS time table template&lt;br /&gt;
&lt;br /&gt;
||&amp;lt;:&amp;gt; {i} &#039;&#039;&#039;Legend:&#039;&#039;&#039; ||&amp;lt;#F06C47&amp;gt; End of life ||&amp;lt;#FCED77&amp;gt; &#039;&#039;&#039;Supported by LTS&#039;&#039;&#039; ||&amp;lt;#9DD12F&amp;gt; Future LTS Version - Currently with [[DebianOldStable|Debian Oldstable]] support ||&amp;lt;#98fb98&amp;gt; [[DebianStable|Debian Stable]] ||&lt;br /&gt;
&lt;br /&gt;
||&amp;lt;:&amp;gt; {i} &#039;&#039;&#039;Legend:&#039;&#039;&#039; ||&amp;lt;#F06C47&amp;gt; End of life ||&amp;lt;#FCED77&amp;gt; &#039;&#039;&#039;Supported by LTS&#039;&#039;&#039;||&amp;lt;#98fb98&amp;gt; [[DebianStable|Debian Stable]] ||&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Companies using Debian who benefit from this project are encouraged to either [[LTS/Development|help directly]] or [[LTS/Funding|contribute financially]]. The number of properly supported packages depends directly on the level of support that the LTS team receives.&lt;br /&gt;
&lt;br /&gt;
All Debian LTS security advisories (DLAs) are published at [https://www.debian.org/lts/security/ https://www.debian.org/lts/security/] where you can also subscribe via RSS feed.&lt;br /&gt;
&lt;br /&gt;
Extended Long Term Support is also available. Please refer to [[LTS/Extended|Extended LTS]] for further information.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Important Subpages =&lt;br /&gt;
See the following sub pages for details:&lt;br /&gt;
&lt;br /&gt;
* [[LTS/Using|How to use the updates from LTS]]&lt;br /&gt;
* [[LTS/FAQ|FAQ (Frequently Asked Questions) about LTS in Debian]]&lt;br /&gt;
* [[LTS/Development|Contributing to Debian LTS]]&lt;br /&gt;
* [[LTS/Funding|Funding the Debian LTS project]]&lt;br /&gt;
* [[LTS/Team|Members of the Debian LTS team]]&lt;br /&gt;
* [https://salsa.debian.org/lts-team/lts-extra-tasks/-/issues ToDo: project wide tasks for everyone]&lt;br /&gt;
* [[LTS/Logos|LTS Logos]]&lt;br /&gt;
&lt;br /&gt;
All LTS related pages are listed in the [[:Category:LTS|LTS category]].&lt;br /&gt;
&lt;br /&gt;
= Get in contact =&lt;br /&gt;
The most important way of communication is the [[LTS/Contact#debian-lts|mailing list debian-lts]]. See [[LTS/Contact]] for more.&lt;br /&gt;
&lt;br /&gt;
= Usage and users survey =&lt;br /&gt;
&lt;br /&gt;
* July 2020:&lt;br /&gt;
** [https://web.archive.org/web/20220511195445/https://lts-team.pages.debian.net/2020/10/15/debian-lts-survey.html Results]&lt;br /&gt;
** [https://inguza.com/reportdoc/debian-lts/survey-summary.pdf Subjective answers summary]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
## This page is referenced from https://www.debian.org/News/2014/20140616&lt;br /&gt;
## This page is referenced from https://www.debian.org/News/2014/20140719 and many more&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Lts]] [[Category:Permalink]]&lt;/div&gt;</summary>
		<author><name>Zeha</name></author>
	</entry>
	<entry>
		<id>https://wiki2025.debian.org/index.php?title=ArchitectureSpecificsMemo&amp;diff=13</id>
		<title>ArchitectureSpecificsMemo</title>
		<link rel="alternate" type="text/html" href="https://wiki2025.debian.org/index.php?title=ArchitectureSpecificsMemo&amp;diff=13"/>
		<updated>2025-07-18T22:04:37Z</updated>

		<summary type="html">&lt;p&gt;Zeha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
This page is a &#039;&#039;&#039;draft&#039;&#039;&#039;. Please help enhancing it by adding lines and filling tables. Comments at the bottom of the text are also welcome.&lt;br /&gt;
&lt;br /&gt;
This is just a quick list to recall some of the specifics of the architectures found in the Debian project.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!sizeof(short)&lt;br /&gt;
!sizeof(int)&lt;br /&gt;
!sizeof(long)&lt;br /&gt;
!sizeof(long long)&lt;br /&gt;
!sizeof(float)&lt;br /&gt;
!sizeof(double)&lt;br /&gt;
|-&lt;br /&gt;
|| &#039;&#039;&#039;any&#039;&#039;&#039; || 2 || 4 || sizeof(void *) || 8 || 4 || 8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!sizeof(void*)&lt;br /&gt;
!sizeof(long double)&lt;br /&gt;
!max_align_t alignment&lt;br /&gt;
!char&lt;br /&gt;
!endian&lt;br /&gt;
!stack grows&lt;br /&gt;
!page sizes&lt;br /&gt;
&amp;lt;small&amp;gt;User-visible page size returned by &amp;lt;code&amp;gt;getauxval(AT_PAGESZ)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;getconf PAGESIZE&amp;lt;/code&amp;gt;, the granularity of the memory map&amp;lt;/small&amp;gt;&lt;br /&gt;
!float&lt;br /&gt;
H=hard, S=soft, P=partial, +=excess precision, ~=not usual standard&lt;br /&gt;
!double&lt;br /&gt;
&amp;lt;small&amp;gt;Note that the columns refer to C types. H=hard, S=soft, P=partial, +=excess precision, ~=not usual standard)&amp;lt;/small&amp;gt;&lt;br /&gt;
!long double&lt;br /&gt;
&amp;lt;small&amp;gt;Note that the columns refer to C types. H=hard, S=soft, P=partial, +=excess precision,-=long double precision &amp;lt; __float128, ~=not usual standard)&amp;lt;/small&amp;gt;&lt;br /&gt;
!sizeof(time_t)&lt;br /&gt;
&amp;lt;small&amp;gt;With &amp;lt;code&amp;gt;_TIME_BITS=64&amp;lt;/code&amp;gt; the size is 8 on all archs&amp;lt;/small&amp;gt;&lt;br /&gt;
!GCC pre-defined macro(s)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;alpha&#039;&#039;&#039;&lt;br /&gt;
||8&lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||16||signed||LE||down||8K||?||?||?||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__alpha__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;any-amd64, amd64, kfreebsd-amd64, hurd-amd64&#039;&#039;&#039; ||8||16||16||signed||LE||down||4K ||H||H&lt;br /&gt;
||H-&lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__x86_64__ &amp;amp;&amp;amp; __LP64__&amp;lt;/code&amp;gt; it&#039;s a common gotcha for x32, you need to use &amp;lt;code&amp;gt;__LP64__&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;__ILP32__&amp;lt;/code&amp;gt; to tell them apart&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arc&#039;&#039;&#039;                       ||4 ||16||?||unsigned||LE||down||8K       ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__arc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm&#039;&#039;&#039;                       ||4 ||? ||8||unsigned||LE||down||?        ||S ||S ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64&#039;&#039;&#039;       ||8 ||16||16||unsigned||LE||down||4K, 16K, 64K ||H ||H ||S ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__aarch64__ &amp;amp;&amp;amp; __LP64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64ilp32&#039;&#039;&#039;       ||4 ||16||?||unsigned||LE||down||4K, 16K, 64K ||H ||H ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__aarch64__ &amp;amp;&amp;amp; __ILP32__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armel&#039;&#039;&#039;     ||4 ||8 ||8||unsigned||LE||down||4K       ||S ||S ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__ &amp;amp;&amp;amp; __ARM_EABI__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armhf&#039;&#039;&#039;||4 ||8 ||8||unsigned||LE||down||4K       ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__ &amp;amp;&amp;amp; __ARM_EABI__ &amp;amp;&amp;amp; __ARM_PCS_VFP&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;avr32&#039;&#039;&#039;                     ||4 ||8 ||?||unsigned||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hppa&#039;&#039;&#039;                      ||4 ||8 ||8||  signed||BE||up  ||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__hppa__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;any-i386i386, kfreebsd-i386, hurd-i386&#039;&#039;&#039; ||                                       4||12||168 prior to GCC 7||  signed||LE||down||4K ||H+||H+&lt;br /&gt;
||H- &lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__i386__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ia64&#039;&#039;&#039;                     ||8 ||16||16||  signed||LE&lt;br /&gt;
||both&lt;br /&gt;
The conventional stack grows down from the top of the stack mapping, but there is also the Register Backing Store which grows up from the bottom of the stack mapping at the same time&lt;br /&gt;
||?        ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__ia64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;loong64&#039;&#039;&#039;               ||8 ||16||16||  signed||LE||down||4K-64K   ||H ||H ||S ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__loongarch__ &amp;amp;&amp;amp; __loongarch_lp64 &amp;amp;&amp;amp; __loongarch_double_float&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;m68k&#039;&#039;&#039;             ||4 ||12||2||  signed||BE||down||4K       ||S?||S?||S?||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__m68k__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips&#039;&#039;&#039;         ||4 ||8 ||8||  signed||BE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABIO32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsel&#039;&#039;&#039;       ||4 ||8 ||8||  signed||LE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABIO32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64&#039;&#039;&#039;     ||8 ||16||16||  signed||BE||down||4K-64K   ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABI64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64el&#039;&#039;&#039;     ||8 ||16||16||  signed||LE||down||4K-64K   ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABI64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32&#039;&#039;&#039;         ||4 ||8 ||?||  signed||BE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABIN32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32el&#039;&#039;&#039;       ||4 ||8 ||?||  signed||LE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABIN32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;powerpc&#039;&#039;&#039;       ||4 &lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||16||                                              unsigned||BE||down||4K-64K   ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64&#039;&#039;&#039;           ||8 ||16||16||unsigned||BE||down||4K-64K   ||? ||? ||? ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__ &amp;amp;&amp;amp; __powerpc64__ &amp;amp;&amp;amp; __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64el&#039;&#039;&#039;       ||8 ||16||16||unsigned||LE||down||4K-64K-16M||H||H ||H~||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__ &amp;amp;&amp;amp; __ppc64__ &amp;amp;&amp;amp; __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;riscv64&#039;&#039;&#039;&lt;br /&gt;
||8 &lt;br /&gt;
||16(8)&lt;br /&gt;
&amp;lt;small&amp;gt;The RV64 ISA spec defines long double as 16 bytes, but older toolchains (pre-&amp;quot;riscv-gcc-6.1.0&amp;quot;) have implemented long double as 8 bytes on RV64; cf. https://github.com/riscv/riscv-gcc/commit/54b21fc5ae83cefec44bc2caed4a8c664c274ba0&amp;lt;/small&amp;gt;&lt;br /&gt;
||16||unsigned||LE||down&lt;br /&gt;
||4K&lt;br /&gt;
&amp;lt;small&amp;gt;4k is the default page size on all RISC-V systems. Depending on the chosen virtual memory mode (Sv32/Sv39/Sv48) additional page sizes are available as well: Sv32 supports 4k and 4M pages, Sv39 supports 4k, 2M and 1G pages and Sv48 supports 4k,  2M, 1G, and 512G pages&amp;lt;/small&amp;gt;&lt;br /&gt;
||H ||H ||H~||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__riscv &amp;amp;&amp;amp; __riscv_xlen==64&amp;lt;/code&amp;gt;&lt;br /&gt;
Older, pre-mainline RISC-V toolchains used &amp;lt;code&amp;gt;__riscv__ &amp;amp;&amp;amp; __riscv64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390&#039;&#039;&#039;                      ||4&lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||?||                                              unsigned||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__s390__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390x&#039;&#039;&#039;                     ||8 ||16||8||unsigned||BE||down||4K, 1M, 2G       ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__s390x__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sh4&#039;&#039;&#039;               ||4 ||8 ||4||  signed||LE||down||4K       ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__sh__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc&#039;&#039;&#039;      ||4 &lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||?||                                                signed||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__sparc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc64&#039;&#039;&#039;       ||8 ||16||16||  signed||BE||down||8K, 64K, 512K, 4M, 32M, 256M, 2G, 16G||? ||? ||? ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__sparc__ &amp;amp;&amp;amp; __arch64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;x32&#039;&#039;&#039;                       ||4 ||16||16||  signed||LE||down||4K ||H ||H &lt;br /&gt;
||H-&lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__x86_64__ &amp;amp;&amp;amp; __ILP32__&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!multiarch&lt;br /&gt;
!ELFCLASS&lt;br /&gt;
!ELF machine EM_&lt;br /&gt;
!ld.so(8)&lt;br /&gt;
!uname -m&lt;br /&gt;
&amp;lt;small&amp;gt;Used to classify CPU architectures in CMake and many ad-hoc build systems, but note that this is a kernel and/or libc specific name despite referring to the CPU&amp;lt;/small&amp;gt;&lt;br /&gt;
!Meson&lt;br /&gt;
&amp;lt;small&amp;gt;[https://mesonbuild.com/Reference-tables.html Reference table] of Meson hardware architecture names&amp;lt;/small&amp;gt;&lt;br /&gt;
!qemu&lt;br /&gt;
&amp;lt;small&amp;gt;e.g. i386 results in qemu(-system)-i386(-static)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;alpha&#039;&#039;&#039;                     ||alpha-linux-gnu            ||64||ALPHA||/lib/ld-linux.so.2||alpha||alpha|| alpha&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;amd64&#039;&#039;&#039;                     ||x86_64-linux-gnu           ||64||X86_64||/lib64/ld-linux-x86-64.so.2||x86_64||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hurd-amd64&#039;&#039;&#039;                ||x86_64-gnu                 ||64||X86_64||/lib/ld-x86-64.so||x86_64-AT386||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;kfreebsd-amd64&#039;&#039;&#039;            ||x86_64-kfreebsd-gnu        ||64||X86_64||/lib/ld-kfreebsd-x86-64.so.1||x86_64||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arc&#039;&#039;&#039;                       ||arc-linux-gnu              ||32||ARC_COMPACT2||/lib/ld-linux-arc.so.2||arc||arc||-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm&#039;&#039;&#039;                       ||arm-linux-gnu              ||32||ARM||/lib/ld-linux.so.2&lt;br /&gt;
||arm*&lt;br /&gt;
Many names starting with arm, e.g. armv5tel&lt;br /&gt;
||arm&lt;br /&gt;
||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64&#039;&#039;&#039;       ||aarch64-linux-gnu          ||64||AARCH64||/lib/ld-linux-aarch64.so.1||aarch64||aarch64||aarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64ilp32&#039;&#039;&#039;||aarch64-linux-gnu_ilp32 ||32?||AARCH64?|| ||aarch64?|| || aarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armel&#039;&#039;&#039;     ||arm-linux-gnueabi          ||32||ARM||/lib/ld-linux.so.3||arm*||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armhf&#039;&#039;&#039;||arm-linux-gnueabihf        ||32||ARM||/lib/ld-linux-armhf.so.3||arm*||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;avr32&#039;&#039;&#039;                     ||                           ||  || || || ||avr||avrqemu-system-avr only&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hppa&#039;&#039;&#039;                      ||hppa-linux-gnu             ||32||PARISC||/lib/ld.so.1||parisc*||parisc||hppa&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;i386&#039;&#039;&#039;                      ||i386-linux-gnu             ||32||386||/lib/ld-linux.so.2||i?86i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hurd-i386&#039;&#039;&#039;                 ||i386-gnu                   ||32||386||/lib/ld.so||i?86-AT386i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;kfreebsd-i386&#039;&#039;&#039;             ||i386-kfreebsd-gnu          ||32||386||/lib/ld.so.1||i?86i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ia64&#039;&#039;&#039;                      ||ia64-linux-gnu             ||64||IA_64||/lib/ld-linux-ia64.so.2||ia64||ia64||-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;loong64&#039;&#039;&#039;               ||loongarch64-linux-gnu      ||64||LOONGARCH||/lib64/ld-linux-loongarch-lp64d.so.1||loongarch64||loongarch64||loongarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;m68k&#039;&#039;&#039;             ||m68k-linux-gnu             ||32||68K||/lib/ld.so.1||m68k||m68k||m68k&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips&#039;&#039;&#039;         ||mips-linux-gnu             ||32||MIPS||/lib/ld.so.1||mips||mips||mips&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsel&#039;&#039;&#039;       ||mipsel-linux-gnu           ||32||MIPS||/lib/ld.so.1||mips||mips||mipsel&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64&#039;&#039;&#039;       ||mips64-linux-gnuabi64      ||  || || ||mips64||mips64||mips64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64el&#039;&#039;&#039;     ||mips64el-linux-gnuabi64    ||64||MIPS||/lib64/ld.so.1||mips64||mips64||mips64el&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32&#039;&#039;&#039;      ||mips64-linux-gnuabin32     ||  || || || || ||mipsn32&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32el&#039;&#039;&#039;    ||mips64el-linux-gnuabin32   ||  || || || || ||mipsn32el&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;powerpc&#039;&#039;&#039;       ||powerpc-linux-gnu          ||32||PPC||/lib/ld.so.1||ppc||ppc||ppc&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64&#039;&#039;&#039;           ||powerpc64-linux-gnu        ||64||PPC64||/lib64/ld64.so.1||ppc64||ppc64||ppc64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64el&#039;&#039;&#039;       ||powerpc64le-linux-gnu      ||64||PPC64||/lib64/ld64.so.2||ppcle ppc64le||ppc64||ppc64le&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;riscv64&#039;&#039;&#039;        ||riscv64-linux-gnu          ||64||RISCV||/lib/ld-linux-riscv64-lp64d.so.1 ||riscv64||riscv64||riscv64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390&#039;&#039;&#039;                      ||s390-linux-gnu             ||32||S390||/lib/ld.so.1||s390||s390||(s390x)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390x&#039;&#039;&#039;                     ||s390x-linux-gnu            ||64||S390||/lib/ld64.so.1||s390x||s390x||s390x&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sh4&#039;&#039;&#039;               ||sh4-linux-gnu              ||32||SH||/lib/ld-linux.so.2||sh||sh4||sh4&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc&#039;&#039;&#039;      ||sparc-linux-gnu            ||32||SPARC32PLUS||/lib/ld-linux.so.2||sparc||sparc||sparc(32plus)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc64&#039;&#039;&#039;       ||sparc64-linux-gnu          ||64||SPARCV9||/lib64/ld-linux.so.2||sparc64||sparc64||sparc64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;x32&#039;&#039;&#039;                       ||x86_64-linux-gnux32        ||32||X86_64||/libx32/ld-linux-x32.so.2||x86_64|| ||x86_64&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Alignment =&lt;br /&gt;
&lt;br /&gt;
Note that there is alignment on the machine language level and alignment in C. Proper misalignment (for example in a packed struct) is no problem in C and allowed almost everywhere (except of SPARC, where you will receive SIGBUS on a program execution, misaligned variable/memory access) and the compiler will do the right thing (like translating a read of a variable to two loads at machine language level). On the other hand most of the constructs that lead to unaligned access not properly handled by the C compiler (especially most constructs involving pointer casting) have undefined behaviour anyway, so compiling them with optimisation enabled can cause strange effects on all architectures. Read more on a Wikipedia article [https://en.wikipedia.org/wiki/Data_structure_alignment Data structure alignment].&lt;br /&gt;
&lt;br /&gt;
On the other hand, unaligned synchronization primitives (atomics, etc) tend to be unsupported or extremely slow.  Extra joy if they cross cacheline or page boundaries.&lt;br /&gt;
&lt;br /&gt;
== alpha ==&lt;br /&gt;
&lt;br /&gt;
Some alpha may emulate see [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/alpha/kernel/traps.c kernel source]&lt;br /&gt;
&lt;br /&gt;
== arc ==&lt;br /&gt;
&lt;br /&gt;
ARCv2 processors (ARC HS38 and ARC HS48 variants, 1-4 cores) support unaligned access in hardware, except for &amp;quot;atomic instructions&amp;quot; where special considerations apply. ARCv2 features 2 types of atomic instructions: the first for 32-bit data (&amp;quot;llock&amp;quot;/&amp;quot;scond&amp;quot; pair) and the second for 64-bit data (&amp;quot;llockd&amp;quot;/&amp;quot;scondd&amp;quot;). Those atomic instructions must work on data aligned naturally. I.e. &amp;quot;llock&amp;quot;/&amp;quot;scond&amp;quot; must be only used on 32-bit word-aligned data, &amp;quot;llockd&amp;quot;/&amp;quot;scondd&amp;quot; must be only used on 64-bit double-word aligned data. If an unaligned access is done by &amp;quot;atomic instruction&amp;quot; in user-space, the offending application gets forcefully killed with visible mention of a segmentation fault.  An unaligned access done by “atomic instruction” in kernel-mode will result in an unrecoverable &amp;quot;Illegal instruction&amp;quot; exception.&lt;br /&gt;
&lt;br /&gt;
== armel/armhf/arm64 ==&lt;br /&gt;
&lt;br /&gt;
High-level summary for software engineers: Don&#039;t do unaligned access.&lt;br /&gt;
It&#039;s always inefficient, sometimes extremely inefficient, and&lt;br /&gt;
in various cases is not permitted at all.&lt;br /&gt;
&lt;br /&gt;
The short answer for the ARM case is that ARMv6 and up guarantee&lt;br /&gt;
that the processor can be configured such that some unaligned&lt;br /&gt;
accesses are fine (or at least just inefficient). Linux by default&lt;br /&gt;
enable this mode and trap:&lt;br /&gt;
* All &amp;lt;=32-bit load/store operations can be unaligned.&lt;br /&gt;
* NEON load-stores can be unaligned (unless an explicit alignment is specified in the encoding).&lt;br /&gt;
&lt;br /&gt;
But:&lt;br /&gt;
* VFP load/stores must be naturally aligned.&lt;br /&gt;
* Load-multiple/store-multiple and ldrd/strd do not work with &amp;lt;32-bit alignment, but can sometimes get fixed up by the kernel at a substantial performance penalty.&lt;br /&gt;
&lt;br /&gt;
PUSH/POP usually requires 32-bit alignment, but then the ABI requires&lt;br /&gt;
64-bit alignment of the stack, so that is less of an issue.&lt;br /&gt;
&lt;br /&gt;
Unaligned load-exclusive/store-exclusive operations are not supported.&lt;br /&gt;
&lt;br /&gt;
No unaligned accesses are permitted to memory regions of Device or&lt;br /&gt;
Strongly-ordered type. But some permutation of this will be true for&lt;br /&gt;
most architectures, and in user-space this would only affect things&lt;br /&gt;
prodding /dev/mem or otherwise mmaping from a device driver.&lt;br /&gt;
&lt;br /&gt;
ARM64 similarly makes it possible to trap unaligned accesses, but if&lt;br /&gt;
that is not enabled (which it isn&#039;t by Linux), everything apart from&lt;br /&gt;
load-exclusive/store-exclusive, load-acquire/store-release and Device&lt;br /&gt;
memory accesses will be handled by hardware.&lt;br /&gt;
&lt;br /&gt;
== avr32 ==&lt;br /&gt;
&lt;br /&gt;
Unaligned access is ok for 32bits word but not for 16bits or 64bits word see [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/avr32/include/asm/unaligned.h kernel source]&lt;br /&gt;
&lt;br /&gt;
== i386/x32/amd64 ==&lt;br /&gt;
&lt;br /&gt;
Unaligned access is slower (but not as much as with other architectures as it is done in hardware and not in software). Moreover some MMX/SSE/vector operation need proper alignment.&lt;br /&gt;
&lt;br /&gt;
Unaligned sync primitives are supported, but there&#039;s active effort to defeature them, with Ice Lakes and newer allowing the kernel to trap.&lt;br /&gt;
&lt;br /&gt;
== ia64 ==&lt;br /&gt;
&lt;br /&gt;
Depending of config may fix with trap handler unaligned access&lt;br /&gt;
&lt;br /&gt;
== riscv64 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Short version&#039;&#039;&#039;: Don&#039;t use unaligned access.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Long version&#039;&#039;&#039;:&lt;br /&gt;
Technically the RISC-V ISA specification allows unaligned access for load and store instructions that are part of the base ISA, but only with significant limitations:&lt;br /&gt;
* Naturally aligned loads and stores are guaranteed to be atomic, but this is not the case for unaligned loads and stores. This can lead to hard-to-find bugs, so unaligned access should really be avoided.&lt;br /&gt;
* Support for unaligned access is usually not implemented in hardware and instead emulated in a trap handler, which makes it very slow.&lt;br /&gt;
&lt;br /&gt;
All synchronization primitives (LR/SC and the atomic memory read-modify-write operations (AMOs)) only allow naturally aligned access.&lt;br /&gt;
&lt;br /&gt;
= Floating point =&lt;br /&gt;
&lt;br /&gt;
First read academic paper about the [http://arxiv.org/abs/cs/0701192 pitfall] of doing multi arch floating point computation&lt;br /&gt;
and the classical &amp;quot;What Every Computer Scientist Should Know About Floating-Point Arithmetic&amp;quot; from [http://www.validlab.com/goldberg/paper.pdf here].&lt;br /&gt;
&lt;br /&gt;
== i386 ==&lt;br /&gt;
&lt;br /&gt;
i387 is a strange beast that suffer from excess precision. Moreover long double is only 80 bits&lt;br /&gt;
&lt;br /&gt;
Internal computation are done with 80 bits of precision that lead to strange and not intuitive result.&lt;br /&gt;
&lt;br /&gt;
== mips/mipsel/mips64el ==&lt;br /&gt;
&lt;br /&gt;
Some mips processors do not contain a hardware floating point unit. In this case the kernel will emulate all FPU instructions at a large performance cost.&lt;br /&gt;
&lt;br /&gt;
= C/C++ Preprocessor Symbols =&lt;br /&gt;
Generally, GNU C tends to define the symbol&lt;br /&gt;
&lt;br /&gt;
 __arch__&lt;br /&gt;
&lt;br /&gt;
A list of some common arch-specific symbols can be found on the [https://github.com/cpredef/predef/blob/master/Architectures.md Pre-defined Architecture Macros] page.&lt;br /&gt;
&lt;br /&gt;
= Signedness =&lt;br /&gt;
When programming in C, variables can be signed or unsigned.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;unsigned char c;&amp;lt;/code&amp;gt; - explicit unsigned, 0 &amp;lt;= c &amp;lt;= 255&lt;br /&gt;
* &amp;lt;code&amp;gt;signed char c;&amp;lt;/code&amp;gt; - explicit signed, -128 &amp;lt;= c &amp;lt;= 127&lt;br /&gt;
* &amp;lt;code&amp;gt;char c;&amp;lt;/code&amp;gt; - implicit (un)signedness, depending on architecture&lt;br /&gt;
&lt;br /&gt;
To force a signedness, either declare it explicitly or use the gcc command line option &amp;lt;tt&amp;gt;-f(un)signed-char&amp;lt;/tt&amp;gt;. The gcc defaults differ only due to optimisation. Other compilers may not have this issue.&lt;br /&gt;
&lt;br /&gt;
= Architecture baselines =&lt;br /&gt;
&lt;br /&gt;
Each Debian architecture has a &#039;&#039;baseline&#039;&#039; indicating the oldest or least capable CPU on which the architecture can be used. The baseline can change between Debian releases. The baseline is mostly defined by the gcc-&#039;&#039;N&#039;&#039; package, which is configured to produce baseline binaries when options like &amp;lt;tt&amp;gt;-march=&amp;lt;/tt&amp;gt; are not used.&lt;br /&gt;
&lt;br /&gt;
If a package uses options that enable additional CPU features such as -msse in particular source files, then the maintainer of that package is responsible for [[InstructionSelection|making sure those CPU features are only used on CPUs that support them]]. ioquake3&#039;s Altivec support on PowerPC is an example of this technique.&lt;br /&gt;
&lt;br /&gt;
== amd64 ==&lt;br /&gt;
&lt;br /&gt;
x86_64 with no optional extensions (psABI baseline). The core specification includes MMX, SSE and SSE2 so these are OK, but SSE3 and up are not guaranteed. (The default is &amp;lt;tt&amp;gt;-march=x86-64&amp;lt;/tt&amp;gt;, but not &amp;lt;tt&amp;gt;-march=x86-64-v2&amp;lt;/tt&amp;gt; or later.)&lt;br /&gt;
&lt;br /&gt;
See [https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build psABI (Table 3.1: Micro-Architecture Levels)] for amd64 ABI level. Wikipedia summary: https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels&lt;br /&gt;
&lt;br /&gt;
== arc ==&lt;br /&gt;
&lt;br /&gt;
A fully featured ARC HS with additional support for double-precision FPU (&amp;lt;tt&amp;gt;-mcpu=hs38_linux&amp;lt;/tt&amp;gt;). And this is a default &amp;lt;tt&amp;gt;-mcpu&amp;lt;/tt&amp;gt; for ARC starting from GCC 11.&lt;br /&gt;
&lt;br /&gt;
To be more precise it&#039;s a baseline ARC HS with HW division (&amp;lt;tt&amp;gt;-mdiv-rem&amp;lt;/tt&amp;gt;), atomic instructions (&amp;lt;tt&amp;gt;-matomic&amp;lt;/tt&amp;gt;), 64-bit loads/stores (&amp;lt;tt&amp;gt;-mll64&amp;lt;/tt&amp;gt;), the most advanced multiplier (including quad half-word &amp;amp; vector operations, &amp;lt;tt&amp;gt;-mmpy-option=plus_qmacw&amp;lt;/tt&amp;gt;) and double-precision FPU (&amp;lt;tt&amp;gt;-mfpu=fpud_all&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
== arm64 ==&lt;br /&gt;
&lt;br /&gt;
aarch64 (ARMv8-A) with no optional extensions. VFPv4 and NEON are OK, but ARMv8.1-A and up are not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== armel ==&lt;br /&gt;
&lt;br /&gt;
armv5te since Debian 10 &#039;buster&#039; (gcc-8 8-20171215-1).&lt;br /&gt;
&lt;br /&gt;
Before that, armv4te.&lt;br /&gt;
&lt;br /&gt;
== armhf ==&lt;br /&gt;
&lt;br /&gt;
armv7 with VFPv3-D16 floating point. NEON is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== i386 ==&lt;br /&gt;
&lt;br /&gt;
* Pentium4 since Trixie.  This includes most notably SSE2. This was made necessary by LLVM&#039;s lack of support for processors without SSE2.&lt;br /&gt;
* i686 since [https://www.debian.org/releases/bookworm/i386/release-notes/ch-information.en.html#i386-is-i686 Debian 12 &#039;bookworm&#039;]. There&#039;s no MMX nor SSE.&lt;br /&gt;
* Before that, [https://salsa.debian.org/ddp-team/release-notes/-/blob/e7b4c032a94b02e31caff6cfdf7d71917ea00346/en/issues.dbk#L286-317 &amp;quot;almost&amp;quot;] i686 (no &amp;quot;long NOP&amp;quot;/NOPL) since Debian 9 &#039;stretch&#039; (gcc-6 6.1.1-1).&lt;br /&gt;
* Before that, i586 since gcc-4.9 4.9-20140411-1 (2014).&lt;br /&gt;
* Before that, i486 since gcc-4.1 4.1ds7-0exp7 (2006).&lt;br /&gt;
* Before that, i386.&lt;br /&gt;
&lt;br /&gt;
See [https://www.sco.com/developers/devspecs/abi386-4.pdf SYSTEM V APPLICATION BINARY INTERFACE], [https://www.uclibc.org/docs/psABI-i386.pdf Intel386 Architecture Processor Supplement] for more information. [https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build psABI (Table 3.1: Micro-Architecture Levels)] for amd64 ABI level may be also relevant, for newer ABI level.&lt;br /&gt;
&lt;br /&gt;
== mips, mipsel ==&lt;br /&gt;
&lt;br /&gt;
MIPS32R2 since Debian 9 &#039;stretch&#039;.&lt;br /&gt;
&lt;br /&gt;
Before that, MIPS II.&lt;br /&gt;
&lt;br /&gt;
== mips64el ==&lt;br /&gt;
&lt;br /&gt;
MIPS64R2 and up.&lt;br /&gt;
&lt;br /&gt;
== powerpc ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== powerpcspe ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is impossible, even with runtime detection.&lt;br /&gt;
&lt;br /&gt;
== ppc64 ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
(Initially Altivec was in the port baseline, but was [https://lists.debian.org/msgid-search/f06cd492-95eb-b0b3-f15c-d5c2501ec0d7@physik.fu-berlin.de later removed to support some embedded systems])&lt;br /&gt;
&lt;br /&gt;
== ppc64el ==&lt;br /&gt;
&lt;br /&gt;
POWER8 and up.&lt;br /&gt;
&lt;br /&gt;
== s390x ==&lt;br /&gt;
&lt;br /&gt;
z196 since Debian 10 &#039;buster&#039;.&lt;br /&gt;
&lt;br /&gt;
== loong64 ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown).&lt;br /&gt;
&lt;br /&gt;
= Obtaining this information =&lt;br /&gt;
&lt;br /&gt;
== via the dpkg build logs ==&lt;br /&gt;
&lt;br /&gt;
Starting with dpkg 1.22.0, its build process will print some of the architecture attributes as part of its configure summary.&lt;br /&gt;
&lt;br /&gt;
Search for «Arch attributes» in the [https://buildd.debian.org/status/package.php?p=dpkg dpkg build logs].&lt;br /&gt;
&lt;br /&gt;
== via the C pre-processor ==&lt;br /&gt;
&lt;br /&gt;
 echo | cpp -dM | sort&lt;br /&gt;
&lt;br /&gt;
== via a special tool ==&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;alloca.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stddef.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;time.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 static void test_size_align(const char *name, size_t size, size_t align) {&lt;br /&gt;
   printf(&amp;quot;sizeof(%s) = %zu\n&amp;quot;, name, size);&lt;br /&gt;
   if (size != align) printf(&amp;quot;alignment(%s) = %zu\n&amp;quot;, name, align);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 #define TEST_SIZE_ALIGN(type, name) \&lt;br /&gt;
   struct test_align_##name { char a; type b; }; \&lt;br /&gt;
   test_size_align(#type, sizeof(type), offsetof(struct test_align_##name, b))&lt;br /&gt;
 &lt;br /&gt;
 static void test_endian(void) {&lt;br /&gt;
 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__&lt;br /&gt;
   printf(&amp;quot;byte order = little endian\n&amp;quot;);&lt;br /&gt;
 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__&lt;br /&gt;
   printf(&amp;quot;byte order = big endian\n&amp;quot;);&lt;br /&gt;
 #endif&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void test_char(void) {&lt;br /&gt;
   if ((int)(char)-1 == -1) printf(&amp;quot;char signedness = signed\n&amp;quot;);&lt;br /&gt;
   else if ((int)(char)-1 == 255) printf(&amp;quot;char signedness = unsigned\n&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void test_stack(void) {&lt;br /&gt;
   void *a = alloca(8);&lt;br /&gt;
   void *b = alloca(8);&lt;br /&gt;
   if (a &amp;gt; b) printf(&amp;quot;stack = grows down\n&amp;quot;);&lt;br /&gt;
   else printf(&amp;quot;stack = grows up\n&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main(void) {&lt;br /&gt;
   TEST_SIZE_ALIGN(short, short);&lt;br /&gt;
   TEST_SIZE_ALIGN(int, int);&lt;br /&gt;
   TEST_SIZE_ALIGN(long, long);&lt;br /&gt;
   TEST_SIZE_ALIGN(long long, long_long);&lt;br /&gt;
   TEST_SIZE_ALIGN(float, float);&lt;br /&gt;
   TEST_SIZE_ALIGN(double, double);&lt;br /&gt;
   TEST_SIZE_ALIGN(long double, long_double);&lt;br /&gt;
   TEST_SIZE_ALIGN(void *, pointer);&lt;br /&gt;
   TEST_SIZE_ALIGN(time_t, time_t);&lt;br /&gt;
   test_endian();&lt;br /&gt;
   test_char();&lt;br /&gt;
   test_stack();&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== via autoconf ==&lt;br /&gt;
&lt;br /&gt;
 AC_INIT(archtest, 0.1)&lt;br /&gt;
 AC_CHECK_SIZEOF(short)&lt;br /&gt;
 AC_CHECK_SIZEOF(int)&lt;br /&gt;
 AC_CHECK_SIZEOF(long)&lt;br /&gt;
 AC_CHECK_SIZEOF(long long)&lt;br /&gt;
 AC_CHECK_SIZEOF(float)&lt;br /&gt;
 AC_CHECK_SIZEOF(double)&lt;br /&gt;
 AC_CHECK_SIZEOF(long double)&lt;br /&gt;
 AC_CHECK_SIZEOF(void*)&lt;br /&gt;
 AC_C_BIGENDIAN()&lt;br /&gt;
 AC_C_CHAR_UNSIGNED()&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* Information about [[Haskell/GHC Haskell]] on different architectures.&lt;br /&gt;
* [https://github.com/cpredef/predef/blob/master/Architectures.md Pre-defined Compiler Macros Wiki - Architectures]&lt;br /&gt;
* [https://gcc.gnu.org/onlinedocs/cpp/Predefined-Macros.html GCC Predefined Macros]&lt;br /&gt;
* [[InstructionSelection|Instruction Selection]]&lt;br /&gt;
* [[Multiarch/Tuples]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Ports]]&lt;/div&gt;</summary>
		<author><name>Zeha</name></author>
	</entry>
	<entry>
		<id>https://wiki2025.debian.org/index.php?title=ArchitectureSpecificsMemo&amp;diff=12</id>
		<title>ArchitectureSpecificsMemo</title>
		<link rel="alternate" type="text/html" href="https://wiki2025.debian.org/index.php?title=ArchitectureSpecificsMemo&amp;diff=12"/>
		<updated>2025-07-18T22:03:54Z</updated>

		<summary type="html">&lt;p&gt;Zeha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
This page is a &#039;&#039;&#039;draft&#039;&#039;&#039;. Please help enhancing it by adding lines and filling tables. Comments at the bottom of the text are also welcome.&lt;br /&gt;
&lt;br /&gt;
This is just a quick array to recall some of the specifics of the architectures found in the Debian project.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!sizeof(short)&lt;br /&gt;
!sizeof(int)&lt;br /&gt;
!sizeof(long)&lt;br /&gt;
!sizeof(long long)&lt;br /&gt;
!sizeof(float)&lt;br /&gt;
!sizeof(double)&lt;br /&gt;
|-&lt;br /&gt;
|| &#039;&#039;&#039;any&#039;&#039;&#039; || 2 || 4 || sizeof(void *) || 8 || 4 || 8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!sizeof(void*)&lt;br /&gt;
!sizeof(long double)&lt;br /&gt;
!max_align_t alignment&lt;br /&gt;
!char&lt;br /&gt;
!endian&lt;br /&gt;
!stack grows&lt;br /&gt;
!page sizes&lt;br /&gt;
&amp;lt;small&amp;gt;User-visible page size returned by &amp;lt;code&amp;gt;getauxval(AT_PAGESZ)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;getconf PAGESIZE&amp;lt;/code&amp;gt;, the granularity of the memory map&amp;lt;/small&amp;gt;&lt;br /&gt;
!float&lt;br /&gt;
H=hard, S=soft, P=partial, +=excess precision, ~=not usual standard&lt;br /&gt;
!double&lt;br /&gt;
&amp;lt;small&amp;gt;Note that the columns refer to C types. H=hard, S=soft, P=partial, +=excess precision, ~=not usual standard)&amp;lt;/small&amp;gt;&lt;br /&gt;
!long double&lt;br /&gt;
&amp;lt;small&amp;gt;Note that the columns refer to C types. H=hard, S=soft, P=partial, +=excess precision,-=long double precision &amp;lt; __float128, ~=not usual standard)&amp;lt;/small&amp;gt;&lt;br /&gt;
!sizeof(time_t)&lt;br /&gt;
&amp;lt;small&amp;gt;With &amp;lt;code&amp;gt;_TIME_BITS=64&amp;lt;/code&amp;gt; the size is 8 on all archs&amp;lt;/small&amp;gt;&lt;br /&gt;
!GCC pre-defined macro(s)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;alpha&#039;&#039;&#039;&lt;br /&gt;
||8&lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||16||signed||LE||down||8K||?||?||?||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__alpha__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;any-amd64, amd64, kfreebsd-amd64, hurd-amd64&#039;&#039;&#039; ||8||16||16||signed||LE||down||4K ||H||H&lt;br /&gt;
||H-&lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__x86_64__ &amp;amp;&amp;amp; __LP64__&amp;lt;/code&amp;gt; it&#039;s a common gotcha for x32, you need to use &amp;lt;code&amp;gt;__LP64__&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;__ILP32__&amp;lt;/code&amp;gt; to tell them apart&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arc&#039;&#039;&#039;                       ||4 ||16||?||unsigned||LE||down||8K       ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__arc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm&#039;&#039;&#039;                       ||4 ||? ||8||unsigned||LE||down||?        ||S ||S ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64&#039;&#039;&#039;       ||8 ||16||16||unsigned||LE||down||4K, 16K, 64K ||H ||H ||S ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__aarch64__ &amp;amp;&amp;amp; __LP64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64ilp32&#039;&#039;&#039;       ||4 ||16||?||unsigned||LE||down||4K, 16K, 64K ||H ||H ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__aarch64__ &amp;amp;&amp;amp; __ILP32__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armel&#039;&#039;&#039;     ||4 ||8 ||8||unsigned||LE||down||4K       ||S ||S ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__ &amp;amp;&amp;amp; __ARM_EABI__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armhf&#039;&#039;&#039;||4 ||8 ||8||unsigned||LE||down||4K       ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__ &amp;amp;&amp;amp; __ARM_EABI__ &amp;amp;&amp;amp; __ARM_PCS_VFP&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;avr32&#039;&#039;&#039;                     ||4 ||8 ||?||unsigned||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hppa&#039;&#039;&#039;                      ||4 ||8 ||8||  signed||BE||up  ||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__hppa__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;any-i386i386, kfreebsd-i386, hurd-i386&#039;&#039;&#039; ||                                       4||12||168 prior to GCC 7||  signed||LE||down||4K ||H+||H+&lt;br /&gt;
||H- &lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__i386__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ia64&#039;&#039;&#039;                     ||8 ||16||16||  signed||LE&lt;br /&gt;
||both&lt;br /&gt;
The conventional stack grows down from the top of the stack mapping, but there is also the Register Backing Store which grows up from the bottom of the stack mapping at the same time&lt;br /&gt;
||?        ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__ia64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;loong64&#039;&#039;&#039;               ||8 ||16||16||  signed||LE||down||4K-64K   ||H ||H ||S ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__loongarch__ &amp;amp;&amp;amp; __loongarch_lp64 &amp;amp;&amp;amp; __loongarch_double_float&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;m68k&#039;&#039;&#039;             ||4 ||12||2||  signed||BE||down||4K       ||S?||S?||S?||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__m68k__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips&#039;&#039;&#039;         ||4 ||8 ||8||  signed||BE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABIO32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsel&#039;&#039;&#039;       ||4 ||8 ||8||  signed||LE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABIO32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64&#039;&#039;&#039;     ||8 ||16||16||  signed||BE||down||4K-64K   ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABI64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64el&#039;&#039;&#039;     ||8 ||16||16||  signed||LE||down||4K-64K   ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABI64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32&#039;&#039;&#039;         ||4 ||8 ||?||  signed||BE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABIN32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32el&#039;&#039;&#039;       ||4 ||8 ||?||  signed||LE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABIN32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;powerpc&#039;&#039;&#039;       ||4 &lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||16||                                              unsigned||BE||down||4K-64K   ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64&#039;&#039;&#039;           ||8 ||16||16||unsigned||BE||down||4K-64K   ||? ||? ||? ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__ &amp;amp;&amp;amp; __powerpc64__ &amp;amp;&amp;amp; __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64el&#039;&#039;&#039;       ||8 ||16||16||unsigned||LE||down||4K-64K-16M||H||H ||H~||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__ &amp;amp;&amp;amp; __ppc64__ &amp;amp;&amp;amp; __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;riscv64&#039;&#039;&#039;&lt;br /&gt;
||8 &lt;br /&gt;
||16(8)&lt;br /&gt;
The RV64 ISA spec defines long double as 16 bytes, but older toolchains (pre-&amp;quot;riscv-gcc-6.1.0&amp;quot;) have implemented long double as 8 bytes on RV64; cf. https://github.com/riscv/riscv-gcc/commit/54b21fc5ae83cefec44bc2caed4a8c664c274ba0&lt;br /&gt;
||16||unsigned||LE||down&lt;br /&gt;
||4K&lt;br /&gt;
&amp;lt;small&amp;gt;4k is the default page size on all RISC-V systems. Depending on the chosen virtual memory mode (Sv32/Sv39/Sv48) additional page sizes are available as well: Sv32 supports 4k and 4M pages, Sv39 supports 4k, 2M and 1G pages and Sv48 supports 4k,  2M, 1G, and 512G pages&amp;lt;/small&amp;gt;&lt;br /&gt;
||H ||H ||H~||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__riscv &amp;amp;&amp;amp; __riscv_xlen==64&amp;lt;/code&amp;gt;&lt;br /&gt;
Older, pre-mainline RISC-V toolchains used &amp;lt;code&amp;gt;__riscv__ &amp;amp;&amp;amp; __riscv64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390&#039;&#039;&#039;                      ||4&lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||?||                                              unsigned||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__s390__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390x&#039;&#039;&#039;                     ||8 ||16||8||unsigned||BE||down||4K, 1M, 2G       ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__s390x__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sh4&#039;&#039;&#039;               ||4 ||8 ||4||  signed||LE||down||4K       ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__sh__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc&#039;&#039;&#039;      ||4 &lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||?||                                                signed||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__sparc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc64&#039;&#039;&#039;       ||8 ||16||16||  signed||BE||down||8K, 64K, 512K, 4M, 32M, 256M, 2G, 16G||? ||? ||? ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__sparc__ &amp;amp;&amp;amp; __arch64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;x32&#039;&#039;&#039;                       ||4 ||16||16||  signed||LE||down||4K ||H ||H &lt;br /&gt;
||H-&lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__x86_64__ &amp;amp;&amp;amp; __ILP32__&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!multiarch&lt;br /&gt;
!ELFCLASS&lt;br /&gt;
!ELF machine EM_&lt;br /&gt;
!ld.so(8)&lt;br /&gt;
!uname -m&lt;br /&gt;
&amp;lt;small&amp;gt;Used to classify CPU architectures in CMake and many ad-hoc build systems, but note that this is a kernel and/or libc specific name despite referring to the CPU&amp;lt;/small&amp;gt;&lt;br /&gt;
!Meson&lt;br /&gt;
&amp;lt;small&amp;gt;[https://mesonbuild.com/Reference-tables.html Reference table] of Meson hardware architecture names&amp;lt;/small&amp;gt;&lt;br /&gt;
!qemu&lt;br /&gt;
&amp;lt;small&amp;gt;e.g. i386 results in qemu(-system)-i386(-static)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;alpha&#039;&#039;&#039;                     ||alpha-linux-gnu            ||64||ALPHA||/lib/ld-linux.so.2||alpha||alpha|| alpha&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;amd64&#039;&#039;&#039;                     ||x86_64-linux-gnu           ||64||X86_64||/lib64/ld-linux-x86-64.so.2||x86_64||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hurd-amd64&#039;&#039;&#039;                ||x86_64-gnu                 ||64||X86_64||/lib/ld-x86-64.so||x86_64-AT386||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;kfreebsd-amd64&#039;&#039;&#039;            ||x86_64-kfreebsd-gnu        ||64||X86_64||/lib/ld-kfreebsd-x86-64.so.1||x86_64||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arc&#039;&#039;&#039;                       ||arc-linux-gnu              ||32||ARC_COMPACT2||/lib/ld-linux-arc.so.2||arc||arc||-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm&#039;&#039;&#039;                       ||arm-linux-gnu              ||32||ARM||/lib/ld-linux.so.2&lt;br /&gt;
||arm*&lt;br /&gt;
Many names starting with arm, e.g. armv5tel&lt;br /&gt;
||arm&lt;br /&gt;
||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64&#039;&#039;&#039;       ||aarch64-linux-gnu          ||64||AARCH64||/lib/ld-linux-aarch64.so.1||aarch64||aarch64||aarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64ilp32&#039;&#039;&#039;||aarch64-linux-gnu_ilp32 ||32?||AARCH64?|| ||aarch64?|| || aarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armel&#039;&#039;&#039;     ||arm-linux-gnueabi          ||32||ARM||/lib/ld-linux.so.3||arm*||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armhf&#039;&#039;&#039;||arm-linux-gnueabihf        ||32||ARM||/lib/ld-linux-armhf.so.3||arm*||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;avr32&#039;&#039;&#039;                     ||                           ||  || || || ||avr||avrqemu-system-avr only&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hppa&#039;&#039;&#039;                      ||hppa-linux-gnu             ||32||PARISC||/lib/ld.so.1||parisc*||parisc||hppa&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;i386&#039;&#039;&#039;                      ||i386-linux-gnu             ||32||386||/lib/ld-linux.so.2||i?86i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hurd-i386&#039;&#039;&#039;                 ||i386-gnu                   ||32||386||/lib/ld.so||i?86-AT386i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;kfreebsd-i386&#039;&#039;&#039;             ||i386-kfreebsd-gnu          ||32||386||/lib/ld.so.1||i?86i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ia64&#039;&#039;&#039;                      ||ia64-linux-gnu             ||64||IA_64||/lib/ld-linux-ia64.so.2||ia64||ia64||-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;loong64&#039;&#039;&#039;               ||loongarch64-linux-gnu      ||64||LOONGARCH||/lib64/ld-linux-loongarch-lp64d.so.1||loongarch64||loongarch64||loongarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;m68k&#039;&#039;&#039;             ||m68k-linux-gnu             ||32||68K||/lib/ld.so.1||m68k||m68k||m68k&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips&#039;&#039;&#039;         ||mips-linux-gnu             ||32||MIPS||/lib/ld.so.1||mips||mips||mips&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsel&#039;&#039;&#039;       ||mipsel-linux-gnu           ||32||MIPS||/lib/ld.so.1||mips||mips||mipsel&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64&#039;&#039;&#039;       ||mips64-linux-gnuabi64      ||  || || ||mips64||mips64||mips64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64el&#039;&#039;&#039;     ||mips64el-linux-gnuabi64    ||64||MIPS||/lib64/ld.so.1||mips64||mips64||mips64el&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32&#039;&#039;&#039;      ||mips64-linux-gnuabin32     ||  || || || || ||mipsn32&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32el&#039;&#039;&#039;    ||mips64el-linux-gnuabin32   ||  || || || || ||mipsn32el&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;powerpc&#039;&#039;&#039;       ||powerpc-linux-gnu          ||32||PPC||/lib/ld.so.1||ppc||ppc||ppc&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64&#039;&#039;&#039;           ||powerpc64-linux-gnu        ||64||PPC64||/lib64/ld64.so.1||ppc64||ppc64||ppc64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64el&#039;&#039;&#039;       ||powerpc64le-linux-gnu      ||64||PPC64||/lib64/ld64.so.2||ppcle ppc64le||ppc64||ppc64le&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;riscv64&#039;&#039;&#039;        ||riscv64-linux-gnu          ||64||RISCV||/lib/ld-linux-riscv64-lp64d.so.1 ||riscv64||riscv64||riscv64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390&#039;&#039;&#039;                      ||s390-linux-gnu             ||32||S390||/lib/ld.so.1||s390||s390||(s390x)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390x&#039;&#039;&#039;                     ||s390x-linux-gnu            ||64||S390||/lib/ld64.so.1||s390x||s390x||s390x&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sh4&#039;&#039;&#039;               ||sh4-linux-gnu              ||32||SH||/lib/ld-linux.so.2||sh||sh4||sh4&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc&#039;&#039;&#039;      ||sparc-linux-gnu            ||32||SPARC32PLUS||/lib/ld-linux.so.2||sparc||sparc||sparc(32plus)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc64&#039;&#039;&#039;       ||sparc64-linux-gnu          ||64||SPARCV9||/lib64/ld-linux.so.2||sparc64||sparc64||sparc64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;x32&#039;&#039;&#039;                       ||x86_64-linux-gnux32        ||32||X86_64||/libx32/ld-linux-x32.so.2||x86_64|| ||x86_64&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Alignment =&lt;br /&gt;
&lt;br /&gt;
Note that there is alignment on the machine language level and alignment in C. Proper misalignment (for example in a packed struct) is no problem in C and allowed almost everywhere (except of SPARC, where you will receive SIGBUS on a program execution, misaligned variable/memory access) and the compiler will do the right thing (like translating a read of a variable to two loads at machine language level). On the other hand most of the constructs that lead to unaligned access not properly handled by the C compiler (especially most constructs involving pointer casting) have undefined behaviour anyway, so compiling them with optimisation enabled can cause strange effects on all architectures. Read more on a Wikipedia article [https://en.wikipedia.org/wiki/Data_structure_alignment Data structure alignment].&lt;br /&gt;
&lt;br /&gt;
On the other hand, unaligned synchronization primitives (atomics, etc) tend to be unsupported or extremely slow.  Extra joy if they cross cacheline or page boundaries.&lt;br /&gt;
&lt;br /&gt;
== alpha ==&lt;br /&gt;
&lt;br /&gt;
Some alpha may emulate see [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/alpha/kernel/traps.c kernel source]&lt;br /&gt;
&lt;br /&gt;
== arc ==&lt;br /&gt;
&lt;br /&gt;
ARCv2 processors (ARC HS38 and ARC HS48 variants, 1-4 cores) support unaligned access in hardware, except for &amp;quot;atomic instructions&amp;quot; where special considerations apply. ARCv2 features 2 types of atomic instructions: the first for 32-bit data (&amp;quot;llock&amp;quot;/&amp;quot;scond&amp;quot; pair) and the second for 64-bit data (&amp;quot;llockd&amp;quot;/&amp;quot;scondd&amp;quot;). Those atomic instructions must work on data aligned naturally. I.e. &amp;quot;llock&amp;quot;/&amp;quot;scond&amp;quot; must be only used on 32-bit word-aligned data, &amp;quot;llockd&amp;quot;/&amp;quot;scondd&amp;quot; must be only used on 64-bit double-word aligned data. If an unaligned access is done by &amp;quot;atomic instruction&amp;quot; in user-space, the offending application gets forcefully killed with visible mention of a segmentation fault.  An unaligned access done by “atomic instruction” in kernel-mode will result in an unrecoverable &amp;quot;Illegal instruction&amp;quot; exception.&lt;br /&gt;
&lt;br /&gt;
== armel/armhf/arm64 ==&lt;br /&gt;
&lt;br /&gt;
High-level summary for software engineers: Don&#039;t do unaligned access.&lt;br /&gt;
It&#039;s always inefficient, sometimes extremely inefficient, and&lt;br /&gt;
in various cases is not permitted at all.&lt;br /&gt;
&lt;br /&gt;
The short answer for the ARM case is that ARMv6 and up guarantee&lt;br /&gt;
that the processor can be configured such that some unaligned&lt;br /&gt;
accesses are fine (or at least just inefficient). Linux by default&lt;br /&gt;
enable this mode and trap:&lt;br /&gt;
* All &amp;lt;=32-bit load/store operations can be unaligned.&lt;br /&gt;
* NEON load-stores can be unaligned (unless an explicit alignment is specified in the encoding).&lt;br /&gt;
&lt;br /&gt;
But:&lt;br /&gt;
* VFP load/stores must be naturally aligned.&lt;br /&gt;
* Load-multiple/store-multiple and ldrd/strd do not work with &amp;lt;32-bit alignment, but can sometimes get fixed up by the kernel at a substantial performance penalty.&lt;br /&gt;
&lt;br /&gt;
PUSH/POP usually requires 32-bit alignment, but then the ABI requires&lt;br /&gt;
64-bit alignment of the stack, so that is less of an issue.&lt;br /&gt;
&lt;br /&gt;
Unaligned load-exclusive/store-exclusive operations are not supported.&lt;br /&gt;
&lt;br /&gt;
No unaligned accesses are permitted to memory regions of Device or&lt;br /&gt;
Strongly-ordered type. But some permutation of this will be true for&lt;br /&gt;
most architectures, and in user-space this would only affect things&lt;br /&gt;
prodding /dev/mem or otherwise mmaping from a device driver.&lt;br /&gt;
&lt;br /&gt;
ARM64 similarly makes it possible to trap unaligned accesses, but if&lt;br /&gt;
that is not enabled (which it isn&#039;t by Linux), everything apart from&lt;br /&gt;
load-exclusive/store-exclusive, load-acquire/store-release and Device&lt;br /&gt;
memory accesses will be handled by hardware.&lt;br /&gt;
&lt;br /&gt;
== avr32 ==&lt;br /&gt;
&lt;br /&gt;
Unaligned access is ok for 32bits word but not for 16bits or 64bits word see [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/avr32/include/asm/unaligned.h kernel source]&lt;br /&gt;
&lt;br /&gt;
== i386/x32/amd64 ==&lt;br /&gt;
&lt;br /&gt;
Unaligned access is slower (but not as much as with other architectures as it is done in hardware and not in software). Moreover some MMX/SSE/vector operation need proper alignment.&lt;br /&gt;
&lt;br /&gt;
Unaligned sync primitives are supported, but there&#039;s active effort to defeature them, with Ice Lakes and newer allowing the kernel to trap.&lt;br /&gt;
&lt;br /&gt;
== ia64 ==&lt;br /&gt;
&lt;br /&gt;
Depending of config may fix with trap handler unaligned access&lt;br /&gt;
&lt;br /&gt;
== riscv64 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Short version&#039;&#039;&#039;: Don&#039;t use unaligned access.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Long version&#039;&#039;&#039;:&lt;br /&gt;
Technically the RISC-V ISA specification allows unaligned access for load and store instructions that are part of the base ISA, but only with significant limitations:&lt;br /&gt;
* Naturally aligned loads and stores are guaranteed to be atomic, but this is not the case for unaligned loads and stores. This can lead to hard-to-find bugs, so unaligned access should really be avoided.&lt;br /&gt;
* Support for unaligned access is usually not implemented in hardware and instead emulated in a trap handler, which makes it very slow.&lt;br /&gt;
&lt;br /&gt;
All synchronization primitives (LR/SC and the atomic memory read-modify-write operations (AMOs)) only allow naturally aligned access.&lt;br /&gt;
&lt;br /&gt;
= Floating point =&lt;br /&gt;
&lt;br /&gt;
First read academic paper about the [http://arxiv.org/abs/cs/0701192 pitfall] of doing multi arch floating point computation&lt;br /&gt;
and the classical &amp;quot;What Every Computer Scientist Should Know About Floating-Point Arithmetic&amp;quot; from [http://www.validlab.com/goldberg/paper.pdf here].&lt;br /&gt;
&lt;br /&gt;
== i386 ==&lt;br /&gt;
&lt;br /&gt;
i387 is a strange beast that suffer from excess precision. Moreover long double is only 80 bits&lt;br /&gt;
&lt;br /&gt;
Internal computation are done with 80 bits of precision that lead to strange and not intuitive result.&lt;br /&gt;
&lt;br /&gt;
== mips/mipsel/mips64el ==&lt;br /&gt;
&lt;br /&gt;
Some mips processors do not contain a hardware floating point unit. In this case the kernel will emulate all FPU instructions at a large performance cost.&lt;br /&gt;
&lt;br /&gt;
= C/C++ Preprocessor Symbols =&lt;br /&gt;
Generally, GNU C tends to define the symbol&lt;br /&gt;
&lt;br /&gt;
 __arch__&lt;br /&gt;
&lt;br /&gt;
A list of some common arch-specific symbols can be found on the [https://github.com/cpredef/predef/blob/master/Architectures.md Pre-defined Architecture Macros] page.&lt;br /&gt;
&lt;br /&gt;
= Signedness =&lt;br /&gt;
When programming in C, variables can be signed or unsigned.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;unsigned char c;&amp;lt;/code&amp;gt; - explicit unsigned, 0 &amp;lt;= c &amp;lt;= 255&lt;br /&gt;
* &amp;lt;code&amp;gt;signed char c;&amp;lt;/code&amp;gt; - explicit signed, -128 &amp;lt;= c &amp;lt;= 127&lt;br /&gt;
* &amp;lt;code&amp;gt;char c;&amp;lt;/code&amp;gt; - implicit (un)signedness, depending on architecture&lt;br /&gt;
&lt;br /&gt;
To force a signedness, either declare it explicitly or use the gcc command line option &amp;lt;tt&amp;gt;-f(un)signed-char&amp;lt;/tt&amp;gt;. The gcc defaults differ only due to optimisation. Other compilers may not have this issue.&lt;br /&gt;
&lt;br /&gt;
= Architecture baselines =&lt;br /&gt;
&lt;br /&gt;
Each Debian architecture has a &#039;&#039;baseline&#039;&#039; indicating the oldest or least capable CPU on which the architecture can be used. The baseline can change between Debian releases. The baseline is mostly defined by the gcc-&#039;&#039;N&#039;&#039; package, which is configured to produce baseline binaries when options like &amp;lt;tt&amp;gt;-march=&amp;lt;/tt&amp;gt; are not used.&lt;br /&gt;
&lt;br /&gt;
If a package uses options that enable additional CPU features such as -msse in particular source files, then the maintainer of that package is responsible for [[InstructionSelection|making sure those CPU features are only used on CPUs that support them]]. ioquake3&#039;s Altivec support on PowerPC is an example of this technique.&lt;br /&gt;
&lt;br /&gt;
== amd64 ==&lt;br /&gt;
&lt;br /&gt;
x86_64 with no optional extensions (psABI baseline). The core specification includes MMX, SSE and SSE2 so these are OK, but SSE3 and up are not guaranteed. (The default is &amp;lt;tt&amp;gt;-march=x86-64&amp;lt;/tt&amp;gt;, but not &amp;lt;tt&amp;gt;-march=x86-64-v2&amp;lt;/tt&amp;gt; or later.)&lt;br /&gt;
&lt;br /&gt;
See [https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build psABI (Table 3.1: Micro-Architecture Levels)] for amd64 ABI level. Wikipedia summary: https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels&lt;br /&gt;
&lt;br /&gt;
== arc ==&lt;br /&gt;
&lt;br /&gt;
A fully featured ARC HS with additional support for double-precision FPU (&amp;lt;tt&amp;gt;-mcpu=hs38_linux&amp;lt;/tt&amp;gt;). And this is a default &amp;lt;tt&amp;gt;-mcpu&amp;lt;/tt&amp;gt; for ARC starting from GCC 11.&lt;br /&gt;
&lt;br /&gt;
To be more precise it&#039;s a baseline ARC HS with HW division (&amp;lt;tt&amp;gt;-mdiv-rem&amp;lt;/tt&amp;gt;), atomic instructions (&amp;lt;tt&amp;gt;-matomic&amp;lt;/tt&amp;gt;), 64-bit loads/stores (&amp;lt;tt&amp;gt;-mll64&amp;lt;/tt&amp;gt;), the most advanced multiplier (including quad half-word &amp;amp; vector operations, &amp;lt;tt&amp;gt;-mmpy-option=plus_qmacw&amp;lt;/tt&amp;gt;) and double-precision FPU (&amp;lt;tt&amp;gt;-mfpu=fpud_all&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
== arm64 ==&lt;br /&gt;
&lt;br /&gt;
aarch64 (ARMv8-A) with no optional extensions. VFPv4 and NEON are OK, but ARMv8.1-A and up are not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== armel ==&lt;br /&gt;
&lt;br /&gt;
armv5te since Debian 10 &#039;buster&#039; (gcc-8 8-20171215-1).&lt;br /&gt;
&lt;br /&gt;
Before that, armv4te.&lt;br /&gt;
&lt;br /&gt;
== armhf ==&lt;br /&gt;
&lt;br /&gt;
armv7 with VFPv3-D16 floating point. NEON is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== i386 ==&lt;br /&gt;
&lt;br /&gt;
* Pentium4 since Trixie.  This includes most notably SSE2. This was made necessary by LLVM&#039;s lack of support for processors without SSE2.&lt;br /&gt;
* i686 since [https://www.debian.org/releases/bookworm/i386/release-notes/ch-information.en.html#i386-is-i686 Debian 12 &#039;bookworm&#039;]. There&#039;s no MMX nor SSE.&lt;br /&gt;
* Before that, [https://salsa.debian.org/ddp-team/release-notes/-/blob/e7b4c032a94b02e31caff6cfdf7d71917ea00346/en/issues.dbk#L286-317 &amp;quot;almost&amp;quot;] i686 (no &amp;quot;long NOP&amp;quot;/NOPL) since Debian 9 &#039;stretch&#039; (gcc-6 6.1.1-1).&lt;br /&gt;
* Before that, i586 since gcc-4.9 4.9-20140411-1 (2014).&lt;br /&gt;
* Before that, i486 since gcc-4.1 4.1ds7-0exp7 (2006).&lt;br /&gt;
* Before that, i386.&lt;br /&gt;
&lt;br /&gt;
See [https://www.sco.com/developers/devspecs/abi386-4.pdf SYSTEM V APPLICATION BINARY INTERFACE], [https://www.uclibc.org/docs/psABI-i386.pdf Intel386 Architecture Processor Supplement] for more information. [https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build psABI (Table 3.1: Micro-Architecture Levels)] for amd64 ABI level may be also relevant, for newer ABI level.&lt;br /&gt;
&lt;br /&gt;
== mips, mipsel ==&lt;br /&gt;
&lt;br /&gt;
MIPS32R2 since Debian 9 &#039;stretch&#039;.&lt;br /&gt;
&lt;br /&gt;
Before that, MIPS II.&lt;br /&gt;
&lt;br /&gt;
== mips64el ==&lt;br /&gt;
&lt;br /&gt;
MIPS64R2 and up.&lt;br /&gt;
&lt;br /&gt;
== powerpc ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== powerpcspe ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is impossible, even with runtime detection.&lt;br /&gt;
&lt;br /&gt;
== ppc64 ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
(Initially Altivec was in the port baseline, but was [https://lists.debian.org/msgid-search/f06cd492-95eb-b0b3-f15c-d5c2501ec0d7@physik.fu-berlin.de later removed to support some embedded systems])&lt;br /&gt;
&lt;br /&gt;
== ppc64el ==&lt;br /&gt;
&lt;br /&gt;
POWER8 and up.&lt;br /&gt;
&lt;br /&gt;
== s390x ==&lt;br /&gt;
&lt;br /&gt;
z196 since Debian 10 &#039;buster&#039;.&lt;br /&gt;
&lt;br /&gt;
== loong64 ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown).&lt;br /&gt;
&lt;br /&gt;
= Obtaining this information =&lt;br /&gt;
&lt;br /&gt;
== via the dpkg build logs ==&lt;br /&gt;
&lt;br /&gt;
Starting with dpkg 1.22.0, its build process will print some of the architecture attributes as part of its configure summary.&lt;br /&gt;
&lt;br /&gt;
Search for «Arch attributes» in the [https://buildd.debian.org/status/package.php?p=dpkg dpkg build logs].&lt;br /&gt;
&lt;br /&gt;
== via the C pre-processor ==&lt;br /&gt;
&lt;br /&gt;
 echo | cpp -dM | sort&lt;br /&gt;
&lt;br /&gt;
== via a special tool ==&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;alloca.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stddef.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;time.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 static void test_size_align(const char *name, size_t size, size_t align) {&lt;br /&gt;
   printf(&amp;quot;sizeof(%s) = %zu\n&amp;quot;, name, size);&lt;br /&gt;
   if (size != align) printf(&amp;quot;alignment(%s) = %zu\n&amp;quot;, name, align);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 #define TEST_SIZE_ALIGN(type, name) \&lt;br /&gt;
   struct test_align_##name { char a; type b; }; \&lt;br /&gt;
   test_size_align(#type, sizeof(type), offsetof(struct test_align_##name, b))&lt;br /&gt;
 &lt;br /&gt;
 static void test_endian(void) {&lt;br /&gt;
 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__&lt;br /&gt;
   printf(&amp;quot;byte order = little endian\n&amp;quot;);&lt;br /&gt;
 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__&lt;br /&gt;
   printf(&amp;quot;byte order = big endian\n&amp;quot;);&lt;br /&gt;
 #endif&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void test_char(void) {&lt;br /&gt;
   if ((int)(char)-1 == -1) printf(&amp;quot;char signedness = signed\n&amp;quot;);&lt;br /&gt;
   else if ((int)(char)-1 == 255) printf(&amp;quot;char signedness = unsigned\n&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void test_stack(void) {&lt;br /&gt;
   void *a = alloca(8);&lt;br /&gt;
   void *b = alloca(8);&lt;br /&gt;
   if (a &amp;gt; b) printf(&amp;quot;stack = grows down\n&amp;quot;);&lt;br /&gt;
   else printf(&amp;quot;stack = grows up\n&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main(void) {&lt;br /&gt;
   TEST_SIZE_ALIGN(short, short);&lt;br /&gt;
   TEST_SIZE_ALIGN(int, int);&lt;br /&gt;
   TEST_SIZE_ALIGN(long, long);&lt;br /&gt;
   TEST_SIZE_ALIGN(long long, long_long);&lt;br /&gt;
   TEST_SIZE_ALIGN(float, float);&lt;br /&gt;
   TEST_SIZE_ALIGN(double, double);&lt;br /&gt;
   TEST_SIZE_ALIGN(long double, long_double);&lt;br /&gt;
   TEST_SIZE_ALIGN(void *, pointer);&lt;br /&gt;
   TEST_SIZE_ALIGN(time_t, time_t);&lt;br /&gt;
   test_endian();&lt;br /&gt;
   test_char();&lt;br /&gt;
   test_stack();&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== via autoconf ==&lt;br /&gt;
&lt;br /&gt;
 AC_INIT(archtest, 0.1)&lt;br /&gt;
 AC_CHECK_SIZEOF(short)&lt;br /&gt;
 AC_CHECK_SIZEOF(int)&lt;br /&gt;
 AC_CHECK_SIZEOF(long)&lt;br /&gt;
 AC_CHECK_SIZEOF(long long)&lt;br /&gt;
 AC_CHECK_SIZEOF(float)&lt;br /&gt;
 AC_CHECK_SIZEOF(double)&lt;br /&gt;
 AC_CHECK_SIZEOF(long double)&lt;br /&gt;
 AC_CHECK_SIZEOF(void*)&lt;br /&gt;
 AC_C_BIGENDIAN()&lt;br /&gt;
 AC_C_CHAR_UNSIGNED()&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* Information about [[Haskell/GHC Haskell]] on different architectures.&lt;br /&gt;
* [https://github.com/cpredef/predef/blob/master/Architectures.md Pre-defined Compiler Macros Wiki - Architectures]&lt;br /&gt;
* [https://gcc.gnu.org/onlinedocs/cpp/Predefined-Macros.html GCC Predefined Macros]&lt;br /&gt;
* [[InstructionSelection|Instruction Selection]]&lt;br /&gt;
* [[Multiarch/Tuples]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Ports]]&lt;/div&gt;</summary>
		<author><name>Zeha</name></author>
	</entry>
	<entry>
		<id>https://wiki2025.debian.org/index.php?title=ArchitectureSpecificsMemo&amp;diff=11</id>
		<title>ArchitectureSpecificsMemo</title>
		<link rel="alternate" type="text/html" href="https://wiki2025.debian.org/index.php?title=ArchitectureSpecificsMemo&amp;diff=11"/>
		<updated>2025-07-18T21:58:45Z</updated>

		<summary type="html">&lt;p&gt;Zeha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
This page is a &#039;&#039;&#039;draft&#039;&#039;&#039;. Please help enhancing it by adding lines and filling tables. Comments at the bottom of the text are also welcome.&lt;br /&gt;
&lt;br /&gt;
This is just a quick array to recall some of the specifics of the architectures found in the Debian project.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!sizeof(short)&lt;br /&gt;
!sizeof(int)&lt;br /&gt;
!sizeof(long)&lt;br /&gt;
!sizeof(long long)&lt;br /&gt;
!sizeof(float)&lt;br /&gt;
!sizeof(double)&lt;br /&gt;
|-&lt;br /&gt;
|| &#039;&#039;&#039;any&#039;&#039;&#039; || 2 || 4 || sizeof(void *) || 8 || 4 || 8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!sizeof(void*)&lt;br /&gt;
!sizeof(long double)&lt;br /&gt;
!max_align_t alignment&lt;br /&gt;
!char&lt;br /&gt;
!endian&lt;br /&gt;
!stack grows&lt;br /&gt;
!page sizes&lt;br /&gt;
User-visible page size returned by &amp;lt;code&amp;gt;getauxval(AT_PAGESZ)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;getconf PAGESIZE&amp;lt;/code&amp;gt;, the granularity of the memory map&lt;br /&gt;
!float&lt;br /&gt;
H=hard, S=soft, P=partial, +=excess precision, ~=not usual standard&lt;br /&gt;
!double&lt;br /&gt;
Note that the columns refer to C types. H=hard, S=soft, P=partial, +=excess precision, ~=not usual standard)&lt;br /&gt;
!long double&lt;br /&gt;
Note that the columns refer to C types. H=hard, S=soft, P=partial, +=excess precision,-=long double precision &amp;lt; __float128, ~=not usual standard)&lt;br /&gt;
!sizeof(time_t)&lt;br /&gt;
With &amp;lt;code&amp;gt;_TIME_BITS=64&amp;lt;/code&amp;gt; the size is 8 on all archs&lt;br /&gt;
!GCC pre-defined macro(s)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;alpha&#039;&#039;&#039;&lt;br /&gt;
||8&lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||16||signed||LE||down||8K||?||?||?||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__alpha__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;any-amd64, amd64, kfreebsd-amd64, hurd-amd64&#039;&#039;&#039; ||8||16||16||signed||LE||down||4K ||H||H&lt;br /&gt;
||H-&lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__x86_64__ &amp;amp;&amp;amp; __LP64__&amp;lt;/code&amp;gt; it&#039;s a common gotcha for x32, you need to use &amp;lt;code&amp;gt;__LP64__&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;__ILP32__&amp;lt;/code&amp;gt; to tell them apart&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arc&#039;&#039;&#039;                       ||4 ||16||?||unsigned||LE||down||8K       ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__arc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm&#039;&#039;&#039;                       ||4 ||? ||8||unsigned||LE||down||?        ||S ||S ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64&#039;&#039;&#039;       ||8 ||16||16||unsigned||LE||down||4K, 16K, 64K ||H ||H ||S ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__aarch64__ &amp;amp;&amp;amp; __LP64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64ilp32&#039;&#039;&#039;       ||4 ||16||?||unsigned||LE||down||4K, 16K, 64K ||H ||H ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__aarch64__ &amp;amp;&amp;amp; __ILP32__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armel&#039;&#039;&#039;     ||4 ||8 ||8||unsigned||LE||down||4K       ||S ||S ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__ &amp;amp;&amp;amp; __ARM_EABI__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armhf&#039;&#039;&#039;||4 ||8 ||8||unsigned||LE||down||4K       ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__ &amp;amp;&amp;amp; __ARM_EABI__ &amp;amp;&amp;amp; __ARM_PCS_VFP&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;avr32&#039;&#039;&#039;                     ||4 ||8 ||?||unsigned||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hppa&#039;&#039;&#039;                      ||4 ||8 ||8||  signed||BE||up  ||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__hppa__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;any-i386i386, kfreebsd-i386, hurd-i386&#039;&#039;&#039; ||                                       4||12||168 prior to GCC 7||  signed||LE||down||4K ||H+||H+&lt;br /&gt;
||H- &lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__i386__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ia64&#039;&#039;&#039;                     ||8 ||16||16||  signed||LE&lt;br /&gt;
||both&lt;br /&gt;
The conventional stack grows down from the top of the stack mapping, but there is also the Register Backing Store which grows up from the bottom of the stack mapping at the same time&lt;br /&gt;
||?        ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__ia64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;loong64&#039;&#039;&#039;               ||8 ||16||16||  signed||LE||down||4K-64K   ||H ||H ||S ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__loongarch__ &amp;amp;&amp;amp; __loongarch_lp64 &amp;amp;&amp;amp; __loongarch_double_float&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;m68k&#039;&#039;&#039;             ||4 ||12||2||  signed||BE||down||4K       ||S?||S?||S?||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__m68k__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips&#039;&#039;&#039;         ||4 ||8 ||8||  signed||BE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABIO32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsel&#039;&#039;&#039;       ||4 ||8 ||8||  signed||LE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABIO32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64&#039;&#039;&#039;     ||8 ||16||16||  signed||BE||down||4K-64K   ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABI64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64el&#039;&#039;&#039;     ||8 ||16||16||  signed||LE||down||4K-64K   ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABI64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32&#039;&#039;&#039;         ||4 ||8 ||?||  signed||BE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABIN32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32el&#039;&#039;&#039;       ||4 ||8 ||?||  signed||LE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABIN32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;powerpc&#039;&#039;&#039;       ||4 &lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||16||                                              unsigned||BE||down||4K-64K   ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64&#039;&#039;&#039;           ||8 ||16||16||unsigned||BE||down||4K-64K   ||? ||? ||? ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__ &amp;amp;&amp;amp; __powerpc64__ &amp;amp;&amp;amp; __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64el&#039;&#039;&#039;       ||8 ||16||16||unsigned||LE||down||4K-64K-16M||H||H ||H~||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__ &amp;amp;&amp;amp; __ppc64__ &amp;amp;&amp;amp; __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;riscv64&#039;&#039;&#039;&lt;br /&gt;
||8 &lt;br /&gt;
||16(8)&lt;br /&gt;
The RV64 ISA spec defines long double as 16 bytes, but older toolchains (pre-&amp;quot;riscv-gcc-6.1.0&amp;quot;) have implemented long double as 8 bytes on RV64; cf. https://github.com/riscv/riscv-gcc/commit/54b21fc5ae83cefec44bc2caed4a8c664c274ba0&lt;br /&gt;
||16||unsigned||LE||down||4K 4k is the default page size on all RISC-V systems. Depending on the chosen virtual memory mode (Sv32/Sv39/Sv48) additional page sizes are available as well: Sv32 supports 4k and 4M pages, Sv39 supports 4k, 2M and 1G pages and Sv48 supports 4k,  2M, 1G, and 512G pages       ||H ||H ||H~||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__riscv &amp;amp;&amp;amp; __riscv_xlen==64&amp;lt;/code&amp;gt;&lt;br /&gt;
Older, pre-mainline RISC-V toolchains used &amp;lt;code&amp;gt;__riscv__ &amp;amp;&amp;amp; __riscv64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390&#039;&#039;&#039;                      ||4&lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||?||                                              unsigned||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__s390__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390x&#039;&#039;&#039;                     ||8 ||16||8||unsigned||BE||down||4K, 1M, 2G       ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__s390x__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sh4&#039;&#039;&#039;               ||4 ||8 ||4||  signed||LE||down||4K       ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__sh__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc&#039;&#039;&#039;      ||4 &lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||?||                                                signed||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__sparc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc64&#039;&#039;&#039;       ||8 ||16||16||  signed||BE||down||8K, 64K, 512K, 4M, 32M, 256M, 2G, 16G||? ||? ||? ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__sparc__ &amp;amp;&amp;amp; __arch64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;x32&#039;&#039;&#039;                       ||4 ||16||16||  signed||LE||down||4K ||H ||H &lt;br /&gt;
||H-&lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__x86_64__ &amp;amp;&amp;amp; __ILP32__&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!multiarch&lt;br /&gt;
!ELFCLASS&lt;br /&gt;
!ELF machine EM_&lt;br /&gt;
!ld.so(8)&lt;br /&gt;
!uname -m&lt;br /&gt;
Used to classify CPU architectures in CMake and many ad-hoc build systems, but note that this is a kernel and/or libc specific name despite referring to the CPU&lt;br /&gt;
!Meson&lt;br /&gt;
[https://mesonbuild.com/Reference-tables.html Reference table] of Meson hardware architecture names&lt;br /&gt;
!qemu&lt;br /&gt;
e.g. i386 results in qemu(-system)-i386(-static)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;alpha&#039;&#039;&#039;                     ||alpha-linux-gnu            ||64||ALPHA||/lib/ld-linux.so.2||alpha||alpha|| alpha&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;amd64&#039;&#039;&#039;                     ||x86_64-linux-gnu           ||64||X86_64||/lib64/ld-linux-x86-64.so.2||x86_64||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hurd-amd64&#039;&#039;&#039;                ||x86_64-gnu                 ||64||X86_64||/lib/ld-x86-64.so||x86_64-AT386||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;kfreebsd-amd64&#039;&#039;&#039;            ||x86_64-kfreebsd-gnu        ||64||X86_64||/lib/ld-kfreebsd-x86-64.so.1||x86_64||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arc&#039;&#039;&#039;                       ||arc-linux-gnu              ||32||ARC_COMPACT2||/lib/ld-linux-arc.so.2||arc||arc||-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm&#039;&#039;&#039;                       ||arm-linux-gnu              ||32||ARM||/lib/ld-linux.so.2&lt;br /&gt;
||arm*&lt;br /&gt;
Many names starting with arm, e.g. armv5tel&lt;br /&gt;
||arm&lt;br /&gt;
||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64&#039;&#039;&#039;       ||aarch64-linux-gnu          ||64||AARCH64||/lib/ld-linux-aarch64.so.1||aarch64||aarch64||aarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64ilp32&#039;&#039;&#039;||aarch64-linux-gnu_ilp32 ||32?||AARCH64?|| ||aarch64?|| || aarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armel&#039;&#039;&#039;     ||arm-linux-gnueabi          ||32||ARM||/lib/ld-linux.so.3||arm*||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armhf&#039;&#039;&#039;||arm-linux-gnueabihf        ||32||ARM||/lib/ld-linux-armhf.so.3||arm*||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;avr32&#039;&#039;&#039;                     ||                           ||  || || || ||avr||avrqemu-system-avr only&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hppa&#039;&#039;&#039;                      ||hppa-linux-gnu             ||32||PARISC||/lib/ld.so.1||parisc*||parisc||hppa&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;i386&#039;&#039;&#039;                      ||i386-linux-gnu             ||32||386||/lib/ld-linux.so.2||i?86i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hurd-i386&#039;&#039;&#039;                 ||i386-gnu                   ||32||386||/lib/ld.so||i?86-AT386i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;kfreebsd-i386&#039;&#039;&#039;             ||i386-kfreebsd-gnu          ||32||386||/lib/ld.so.1||i?86i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ia64&#039;&#039;&#039;                      ||ia64-linux-gnu             ||64||IA_64||/lib/ld-linux-ia64.so.2||ia64||ia64||-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;loong64&#039;&#039;&#039;               ||loongarch64-linux-gnu      ||64||LOONGARCH||/lib64/ld-linux-loongarch-lp64d.so.1||loongarch64||loongarch64||loongarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;m68k&#039;&#039;&#039;             ||m68k-linux-gnu             ||32||68K||/lib/ld.so.1||m68k||m68k||m68k&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips&#039;&#039;&#039;         ||mips-linux-gnu             ||32||MIPS||/lib/ld.so.1||mips||mips||mips&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsel&#039;&#039;&#039;       ||mipsel-linux-gnu           ||32||MIPS||/lib/ld.so.1||mips||mips||mipsel&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64&#039;&#039;&#039;       ||mips64-linux-gnuabi64      ||  || || ||mips64||mips64||mips64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64el&#039;&#039;&#039;     ||mips64el-linux-gnuabi64    ||64||MIPS||/lib64/ld.so.1||mips64||mips64||mips64el&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32&#039;&#039;&#039;      ||mips64-linux-gnuabin32     ||  || || || || ||mipsn32&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32el&#039;&#039;&#039;    ||mips64el-linux-gnuabin32   ||  || || || || ||mipsn32el&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;powerpc&#039;&#039;&#039;       ||powerpc-linux-gnu          ||32||PPC||/lib/ld.so.1||ppc||ppc||ppc&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64&#039;&#039;&#039;           ||powerpc64-linux-gnu        ||64||PPC64||/lib64/ld64.so.1||ppc64||ppc64||ppc64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64el&#039;&#039;&#039;       ||powerpc64le-linux-gnu      ||64||PPC64||/lib64/ld64.so.2||ppcle ppc64le||ppc64||ppc64le&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;riscv64&#039;&#039;&#039;        ||riscv64-linux-gnu          ||64||RISCV||/lib/ld-linux-riscv64-lp64d.so.1 ||riscv64||riscv64||riscv64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390&#039;&#039;&#039;                      ||s390-linux-gnu             ||32||S390||/lib/ld.so.1||s390||s390||(s390x)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390x&#039;&#039;&#039;                     ||s390x-linux-gnu            ||64||S390||/lib/ld64.so.1||s390x||s390x||s390x&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sh4&#039;&#039;&#039;               ||sh4-linux-gnu              ||32||SH||/lib/ld-linux.so.2||sh||sh4||sh4&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc&#039;&#039;&#039;      ||sparc-linux-gnu            ||32||SPARC32PLUS||/lib/ld-linux.so.2||sparc||sparc||sparc(32plus)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc64&#039;&#039;&#039;       ||sparc64-linux-gnu          ||64||SPARCV9||/lib64/ld-linux.so.2||sparc64||sparc64||sparc64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;x32&#039;&#039;&#039;                       ||x86_64-linux-gnux32        ||32||X86_64||/libx32/ld-linux-x32.so.2||x86_64|| ||x86_64&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Alignment =&lt;br /&gt;
&lt;br /&gt;
Note that there is alignment on the machine language level and alignment in C. Proper misalignment (for example in a packed struct) is no problem in C and allowed almost everywhere (except of SPARC, where you will receive SIGBUS on a program execution, misaligned variable/memory access) and the compiler will do the right thing (like translating a read of a variable to two loads at machine language level). On the other hand most of the constructs that lead to unaligned access not properly handled by the C compiler (especially most constructs involving pointer casting) have undefined behaviour anyway, so compiling them with optimisation enabled can cause strange effects on all architectures. Read more on a Wikipedia article [https://en.wikipedia.org/wiki/Data_structure_alignment Data structure alignment].&lt;br /&gt;
&lt;br /&gt;
On the other hand, unaligned synchronization primitives (atomics, etc) tend to be unsupported or extremely slow.  Extra joy if they cross cacheline or page boundaries.&lt;br /&gt;
&lt;br /&gt;
== alpha ==&lt;br /&gt;
&lt;br /&gt;
Some alpha may emulate see [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/alpha/kernel/traps.c kernel source]&lt;br /&gt;
&lt;br /&gt;
== arc ==&lt;br /&gt;
&lt;br /&gt;
ARCv2 processors (ARC HS38 and ARC HS48 variants, 1-4 cores) support unaligned access in hardware, except for &amp;quot;atomic instructions&amp;quot; where special considerations apply. ARCv2 features 2 types of atomic instructions: the first for 32-bit data (&amp;quot;llock&amp;quot;/&amp;quot;scond&amp;quot; pair) and the second for 64-bit data (&amp;quot;llockd&amp;quot;/&amp;quot;scondd&amp;quot;). Those atomic instructions must work on data aligned naturally. I.e. &amp;quot;llock&amp;quot;/&amp;quot;scond&amp;quot; must be only used on 32-bit word-aligned data, &amp;quot;llockd&amp;quot;/&amp;quot;scondd&amp;quot; must be only used on 64-bit double-word aligned data. If an unaligned access is done by &amp;quot;atomic instruction&amp;quot; in user-space, the offending application gets forcefully killed with visible mention of a segmentation fault.  An unaligned access done by “atomic instruction” in kernel-mode will result in an unrecoverable &amp;quot;Illegal instruction&amp;quot; exception.&lt;br /&gt;
&lt;br /&gt;
== armel/armhf/arm64 ==&lt;br /&gt;
&lt;br /&gt;
High-level summary for software engineers: Don&#039;t do unaligned access.&lt;br /&gt;
It&#039;s always inefficient, sometimes extremely inefficient, and&lt;br /&gt;
in various cases is not permitted at all.&lt;br /&gt;
&lt;br /&gt;
The short answer for the ARM case is that ARMv6 and up guarantee&lt;br /&gt;
that the processor can be configured such that some unaligned&lt;br /&gt;
accesses are fine (or at least just inefficient). Linux by default&lt;br /&gt;
enable this mode and trap:&lt;br /&gt;
* All &amp;lt;=32-bit load/store operations can be unaligned.&lt;br /&gt;
* NEON load-stores can be unaligned (unless an explicit alignment is specified in the encoding).&lt;br /&gt;
&lt;br /&gt;
But:&lt;br /&gt;
* VFP load/stores must be naturally aligned.&lt;br /&gt;
* Load-multiple/store-multiple and ldrd/strd do not work with &amp;lt;32-bit alignment, but can sometimes get fixed up by the kernel at a substantial performance penalty.&lt;br /&gt;
&lt;br /&gt;
PUSH/POP usually requires 32-bit alignment, but then the ABI requires&lt;br /&gt;
64-bit alignment of the stack, so that is less of an issue.&lt;br /&gt;
&lt;br /&gt;
Unaligned load-exclusive/store-exclusive operations are not supported.&lt;br /&gt;
&lt;br /&gt;
No unaligned accesses are permitted to memory regions of Device or&lt;br /&gt;
Strongly-ordered type. But some permutation of this will be true for&lt;br /&gt;
most architectures, and in user-space this would only affect things&lt;br /&gt;
prodding /dev/mem or otherwise mmaping from a device driver.&lt;br /&gt;
&lt;br /&gt;
ARM64 similarly makes it possible to trap unaligned accesses, but if&lt;br /&gt;
that is not enabled (which it isn&#039;t by Linux), everything apart from&lt;br /&gt;
load-exclusive/store-exclusive, load-acquire/store-release and Device&lt;br /&gt;
memory accesses will be handled by hardware.&lt;br /&gt;
&lt;br /&gt;
== avr32 ==&lt;br /&gt;
&lt;br /&gt;
Unaligned access is ok for 32bits word but not for 16bits or 64bits word see [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/avr32/include/asm/unaligned.h kernel source]&lt;br /&gt;
&lt;br /&gt;
== i386/x32/amd64 ==&lt;br /&gt;
&lt;br /&gt;
Unaligned access is slower (but not as much as with other architectures as it is done in hardware and not in software). Moreover some MMX/SSE/vector operation need proper alignment.&lt;br /&gt;
&lt;br /&gt;
Unaligned sync primitives are supported, but there&#039;s active effort to defeature them, with Ice Lakes and newer allowing the kernel to trap.&lt;br /&gt;
&lt;br /&gt;
== ia64 ==&lt;br /&gt;
&lt;br /&gt;
Depending of config may fix with trap handler unaligned access&lt;br /&gt;
&lt;br /&gt;
== riscv64 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Short version&#039;&#039;&#039;: Don&#039;t use unaligned access.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Long version&#039;&#039;&#039;:&lt;br /&gt;
Technically the RISC-V ISA specification allows unaligned access for load and store instructions that are part of the base ISA, but only with significant limitations:&lt;br /&gt;
* Naturally aligned loads and stores are guaranteed to be atomic, but this is not the case for unaligned loads and stores. This can lead to hard-to-find bugs, so unaligned access should really be avoided.&lt;br /&gt;
* Support for unaligned access is usually not implemented in hardware and instead emulated in a trap handler, which makes it very slow.&lt;br /&gt;
&lt;br /&gt;
All synchronization primitives (LR/SC and the atomic memory read-modify-write operations (AMOs)) only allow naturally aligned access.&lt;br /&gt;
&lt;br /&gt;
= Floating point =&lt;br /&gt;
&lt;br /&gt;
First read academic paper about the [http://arxiv.org/abs/cs/0701192 pitfall] of doing multi arch floating point computation&lt;br /&gt;
and the classical &amp;quot;What Every Computer Scientist Should Know About Floating-Point Arithmetic&amp;quot; from [http://www.validlab.com/goldberg/paper.pdf here].&lt;br /&gt;
&lt;br /&gt;
== i386 ==&lt;br /&gt;
&lt;br /&gt;
i387 is a strange beast that suffer from excess precision. Moreover long double is only 80 bits&lt;br /&gt;
&lt;br /&gt;
Internal computation are done with 80 bits of precision that lead to strange and not intuitive result.&lt;br /&gt;
&lt;br /&gt;
== mips/mipsel/mips64el ==&lt;br /&gt;
&lt;br /&gt;
Some mips processors do not contain a hardware floating point unit. In this case the kernel will emulate all FPU instructions at a large performance cost.&lt;br /&gt;
&lt;br /&gt;
= C/C++ Preprocessor Symbols =&lt;br /&gt;
Generally, GNU C tends to define the symbol&lt;br /&gt;
&lt;br /&gt;
 __arch__&lt;br /&gt;
&lt;br /&gt;
A list of some common arch-specific symbols can be found on the [https://github.com/cpredef/predef/blob/master/Architectures.md Pre-defined Architecture Macros] page.&lt;br /&gt;
&lt;br /&gt;
= Signedness =&lt;br /&gt;
When programming in C, variables can be signed or unsigned.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
* `unsigned char c;` - explicit unsigned, 0 &amp;lt;= c &amp;lt;= 255&lt;br /&gt;
* `signed char c;` - explicit signed, -128 &amp;lt;= c &amp;lt;= 127&lt;br /&gt;
* `char c;` - implicit (un)signedness, depending on architecture&lt;br /&gt;
&lt;br /&gt;
To force a signedness, either declare it explicitly or use the gcc command line option -f(un)signed-char. The gcc defaults differ only due to optimisation. Other compilers may not have this issue.&lt;br /&gt;
&lt;br /&gt;
= Architecture baselines =&lt;br /&gt;
&lt;br /&gt;
Each Debian architecture has a &#039;&#039;baseline&#039;&#039; indicating the oldest or least capable CPU on which the architecture can be used. The baseline can change between Debian releases. The baseline is mostly defined by the gcc-&#039;&#039;N&#039;&#039; package, which is configured to produce baseline binaries when options like -march= are not used.&lt;br /&gt;
&lt;br /&gt;
If a package uses options that enable additional CPU features such as -msse in particular source files, then the maintainer of that package is responsible for [[InstructionSelection|making sure those CPU features are only used on CPUs that support them]]. ioquake3&#039;s Altivec support on PowerPC is an example of this technique.&lt;br /&gt;
&lt;br /&gt;
== amd64 ==&lt;br /&gt;
&lt;br /&gt;
x86_64 with no optional extensions (psABI baseline). The core specification includes MMX, SSE and SSE2 so these are OK, but SSE3 and up are not guaranteed. (The default is &#039;&#039;-march=x86-64&#039;&#039;, but not &#039;&#039;-march=x86-64-v2&#039;&#039; or later.)&lt;br /&gt;
&lt;br /&gt;
See [https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build psABI (Table 3.1: Micro-Architecture Levels)] for amd64 ABI level. Wikipedia summary: https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels&lt;br /&gt;
&lt;br /&gt;
== arc ==&lt;br /&gt;
&lt;br /&gt;
A fully featured ARC HS with additional support for double-precision FPU (&amp;quot;-mcpu=hs38_linux&amp;quot;). And this is a default &amp;quot;-mcpu&amp;quot; for ARC starting from GCC 11.&lt;br /&gt;
&lt;br /&gt;
To be more precise it&#039;s a baseline ARC HS with HW division (&amp;quot;-mdiv-rem&amp;quot;), atomic instructions (&amp;quot;-matomic&amp;quot;), 64-bit loads/stores	(&amp;quot;-mll64&amp;quot;), the most advanced multiplier (including quad half-word &amp;amp; vector operations, &amp;quot;-mmpy-option=plus_qmacw&amp;quot;) and double-precision FPU (&amp;quot;-mfpu=fpud_all&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
== arm64 ==&lt;br /&gt;
&lt;br /&gt;
aarch64 (ARMv8-A) with no optional extensions. VFPv4 and NEON are OK, but ARMv8.1-A and up are not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== armel ==&lt;br /&gt;
&lt;br /&gt;
armv5te since Debian 10 &#039;buster&#039; (gcc-8 8-20171215-1).&lt;br /&gt;
&lt;br /&gt;
Before that, armv4te.&lt;br /&gt;
&lt;br /&gt;
== armhf ==&lt;br /&gt;
&lt;br /&gt;
armv7 with VFPv3-D16 floating point. NEON is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== i386 ==&lt;br /&gt;
&lt;br /&gt;
* Pentium4 since Trixie.  This includes most notably SSE2. This was made necessary by LLVM&#039;s lack of support for processors without SSE2.&lt;br /&gt;
* i686 since [https://www.debian.org/releases/bookworm/i386/release-notes/ch-information.en.html#i386-is-i686 Debian 12 &#039;bookworm&#039;]. There&#039;s no MMX nor SSE.&lt;br /&gt;
* Before that, [https://salsa.debian.org/ddp-team/release-notes/-/blob/e7b4c032a94b02e31caff6cfdf7d71917ea00346/en/issues.dbk#L286-317 &amp;quot;almost&amp;quot;] i686 (no &amp;quot;long NOP&amp;quot;/NOPL) since Debian 9 &#039;stretch&#039; (gcc-6 6.1.1-1).&lt;br /&gt;
* Before that, i586 since gcc-4.9 4.9-20140411-1 (2014).&lt;br /&gt;
* Before that, i486 since gcc-4.1 4.1ds7-0exp7 (2006).&lt;br /&gt;
* Before that, i386.&lt;br /&gt;
&lt;br /&gt;
See [https://www.sco.com/developers/devspecs/abi386-4.pdf SYSTEM V APPLICATION BINARY INTERFACE], [https://www.uclibc.org/docs/psABI-i386.pdf Intel386 Architecture Processor Supplement] for more information. [https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build psABI (Table 3.1: Micro-Architecture Levels)] for amd64 ABI level may be also relevant, for newer ABI level.&lt;br /&gt;
&lt;br /&gt;
== mips, mipsel ==&lt;br /&gt;
&lt;br /&gt;
MIPS32R2 since Debian 9 &#039;stretch&#039;.&lt;br /&gt;
&lt;br /&gt;
Before that, MIPS II.&lt;br /&gt;
&lt;br /&gt;
== mips64el ==&lt;br /&gt;
&lt;br /&gt;
MIPS64R2 and up.&lt;br /&gt;
&lt;br /&gt;
== powerpc ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== powerpcspe ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is impossible, even with runtime detection.&lt;br /&gt;
&lt;br /&gt;
== ppc64 ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
(Initially Altivec was in the port baseline, but was [https://lists.debian.org/msgid-search/f06cd492-95eb-b0b3-f15c-d5c2501ec0d7@physik.fu-berlin.de later removed to support some embedded systems])&lt;br /&gt;
&lt;br /&gt;
== ppc64el ==&lt;br /&gt;
&lt;br /&gt;
POWER8 and up.&lt;br /&gt;
&lt;br /&gt;
== s390x ==&lt;br /&gt;
&lt;br /&gt;
z196 since Debian 10 &#039;buster&#039;.&lt;br /&gt;
&lt;br /&gt;
== loong64 ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown).&lt;br /&gt;
&lt;br /&gt;
= Obtaining this information =&lt;br /&gt;
&lt;br /&gt;
== via the dpkg build logs ==&lt;br /&gt;
&lt;br /&gt;
Starting with dpkg 1.22.0, its build process will print some of the architecture attributes as part of its configure summary.&lt;br /&gt;
&lt;br /&gt;
Search for «Arch attributes» in the [https://buildd.debian.org/status/package.php?p=dpkg dpkg build logs].&lt;br /&gt;
&lt;br /&gt;
== via the C pre-processor ==&lt;br /&gt;
&lt;br /&gt;
 echo | cpp -dM | sort&lt;br /&gt;
&lt;br /&gt;
== via a special tool ==&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;alloca.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stddef.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;time.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 static void test_size_align(const char *name, size_t size, size_t align) {&lt;br /&gt;
   printf(&amp;quot;sizeof(%s) = %zu\n&amp;quot;, name, size);&lt;br /&gt;
   if (size != align) printf(&amp;quot;alignment(%s) = %zu\n&amp;quot;, name, align);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 #define TEST_SIZE_ALIGN(type, name) \&lt;br /&gt;
   struct test_align_##name { char a; type b; }; \&lt;br /&gt;
   test_size_align(#type, sizeof(type), offsetof(struct test_align_##name, b))&lt;br /&gt;
 &lt;br /&gt;
 static void test_endian(void) {&lt;br /&gt;
 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__&lt;br /&gt;
   printf(&amp;quot;byte order = little endian\n&amp;quot;);&lt;br /&gt;
 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__&lt;br /&gt;
   printf(&amp;quot;byte order = big endian\n&amp;quot;);&lt;br /&gt;
 #endif&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void test_char(void) {&lt;br /&gt;
   if ((int)(char)-1 == -1) printf(&amp;quot;char signedness = signed\n&amp;quot;);&lt;br /&gt;
   else if ((int)(char)-1 == 255) printf(&amp;quot;char signedness = unsigned\n&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void test_stack(void) {&lt;br /&gt;
   void *a = alloca(8);&lt;br /&gt;
   void *b = alloca(8);&lt;br /&gt;
   if (a &amp;gt; b) printf(&amp;quot;stack = grows down\n&amp;quot;);&lt;br /&gt;
   else printf(&amp;quot;stack = grows up\n&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main(void) {&lt;br /&gt;
   TEST_SIZE_ALIGN(short, short);&lt;br /&gt;
   TEST_SIZE_ALIGN(int, int);&lt;br /&gt;
   TEST_SIZE_ALIGN(long, long);&lt;br /&gt;
   TEST_SIZE_ALIGN(long long, long_long);&lt;br /&gt;
   TEST_SIZE_ALIGN(float, float);&lt;br /&gt;
   TEST_SIZE_ALIGN(double, double);&lt;br /&gt;
   TEST_SIZE_ALIGN(long double, long_double);&lt;br /&gt;
   TEST_SIZE_ALIGN(void *, pointer);&lt;br /&gt;
   TEST_SIZE_ALIGN(time_t, time_t);&lt;br /&gt;
   test_endian();&lt;br /&gt;
   test_char();&lt;br /&gt;
   test_stack();&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== via autoconf ==&lt;br /&gt;
&lt;br /&gt;
 AC_INIT(archtest, 0.1)&lt;br /&gt;
 AC_CHECK_SIZEOF(short)&lt;br /&gt;
 AC_CHECK_SIZEOF(int)&lt;br /&gt;
 AC_CHECK_SIZEOF(long)&lt;br /&gt;
 AC_CHECK_SIZEOF(long long)&lt;br /&gt;
 AC_CHECK_SIZEOF(float)&lt;br /&gt;
 AC_CHECK_SIZEOF(double)&lt;br /&gt;
 AC_CHECK_SIZEOF(long double)&lt;br /&gt;
 AC_CHECK_SIZEOF(void*)&lt;br /&gt;
 AC_C_BIGENDIAN()&lt;br /&gt;
 AC_C_CHAR_UNSIGNED()&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* Information about [[Haskell/GHC Haskell]] on different architectures.&lt;br /&gt;
* [https://github.com/cpredef/predef/blob/master/Architectures.md Pre-defined Compiler Macros Wiki - Architectures]&lt;br /&gt;
* [https://gcc.gnu.org/onlinedocs/cpp/Predefined-Macros.html GCC Predefined Macros]&lt;br /&gt;
* [[InstructionSelection|Instruction Selection]]&lt;br /&gt;
* [[Multiarch/Tuples]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Ports]]&lt;/div&gt;</summary>
		<author><name>Zeha</name></author>
	</entry>
	<entry>
		<id>https://wiki2025.debian.org/index.php?title=ArchitectureSpecificsMemo&amp;diff=10</id>
		<title>ArchitectureSpecificsMemo</title>
		<link rel="alternate" type="text/html" href="https://wiki2025.debian.org/index.php?title=ArchitectureSpecificsMemo&amp;diff=10"/>
		<updated>2025-07-18T21:56:27Z</updated>

		<summary type="html">&lt;p&gt;Zeha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
This page is a &#039;&#039;&#039;draft&#039;&#039;&#039;. Please help enhancing it by adding lines and filling tables. Comments at the bottom of the text are also welcome.&lt;br /&gt;
&lt;br /&gt;
This is just a quick array to recall some of the specifics of the architectures found in the Debian project.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!sizeof(short)&lt;br /&gt;
!sizeof(int)&lt;br /&gt;
!sizeof(long)&lt;br /&gt;
!sizeof(long long)&lt;br /&gt;
!sizeof(float)&lt;br /&gt;
!sizeof(double)&lt;br /&gt;
|-&lt;br /&gt;
|| &#039;&#039;&#039;any&#039;&#039;&#039; || 2 || 4 || sizeof(void *) || 8 || 4 || 8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!sizeof(void*)&lt;br /&gt;
!sizeof(long double)&lt;br /&gt;
!max_align_t alignment&lt;br /&gt;
!char&lt;br /&gt;
!endian&lt;br /&gt;
!stack grows&lt;br /&gt;
!page sizes&lt;br /&gt;
User-visible page size returned by &amp;lt;code&amp;gt;getauxval(AT_PAGESZ)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;getconf PAGESIZE&amp;lt;/code&amp;gt;, the granularity of the memory map&lt;br /&gt;
!float&lt;br /&gt;
H=hard, S=soft, P=partial, +=excess precision, ~=not usual standard&lt;br /&gt;
!double&lt;br /&gt;
Note that the columns refer to C types. H=hard, S=soft, P=partial, +=excess precision, ~=not usual standard)&lt;br /&gt;
!long double&lt;br /&gt;
Note that the columns refer to C types. H=hard, S=soft, P=partial, +=excess precision,-=long double precision &amp;lt; __float128, ~=not usual standard)&lt;br /&gt;
!sizeof(time_t)&lt;br /&gt;
With &amp;lt;code&amp;gt;_TIME_BITS=64&amp;lt;/code&amp;gt; the size is 8 on all archs&lt;br /&gt;
!GCC pre-defined macro(s)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;alpha&#039;&#039;&#039;&lt;br /&gt;
||8&lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||16||signed||LE||down||8K||?||?||?||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__alpha__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;any-amd64, amd64, kfreebsd-amd64, hurd-amd64&#039;&#039;&#039; ||8||16||16||signed||LE||down||4K ||H||H&lt;br /&gt;
||H-&lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__x86_64__ &amp;amp;&amp;amp; __LP64__&amp;lt;/code&amp;gt; it&#039;s a common gotcha for x32, you need to use &amp;lt;code&amp;gt;__LP64__&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;__ILP32__&amp;lt;/code&amp;gt; to tell them apart&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arc&#039;&#039;&#039;                       ||4 ||16||?||unsigned||LE||down||8K       ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__arc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm&#039;&#039;&#039;                       ||4 ||? ||8||unsigned||LE||down||?        ||S ||S ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64&#039;&#039;&#039;       ||8 ||16||16||unsigned||LE||down||4K, 16K, 64K ||H ||H ||S ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__aarch64__ &amp;amp;&amp;amp; __LP64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64ilp32&#039;&#039;&#039;       ||4 ||16||?||unsigned||LE||down||4K, 16K, 64K ||H ||H ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__aarch64__ &amp;amp;&amp;amp; __ILP32__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armel&#039;&#039;&#039;     ||4 ||8 ||8||unsigned||LE||down||4K       ||S ||S ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__ &amp;amp;&amp;amp; __ARM_EABI__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armhf&#039;&#039;&#039;||4 ||8 ||8||unsigned||LE||down||4K       ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__ &amp;amp;&amp;amp; __ARM_EABI__ &amp;amp;&amp;amp; __ARM_PCS_VFP&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;avr32&#039;&#039;&#039;                     ||4 ||8 ||?||unsigned||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hppa&#039;&#039;&#039;                      ||4 ||8 ||8||  signed||BE||up  ||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__hppa__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;any-i386i386, kfreebsd-i386, hurd-i386&#039;&#039;&#039; ||                                       4||12||168 prior to GCC 7||  signed||LE||down||4K ||H+||H+&lt;br /&gt;
||H- &lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__i386__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ia64&#039;&#039;&#039;                     ||8 ||16||16||  signed||LE&lt;br /&gt;
||both&lt;br /&gt;
The conventional stack grows down from the top of the stack mapping, but there is also the Register Backing Store which grows up from the bottom of the stack mapping at the same time&lt;br /&gt;
||?        ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__ia64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;loong64&#039;&#039;&#039;               ||8 ||16||16||  signed||LE||down||4K-64K   ||H ||H ||S ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__loongarch__ &amp;amp;&amp;amp; __loongarch_lp64 &amp;amp;&amp;amp; __loongarch_double_float&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;m68k&#039;&#039;&#039;             ||4 ||12||2||  signed||BE||down||4K       ||S?||S?||S?||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__m68k__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips&#039;&#039;&#039;         ||4 ||8 ||8||  signed||BE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABIO32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsel&#039;&#039;&#039;       ||4 ||8 ||8||  signed||LE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABIO32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64&#039;&#039;&#039;     ||8 ||16||16||  signed||BE||down||4K-64K   ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABI64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64el&#039;&#039;&#039;     ||8 ||16||16||  signed||LE||down||4K-64K   ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABI64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32&#039;&#039;&#039;         ||4 ||8 ||?||  signed||BE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABIN32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32el&#039;&#039;&#039;       ||4 ||8 ||?||  signed||LE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABIN32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;powerpc&#039;&#039;&#039;       ||4 &lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||16||                                              unsigned||BE||down||4K-64K   ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64&#039;&#039;&#039;           ||8 ||16||16||unsigned||BE||down||4K-64K   ||? ||? ||? ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__ &amp;amp;&amp;amp; __powerpc64__ &amp;amp;&amp;amp; __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64el&#039;&#039;&#039;       ||8 ||16||16||unsigned||LE||down||4K-64K-16M||H||H ||H~||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__ &amp;amp;&amp;amp; __ppc64__ &amp;amp;&amp;amp; __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;riscv64&#039;&#039;&#039;&lt;br /&gt;
||8 &lt;br /&gt;
||16(8)&lt;br /&gt;
The RV64 ISA spec defines long double as 16 bytes, but older toolchains (pre-&amp;quot;riscv-gcc-6.1.0&amp;quot;) have implemented long double as 8 bytes on RV64; cf. https://github.com/riscv/riscv-gcc/commit/54b21fc5ae83cefec44bc2caed4a8c664c274ba0&lt;br /&gt;
||16||unsigned||LE||down||4K 4k is the default page size on all RISC-V systems. Depending on the chosen virtual memory mode (Sv32/Sv39/Sv48) additional page sizes are available as well: Sv32 supports 4k and 4M pages, Sv39 supports 4k, 2M and 1G pages and Sv48 supports 4k,  2M, 1G, and 512G pages       ||H ||H ||H~||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__riscv &amp;amp;&amp;amp; __riscv_xlen==64&amp;lt;/code&amp;gt;&lt;br /&gt;
Older, pre-mainline RISC-V toolchains used &amp;lt;code&amp;gt;__riscv__ &amp;amp;&amp;amp; __riscv64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390&#039;&#039;&#039;                      ||4&lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||?||                                              unsigned||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__s390__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390x&#039;&#039;&#039;                     ||8 ||16||8||unsigned||BE||down||4K, 1M, 2G       ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__s390x__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sh4&#039;&#039;&#039;               ||4 ||8 ||4||  signed||LE||down||4K       ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__sh__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc&#039;&#039;&#039;      ||4 &lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||?||                                                signed||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__sparc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc64&#039;&#039;&#039;       ||8 ||16||16||  signed||BE||down||8K, 64K, 512K, 4M, 32M, 256M, 2G, 16G||? ||? ||? ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__sparc__ &amp;amp;&amp;amp; __arch64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;x32&#039;&#039;&#039;                       ||4 ||16||16||  signed||LE||down||4K ||H ||H &lt;br /&gt;
||H-&lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__x86_64__ &amp;amp;&amp;amp; __ILP32__&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!multiarch&lt;br /&gt;
!ELFCLASS&lt;br /&gt;
!ELF machine EM_&lt;br /&gt;
!ld.so(8)&lt;br /&gt;
!uname -m&lt;br /&gt;
Used to classify CPU architectures in CMake and many ad-hoc build systems, but note that this is a kernel and/or libc specific name despite referring to the CPU&lt;br /&gt;
!Meson&lt;br /&gt;
[https://mesonbuild.com/Reference-tables.html Reference table] of Meson hardware architecture names&lt;br /&gt;
!qemu&lt;br /&gt;
e.g. i386 results in qemu(-system)-i386(-static)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;alpha&#039;&#039;&#039;                     ||alpha-linux-gnu            ||64||ALPHA||/lib/ld-linux.so.2||alpha||alpha|| alpha&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;amd64&#039;&#039;&#039;                     ||x86_64-linux-gnu           ||64||X86_64||/lib64/ld-linux-x86-64.so.2||x86_64||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hurd-amd64&#039;&#039;&#039;                ||x86_64-gnu                 ||64||X86_64||/lib/ld-x86-64.so||x86_64-AT386||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;kfreebsd-amd64&#039;&#039;&#039;            ||x86_64-kfreebsd-gnu        ||64||X86_64||/lib/ld-kfreebsd-x86-64.so.1||x86_64||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arc&#039;&#039;&#039;                       ||arc-linux-gnu              ||32||ARC_COMPACT2||/lib/ld-linux-arc.so.2||arc||arc||-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm&#039;&#039;&#039;                       ||arm-linux-gnu              ||32||ARM||/lib/ld-linux.so.2&lt;br /&gt;
||arm*&lt;br /&gt;
Many names starting with arm, e.g. armv5tel&lt;br /&gt;
||arm&lt;br /&gt;
||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64&#039;&#039;&#039;       ||aarch64-linux-gnu          ||64||AARCH64||/lib/ld-linux-aarch64.so.1||aarch64||aarch64||aarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64ilp32&#039;&#039;&#039;||aarch64-linux-gnu_ilp32 ||32?||AARCH64?|| ||aarch64?|| || aarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armel&#039;&#039;&#039;     ||arm-linux-gnueabi          ||32||ARM||/lib/ld-linux.so.3||arm*||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armhf&#039;&#039;&#039;||arm-linux-gnueabihf        ||32||ARM||/lib/ld-linux-armhf.so.3||arm*||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;avr32&#039;&#039;&#039;                     ||                           ||  || || || ||avr||avrqemu-system-avr only&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hppa&#039;&#039;&#039;                      ||hppa-linux-gnu             ||32||PARISC||/lib/ld.so.1||parisc*||parisc||hppa&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;i386&#039;&#039;&#039;                      ||i386-linux-gnu             ||32||386||/lib/ld-linux.so.2||i?86i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hurd-i386&#039;&#039;&#039;                 ||i386-gnu                   ||32||386||/lib/ld.so||i?86-AT386i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;kfreebsd-i386&#039;&#039;&#039;             ||i386-kfreebsd-gnu          ||32||386||/lib/ld.so.1||i?86i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ia64&#039;&#039;&#039;                      ||ia64-linux-gnu             ||64||IA_64||/lib/ld-linux-ia64.so.2||ia64||ia64||-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;loong64&#039;&#039;&#039;               ||loongarch64-linux-gnu      ||64||LOONGARCH||/lib64/ld-linux-loongarch-lp64d.so.1||loongarch64||loongarch64||loongarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;m68k&#039;&#039;&#039;             ||m68k-linux-gnu             ||32||68K||/lib/ld.so.1||m68k||m68k||m68k&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips&#039;&#039;&#039;         ||mips-linux-gnu             ||32||MIPS||/lib/ld.so.1||mips||mips||mips&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsel&#039;&#039;&#039;       ||mipsel-linux-gnu           ||32||MIPS||/lib/ld.so.1||mips||mips||mipsel&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64&#039;&#039;&#039;       ||mips64-linux-gnuabi64      ||  || || ||mips64||mips64||mips64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64el&#039;&#039;&#039;     ||mips64el-linux-gnuabi64    ||64||MIPS||/lib64/ld.so.1||mips64||mips64||mips64el&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32&#039;&#039;&#039;      ||mips64-linux-gnuabin32     ||  || || || || ||mipsn32&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32el&#039;&#039;&#039;    ||mips64el-linux-gnuabin32   ||  || || || || ||mipsn32el&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;powerpc&#039;&#039;&#039;       ||powerpc-linux-gnu          ||32||PPC||/lib/ld.so.1||ppc||ppc||ppc&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64&#039;&#039;&#039;           ||powerpc64-linux-gnu        ||64||PPC64||/lib64/ld64.so.1||ppc64||ppc64||ppc64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64el&#039;&#039;&#039;       ||powerpc64le-linux-gnu      ||64||PPC64||/lib64/ld64.so.2||ppcle ppc64le||ppc64||ppc64le&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;riscv64&#039;&#039;&#039;        ||riscv64-linux-gnu          ||64||RISCV||/lib/ld-linux-riscv64-lp64d.so.1 ||riscv64||riscv64||riscv64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390&#039;&#039;&#039;                      ||s390-linux-gnu             ||32||S390||/lib/ld.so.1||s390||s390||(s390x)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390x&#039;&#039;&#039;                     ||s390x-linux-gnu            ||64||S390||/lib/ld64.so.1||s390x||s390x||s390x&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sh4&#039;&#039;&#039;               ||sh4-linux-gnu              ||32||SH||/lib/ld-linux.so.2||sh||sh4||sh4&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc&#039;&#039;&#039;      ||sparc-linux-gnu            ||32||SPARC32PLUS||/lib/ld-linux.so.2||sparc||sparc||sparc(32plus)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc64&#039;&#039;&#039;       ||sparc64-linux-gnu          ||64||SPARCV9||/lib64/ld-linux.so.2||sparc64||sparc64||sparc64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;x32&#039;&#039;&#039;                       ||x86_64-linux-gnux32        ||32||X86_64||/libx32/ld-linux-x32.so.2||x86_64|| ||x86_64&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Alignment =&lt;br /&gt;
&lt;br /&gt;
Note that there is alignment on the machine language level and alignment in C. Proper misalignment (for example in a packed struct) is no problem in C and allowed almost everywhere (except of SPARC, where you will receive SIGBUS on a program execution, misaligned variable/memory access) and the compiler will do the right thing (like translating a read of a variable to two loads at machine language level). On the other hand most of the constructs that lead to unaligned access not properly handled by the C compiler (especially most constructs involving pointer casting) have undefined behaviour anyway, so compiling them with optimisation enabled can cause strange effects on all architectures. Read more on a Wikipedia article [https://en.wikipedia.org/wiki/Data_structure_alignment Data structure alignment].&lt;br /&gt;
&lt;br /&gt;
On the other hand, unaligned synchronization primitives (atomics, etc) tend to be unsupported or extremely slow.  Extra joy if they cross cacheline or page boundaries.&lt;br /&gt;
&lt;br /&gt;
== alpha ==&lt;br /&gt;
&lt;br /&gt;
Some alpha may emulate see [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/alpha/kernel/traps.c kernel source]&lt;br /&gt;
&lt;br /&gt;
== arc ==&lt;br /&gt;
&lt;br /&gt;
ARCv2 processors (ARC HS38 and ARC HS48 variants, 1-4 cores) support unaligned access in hardware, except for &amp;quot;atomic instructions&amp;quot; where special considerations apply. ARCv2 features 2 types of atomic instructions: the first for 32-bit data (&amp;quot;llock&amp;quot;/&amp;quot;scond&amp;quot; pair) and the second for 64-bit data (&amp;quot;llockd&amp;quot;/&amp;quot;scondd&amp;quot;). Those atomic instructions must work on data aligned naturally. I.e. &amp;quot;llock&amp;quot;/&amp;quot;scond&amp;quot; must be only used on 32-bit word-aligned data, &amp;quot;llockd&amp;quot;/&amp;quot;scondd&amp;quot; must be only used on 64-bit double-word aligned data. If an unaligned access is done by &amp;quot;atomic instruction&amp;quot; in user-space, the offending application gets forcefully killed with visible mention of a segmentation fault.  An unaligned access done by “atomic instruction” in kernel-mode will result in an unrecoverable &amp;quot;Illegal instruction&amp;quot; exception.&lt;br /&gt;
&lt;br /&gt;
== armel/armhf/arm64 ==&lt;br /&gt;
&lt;br /&gt;
High-level summary for software engineers: Don&#039;t do unaligned access.&lt;br /&gt;
It&#039;s always inefficient, sometimes extremely inefficient, and&lt;br /&gt;
in various cases is not permitted at all.&lt;br /&gt;
&lt;br /&gt;
The short answer for the ARM case is that ARMv6 and up guarantee&lt;br /&gt;
that the processor can be configured such that some unaligned&lt;br /&gt;
accesses are fine (or at least just inefficient). Linux by default&lt;br /&gt;
enable this mode and trap:&lt;br /&gt;
* All &amp;lt;=32-bit load/store operations can be unaligned.&lt;br /&gt;
* NEON load-stores can be unaligned (unless an explicit alignment is specified in the encoding).&lt;br /&gt;
&lt;br /&gt;
But:&lt;br /&gt;
* VFP load/stores must be naturally aligned.&lt;br /&gt;
* Load-multiple/store-multiple and ldrd/strd do not work with &amp;lt;32-bit alignment, but can sometimes get fixed up by the kernel at a substantial performance penalty.&lt;br /&gt;
&lt;br /&gt;
PUSH/POP usually requires 32-bit alignment, but then the ABI requires&lt;br /&gt;
64-bit alignment of the stack, so that is less of an issue.&lt;br /&gt;
&lt;br /&gt;
Unaligned load-exclusive/store-exclusive operations are not supported.&lt;br /&gt;
&lt;br /&gt;
No unaligned accesses are permitted to memory regions of Device or&lt;br /&gt;
Strongly-ordered type. But some permutation of this will be true for&lt;br /&gt;
most architectures, and in user-space this would only affect things&lt;br /&gt;
prodding /dev/mem or otherwise mmaping from a device driver.&lt;br /&gt;
&lt;br /&gt;
ARM64 similarly makes it possible to trap unaligned accesses, but if&lt;br /&gt;
that is not enabled (which it isn&#039;t by Linux), everything apart from&lt;br /&gt;
load-exclusive/store-exclusive, load-acquire/store-release and Device&lt;br /&gt;
memory accesses will be handled by hardware.&lt;br /&gt;
&lt;br /&gt;
== avr32 ==&lt;br /&gt;
&lt;br /&gt;
Unaligned access is ok for 32bits word but not for 16bits or 64bits word see [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/avr32/include/asm/unaligned.h kernel source]&lt;br /&gt;
&lt;br /&gt;
== i386/x32/amd64 ==&lt;br /&gt;
&lt;br /&gt;
Unaligned access is slower (but not as much as with other architectures as it is done in hardware and not in software). Moreover some MMX/SSE/vector operation need proper alignment.&lt;br /&gt;
&lt;br /&gt;
Unaligned sync primitives are supported, but there&#039;s active effort to defeature them, with Ice Lakes and newer allowing the kernel to trap.&lt;br /&gt;
&lt;br /&gt;
== ia64 ==&lt;br /&gt;
&lt;br /&gt;
Depending of config may fix with trap handler unaligned access&lt;br /&gt;
&lt;br /&gt;
== riscv64 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Short version&#039;&#039;&#039;: Don&#039;t use unaligned access.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Long version&#039;&#039;&#039;:&lt;br /&gt;
Technically the RISC-V ISA specification allows unaligned access for load and store instructions that are part of the base ISA, but only with significant limitations:&lt;br /&gt;
* Naturally aligned loads and stores are guaranteed to be atomic, but this is not the case for unaligned loads and stores. This can lead to hard-to-find bugs, so unaligned access should really be avoided.&lt;br /&gt;
* Support for unaligned access is usually not implemented in hardware and instead emulated in a trap handler, which makes it very slow.&lt;br /&gt;
&lt;br /&gt;
All synchronization primitives (LR/SC and the atomic memory read-modify-write operations (AMOs)) only allow naturally aligned access.&lt;br /&gt;
&lt;br /&gt;
= Floating point =&lt;br /&gt;
&lt;br /&gt;
First read academic paper about the [http://arxiv.org/abs/cs/0701192 pitfall] of doing multi arch floating point computation&lt;br /&gt;
and the classical &amp;quot;What Every Computer Scientist Should Know About Floating-Point Arithmetic&amp;quot; from [http://www.validlab.com/goldberg/paper.pdf here].&lt;br /&gt;
&lt;br /&gt;
== i386 ==&lt;br /&gt;
&lt;br /&gt;
i387 is a strange beast that suffer from excess precision. Moreover long double is only 80 bits&lt;br /&gt;
&lt;br /&gt;
Internal computation are done with 80 bits of precision that lead to strange and not intuitive result.&lt;br /&gt;
&lt;br /&gt;
== mips/mipsel/mips64el ==&lt;br /&gt;
&lt;br /&gt;
Some mips processors do not contain a hardware floating point unit. In this case the kernel will emulate all FPU instructions at a large performance cost.&lt;br /&gt;
&lt;br /&gt;
= C/C++ Preprocessor Symbols =&lt;br /&gt;
Generally, GNU C tends to define the symbol&lt;br /&gt;
&lt;br /&gt;
 __arch__&lt;br /&gt;
&lt;br /&gt;
A list of some common arch-specific symbols can be found on the [https://github.com/cpredef/predef/blob/master/Architectures.md Pre-defined Architecture Macros] page.&lt;br /&gt;
&lt;br /&gt;
= Signedness =&lt;br /&gt;
When programming in C, variables can be signed or unsigned.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
* `unsigned char c;` - explicit unsigned, 0 &amp;lt;= c &amp;lt;= 255&lt;br /&gt;
* `signed char c;` - explicit signed, -128 &amp;lt;= c &amp;lt;= 127&lt;br /&gt;
* `char c;` - implicit (un)signedness, depending on architecture&lt;br /&gt;
&lt;br /&gt;
To force a signedness, either declare it explicitly or use the gcc command line option -f(un)signed-char. The gcc defaults differ only due to optimisation. Other compilers may not have this issue.&lt;br /&gt;
&lt;br /&gt;
= Architecture baselines =&lt;br /&gt;
&lt;br /&gt;
Each Debian architecture has a &#039;&#039;baseline&#039;&#039; indicating the oldest or least capable CPU on which the architecture can be used. The baseline can change between Debian releases. The baseline is mostly defined by the gcc-&#039;&#039;N&#039;&#039; package, which is configured to produce baseline binaries when options like -march= are not used.&lt;br /&gt;
&lt;br /&gt;
If a package uses options that enable additional CPU features such as -msse in particular source files, then the maintainer of that package is responsible for [[InstructionSelection|making sure those CPU features are only used on CPUs that support them]]. ioquake3&#039;s Altivec support on PowerPC is an example of this technique.&lt;br /&gt;
&lt;br /&gt;
== amd64 ==&lt;br /&gt;
&lt;br /&gt;
x86_64 with no optional extensions (psABI baseline). The core specification includes MMX, SSE and SSE2 so these are OK, but SSE3 and up are not guaranteed. (The default is &#039;&#039;-march=x86-64&#039;&#039;, but not &#039;&#039;-march=x86-64-v2&#039;&#039; or later.)&lt;br /&gt;
&lt;br /&gt;
See [https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build psABI (Table 3.1: Micro-Architecture Levels)] for amd64 ABI level. Wikipedia summary: https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels&lt;br /&gt;
&lt;br /&gt;
== arc ==&lt;br /&gt;
&lt;br /&gt;
A fully featured ARC HS with additional support for double-precision FPU (&amp;quot;-mcpu=hs38_linux&amp;quot;). And this is a default &amp;quot;-mcpu&amp;quot; for ARC starting from GCC 11.&lt;br /&gt;
&lt;br /&gt;
To be more precise it&#039;s a baseline ARC HS with HW division (&amp;quot;-mdiv-rem&amp;quot;), atomic instructions (&amp;quot;-matomic&amp;quot;), 64-bit loads/stores	(&amp;quot;-mll64&amp;quot;), the most advanced multiplier (including quad half-word &amp;amp; vector operations, &amp;quot;-mmpy-option=plus_qmacw&amp;quot;) and double-precision FPU (&amp;quot;-mfpu=fpud_all&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
== arm64 ==&lt;br /&gt;
&lt;br /&gt;
aarch64 (ARMv8-A) with no optional extensions. VFPv4 and NEON are OK, but ARMv8.1-A and up are not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== armel ==&lt;br /&gt;
&lt;br /&gt;
armv5te since Debian 10 &#039;buster&#039; (gcc-8 8-20171215-1).&lt;br /&gt;
&lt;br /&gt;
Before that, armv4te.&lt;br /&gt;
&lt;br /&gt;
== armhf ==&lt;br /&gt;
&lt;br /&gt;
armv7 with VFPv3-D16 floating point. NEON is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== i386 ==&lt;br /&gt;
&lt;br /&gt;
* Pentium4 since Trixie.  This includes most notably SSE2. This was made necessary by LLVM&#039;s lack of support for processors without SSE2.&lt;br /&gt;
* i686 since [https://www.debian.org/releases/bookworm/i386/release-notes/ch-information.en.html#i386-is-i686 Debian 12 &#039;bookworm&#039;]. There&#039;s no MMX nor SSE.&lt;br /&gt;
* Before that, [https://salsa.debian.org/ddp-team/release-notes/-/blob/e7b4c032a94b02e31caff6cfdf7d71917ea00346/en/issues.dbk#L286-317 &amp;quot;almost&amp;quot;] i686 (no &amp;quot;long NOP&amp;quot;/NOPL) since Debian 9 &#039;stretch&#039; (gcc-6 6.1.1-1).&lt;br /&gt;
* Before that, i586 since gcc-4.9 4.9-20140411-1 (2014).&lt;br /&gt;
* Before that, i486 since gcc-4.1 4.1ds7-0exp7 (2006).&lt;br /&gt;
* Before that, i386.&lt;br /&gt;
&lt;br /&gt;
See [https://www.sco.com/developers/devspecs/abi386-4.pdf SYSTEM V APPLICATION BINARY INTERFACE], [https://www.uclibc.org/docs/psABI-i386.pdf Intel386 Architecture Processor Supplement] for more information. [https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build psABI (Table 3.1: Micro-Architecture Levels)] for amd64 ABI level may be also relevant, for newer ABI level.&lt;br /&gt;
&lt;br /&gt;
== mips, mipsel ==&lt;br /&gt;
&lt;br /&gt;
MIPS32R2 since Debian 9 &#039;stretch&#039;.&lt;br /&gt;
&lt;br /&gt;
Before that, MIPS II.&lt;br /&gt;
&lt;br /&gt;
== mips64el ==&lt;br /&gt;
&lt;br /&gt;
MIPS64R2 and up.&lt;br /&gt;
&lt;br /&gt;
== powerpc ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== powerpcspe ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is impossible, even with runtime detection.&lt;br /&gt;
&lt;br /&gt;
== ppc64 ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
(Initially Altivec was in the port baseline, but was [https://lists.debian.org/msgid-search/f06cd492-95eb-b0b3-f15c-d5c2501ec0d7@physik.fu-berlin.de later removed to support some embedded systems])&lt;br /&gt;
&lt;br /&gt;
== ppc64el ==&lt;br /&gt;
&lt;br /&gt;
POWER8 and up.&lt;br /&gt;
&lt;br /&gt;
== s390x ==&lt;br /&gt;
&lt;br /&gt;
z196 since Debian 10 &#039;buster&#039;.&lt;br /&gt;
&lt;br /&gt;
== loong64 ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown).&lt;br /&gt;
&lt;br /&gt;
= Obtaining this information =&lt;br /&gt;
&lt;br /&gt;
== via the dpkg build logs ==&lt;br /&gt;
&lt;br /&gt;
Starting with dpkg 1.22.0, its build process will print some of the architecture attributes as part of its configure summary.&lt;br /&gt;
&lt;br /&gt;
Search for «Arch attributes» in the [https://buildd.debian.org/status/package.php?p=dpkg dpkg build logs].&lt;br /&gt;
&lt;br /&gt;
== via the C pre-processor ==&lt;br /&gt;
&lt;br /&gt;
 echo | cpp -dM | sort&lt;br /&gt;
&lt;br /&gt;
== via a special tool ==&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;alloca.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stddef.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;time.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 static void test_size_align(const char *name, size_t size, size_t align) {&lt;br /&gt;
   printf(&amp;quot;sizeof(%s) = %zu\n&amp;quot;, name, size);&lt;br /&gt;
   if (size != align) printf(&amp;quot;alignment(%s) = %zu\n&amp;quot;, name, align);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 #define TEST_SIZE_ALIGN(type, name) \&lt;br /&gt;
   struct test_align_##name { char a; type b; }; \&lt;br /&gt;
   test_size_align(#type, sizeof(type), offsetof(struct test_align_##name, b))&lt;br /&gt;
 &lt;br /&gt;
 static void test_endian(void) {&lt;br /&gt;
 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__&lt;br /&gt;
   printf(&amp;quot;byte order = little endian\n&amp;quot;);&lt;br /&gt;
 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__&lt;br /&gt;
   printf(&amp;quot;byte order = big endian\n&amp;quot;);&lt;br /&gt;
 #endif&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void test_char(void) {&lt;br /&gt;
   if ((int)(char)-1 == -1) printf(&amp;quot;char signedness = signed\n&amp;quot;);&lt;br /&gt;
   else if ((int)(char)-1 == 255) printf(&amp;quot;char signedness = unsigned\n&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void test_stack(void) {&lt;br /&gt;
   void *a = alloca(8);&lt;br /&gt;
   void *b = alloca(8);&lt;br /&gt;
   if (a &amp;gt; b) printf(&amp;quot;stack = grows down\n&amp;quot;);&lt;br /&gt;
   else printf(&amp;quot;stack = grows up\n&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main(void) {&lt;br /&gt;
   TEST_SIZE_ALIGN(short, short);&lt;br /&gt;
   TEST_SIZE_ALIGN(int, int);&lt;br /&gt;
   TEST_SIZE_ALIGN(long, long);&lt;br /&gt;
   TEST_SIZE_ALIGN(long long, long_long);&lt;br /&gt;
   TEST_SIZE_ALIGN(float, float);&lt;br /&gt;
   TEST_SIZE_ALIGN(double, double);&lt;br /&gt;
   TEST_SIZE_ALIGN(long double, long_double);&lt;br /&gt;
   TEST_SIZE_ALIGN(void *, pointer);&lt;br /&gt;
   TEST_SIZE_ALIGN(time_t, time_t);&lt;br /&gt;
   test_endian();&lt;br /&gt;
   test_char();&lt;br /&gt;
   test_stack();&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== via autoconf ==&lt;br /&gt;
&lt;br /&gt;
 AC_INIT(archtest, 0.1)&lt;br /&gt;
 AC_CHECK_SIZEOF(short)&lt;br /&gt;
 AC_CHECK_SIZEOF(int)&lt;br /&gt;
 AC_CHECK_SIZEOF(long)&lt;br /&gt;
 AC_CHECK_SIZEOF(long long)&lt;br /&gt;
 AC_CHECK_SIZEOF(float)&lt;br /&gt;
 AC_CHECK_SIZEOF(double)&lt;br /&gt;
 AC_CHECK_SIZEOF(long double)&lt;br /&gt;
 AC_CHECK_SIZEOF(void*)&lt;br /&gt;
 AC_C_BIGENDIAN()&lt;br /&gt;
 AC_C_CHAR_UNSIGNED()&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* Information about [Haskell/GHC Haskell] on different architectures.&lt;br /&gt;
* [https://github.com/cpredef/predef/blob/master/Architectures.md Pre-defined Compiler Macros Wiki - Architectures]&lt;br /&gt;
* [https://gcc.gnu.org/onlinedocs/cpp/Predefined-Macros.html GCC Predefined Macros]&lt;br /&gt;
* [InstructionSelection Instruction Selection]&lt;br /&gt;
* [Multiarch/Tuples]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Ports]]&lt;/div&gt;</summary>
		<author><name>Zeha</name></author>
	</entry>
	<entry>
		<id>https://wiki2025.debian.org/index.php?title=ArchitectureSpecificsMemo&amp;diff=9</id>
		<title>ArchitectureSpecificsMemo</title>
		<link rel="alternate" type="text/html" href="https://wiki2025.debian.org/index.php?title=ArchitectureSpecificsMemo&amp;diff=9"/>
		<updated>2025-07-18T21:54:27Z</updated>

		<summary type="html">&lt;p&gt;Zeha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
This page is a &#039;&#039;&#039;draft&#039;&#039;&#039;. Please help enhancing it by adding lines and filling tables. Comments at the bottom of the text are also welcome.&lt;br /&gt;
&lt;br /&gt;
This is just a quick array to recall some of the specifics of the architectures found in the Debian project.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!sizeof(short)&lt;br /&gt;
!sizeof(int)&lt;br /&gt;
!sizeof(long)&lt;br /&gt;
!sizeof(long long)&lt;br /&gt;
!sizeof(float)&lt;br /&gt;
!sizeof(double)&lt;br /&gt;
|-&lt;br /&gt;
|| &#039;&#039;&#039;any&#039;&#039;&#039; || 2 || 4 || sizeof(void *) || 8 || 4 || 8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!sizeof(void*)&lt;br /&gt;
!sizeof(long double)&lt;br /&gt;
!max_align_t alignment&lt;br /&gt;
!char&lt;br /&gt;
!endian&lt;br /&gt;
!stack grows&lt;br /&gt;
!page sizes&lt;br /&gt;
User-visible page size returned by &amp;lt;code&amp;gt;getauxval(AT_PAGESZ)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;getconf PAGESIZE&amp;lt;/code&amp;gt;, the granularity of the memory map&lt;br /&gt;
!float&lt;br /&gt;
H=hard, S=soft, P=partial, +=excess precision, ~=not usual standard&lt;br /&gt;
!double&lt;br /&gt;
Note that the columns refer to C types. H=hard, S=soft, P=partial, +=excess precision, ~=not usual standard)&lt;br /&gt;
!long double&lt;br /&gt;
Note that the columns refer to C types. H=hard, S=soft, P=partial, +=excess precision,-=long double precision &amp;lt; __float128, ~=not usual standard)&lt;br /&gt;
!sizeof(time_t)&lt;br /&gt;
With &amp;lt;code&amp;gt;_TIME_BITS=64&amp;lt;/code&amp;gt; the size is 8 on all archs&lt;br /&gt;
!GCC pre-defined macro(s)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;alpha&#039;&#039;&#039;&lt;br /&gt;
||8&lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||16||signed||LE||down||8K||?||?||?||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__alpha__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;any-amd64, amd64, kfreebsd-amd64, hurd-amd64&#039;&#039;&#039; ||8||16||16||signed||LE||down||4K ||H||H&lt;br /&gt;
||H-&lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__x86_64__ &amp;amp;&amp;amp; __LP64__&amp;lt;/code&amp;gt; it&#039;s a common gotcha for x32, you need to use &amp;lt;code&amp;gt;__LP64__&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;__ILP32__&amp;lt;/code&amp;gt; to tell them apart&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arc&#039;&#039;&#039;                       ||4 ||16||?||unsigned||LE||down||8K       ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__arc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm&#039;&#039;&#039;                       ||4 ||? ||8||unsigned||LE||down||?        ||S ||S ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64&#039;&#039;&#039;       ||8 ||16||16||unsigned||LE||down||4K, 16K, 64K ||H ||H ||S ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__aarch64__ &amp;amp;&amp;amp; __LP64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64ilp32&#039;&#039;&#039;       ||4 ||16||?||unsigned||LE||down||4K, 16K, 64K ||H ||H ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__aarch64__ &amp;amp;&amp;amp; __ILP32__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armel&#039;&#039;&#039;     ||4 ||8 ||8||unsigned||LE||down||4K       ||S ||S ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__ &amp;amp;&amp;amp; __ARM_EABI__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armhf&#039;&#039;&#039;||4 ||8 ||8||unsigned||LE||down||4K       ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__ &amp;amp;&amp;amp; __ARM_EABI__ &amp;amp;&amp;amp; __ARM_PCS_VFP&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;avr32&#039;&#039;&#039;                     ||4 ||8 ||?||unsigned||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hppa&#039;&#039;&#039;                      ||4 ||8 ||8||  signed||BE||up  ||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__hppa__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;any-i386i386, kfreebsd-i386, hurd-i386&#039;&#039;&#039; ||                                       4||12||168 prior to GCC 7||  signed||LE||down||4K ||H+||H+&lt;br /&gt;
||H- &lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__i386__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ia64&#039;&#039;&#039;                     ||8 ||16||16||  signed||LE&lt;br /&gt;
||both&lt;br /&gt;
The conventional stack grows down from the top of the stack mapping, but there is also the Register Backing Store which grows up from the bottom of the stack mapping at the same time&lt;br /&gt;
||?        ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__ia64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;loong64&#039;&#039;&#039;               ||8 ||16||16||  signed||LE||down||4K-64K   ||H ||H ||S ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__loongarch__ &amp;amp;&amp;amp; __loongarch_lp64 &amp;amp;&amp;amp; __loongarch_double_float&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;m68k&#039;&#039;&#039;             ||4 ||12||2||  signed||BE||down||4K       ||S?||S?||S?||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__m68k__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips&#039;&#039;&#039;         ||4 ||8 ||8||  signed||BE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABIO32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsel&#039;&#039;&#039;       ||4 ||8 ||8||  signed||LE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABIO32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64&#039;&#039;&#039;     ||8 ||16||16||  signed||BE||down||4K-64K   ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABI64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64el&#039;&#039;&#039;     ||8 ||16||16||  signed||LE||down||4K-64K   ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABI64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32&#039;&#039;&#039;         ||4 ||8 ||?||  signed||BE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABIN32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32el&#039;&#039;&#039;       ||4 ||8 ||?||  signed||LE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABIN32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;powerpc&#039;&#039;&#039;       ||4 &lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||16||                                              unsigned||BE||down||4K-64K   ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64&#039;&#039;&#039;           ||8 ||16||16||unsigned||BE||down||4K-64K   ||? ||? ||? ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__ &amp;amp;&amp;amp; __powerpc64__ &amp;amp;&amp;amp; __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64el&#039;&#039;&#039;       ||8 ||16||16||unsigned||LE||down||4K-64K-16M||H||H ||H~||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__ &amp;amp;&amp;amp; __ppc64__ &amp;amp;&amp;amp; __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;riscv64&#039;&#039;&#039;&lt;br /&gt;
||8 &lt;br /&gt;
||16(8)&lt;br /&gt;
The RV64 ISA spec defines long double as 16 bytes, but older toolchains (pre-&amp;quot;riscv-gcc-6.1.0&amp;quot;) have implemented long double as 8 bytes on RV64; cf. https://github.com/riscv/riscv-gcc/commit/54b21fc5ae83cefec44bc2caed4a8c664c274ba0&lt;br /&gt;
||16||unsigned||LE||down||4K 4k is the default page size on all RISC-V systems. Depending on the chosen virtual memory mode (Sv32/Sv39/Sv48) additional page sizes are available as well: Sv32 supports 4k and 4M pages, Sv39 supports 4k, 2M and 1G pages and Sv48 supports 4k,  2M, 1G, and 512G pages       ||H ||H ||H~||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__riscv &amp;amp;&amp;amp; __riscv_xlen==64&amp;lt;/code&amp;gt;&lt;br /&gt;
Older, pre-mainline RISC-V toolchains used &amp;lt;code&amp;gt;__riscv__ &amp;amp;&amp;amp; __riscv64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390&#039;&#039;&#039;                      ||4&lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||?||                                              unsigned||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__s390__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390x&#039;&#039;&#039;                     ||8 ||16||8||unsigned||BE||down||4K, 1M, 2G       ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__s390x__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sh4&#039;&#039;&#039;               ||4 ||8 ||4||  signed||LE||down||4K       ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__sh__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc&#039;&#039;&#039;      ||4 &lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||?||                                                signed||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__sparc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc64&#039;&#039;&#039;       ||8 ||16||16||  signed||BE||down||8K, 64K, 512K, 4M, 32M, 256M, 2G, 16G||? ||? ||? ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__sparc__ &amp;amp;&amp;amp; __arch64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;x32&#039;&#039;&#039;                       ||4 ||16||16||  signed||LE||down||4K ||H ||H &lt;br /&gt;
||H-&lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__x86_64__ &amp;amp;&amp;amp; __ILP32__&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!multiarch&lt;br /&gt;
!ELFCLASS&lt;br /&gt;
!ELF machine EM_&lt;br /&gt;
!ld.so(8)&lt;br /&gt;
!uname -mUsed to classify CPU architectures in CMake and many ad-hoc build systems, but note that this is a kernel and/or libc specific name despite referring to the CPU&lt;br /&gt;
!Meson[https://mesonbuild.com/Reference-tables.html Reference table] of Meson hardware architecture names&lt;br /&gt;
!qemue.g. i386 results in qemu(-system)-i386(-static)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;alpha&#039;&#039;&#039;                     ||alpha-linux-gnu            ||64||ALPHA||/lib/ld-linux.so.2||alpha||alpha|| alpha&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;amd64&#039;&#039;&#039;                     ||x86_64-linux-gnu           ||64||X86_64||/lib64/ld-linux-x86-64.so.2||x86_64||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hurd-amd64&#039;&#039;&#039;                ||x86_64-gnu                 ||64||X86_64||/lib/ld-x86-64.so||x86_64-AT386||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;kfreebsd-amd64&#039;&#039;&#039;            ||x86_64-kfreebsd-gnu        ||64||X86_64||/lib/ld-kfreebsd-x86-64.so.1||x86_64||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arc&#039;&#039;&#039;                       ||arc-linux-gnu              ||32||ARC_COMPACT2||/lib/ld-linux-arc.so.2||arc||arc||-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm&#039;&#039;&#039;                       ||arm-linux-gnu              ||32||ARM||/lib/ld-linux.so.2&lt;br /&gt;
||arm*&lt;br /&gt;
Many names starting with arm, e.g. armv5tel&lt;br /&gt;
||arm&lt;br /&gt;
||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64&#039;&#039;&#039;       ||aarch64-linux-gnu          ||64||AARCH64||/lib/ld-linux-aarch64.so.1||aarch64||aarch64||aarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64ilp32&#039;&#039;&#039;||aarch64-linux-gnu_ilp32 ||32?||AARCH64?|| ||aarch64?|| || aarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armel&#039;&#039;&#039;     ||arm-linux-gnueabi          ||32||ARM||/lib/ld-linux.so.3||arm*||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armhf&#039;&#039;&#039;||arm-linux-gnueabihf        ||32||ARM||/lib/ld-linux-armhf.so.3||arm*||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;avr32&#039;&#039;&#039;                     ||                           ||  || || || ||avr||avrqemu-system-avr only&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hppa&#039;&#039;&#039;                      ||hppa-linux-gnu             ||32||PARISC||/lib/ld.so.1||parisc*||parisc||hppa&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;i386&#039;&#039;&#039;                      ||i386-linux-gnu             ||32||386||/lib/ld-linux.so.2||i?86i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hurd-i386&#039;&#039;&#039;                 ||i386-gnu                   ||32||386||/lib/ld.so||i?86-AT386i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;kfreebsd-i386&#039;&#039;&#039;             ||i386-kfreebsd-gnu          ||32||386||/lib/ld.so.1||i?86i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ia64&#039;&#039;&#039;                      ||ia64-linux-gnu             ||64||IA_64||/lib/ld-linux-ia64.so.2||ia64||ia64||-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;loong64&#039;&#039;&#039;               ||loongarch64-linux-gnu      ||64||LOONGARCH||/lib64/ld-linux-loongarch-lp64d.so.1||loongarch64||loongarch64||loongarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;m68k&#039;&#039;&#039;             ||m68k-linux-gnu             ||32||68K||/lib/ld.so.1||m68k||m68k||m68k&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips&#039;&#039;&#039;         ||mips-linux-gnu             ||32||MIPS||/lib/ld.so.1||mips||mips||mips&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsel&#039;&#039;&#039;       ||mipsel-linux-gnu           ||32||MIPS||/lib/ld.so.1||mips||mips||mipsel&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64&#039;&#039;&#039;       ||mips64-linux-gnuabi64      ||  || || ||mips64||mips64||mips64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64el&#039;&#039;&#039;     ||mips64el-linux-gnuabi64    ||64||MIPS||/lib64/ld.so.1||mips64||mips64||mips64el&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32&#039;&#039;&#039;      ||mips64-linux-gnuabin32     ||  || || || || ||mipsn32&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32el&#039;&#039;&#039;    ||mips64el-linux-gnuabin32   ||  || || || || ||mipsn32el&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;powerpc&#039;&#039;&#039;       ||powerpc-linux-gnu          ||32||PPC||/lib/ld.so.1||ppc||ppc||ppc&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64&#039;&#039;&#039;           ||powerpc64-linux-gnu        ||64||PPC64||/lib64/ld64.so.1||ppc64||ppc64||ppc64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64el&#039;&#039;&#039;       ||powerpc64le-linux-gnu      ||64||PPC64||/lib64/ld64.so.2||ppcle ppc64le||ppc64||ppc64le&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;riscv64&#039;&#039;&#039;        ||riscv64-linux-gnu          ||64||RISCV||/lib/ld-linux-riscv64-lp64d.so.1 ||riscv64||riscv64||riscv64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390&#039;&#039;&#039;                      ||s390-linux-gnu             ||32||S390||/lib/ld.so.1||s390||s390||(s390x)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390x&#039;&#039;&#039;                     ||s390x-linux-gnu            ||64||S390||/lib/ld64.so.1||s390x||s390x||s390x&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sh4&#039;&#039;&#039;               ||sh4-linux-gnu              ||32||SH||/lib/ld-linux.so.2||sh||sh4||sh4&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc&#039;&#039;&#039;      ||sparc-linux-gnu            ||32||SPARC32PLUS||/lib/ld-linux.so.2||sparc||sparc||sparc(32plus)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc64&#039;&#039;&#039;       ||sparc64-linux-gnu          ||64||SPARCV9||/lib64/ld-linux.so.2||sparc64||sparc64||sparc64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;x32&#039;&#039;&#039;                       ||x86_64-linux-gnux32        ||32||X86_64||/libx32/ld-linux-x32.so.2||x86_64|| ||x86_64&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Alignment =&lt;br /&gt;
&lt;br /&gt;
Note that there is alignment on the machine language level and alignment in C. Proper misalignment (for example in a packed struct) is no problem in C and allowed almost everywhere (except of SPARC, where you will receive SIGBUS on a program execution, misaligned variable/memory access) and the compiler will do the right thing (like translating a read of a variable to two loads at machine language level). On the other hand most of the constructs that lead to unaligned access not properly handled by the C compiler (especially most constructs involving pointer casting) have undefined behaviour anyway, so compiling them with optimisation enabled can cause strange effects on all architectures. Read more on a Wikipedia article [https://en.wikipedia.org/wiki/Data_structure_alignment Data structure alignment].&lt;br /&gt;
&lt;br /&gt;
On the other hand, unaligned synchronization primitives (atomics, etc) tend to be unsupported or extremely slow.  Extra joy if they cross cacheline or page boundaries.&lt;br /&gt;
&lt;br /&gt;
== alpha ==&lt;br /&gt;
&lt;br /&gt;
Some alpha may emulate see [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/alpha/kernel/traps.c kernel source]&lt;br /&gt;
&lt;br /&gt;
== arc ==&lt;br /&gt;
&lt;br /&gt;
ARCv2 processors (ARC HS38 and ARC HS48 variants, 1-4 cores) support unaligned access in hardware, except for &amp;quot;atomic instructions&amp;quot; where special considerations apply. ARCv2 features 2 types of atomic instructions: the first for 32-bit data (&amp;quot;llock&amp;quot;/&amp;quot;scond&amp;quot; pair) and the second for 64-bit data (&amp;quot;llockd&amp;quot;/&amp;quot;scondd&amp;quot;). Those atomic instructions must work on data aligned naturally. I.e. &amp;quot;llock&amp;quot;/&amp;quot;scond&amp;quot; must be only used on 32-bit word-aligned data, &amp;quot;llockd&amp;quot;/&amp;quot;scondd&amp;quot; must be only used on 64-bit double-word aligned data. If an unaligned access is done by &amp;quot;atomic instruction&amp;quot; in user-space, the offending application gets forcefully killed with visible mention of a segmentation fault.  An unaligned access done by “atomic instruction” in kernel-mode will result in an unrecoverable &amp;quot;Illegal instruction&amp;quot; exception.&lt;br /&gt;
&lt;br /&gt;
== armel/armhf/arm64 ==&lt;br /&gt;
&lt;br /&gt;
High-level summary for software engineers: Don&#039;t do unaligned access.&lt;br /&gt;
It&#039;s always inefficient, sometimes extremely inefficient, and&lt;br /&gt;
in various cases is not permitted at all.&lt;br /&gt;
&lt;br /&gt;
The short answer for the ARM case is that ARMv6 and up guarantee&lt;br /&gt;
that the processor can be configured such that some unaligned&lt;br /&gt;
accesses are fine (or at least just inefficient). Linux by default&lt;br /&gt;
enable this mode and trap:&lt;br /&gt;
* All &amp;lt;=32-bit load/store operations can be unaligned.&lt;br /&gt;
* NEON load-stores can be unaligned (unless an explicit alignment is specified in the encoding).&lt;br /&gt;
&lt;br /&gt;
But:&lt;br /&gt;
* VFP load/stores must be naturally aligned.&lt;br /&gt;
* Load-multiple/store-multiple and ldrd/strd do not work with &amp;lt;32-bit alignment, but can sometimes get fixed up by the kernel at a substantial performance penalty.&lt;br /&gt;
&lt;br /&gt;
PUSH/POP usually requires 32-bit alignment, but then the ABI requires&lt;br /&gt;
64-bit alignment of the stack, so that is less of an issue.&lt;br /&gt;
&lt;br /&gt;
Unaligned load-exclusive/store-exclusive operations are not supported.&lt;br /&gt;
&lt;br /&gt;
No unaligned accesses are permitted to memory regions of Device or&lt;br /&gt;
Strongly-ordered type. But some permutation of this will be true for&lt;br /&gt;
most architectures, and in user-space this would only affect things&lt;br /&gt;
prodding /dev/mem or otherwise mmaping from a device driver.&lt;br /&gt;
&lt;br /&gt;
ARM64 similarly makes it possible to trap unaligned accesses, but if&lt;br /&gt;
that is not enabled (which it isn&#039;t by Linux), everything apart from&lt;br /&gt;
load-exclusive/store-exclusive, load-acquire/store-release and Device&lt;br /&gt;
memory accesses will be handled by hardware.&lt;br /&gt;
&lt;br /&gt;
== avr32 ==&lt;br /&gt;
&lt;br /&gt;
Unaligned access is ok for 32bits word but not for 16bits or 64bits word see [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/avr32/include/asm/unaligned.h kernel source]&lt;br /&gt;
&lt;br /&gt;
== i386/x32/amd64 ==&lt;br /&gt;
&lt;br /&gt;
Unaligned access is slower (but not as much as with other architectures as it is done in hardware and not in software). Moreover some MMX/SSE/vector operation need proper alignment.&lt;br /&gt;
&lt;br /&gt;
Unaligned sync primitives are supported, but there&#039;s active effort to defeature them, with Ice Lakes and newer allowing the kernel to trap.&lt;br /&gt;
&lt;br /&gt;
== ia64 ==&lt;br /&gt;
&lt;br /&gt;
Depending of config may fix with trap handler unaligned access&lt;br /&gt;
&lt;br /&gt;
== riscv64 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Short version&#039;&#039;&#039;: Don&#039;t use unaligned access.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Long version&#039;&#039;&#039;:&lt;br /&gt;
Technically the RISC-V ISA specification allows unaligned access for load and store instructions that are part of the base ISA, but only with significant limitations:&lt;br /&gt;
* Naturally aligned loads and stores are guaranteed to be atomic, but this is not the case for unaligned loads and stores. This can lead to hard-to-find bugs, so unaligned access should really be avoided.&lt;br /&gt;
* Support for unaligned access is usually not implemented in hardware and instead emulated in a trap handler, which makes it very slow.&lt;br /&gt;
&lt;br /&gt;
All synchronization primitives (LR/SC and the atomic memory read-modify-write operations (AMOs)) only allow naturally aligned access.&lt;br /&gt;
&lt;br /&gt;
= Floating point =&lt;br /&gt;
&lt;br /&gt;
First read academic paper about the [http://arxiv.org/abs/cs/0701192 pitfall] of doing multi arch floating point computation&lt;br /&gt;
and the classical &amp;quot;What Every Computer Scientist Should Know About Floating-Point Arithmetic&amp;quot; from [http://www.validlab.com/goldberg/paper.pdf here].&lt;br /&gt;
&lt;br /&gt;
== i386 ==&lt;br /&gt;
&lt;br /&gt;
i387 is a strange beast that suffer from excess precision. Moreover long double is only 80 bits&lt;br /&gt;
&lt;br /&gt;
Internal computation are done with 80 bits of precision that lead to strange and not intuitive result.&lt;br /&gt;
&lt;br /&gt;
== mips/mipsel/mips64el ==&lt;br /&gt;
&lt;br /&gt;
Some mips processors do not contain a hardware floating point unit. In this case the kernel will emulate all FPU instructions at a large performance cost.&lt;br /&gt;
&lt;br /&gt;
= C/C++ Preprocessor Symbols =&lt;br /&gt;
Generally, GNU C tends to define the symbol&lt;br /&gt;
&lt;br /&gt;
 __arch__&lt;br /&gt;
&lt;br /&gt;
A list of some common arch-specific symbols can be found on the [https://github.com/cpredef/predef/blob/master/Architectures.md Pre-defined Architecture Macros] page.&lt;br /&gt;
&lt;br /&gt;
= Signedness =&lt;br /&gt;
When programming in C, variables can be signed or unsigned.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
* `unsigned char c;` - explicit unsigned, 0 &amp;lt;= c &amp;lt;= 255&lt;br /&gt;
* `signed char c;` - explicit signed, -128 &amp;lt;= c &amp;lt;= 127&lt;br /&gt;
* `char c;` - implicit (un)signedness, depending on architecture&lt;br /&gt;
&lt;br /&gt;
To force a signedness, either declare it explicitly or use the gcc command line option -f(un)signed-char. The gcc defaults differ only due to optimisation. Other compilers may not have this issue.&lt;br /&gt;
&lt;br /&gt;
= Architecture baselines =&lt;br /&gt;
&lt;br /&gt;
Each Debian architecture has a &#039;&#039;baseline&#039;&#039; indicating the oldest or least capable CPU on which the architecture can be used. The baseline can change between Debian releases. The baseline is mostly defined by the gcc-&#039;&#039;N&#039;&#039; package, which is configured to produce baseline binaries when options like -march= are not used.&lt;br /&gt;
&lt;br /&gt;
If a package uses options that enable additional CPU features such as -msse in particular source files, then the maintainer of that package is responsible for [[InstructionSelection|making sure those CPU features are only used on CPUs that support them]]. ioquake3&#039;s Altivec support on PowerPC is an example of this technique.&lt;br /&gt;
&lt;br /&gt;
== amd64 ==&lt;br /&gt;
&lt;br /&gt;
x86_64 with no optional extensions (psABI baseline). The core specification includes MMX, SSE and SSE2 so these are OK, but SSE3 and up are not guaranteed. (The default is &#039;&#039;-march=x86-64&#039;&#039;, but not &#039;&#039;-march=x86-64-v2&#039;&#039; or later.)&lt;br /&gt;
&lt;br /&gt;
See [https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build psABI (Table 3.1: Micro-Architecture Levels)] for amd64 ABI level. Wikipedia summary: https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels&lt;br /&gt;
&lt;br /&gt;
== arc ==&lt;br /&gt;
&lt;br /&gt;
A fully featured ARC HS with additional support for double-precision FPU (&amp;quot;-mcpu=hs38_linux&amp;quot;). And this is a default &amp;quot;-mcpu&amp;quot; for ARC starting from GCC 11.&lt;br /&gt;
&lt;br /&gt;
To be more precise it&#039;s a baseline ARC HS with HW division (&amp;quot;-mdiv-rem&amp;quot;), atomic instructions (&amp;quot;-matomic&amp;quot;), 64-bit loads/stores	(&amp;quot;-mll64&amp;quot;), the most advanced multiplier (including quad half-word &amp;amp; vector operations, &amp;quot;-mmpy-option=plus_qmacw&amp;quot;) and double-precision FPU (&amp;quot;-mfpu=fpud_all&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
== arm64 ==&lt;br /&gt;
&lt;br /&gt;
aarch64 (ARMv8-A) with no optional extensions. VFPv4 and NEON are OK, but ARMv8.1-A and up are not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== armel ==&lt;br /&gt;
&lt;br /&gt;
armv5te since Debian 10 &#039;buster&#039; (gcc-8 8-20171215-1).&lt;br /&gt;
&lt;br /&gt;
Before that, armv4te.&lt;br /&gt;
&lt;br /&gt;
== armhf ==&lt;br /&gt;
&lt;br /&gt;
armv7 with VFPv3-D16 floating point. NEON is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== i386 ==&lt;br /&gt;
&lt;br /&gt;
* Pentium4 since Trixie.  This includes most notably SSE2. This was made necessary by LLVM&#039;s lack of support for processors without SSE2.&lt;br /&gt;
* i686 since [https://www.debian.org/releases/bookworm/i386/release-notes/ch-information.en.html#i386-is-i686 Debian 12 &#039;bookworm&#039;]. There&#039;s no MMX nor SSE.&lt;br /&gt;
* Before that, [https://salsa.debian.org/ddp-team/release-notes/-/blob/e7b4c032a94b02e31caff6cfdf7d71917ea00346/en/issues.dbk#L286-317 &amp;quot;almost&amp;quot;] i686 (no &amp;quot;long NOP&amp;quot;/NOPL) since Debian 9 &#039;stretch&#039; (gcc-6 6.1.1-1).&lt;br /&gt;
* Before that, i586 since gcc-4.9 4.9-20140411-1 (2014).&lt;br /&gt;
* Before that, i486 since gcc-4.1 4.1ds7-0exp7 (2006).&lt;br /&gt;
* Before that, i386.&lt;br /&gt;
&lt;br /&gt;
See [https://www.sco.com/developers/devspecs/abi386-4.pdf SYSTEM V APPLICATION BINARY INTERFACE], [https://www.uclibc.org/docs/psABI-i386.pdf Intel386 Architecture Processor Supplement] for more information. [https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build psABI (Table 3.1: Micro-Architecture Levels)] for amd64 ABI level may be also relevant, for newer ABI level.&lt;br /&gt;
&lt;br /&gt;
== mips, mipsel ==&lt;br /&gt;
&lt;br /&gt;
MIPS32R2 since Debian 9 &#039;stretch&#039;.&lt;br /&gt;
&lt;br /&gt;
Before that, MIPS II.&lt;br /&gt;
&lt;br /&gt;
== mips64el ==&lt;br /&gt;
&lt;br /&gt;
MIPS64R2 and up.&lt;br /&gt;
&lt;br /&gt;
== powerpc ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== powerpcspe ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is impossible, even with runtime detection.&lt;br /&gt;
&lt;br /&gt;
== ppc64 ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
(Initially Altivec was in the port baseline, but was [https://lists.debian.org/msgid-search/f06cd492-95eb-b0b3-f15c-d5c2501ec0d7@physik.fu-berlin.de later removed to support some embedded systems])&lt;br /&gt;
&lt;br /&gt;
== ppc64el ==&lt;br /&gt;
&lt;br /&gt;
POWER8 and up.&lt;br /&gt;
&lt;br /&gt;
== s390x ==&lt;br /&gt;
&lt;br /&gt;
z196 since Debian 10 &#039;buster&#039;.&lt;br /&gt;
&lt;br /&gt;
== loong64 ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown).&lt;br /&gt;
&lt;br /&gt;
= Obtaining this information =&lt;br /&gt;
&lt;br /&gt;
== via the dpkg build logs ==&lt;br /&gt;
&lt;br /&gt;
Starting with dpkg 1.22.0, its build process will print some of the architecture attributes as part of its configure summary.&lt;br /&gt;
&lt;br /&gt;
Search for «Arch attributes» in the [https://buildd.debian.org/status/package.php?p=dpkg dpkg build logs].&lt;br /&gt;
&lt;br /&gt;
== via the C pre-processor ==&lt;br /&gt;
&lt;br /&gt;
 echo | cpp -dM | sort&lt;br /&gt;
&lt;br /&gt;
== via a special tool ==&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;alloca.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stddef.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;time.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 static void test_size_align(const char *name, size_t size, size_t align) {&lt;br /&gt;
   printf(&amp;quot;sizeof(%s) = %zu\n&amp;quot;, name, size);&lt;br /&gt;
   if (size != align) printf(&amp;quot;alignment(%s) = %zu\n&amp;quot;, name, align);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 #define TEST_SIZE_ALIGN(type, name) \&lt;br /&gt;
   struct test_align_##name { char a; type b; }; \&lt;br /&gt;
   test_size_align(#type, sizeof(type), offsetof(struct test_align_##name, b))&lt;br /&gt;
 &lt;br /&gt;
 static void test_endian(void) {&lt;br /&gt;
 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__&lt;br /&gt;
   printf(&amp;quot;byte order = little endian\n&amp;quot;);&lt;br /&gt;
 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__&lt;br /&gt;
   printf(&amp;quot;byte order = big endian\n&amp;quot;);&lt;br /&gt;
 #endif&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void test_char(void) {&lt;br /&gt;
   if ((int)(char)-1 == -1) printf(&amp;quot;char signedness = signed\n&amp;quot;);&lt;br /&gt;
   else if ((int)(char)-1 == 255) printf(&amp;quot;char signedness = unsigned\n&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void test_stack(void) {&lt;br /&gt;
   void *a = alloca(8);&lt;br /&gt;
   void *b = alloca(8);&lt;br /&gt;
   if (a &amp;gt; b) printf(&amp;quot;stack = grows down\n&amp;quot;);&lt;br /&gt;
   else printf(&amp;quot;stack = grows up\n&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main(void) {&lt;br /&gt;
   TEST_SIZE_ALIGN(short, short);&lt;br /&gt;
   TEST_SIZE_ALIGN(int, int);&lt;br /&gt;
   TEST_SIZE_ALIGN(long, long);&lt;br /&gt;
   TEST_SIZE_ALIGN(long long, long_long);&lt;br /&gt;
   TEST_SIZE_ALIGN(float, float);&lt;br /&gt;
   TEST_SIZE_ALIGN(double, double);&lt;br /&gt;
   TEST_SIZE_ALIGN(long double, long_double);&lt;br /&gt;
   TEST_SIZE_ALIGN(void *, pointer);&lt;br /&gt;
   TEST_SIZE_ALIGN(time_t, time_t);&lt;br /&gt;
   test_endian();&lt;br /&gt;
   test_char();&lt;br /&gt;
   test_stack();&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== via autoconf ==&lt;br /&gt;
&lt;br /&gt;
 AC_INIT(archtest, 0.1)&lt;br /&gt;
 AC_CHECK_SIZEOF(short)&lt;br /&gt;
 AC_CHECK_SIZEOF(int)&lt;br /&gt;
 AC_CHECK_SIZEOF(long)&lt;br /&gt;
 AC_CHECK_SIZEOF(long long)&lt;br /&gt;
 AC_CHECK_SIZEOF(float)&lt;br /&gt;
 AC_CHECK_SIZEOF(double)&lt;br /&gt;
 AC_CHECK_SIZEOF(long double)&lt;br /&gt;
 AC_CHECK_SIZEOF(void*)&lt;br /&gt;
 AC_C_BIGENDIAN()&lt;br /&gt;
 AC_C_CHAR_UNSIGNED()&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* Information about [Haskell/GHC Haskell] on different architectures.&lt;br /&gt;
* [https://github.com/cpredef/predef/blob/master/Architectures.md Pre-defined Compiler Macros Wiki - Architectures]&lt;br /&gt;
* [https://gcc.gnu.org/onlinedocs/cpp/Predefined-Macros.html GCC Predefined Macros]&lt;br /&gt;
* [InstructionSelection Instruction Selection]&lt;br /&gt;
* [Multiarch/Tuples]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Ports]]&lt;/div&gt;</summary>
		<author><name>Zeha</name></author>
	</entry>
	<entry>
		<id>https://wiki2025.debian.org/index.php?title=ArchitectureSpecificsMemo&amp;diff=8</id>
		<title>ArchitectureSpecificsMemo</title>
		<link rel="alternate" type="text/html" href="https://wiki2025.debian.org/index.php?title=ArchitectureSpecificsMemo&amp;diff=8"/>
		<updated>2025-07-18T21:53:47Z</updated>

		<summary type="html">&lt;p&gt;Zeha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
This page is a &#039;&#039;&#039;draft&#039;&#039;&#039;. Please help enhancing it by adding lines and filling tables. Comments at the bottom of the text are also welcome.&lt;br /&gt;
&lt;br /&gt;
This is just a quick array to recall some of the specifics of the architectures found in the Debian project.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!sizeof(short)&lt;br /&gt;
!sizeof(int)&lt;br /&gt;
!sizeof(long)&lt;br /&gt;
!sizeof(long long)&lt;br /&gt;
!sizeof(float)&lt;br /&gt;
!sizeof(double)&lt;br /&gt;
|-&lt;br /&gt;
|| &#039;&#039;&#039;any&#039;&#039;&#039; || 2 || 4 || sizeof(void *) || 8 || 4 || 8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!sizeof(void*)&lt;br /&gt;
!sizeof(long double)&lt;br /&gt;
!max_align_t alignment&lt;br /&gt;
!char&lt;br /&gt;
!endian&lt;br /&gt;
!stack grows&lt;br /&gt;
!page sizes&lt;br /&gt;
User-visible page size returned by &amp;lt;code&amp;gt;getauxval(AT_PAGESZ)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;getconf PAGESIZE&amp;lt;/code&amp;gt;, the granularity of the memory map&lt;br /&gt;
!float&lt;br /&gt;
H=hard, S=soft, P=partial, +=excess precision, ~=not usual standard&lt;br /&gt;
!double&lt;br /&gt;
Note that the columns refer to C types. H=hard, S=soft, P=partial, +=excess precision, ~=not usual standard)&lt;br /&gt;
!long double&lt;br /&gt;
Note that the columns refer to C types. H=hard, S=soft, P=partial, +=excess precision,-=long double precision &amp;lt; __float128, ~=not usual standard)&lt;br /&gt;
!sizeof(time_t)&lt;br /&gt;
With &amp;lt;code&amp;gt;_TIME_BITS=64&amp;lt;/code&amp;gt; the size is 8 on all archs&lt;br /&gt;
!GCC pre-defined macro(s)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;alpha&#039;&#039;&#039;&lt;br /&gt;
||8&lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||16||signed||LE||down||8K||?||?||?||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__alpha__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;any-amd64, amd64, kfreebsd-amd64, hurd-amd64&#039;&#039;&#039; ||8||16||16||signed||LE||down||4K ||H||H&lt;br /&gt;
||H-&lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__x86_64__ &amp;amp;&amp;amp; __LP64__&amp;lt;/code&amp;gt; it&#039;s a common gotcha for x32, you need to use &amp;lt;code&amp;gt;__LP64__&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;__ILP32__&amp;lt;/code&amp;gt; to tell them apart&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arc&#039;&#039;&#039;                       ||4 ||16||?||unsigned||LE||down||8K       ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__arc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm&#039;&#039;&#039;                       ||4 ||? ||8||unsigned||LE||down||?        ||S ||S ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64&#039;&#039;&#039;       ||8 ||16||16||unsigned||LE||down||4K, 16K, 64K ||H ||H ||S ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__aarch64__ &amp;amp;&amp;amp; __LP64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64ilp32&#039;&#039;&#039;       ||4 ||16||?||unsigned||LE||down||4K, 16K, 64K ||H ||H ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__aarch64__ &amp;amp;&amp;amp; __ILP32__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armel&#039;&#039;&#039;     ||4 ||8 ||8||unsigned||LE||down||4K       ||S ||S ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__ &amp;amp;&amp;amp; __ARM_EABI__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armhf&#039;&#039;&#039;||4 ||8 ||8||unsigned||LE||down||4K       ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__ &amp;amp;&amp;amp; __ARM_EABI__ &amp;amp;&amp;amp; __ARM_PCS_VFP&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;avr32&#039;&#039;&#039;                     ||4 ||8 ||?||unsigned||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hppa&#039;&#039;&#039;                      ||4 ||8 ||8||  signed||BE||up  ||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__hppa__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;any-i386i386, kfreebsd-i386, hurd-i386&#039;&#039;&#039; ||                                       4||12||168 prior to GCC 7||  signed||LE||down||4K ||H+||H+&lt;br /&gt;
||H- &lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__i386__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ia64&#039;&#039;&#039;                     ||8 ||16||16||  signed||LE&lt;br /&gt;
||both&lt;br /&gt;
The conventional stack grows down from the top of the stack mapping, but there is also the Register Backing Store which grows up from the bottom of the stack mapping at the same time&lt;br /&gt;
||?        ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__ia64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;loong64&#039;&#039;&#039;               ||8 ||16||16||  signed||LE||down||4K-64K   ||H ||H ||S ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__loongarch__ &amp;amp;&amp;amp; __loongarch_lp64 &amp;amp;&amp;amp; __loongarch_double_float&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;m68k&#039;&#039;&#039;             ||4 ||12||2||  signed||BE||down||4K       ||S?||S?||S?||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__m68k__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips&#039;&#039;&#039;         ||4 ||8 ||8||  signed||BE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABIO32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsel&#039;&#039;&#039;       ||4 ||8 ||8||  signed||LE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABIO32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64&#039;&#039;&#039;     ||8 ||16||16||  signed||BE||down||4K-64K   ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABI64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64el&#039;&#039;&#039;     ||8 ||16||16||  signed||LE||down||4K-64K   ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABI64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32&#039;&#039;&#039;         ||4 ||8 ||?||  signed||BE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABIN32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32el&#039;&#039;&#039;       ||4 ||8 ||?||  signed||LE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABIN32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;powerpc&#039;&#039;&#039;       ||4 &lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||16||                                              unsigned||BE||down||4K-64K   ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64&#039;&#039;&#039;           ||8 ||16||16||unsigned||BE||down||4K-64K   ||? ||? ||? ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__ &amp;amp;&amp;amp; __powerpc64__ &amp;amp;&amp;amp; __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64el&#039;&#039;&#039;       ||8 ||16||16||unsigned||LE||down||4K-64K-16M||H||H ||H~||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__ &amp;amp;&amp;amp; __ppc64__ &amp;amp;&amp;amp; __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;riscv64&#039;&#039;&#039;&lt;br /&gt;
||8 &lt;br /&gt;
||16(8)&lt;br /&gt;
The RV64 ISA spec defines long double as 16 bytes, but older toolchains (pre-&amp;quot;riscv-gcc-6.1.0&amp;quot;) have implemented long double as 8 bytes on RV64; cf. https://github.com/riscv/riscv-gcc/commit/54b21fc5ae83cefec44bc2caed4a8c664c274ba0&lt;br /&gt;
||16||unsigned||LE||down||4K 4k is the default page size on all RISC-V systems. Depending on the chosen virtual memory mode (Sv32/Sv39/Sv48) additional page sizes are available as well: Sv32 supports 4k and 4M pages, Sv39 supports 4k, 2M and 1G pages and Sv48 supports 4k,  2M, 1G, and 512G pages       ||H ||H ||H~||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__riscv &amp;amp;&amp;amp; __riscv_xlen==64&amp;lt;/code&amp;gt; Older, pre-mainline RISC-V toolchains used &amp;lt;code&amp;gt;__riscv__ &amp;amp;&amp;amp; __riscv64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390&#039;&#039;&#039;                      ||4&lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||?||                                              unsigned||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__s390__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390x&#039;&#039;&#039;                     ||8 ||16||8||unsigned||BE||down||4K, 1M, 2G       ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__s390x__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sh4&#039;&#039;&#039;               ||4 ||8 ||4||  signed||LE||down||4K       ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__sh__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc&#039;&#039;&#039;      ||4 &lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||?||                                                signed||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__sparc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc64&#039;&#039;&#039;       ||8 ||16||16||  signed||BE||down||8K, 64K, 512K, 4M, 32M, 256M, 2G, 16G||? ||? ||? ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__sparc__ &amp;amp;&amp;amp; __arch64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;x32&#039;&#039;&#039;                       ||4 ||16||16||  signed||LE||down||4K ||H ||H &lt;br /&gt;
||H-&lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__x86_64__ &amp;amp;&amp;amp; __ILP32__&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!multiarch&lt;br /&gt;
!ELFCLASS&lt;br /&gt;
!ELF machine EM_&lt;br /&gt;
!ld.so(8)&lt;br /&gt;
!uname -mUsed to classify CPU architectures in CMake and many ad-hoc build systems, but note that this is a kernel and/or libc specific name despite referring to the CPU&lt;br /&gt;
!Meson[https://mesonbuild.com/Reference-tables.html Reference table] of Meson hardware architecture names&lt;br /&gt;
!qemue.g. i386 results in qemu(-system)-i386(-static)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;alpha&#039;&#039;&#039;                     ||alpha-linux-gnu            ||64||ALPHA||/lib/ld-linux.so.2||alpha||alpha|| alpha&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;amd64&#039;&#039;&#039;                     ||x86_64-linux-gnu           ||64||X86_64||/lib64/ld-linux-x86-64.so.2||x86_64||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hurd-amd64&#039;&#039;&#039;                ||x86_64-gnu                 ||64||X86_64||/lib/ld-x86-64.so||x86_64-AT386||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;kfreebsd-amd64&#039;&#039;&#039;            ||x86_64-kfreebsd-gnu        ||64||X86_64||/lib/ld-kfreebsd-x86-64.so.1||x86_64||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arc&#039;&#039;&#039;                       ||arc-linux-gnu              ||32||ARC_COMPACT2||/lib/ld-linux-arc.so.2||arc||arc||-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm&#039;&#039;&#039;                       ||arm-linux-gnu              ||32||ARM||/lib/ld-linux.so.2&lt;br /&gt;
||arm*&lt;br /&gt;
Many names starting with arm, e.g. armv5tel&lt;br /&gt;
||arm&lt;br /&gt;
||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64&#039;&#039;&#039;       ||aarch64-linux-gnu          ||64||AARCH64||/lib/ld-linux-aarch64.so.1||aarch64||aarch64||aarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64ilp32&#039;&#039;&#039;||aarch64-linux-gnu_ilp32 ||32?||AARCH64?|| ||aarch64?|| || aarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armel&#039;&#039;&#039;     ||arm-linux-gnueabi          ||32||ARM||/lib/ld-linux.so.3||arm*||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armhf&#039;&#039;&#039;||arm-linux-gnueabihf        ||32||ARM||/lib/ld-linux-armhf.so.3||arm*||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;avr32&#039;&#039;&#039;                     ||                           ||  || || || ||avr||avrqemu-system-avr only&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hppa&#039;&#039;&#039;                      ||hppa-linux-gnu             ||32||PARISC||/lib/ld.so.1||parisc*||parisc||hppa&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;i386&#039;&#039;&#039;                      ||i386-linux-gnu             ||32||386||/lib/ld-linux.so.2||i?86i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hurd-i386&#039;&#039;&#039;                 ||i386-gnu                   ||32||386||/lib/ld.so||i?86-AT386i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;kfreebsd-i386&#039;&#039;&#039;             ||i386-kfreebsd-gnu          ||32||386||/lib/ld.so.1||i?86i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ia64&#039;&#039;&#039;                      ||ia64-linux-gnu             ||64||IA_64||/lib/ld-linux-ia64.so.2||ia64||ia64||-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;loong64&#039;&#039;&#039;               ||loongarch64-linux-gnu      ||64||LOONGARCH||/lib64/ld-linux-loongarch-lp64d.so.1||loongarch64||loongarch64||loongarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;m68k&#039;&#039;&#039;             ||m68k-linux-gnu             ||32||68K||/lib/ld.so.1||m68k||m68k||m68k&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips&#039;&#039;&#039;         ||mips-linux-gnu             ||32||MIPS||/lib/ld.so.1||mips||mips||mips&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsel&#039;&#039;&#039;       ||mipsel-linux-gnu           ||32||MIPS||/lib/ld.so.1||mips||mips||mipsel&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64&#039;&#039;&#039;       ||mips64-linux-gnuabi64      ||  || || ||mips64||mips64||mips64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64el&#039;&#039;&#039;     ||mips64el-linux-gnuabi64    ||64||MIPS||/lib64/ld.so.1||mips64||mips64||mips64el&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32&#039;&#039;&#039;      ||mips64-linux-gnuabin32     ||  || || || || ||mipsn32&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32el&#039;&#039;&#039;    ||mips64el-linux-gnuabin32   ||  || || || || ||mipsn32el&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;powerpc&#039;&#039;&#039;       ||powerpc-linux-gnu          ||32||PPC||/lib/ld.so.1||ppc||ppc||ppc&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64&#039;&#039;&#039;           ||powerpc64-linux-gnu        ||64||PPC64||/lib64/ld64.so.1||ppc64||ppc64||ppc64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64el&#039;&#039;&#039;       ||powerpc64le-linux-gnu      ||64||PPC64||/lib64/ld64.so.2||ppcle ppc64le||ppc64||ppc64le&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;riscv64&#039;&#039;&#039;        ||riscv64-linux-gnu          ||64||RISCV||/lib/ld-linux-riscv64-lp64d.so.1 ||riscv64||riscv64||riscv64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390&#039;&#039;&#039;                      ||s390-linux-gnu             ||32||S390||/lib/ld.so.1||s390||s390||(s390x)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390x&#039;&#039;&#039;                     ||s390x-linux-gnu            ||64||S390||/lib/ld64.so.1||s390x||s390x||s390x&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sh4&#039;&#039;&#039;               ||sh4-linux-gnu              ||32||SH||/lib/ld-linux.so.2||sh||sh4||sh4&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc&#039;&#039;&#039;      ||sparc-linux-gnu            ||32||SPARC32PLUS||/lib/ld-linux.so.2||sparc||sparc||sparc(32plus)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc64&#039;&#039;&#039;       ||sparc64-linux-gnu          ||64||SPARCV9||/lib64/ld-linux.so.2||sparc64||sparc64||sparc64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;x32&#039;&#039;&#039;                       ||x86_64-linux-gnux32        ||32||X86_64||/libx32/ld-linux-x32.so.2||x86_64|| ||x86_64&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Alignment =&lt;br /&gt;
&lt;br /&gt;
Note that there is alignment on the machine language level and alignment in C. Proper misalignment (for example in a packed struct) is no problem in C and allowed almost everywhere (except of SPARC, where you will receive SIGBUS on a program execution, misaligned variable/memory access) and the compiler will do the right thing (like translating a read of a variable to two loads at machine language level). On the other hand most of the constructs that lead to unaligned access not properly handled by the C compiler (especially most constructs involving pointer casting) have undefined behaviour anyway, so compiling them with optimisation enabled can cause strange effects on all architectures. Read more on a Wikipedia article [https://en.wikipedia.org/wiki/Data_structure_alignment Data structure alignment].&lt;br /&gt;
&lt;br /&gt;
On the other hand, unaligned synchronization primitives (atomics, etc) tend to be unsupported or extremely slow.  Extra joy if they cross cacheline or page boundaries.&lt;br /&gt;
&lt;br /&gt;
== alpha ==&lt;br /&gt;
&lt;br /&gt;
Some alpha may emulate see [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/alpha/kernel/traps.c kernel source]&lt;br /&gt;
&lt;br /&gt;
== arc ==&lt;br /&gt;
&lt;br /&gt;
ARCv2 processors (ARC HS38 and ARC HS48 variants, 1-4 cores) support unaligned access in hardware, except for &amp;quot;atomic instructions&amp;quot; where special considerations apply. ARCv2 features 2 types of atomic instructions: the first for 32-bit data (&amp;quot;llock&amp;quot;/&amp;quot;scond&amp;quot; pair) and the second for 64-bit data (&amp;quot;llockd&amp;quot;/&amp;quot;scondd&amp;quot;). Those atomic instructions must work on data aligned naturally. I.e. &amp;quot;llock&amp;quot;/&amp;quot;scond&amp;quot; must be only used on 32-bit word-aligned data, &amp;quot;llockd&amp;quot;/&amp;quot;scondd&amp;quot; must be only used on 64-bit double-word aligned data. If an unaligned access is done by &amp;quot;atomic instruction&amp;quot; in user-space, the offending application gets forcefully killed with visible mention of a segmentation fault.  An unaligned access done by “atomic instruction” in kernel-mode will result in an unrecoverable &amp;quot;Illegal instruction&amp;quot; exception.&lt;br /&gt;
&lt;br /&gt;
== armel/armhf/arm64 ==&lt;br /&gt;
&lt;br /&gt;
High-level summary for software engineers: Don&#039;t do unaligned access.&lt;br /&gt;
It&#039;s always inefficient, sometimes extremely inefficient, and&lt;br /&gt;
in various cases is not permitted at all.&lt;br /&gt;
&lt;br /&gt;
The short answer for the ARM case is that ARMv6 and up guarantee&lt;br /&gt;
that the processor can be configured such that some unaligned&lt;br /&gt;
accesses are fine (or at least just inefficient). Linux by default&lt;br /&gt;
enable this mode and trap:&lt;br /&gt;
* All &amp;lt;=32-bit load/store operations can be unaligned.&lt;br /&gt;
* NEON load-stores can be unaligned (unless an explicit alignment is specified in the encoding).&lt;br /&gt;
&lt;br /&gt;
But:&lt;br /&gt;
* VFP load/stores must be naturally aligned.&lt;br /&gt;
* Load-multiple/store-multiple and ldrd/strd do not work with &amp;lt;32-bit alignment, but can sometimes get fixed up by the kernel at a substantial performance penalty.&lt;br /&gt;
&lt;br /&gt;
PUSH/POP usually requires 32-bit alignment, but then the ABI requires&lt;br /&gt;
64-bit alignment of the stack, so that is less of an issue.&lt;br /&gt;
&lt;br /&gt;
Unaligned load-exclusive/store-exclusive operations are not supported.&lt;br /&gt;
&lt;br /&gt;
No unaligned accesses are permitted to memory regions of Device or&lt;br /&gt;
Strongly-ordered type. But some permutation of this will be true for&lt;br /&gt;
most architectures, and in user-space this would only affect things&lt;br /&gt;
prodding /dev/mem or otherwise mmaping from a device driver.&lt;br /&gt;
&lt;br /&gt;
ARM64 similarly makes it possible to trap unaligned accesses, but if&lt;br /&gt;
that is not enabled (which it isn&#039;t by Linux), everything apart from&lt;br /&gt;
load-exclusive/store-exclusive, load-acquire/store-release and Device&lt;br /&gt;
memory accesses will be handled by hardware.&lt;br /&gt;
&lt;br /&gt;
== avr32 ==&lt;br /&gt;
&lt;br /&gt;
Unaligned access is ok for 32bits word but not for 16bits or 64bits word see [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/avr32/include/asm/unaligned.h kernel source]&lt;br /&gt;
&lt;br /&gt;
== i386/x32/amd64 ==&lt;br /&gt;
&lt;br /&gt;
Unaligned access is slower (but not as much as with other architectures as it is done in hardware and not in software). Moreover some MMX/SSE/vector operation need proper alignment.&lt;br /&gt;
&lt;br /&gt;
Unaligned sync primitives are supported, but there&#039;s active effort to defeature them, with Ice Lakes and newer allowing the kernel to trap.&lt;br /&gt;
&lt;br /&gt;
== ia64 ==&lt;br /&gt;
&lt;br /&gt;
Depending of config may fix with trap handler unaligned access&lt;br /&gt;
&lt;br /&gt;
== riscv64 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Short version&#039;&#039;&#039;: Don&#039;t use unaligned access.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Long version&#039;&#039;&#039;:&lt;br /&gt;
Technically the RISC-V ISA specification allows unaligned access for load and store instructions that are part of the base ISA, but only with significant limitations:&lt;br /&gt;
* Naturally aligned loads and stores are guaranteed to be atomic, but this is not the case for unaligned loads and stores. This can lead to hard-to-find bugs, so unaligned access should really be avoided.&lt;br /&gt;
* Support for unaligned access is usually not implemented in hardware and instead emulated in a trap handler, which makes it very slow.&lt;br /&gt;
&lt;br /&gt;
All synchronization primitives (LR/SC and the atomic memory read-modify-write operations (AMOs)) only allow naturally aligned access.&lt;br /&gt;
&lt;br /&gt;
= Floating point =&lt;br /&gt;
&lt;br /&gt;
First read academic paper about the [http://arxiv.org/abs/cs/0701192 pitfall] of doing multi arch floating point computation&lt;br /&gt;
and the classical &amp;quot;What Every Computer Scientist Should Know About Floating-Point Arithmetic&amp;quot; from [http://www.validlab.com/goldberg/paper.pdf here].&lt;br /&gt;
&lt;br /&gt;
== i386 ==&lt;br /&gt;
&lt;br /&gt;
i387 is a strange beast that suffer from excess precision. Moreover long double is only 80 bits&lt;br /&gt;
&lt;br /&gt;
Internal computation are done with 80 bits of precision that lead to strange and not intuitive result.&lt;br /&gt;
&lt;br /&gt;
== mips/mipsel/mips64el ==&lt;br /&gt;
&lt;br /&gt;
Some mips processors do not contain a hardware floating point unit. In this case the kernel will emulate all FPU instructions at a large performance cost.&lt;br /&gt;
&lt;br /&gt;
= C/C++ Preprocessor Symbols =&lt;br /&gt;
Generally, GNU C tends to define the symbol&lt;br /&gt;
&lt;br /&gt;
 __arch__&lt;br /&gt;
&lt;br /&gt;
A list of some common arch-specific symbols can be found on the [https://github.com/cpredef/predef/blob/master/Architectures.md Pre-defined Architecture Macros] page.&lt;br /&gt;
&lt;br /&gt;
= Signedness =&lt;br /&gt;
When programming in C, variables can be signed or unsigned.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
* `unsigned char c;` - explicit unsigned, 0 &amp;lt;= c &amp;lt;= 255&lt;br /&gt;
* `signed char c;` - explicit signed, -128 &amp;lt;= c &amp;lt;= 127&lt;br /&gt;
* `char c;` - implicit (un)signedness, depending on architecture&lt;br /&gt;
&lt;br /&gt;
To force a signedness, either declare it explicitly or use the gcc command line option -f(un)signed-char. The gcc defaults differ only due to optimisation. Other compilers may not have this issue.&lt;br /&gt;
&lt;br /&gt;
= Architecture baselines =&lt;br /&gt;
&lt;br /&gt;
Each Debian architecture has a &#039;&#039;baseline&#039;&#039; indicating the oldest or least capable CPU on which the architecture can be used. The baseline can change between Debian releases. The baseline is mostly defined by the gcc-&#039;&#039;N&#039;&#039; package, which is configured to produce baseline binaries when options like -march= are not used.&lt;br /&gt;
&lt;br /&gt;
If a package uses options that enable additional CPU features such as -msse in particular source files, then the maintainer of that package is responsible for [[InstructionSelection|making sure those CPU features are only used on CPUs that support them]]. ioquake3&#039;s Altivec support on PowerPC is an example of this technique.&lt;br /&gt;
&lt;br /&gt;
== amd64 ==&lt;br /&gt;
&lt;br /&gt;
x86_64 with no optional extensions (psABI baseline). The core specification includes MMX, SSE and SSE2 so these are OK, but SSE3 and up are not guaranteed. (The default is &#039;&#039;-march=x86-64&#039;&#039;, but not &#039;&#039;-march=x86-64-v2&#039;&#039; or later.)&lt;br /&gt;
&lt;br /&gt;
See [https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build psABI (Table 3.1: Micro-Architecture Levels)] for amd64 ABI level. Wikipedia summary: https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels&lt;br /&gt;
&lt;br /&gt;
== arc ==&lt;br /&gt;
&lt;br /&gt;
A fully featured ARC HS with additional support for double-precision FPU (&amp;quot;-mcpu=hs38_linux&amp;quot;). And this is a default &amp;quot;-mcpu&amp;quot; for ARC starting from GCC 11.&lt;br /&gt;
&lt;br /&gt;
To be more precise it&#039;s a baseline ARC HS with HW division (&amp;quot;-mdiv-rem&amp;quot;), atomic instructions (&amp;quot;-matomic&amp;quot;), 64-bit loads/stores	(&amp;quot;-mll64&amp;quot;), the most advanced multiplier (including quad half-word &amp;amp; vector operations, &amp;quot;-mmpy-option=plus_qmacw&amp;quot;) and double-precision FPU (&amp;quot;-mfpu=fpud_all&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
== arm64 ==&lt;br /&gt;
&lt;br /&gt;
aarch64 (ARMv8-A) with no optional extensions. VFPv4 and NEON are OK, but ARMv8.1-A and up are not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== armel ==&lt;br /&gt;
&lt;br /&gt;
armv5te since Debian 10 &#039;buster&#039; (gcc-8 8-20171215-1).&lt;br /&gt;
&lt;br /&gt;
Before that, armv4te.&lt;br /&gt;
&lt;br /&gt;
== armhf ==&lt;br /&gt;
&lt;br /&gt;
armv7 with VFPv3-D16 floating point. NEON is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== i386 ==&lt;br /&gt;
&lt;br /&gt;
* Pentium4 since Trixie.  This includes most notably SSE2. This was made necessary by LLVM&#039;s lack of support for processors without SSE2.&lt;br /&gt;
* i686 since [https://www.debian.org/releases/bookworm/i386/release-notes/ch-information.en.html#i386-is-i686 Debian 12 &#039;bookworm&#039;]. There&#039;s no MMX nor SSE.&lt;br /&gt;
* Before that, [https://salsa.debian.org/ddp-team/release-notes/-/blob/e7b4c032a94b02e31caff6cfdf7d71917ea00346/en/issues.dbk#L286-317 &amp;quot;almost&amp;quot;] i686 (no &amp;quot;long NOP&amp;quot;/NOPL) since Debian 9 &#039;stretch&#039; (gcc-6 6.1.1-1).&lt;br /&gt;
* Before that, i586 since gcc-4.9 4.9-20140411-1 (2014).&lt;br /&gt;
* Before that, i486 since gcc-4.1 4.1ds7-0exp7 (2006).&lt;br /&gt;
* Before that, i386.&lt;br /&gt;
&lt;br /&gt;
See [https://www.sco.com/developers/devspecs/abi386-4.pdf SYSTEM V APPLICATION BINARY INTERFACE], [https://www.uclibc.org/docs/psABI-i386.pdf Intel386 Architecture Processor Supplement] for more information. [https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build psABI (Table 3.1: Micro-Architecture Levels)] for amd64 ABI level may be also relevant, for newer ABI level.&lt;br /&gt;
&lt;br /&gt;
== mips, mipsel ==&lt;br /&gt;
&lt;br /&gt;
MIPS32R2 since Debian 9 &#039;stretch&#039;.&lt;br /&gt;
&lt;br /&gt;
Before that, MIPS II.&lt;br /&gt;
&lt;br /&gt;
== mips64el ==&lt;br /&gt;
&lt;br /&gt;
MIPS64R2 and up.&lt;br /&gt;
&lt;br /&gt;
== powerpc ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== powerpcspe ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is impossible, even with runtime detection.&lt;br /&gt;
&lt;br /&gt;
== ppc64 ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
(Initially Altivec was in the port baseline, but was [https://lists.debian.org/msgid-search/f06cd492-95eb-b0b3-f15c-d5c2501ec0d7@physik.fu-berlin.de later removed to support some embedded systems])&lt;br /&gt;
&lt;br /&gt;
== ppc64el ==&lt;br /&gt;
&lt;br /&gt;
POWER8 and up.&lt;br /&gt;
&lt;br /&gt;
== s390x ==&lt;br /&gt;
&lt;br /&gt;
z196 since Debian 10 &#039;buster&#039;.&lt;br /&gt;
&lt;br /&gt;
== loong64 ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown).&lt;br /&gt;
&lt;br /&gt;
= Obtaining this information =&lt;br /&gt;
&lt;br /&gt;
== via the dpkg build logs ==&lt;br /&gt;
&lt;br /&gt;
Starting with dpkg 1.22.0, its build process will print some of the architecture attributes as part of its configure summary.&lt;br /&gt;
&lt;br /&gt;
Search for «Arch attributes» in the [https://buildd.debian.org/status/package.php?p=dpkg dpkg build logs].&lt;br /&gt;
&lt;br /&gt;
== via the C pre-processor ==&lt;br /&gt;
&lt;br /&gt;
 echo | cpp -dM | sort&lt;br /&gt;
&lt;br /&gt;
== via a special tool ==&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;alloca.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stddef.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;time.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 static void test_size_align(const char *name, size_t size, size_t align) {&lt;br /&gt;
   printf(&amp;quot;sizeof(%s) = %zu\n&amp;quot;, name, size);&lt;br /&gt;
   if (size != align) printf(&amp;quot;alignment(%s) = %zu\n&amp;quot;, name, align);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 #define TEST_SIZE_ALIGN(type, name) \&lt;br /&gt;
   struct test_align_##name { char a; type b; }; \&lt;br /&gt;
   test_size_align(#type, sizeof(type), offsetof(struct test_align_##name, b))&lt;br /&gt;
 &lt;br /&gt;
 static void test_endian(void) {&lt;br /&gt;
 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__&lt;br /&gt;
   printf(&amp;quot;byte order = little endian\n&amp;quot;);&lt;br /&gt;
 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__&lt;br /&gt;
   printf(&amp;quot;byte order = big endian\n&amp;quot;);&lt;br /&gt;
 #endif&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void test_char(void) {&lt;br /&gt;
   if ((int)(char)-1 == -1) printf(&amp;quot;char signedness = signed\n&amp;quot;);&lt;br /&gt;
   else if ((int)(char)-1 == 255) printf(&amp;quot;char signedness = unsigned\n&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void test_stack(void) {&lt;br /&gt;
   void *a = alloca(8);&lt;br /&gt;
   void *b = alloca(8);&lt;br /&gt;
   if (a &amp;gt; b) printf(&amp;quot;stack = grows down\n&amp;quot;);&lt;br /&gt;
   else printf(&amp;quot;stack = grows up\n&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main(void) {&lt;br /&gt;
   TEST_SIZE_ALIGN(short, short);&lt;br /&gt;
   TEST_SIZE_ALIGN(int, int);&lt;br /&gt;
   TEST_SIZE_ALIGN(long, long);&lt;br /&gt;
   TEST_SIZE_ALIGN(long long, long_long);&lt;br /&gt;
   TEST_SIZE_ALIGN(float, float);&lt;br /&gt;
   TEST_SIZE_ALIGN(double, double);&lt;br /&gt;
   TEST_SIZE_ALIGN(long double, long_double);&lt;br /&gt;
   TEST_SIZE_ALIGN(void *, pointer);&lt;br /&gt;
   TEST_SIZE_ALIGN(time_t, time_t);&lt;br /&gt;
   test_endian();&lt;br /&gt;
   test_char();&lt;br /&gt;
   test_stack();&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== via autoconf ==&lt;br /&gt;
&lt;br /&gt;
 AC_INIT(archtest, 0.1)&lt;br /&gt;
 AC_CHECK_SIZEOF(short)&lt;br /&gt;
 AC_CHECK_SIZEOF(int)&lt;br /&gt;
 AC_CHECK_SIZEOF(long)&lt;br /&gt;
 AC_CHECK_SIZEOF(long long)&lt;br /&gt;
 AC_CHECK_SIZEOF(float)&lt;br /&gt;
 AC_CHECK_SIZEOF(double)&lt;br /&gt;
 AC_CHECK_SIZEOF(long double)&lt;br /&gt;
 AC_CHECK_SIZEOF(void*)&lt;br /&gt;
 AC_C_BIGENDIAN()&lt;br /&gt;
 AC_C_CHAR_UNSIGNED()&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* Information about [Haskell/GHC Haskell] on different architectures.&lt;br /&gt;
* [https://github.com/cpredef/predef/blob/master/Architectures.md Pre-defined Compiler Macros Wiki - Architectures]&lt;br /&gt;
* [https://gcc.gnu.org/onlinedocs/cpp/Predefined-Macros.html GCC Predefined Macros]&lt;br /&gt;
* [InstructionSelection Instruction Selection]&lt;br /&gt;
* [Multiarch/Tuples]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Ports]]&lt;/div&gt;</summary>
		<author><name>Zeha</name></author>
	</entry>
	<entry>
		<id>https://wiki2025.debian.org/index.php?title=ArchitectureSpecificsMemo&amp;diff=7</id>
		<title>ArchitectureSpecificsMemo</title>
		<link rel="alternate" type="text/html" href="https://wiki2025.debian.org/index.php?title=ArchitectureSpecificsMemo&amp;diff=7"/>
		<updated>2025-07-18T21:52:52Z</updated>

		<summary type="html">&lt;p&gt;Zeha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
This page is a &#039;&#039;&#039;draft&#039;&#039;&#039;. Please help enhancing it by adding lines and filling tables. Comments at the bottom of the text are also welcome.&lt;br /&gt;
&lt;br /&gt;
This is just a quick array to recall some of the specifics of the architectures found in the Debian project.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!sizeof(short)&lt;br /&gt;
!sizeof(int)&lt;br /&gt;
!sizeof(long)&lt;br /&gt;
!sizeof(long long)&lt;br /&gt;
!sizeof(float)&lt;br /&gt;
!sizeof(double)&lt;br /&gt;
|-&lt;br /&gt;
|| &#039;&#039;&#039;any&#039;&#039;&#039; || 2 || 4 || sizeof(void *) || 8 || 4 || 8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!sizeof(void*)&lt;br /&gt;
!sizeof(long double)&lt;br /&gt;
!max_align_t alignment&lt;br /&gt;
!char&lt;br /&gt;
!endian&lt;br /&gt;
!stack grows&lt;br /&gt;
!page sizes&lt;br /&gt;
User-visible page size returned by &amp;lt;code&amp;gt;getauxval(AT_PAGESZ)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;getconf PAGESIZE&amp;lt;/code&amp;gt;, the granularity of the memory map&lt;br /&gt;
!float&lt;br /&gt;
H=hard, S=soft, P=partial, +=excess precision, ~=not usual standard&lt;br /&gt;
!double&lt;br /&gt;
Note that the columns refer to C types. H=hard, S=soft, P=partial, +=excess precision, ~=not usual standard)&lt;br /&gt;
!long double&lt;br /&gt;
Note that the columns refer to C types. H=hard, S=soft, P=partial, +=excess precision,-=long double precision &amp;lt; __float128, ~=not usual standard)&lt;br /&gt;
!sizeof(time_t)&lt;br /&gt;
With &amp;lt;code&amp;gt;_TIME_BITS=64&amp;lt;/code&amp;gt; the size is 8 on all archs&lt;br /&gt;
!GCC pre-defined macro(s)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;alpha&#039;&#039;&#039;&lt;br /&gt;
||8&lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||16||signed||LE||down||8K||?||?||?||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__alpha__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;any-amd64, amd64, kfreebsd-amd64, hurd-amd64&#039;&#039;&#039; ||8||16||16||signed||LE||down||4K ||H||H&lt;br /&gt;
||H-&lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__x86_64__ &amp;amp;&amp;amp; __LP64__&amp;lt;/code&amp;gt; it&#039;s a common gotcha for x32, you need to use &amp;lt;code&amp;gt;__LP64__&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;__ILP32__&amp;lt;/code&amp;gt; to tell them apart&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arc&#039;&#039;&#039;                       ||4 ||16||?||unsigned||LE||down||8K       ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__arc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm&#039;&#039;&#039;                       ||4 ||? ||8||unsigned||LE||down||?        ||S ||S ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64&#039;&#039;&#039;       ||8 ||16||16||unsigned||LE||down||4K, 16K, 64K ||H ||H ||S ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__aarch64__ &amp;amp;&amp;amp; __LP64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64ilp32&#039;&#039;&#039;       ||4 ||16||?||unsigned||LE||down||4K, 16K, 64K ||H ||H ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__aarch64__ &amp;amp;&amp;amp; __ILP32__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armel&#039;&#039;&#039;     ||4 ||8 ||8||unsigned||LE||down||4K       ||S ||S ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__ &amp;amp;&amp;amp; __ARM_EABI__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armhf&#039;&#039;&#039;||4 ||8 ||8||unsigned||LE||down||4K       ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__ &amp;amp;&amp;amp; __ARM_EABI__ &amp;amp;&amp;amp; __ARM_PCS_VFP&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;avr32&#039;&#039;&#039;                     ||4 ||8 ||?||unsigned||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hppa&#039;&#039;&#039;                      ||4 ||8 ||8||  signed||BE||up  ||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__hppa__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;any-i386i386, kfreebsd-i386, hurd-i386&#039;&#039;&#039; ||                                       4||12||168 prior to GCC 7||  signed||LE||down||4K ||H+||H+&lt;br /&gt;
||H- &lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__i386__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ia64&#039;&#039;&#039;                     ||8 ||16||16||  signed||LE&lt;br /&gt;
||both&lt;br /&gt;
The conventional stack grows down from the top of the stack mapping, but there is also the Register Backing Store which grows up from the bottom of the stack mapping at the same time&lt;br /&gt;
||?        ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__ia64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;loong64&#039;&#039;&#039;               ||8 ||16||16||  signed||LE||down||4K-64K   ||H ||H ||S ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__loongarch__ &amp;amp;&amp;amp; __loongarch_lp64 &amp;amp;&amp;amp; __loongarch_double_float&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;m68k&#039;&#039;&#039;             ||4 ||12||2||  signed||BE||down||4K       ||S?||S?||S?||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__m68k__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips&#039;&#039;&#039;         ||4 ||8 ||8||  signed||BE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABIO32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsel&#039;&#039;&#039;       ||4 ||8 ||8||  signed||LE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABIO32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64&#039;&#039;&#039;     ||8 ||16||16||  signed||BE||down||4K-64K   ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABI64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64el&#039;&#039;&#039;     ||8 ||16||16||  signed||LE||down||4K-64K   ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABI64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32&#039;&#039;&#039;         ||4 ||8 ||?||  signed||BE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABIN32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32el&#039;&#039;&#039;       ||4 ||8 ||?||  signed||LE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABIN32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;powerpc&#039;&#039;&#039;       ||4 &lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||16||                                              unsigned||BE||down||4K-64K   ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64&#039;&#039;&#039;           ||8 ||16||16||unsigned||BE||down||4K-64K   ||? ||? ||? ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__ &amp;amp;&amp;amp; __powerpc64__ &amp;amp;&amp;amp; __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64el&#039;&#039;&#039;       ||8 ||16||16||unsigned||LE||down||4K-64K-16M||H||H ||H~||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__ &amp;amp;&amp;amp; __ppc64__ &amp;amp;&amp;amp; __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;riscv64&#039;&#039;&#039;&lt;br /&gt;
||8 &lt;br /&gt;
||16(8)&lt;br /&gt;
The RV64 ISA spec defines long double as 16 bytes, but older toolchains (pre-&amp;quot;riscv-gcc-6.1.0&amp;quot;) have implemented long double as 8 bytes on RV64; cf. https://github.com/riscv/riscv-gcc/commit/54b21fc5ae83cefec44bc2caed4a8c664c274ba0&lt;br /&gt;
||16||unsigned||LE||down||4K 4k is the default page size on all RISC-V systems. Depending on the chosen virtual memory mode (Sv32/Sv39/Sv48) additional page sizes are available as well: Sv32 supports 4k and 4M pages, Sv39 supports 4k, 2M and 1G pages and Sv48 supports 4k,  2M, 1G, and 512G pages       ||H ||H ||H~||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__riscv &amp;amp;&amp;amp; __riscv_xlen==64&amp;lt;/code&amp;gt; Older, pre-mainline RISC-V toolchains used &amp;lt;code&amp;gt;__riscv__ &amp;amp;&amp;amp; __riscv64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390&#039;&#039;&#039;                      ||4&lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||?||                                              unsigned||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__s390__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390x&#039;&#039;&#039;                     ||8 ||16||8||unsigned||BE||down||4K, 1M, 2G       ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__s390x__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sh4&#039;&#039;&#039;               ||4 ||8 ||4||  signed||LE||down||4K       ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__sh__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc&#039;&#039;&#039;      ||4 &lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||?||                                                signed||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__sparc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc64&#039;&#039;&#039;       ||8 ||16||16||  signed||BE||down||8K, 64K, 512K, 4M, 32M, 256M, 2G, 16G||? ||? ||? ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__sparc__ &amp;amp;&amp;amp; __arch64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;x32&#039;&#039;&#039;                       ||4 ||16||16||  signed||LE||down||4K ||H ||H &lt;br /&gt;
||H-&lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__x86_64__ &amp;amp;&amp;amp; __ILP32__&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!multiarch&lt;br /&gt;
!ELFCLASS&lt;br /&gt;
!ELF machine EM_&lt;br /&gt;
!ld.so(8)&lt;br /&gt;
!uname -mUsed to classify CPU architectures in CMake and many ad-hoc build systems, but note that this is a kernel and/or libc specific name despite referring to the CPU&lt;br /&gt;
!Meson[https://mesonbuild.com/Reference-tables.html Reference table] of Meson hardware architecture names&lt;br /&gt;
!qemue.g. i386 results in qemu(-system)-i386(-static)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;alpha&#039;&#039;&#039;                     ||alpha-linux-gnu            ||64||ALPHA||/lib/ld-linux.so.2||alpha||alpha|| alpha&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;amd64&#039;&#039;&#039;                     ||x86_64-linux-gnu           ||64||X86_64||/lib64/ld-linux-x86-64.so.2||x86_64||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hurd-amd64&#039;&#039;&#039;                ||x86_64-gnu                 ||64||X86_64||/lib/ld-x86-64.so||x86_64-AT386||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;kfreebsd-amd64&#039;&#039;&#039;            ||x86_64-kfreebsd-gnu        ||64||X86_64||/lib/ld-kfreebsd-x86-64.so.1||x86_64||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arc&#039;&#039;&#039;                       ||arc-linux-gnu              ||32||ARC_COMPACT2||/lib/ld-linux-arc.so.2||arc||arc||-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm&#039;&#039;&#039;                       ||arm-linux-gnu              ||32||ARM||/lib/ld-linux.so.2||arm*Many names starting with arm, e.g. armv5tel||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64&#039;&#039;&#039;       ||aarch64-linux-gnu          ||64||AARCH64||/lib/ld-linux-aarch64.so.1||aarch64||aarch64||aarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64ilp32&#039;&#039;&#039;||aarch64-linux-gnu_ilp32 ||32?||AARCH64?|| ||aarch64?|| || aarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armel&#039;&#039;&#039;     ||arm-linux-gnueabi          ||32||ARM||/lib/ld-linux.so.3||arm*||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armhf&#039;&#039;&#039;||arm-linux-gnueabihf        ||32||ARM||/lib/ld-linux-armhf.so.3||arm*||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;avr32&#039;&#039;&#039;                     ||                           ||  || || || ||avr||avrqemu-system-avr only&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hppa&#039;&#039;&#039;                      ||hppa-linux-gnu             ||32||PARISC||/lib/ld.so.1||parisc*||parisc||hppa&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;i386&#039;&#039;&#039;                      ||i386-linux-gnu             ||32||386||/lib/ld-linux.so.2||i?86i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hurd-i386&#039;&#039;&#039;                 ||i386-gnu                   ||32||386||/lib/ld.so||i?86-AT386i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;kfreebsd-i386&#039;&#039;&#039;             ||i386-kfreebsd-gnu          ||32||386||/lib/ld.so.1||i?86i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ia64&#039;&#039;&#039;                      ||ia64-linux-gnu             ||64||IA_64||/lib/ld-linux-ia64.so.2||ia64||ia64||-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;loong64&#039;&#039;&#039;               ||loongarch64-linux-gnu      ||64||LOONGARCH||/lib64/ld-linux-loongarch-lp64d.so.1||loongarch64||loongarch64||loongarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;m68k&#039;&#039;&#039;             ||m68k-linux-gnu             ||32||68K||/lib/ld.so.1||m68k||m68k||m68k&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips&#039;&#039;&#039;         ||mips-linux-gnu             ||32||MIPS||/lib/ld.so.1||mips||mips||mips&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsel&#039;&#039;&#039;       ||mipsel-linux-gnu           ||32||MIPS||/lib/ld.so.1||mips||mips||mipsel&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64&#039;&#039;&#039;       ||mips64-linux-gnuabi64      ||  || || ||mips64||mips64||mips64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64el&#039;&#039;&#039;     ||mips64el-linux-gnuabi64    ||64||MIPS||/lib64/ld.so.1||mips64||mips64||mips64el&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32&#039;&#039;&#039;      ||mips64-linux-gnuabin32     ||  || || || || ||mipsn32&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32el&#039;&#039;&#039;    ||mips64el-linux-gnuabin32   ||  || || || || ||mipsn32el&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;powerpc&#039;&#039;&#039;       ||powerpc-linux-gnu          ||32||PPC||/lib/ld.so.1||ppc||ppc||ppc&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64&#039;&#039;&#039;           ||powerpc64-linux-gnu        ||64||PPC64||/lib64/ld64.so.1||ppc64||ppc64||ppc64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64el&#039;&#039;&#039;       ||powerpc64le-linux-gnu      ||64||PPC64||/lib64/ld64.so.2||ppcle ppc64le||ppc64||ppc64le&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;riscv64&#039;&#039;&#039;        ||riscv64-linux-gnu          ||64||RISCV||/lib/ld-linux-riscv64-lp64d.so.1 ||riscv64||riscv64||riscv64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390&#039;&#039;&#039;                      ||s390-linux-gnu             ||32||S390||/lib/ld.so.1||s390||s390||(s390x)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390x&#039;&#039;&#039;                     ||s390x-linux-gnu            ||64||S390||/lib/ld64.so.1||s390x||s390x||s390x&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sh4&#039;&#039;&#039;               ||sh4-linux-gnu              ||32||SH||/lib/ld-linux.so.2||sh||sh4||sh4&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc&#039;&#039;&#039;      ||sparc-linux-gnu            ||32||SPARC32PLUS||/lib/ld-linux.so.2||sparc||sparc||sparc(32plus)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc64&#039;&#039;&#039;       ||sparc64-linux-gnu          ||64||SPARCV9||/lib64/ld-linux.so.2||sparc64||sparc64||sparc64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;x32&#039;&#039;&#039;                       ||x86_64-linux-gnux32        ||32||X86_64||/libx32/ld-linux-x32.so.2||x86_64|| ||x86_64&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Alignment =&lt;br /&gt;
&lt;br /&gt;
Note that there is alignment on the machine language level and alignment in C. Proper misalignment (for example in a packed struct) is no problem in C and allowed almost everywhere (except of SPARC, where you will receive SIGBUS on a program execution, misaligned variable/memory access) and the compiler will do the right thing (like translating a read of a variable to two loads at machine language level). On the other hand most of the constructs that lead to unaligned access not properly handled by the C compiler (especially most constructs involving pointer casting) have undefined behaviour anyway, so compiling them with optimisation enabled can cause strange effects on all architectures. Read more on a Wikipedia article [https://en.wikipedia.org/wiki/Data_structure_alignment Data structure alignment].&lt;br /&gt;
&lt;br /&gt;
On the other hand, unaligned synchronization primitives (atomics, etc) tend to be unsupported or extremely slow.  Extra joy if they cross cacheline or page boundaries.&lt;br /&gt;
&lt;br /&gt;
== alpha ==&lt;br /&gt;
&lt;br /&gt;
Some alpha may emulate see [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/alpha/kernel/traps.c kernel source]&lt;br /&gt;
&lt;br /&gt;
== arc ==&lt;br /&gt;
&lt;br /&gt;
ARCv2 processors (ARC HS38 and ARC HS48 variants, 1-4 cores) support unaligned access in hardware, except for &amp;quot;atomic instructions&amp;quot; where special considerations apply. ARCv2 features 2 types of atomic instructions: the first for 32-bit data (&amp;quot;llock&amp;quot;/&amp;quot;scond&amp;quot; pair) and the second for 64-bit data (&amp;quot;llockd&amp;quot;/&amp;quot;scondd&amp;quot;). Those atomic instructions must work on data aligned naturally. I.e. &amp;quot;llock&amp;quot;/&amp;quot;scond&amp;quot; must be only used on 32-bit word-aligned data, &amp;quot;llockd&amp;quot;/&amp;quot;scondd&amp;quot; must be only used on 64-bit double-word aligned data. If an unaligned access is done by &amp;quot;atomic instruction&amp;quot; in user-space, the offending application gets forcefully killed with visible mention of a segmentation fault.  An unaligned access done by “atomic instruction” in kernel-mode will result in an unrecoverable &amp;quot;Illegal instruction&amp;quot; exception.&lt;br /&gt;
&lt;br /&gt;
== armel/armhf/arm64 ==&lt;br /&gt;
&lt;br /&gt;
High-level summary for software engineers: Don&#039;t do unaligned access.&lt;br /&gt;
It&#039;s always inefficient, sometimes extremely inefficient, and&lt;br /&gt;
in various cases is not permitted at all.&lt;br /&gt;
&lt;br /&gt;
The short answer for the ARM case is that ARMv6 and up guarantee&lt;br /&gt;
that the processor can be configured such that some unaligned&lt;br /&gt;
accesses are fine (or at least just inefficient). Linux by default&lt;br /&gt;
enable this mode and trap:&lt;br /&gt;
* All &amp;lt;=32-bit load/store operations can be unaligned.&lt;br /&gt;
* NEON load-stores can be unaligned (unless an explicit alignment is specified in the encoding).&lt;br /&gt;
&lt;br /&gt;
But:&lt;br /&gt;
* VFP load/stores must be naturally aligned.&lt;br /&gt;
* Load-multiple/store-multiple and ldrd/strd do not work with &amp;lt;32-bit alignment, but can sometimes get fixed up by the kernel at a substantial performance penalty.&lt;br /&gt;
&lt;br /&gt;
PUSH/POP usually requires 32-bit alignment, but then the ABI requires&lt;br /&gt;
64-bit alignment of the stack, so that is less of an issue.&lt;br /&gt;
&lt;br /&gt;
Unaligned load-exclusive/store-exclusive operations are not supported.&lt;br /&gt;
&lt;br /&gt;
No unaligned accesses are permitted to memory regions of Device or&lt;br /&gt;
Strongly-ordered type. But some permutation of this will be true for&lt;br /&gt;
most architectures, and in user-space this would only affect things&lt;br /&gt;
prodding /dev/mem or otherwise mmaping from a device driver.&lt;br /&gt;
&lt;br /&gt;
ARM64 similarly makes it possible to trap unaligned accesses, but if&lt;br /&gt;
that is not enabled (which it isn&#039;t by Linux), everything apart from&lt;br /&gt;
load-exclusive/store-exclusive, load-acquire/store-release and Device&lt;br /&gt;
memory accesses will be handled by hardware.&lt;br /&gt;
&lt;br /&gt;
== avr32 ==&lt;br /&gt;
&lt;br /&gt;
Unaligned access is ok for 32bits word but not for 16bits or 64bits word see [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/avr32/include/asm/unaligned.h kernel source]&lt;br /&gt;
&lt;br /&gt;
== i386/x32/amd64 ==&lt;br /&gt;
&lt;br /&gt;
Unaligned access is slower (but not as much as with other architectures as it is done in hardware and not in software). Moreover some MMX/SSE/vector operation need proper alignment.&lt;br /&gt;
&lt;br /&gt;
Unaligned sync primitives are supported, but there&#039;s active effort to defeature them, with Ice Lakes and newer allowing the kernel to trap.&lt;br /&gt;
&lt;br /&gt;
== ia64 ==&lt;br /&gt;
&lt;br /&gt;
Depending of config may fix with trap handler unaligned access&lt;br /&gt;
&lt;br /&gt;
== riscv64 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Short version&#039;&#039;&#039;: Don&#039;t use unaligned access.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Long version&#039;&#039;&#039;:&lt;br /&gt;
Technically the RISC-V ISA specification allows unaligned access for load and store instructions that are part of the base ISA, but only with significant limitations:&lt;br /&gt;
* Naturally aligned loads and stores are guaranteed to be atomic, but this is not the case for unaligned loads and stores. This can lead to hard-to-find bugs, so unaligned access should really be avoided.&lt;br /&gt;
* Support for unaligned access is usually not implemented in hardware and instead emulated in a trap handler, which makes it very slow.&lt;br /&gt;
&lt;br /&gt;
All synchronization primitives (LR/SC and the atomic memory read-modify-write operations (AMOs)) only allow naturally aligned access.&lt;br /&gt;
&lt;br /&gt;
= Floating point =&lt;br /&gt;
&lt;br /&gt;
First read academic paper about the [http://arxiv.org/abs/cs/0701192 pitfall] of doing multi arch floating point computation&lt;br /&gt;
and the classical &amp;quot;What Every Computer Scientist Should Know About Floating-Point Arithmetic&amp;quot; from [http://www.validlab.com/goldberg/paper.pdf here].&lt;br /&gt;
&lt;br /&gt;
== i386 ==&lt;br /&gt;
&lt;br /&gt;
i387 is a strange beast that suffer from excess precision. Moreover long double is only 80 bits&lt;br /&gt;
&lt;br /&gt;
Internal computation are done with 80 bits of precision that lead to strange and not intuitive result.&lt;br /&gt;
&lt;br /&gt;
== mips/mipsel/mips64el ==&lt;br /&gt;
&lt;br /&gt;
Some mips processors do not contain a hardware floating point unit. In this case the kernel will emulate all FPU instructions at a large performance cost.&lt;br /&gt;
&lt;br /&gt;
= C/C++ Preprocessor Symbols =&lt;br /&gt;
Generally, GNU C tends to define the symbol&lt;br /&gt;
&lt;br /&gt;
 __arch__&lt;br /&gt;
&lt;br /&gt;
A list of some common arch-specific symbols can be found on the [https://github.com/cpredef/predef/blob/master/Architectures.md Pre-defined Architecture Macros] page.&lt;br /&gt;
&lt;br /&gt;
= Signedness =&lt;br /&gt;
When programming in C, variables can be signed or unsigned.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
* `unsigned char c;` - explicit unsigned, 0 &amp;lt;= c &amp;lt;= 255&lt;br /&gt;
* `signed char c;` - explicit signed, -128 &amp;lt;= c &amp;lt;= 127&lt;br /&gt;
* `char c;` - implicit (un)signedness, depending on architecture&lt;br /&gt;
&lt;br /&gt;
To force a signedness, either declare it explicitly or use the gcc command line option -f(un)signed-char. The gcc defaults differ only due to optimisation. Other compilers may not have this issue.&lt;br /&gt;
&lt;br /&gt;
= Architecture baselines =&lt;br /&gt;
&lt;br /&gt;
Each Debian architecture has a &#039;&#039;baseline&#039;&#039; indicating the oldest or least capable CPU on which the architecture can be used. The baseline can change between Debian releases. The baseline is mostly defined by the gcc-&#039;&#039;N&#039;&#039; package, which is configured to produce baseline binaries when options like -march= are not used.&lt;br /&gt;
&lt;br /&gt;
If a package uses options that enable additional CPU features such as -msse in particular source files, then the maintainer of that package is responsible for [[InstructionSelection|making sure those CPU features are only used on CPUs that support them]]. ioquake3&#039;s Altivec support on PowerPC is an example of this technique.&lt;br /&gt;
&lt;br /&gt;
== amd64 ==&lt;br /&gt;
&lt;br /&gt;
x86_64 with no optional extensions (psABI baseline). The core specification includes MMX, SSE and SSE2 so these are OK, but SSE3 and up are not guaranteed. (The default is &#039;&#039;-march=x86-64&#039;&#039;, but not &#039;&#039;-march=x86-64-v2&#039;&#039; or later.)&lt;br /&gt;
&lt;br /&gt;
See [https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build psABI (Table 3.1: Micro-Architecture Levels)] for amd64 ABI level. Wikipedia summary: https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels&lt;br /&gt;
&lt;br /&gt;
== arc ==&lt;br /&gt;
&lt;br /&gt;
A fully featured ARC HS with additional support for double-precision FPU (&amp;quot;-mcpu=hs38_linux&amp;quot;). And this is a default &amp;quot;-mcpu&amp;quot; for ARC starting from GCC 11.&lt;br /&gt;
&lt;br /&gt;
To be more precise it&#039;s a baseline ARC HS with HW division (&amp;quot;-mdiv-rem&amp;quot;), atomic instructions (&amp;quot;-matomic&amp;quot;), 64-bit loads/stores	(&amp;quot;-mll64&amp;quot;), the most advanced multiplier (including quad half-word &amp;amp; vector operations, &amp;quot;-mmpy-option=plus_qmacw&amp;quot;) and double-precision FPU (&amp;quot;-mfpu=fpud_all&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
== arm64 ==&lt;br /&gt;
&lt;br /&gt;
aarch64 (ARMv8-A) with no optional extensions. VFPv4 and NEON are OK, but ARMv8.1-A and up are not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== armel ==&lt;br /&gt;
&lt;br /&gt;
armv5te since Debian 10 &#039;buster&#039; (gcc-8 8-20171215-1).&lt;br /&gt;
&lt;br /&gt;
Before that, armv4te.&lt;br /&gt;
&lt;br /&gt;
== armhf ==&lt;br /&gt;
&lt;br /&gt;
armv7 with VFPv3-D16 floating point. NEON is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== i386 ==&lt;br /&gt;
&lt;br /&gt;
* Pentium4 since Trixie.  This includes most notably SSE2. This was made necessary by LLVM&#039;s lack of support for processors without SSE2.&lt;br /&gt;
* i686 since [https://www.debian.org/releases/bookworm/i386/release-notes/ch-information.en.html#i386-is-i686 Debian 12 &#039;bookworm&#039;]. There&#039;s no MMX nor SSE.&lt;br /&gt;
* Before that, [https://salsa.debian.org/ddp-team/release-notes/-/blob/e7b4c032a94b02e31caff6cfdf7d71917ea00346/en/issues.dbk#L286-317 &amp;quot;almost&amp;quot;] i686 (no &amp;quot;long NOP&amp;quot;/NOPL) since Debian 9 &#039;stretch&#039; (gcc-6 6.1.1-1).&lt;br /&gt;
* Before that, i586 since gcc-4.9 4.9-20140411-1 (2014).&lt;br /&gt;
* Before that, i486 since gcc-4.1 4.1ds7-0exp7 (2006).&lt;br /&gt;
* Before that, i386.&lt;br /&gt;
&lt;br /&gt;
See [https://www.sco.com/developers/devspecs/abi386-4.pdf SYSTEM V APPLICATION BINARY INTERFACE], [https://www.uclibc.org/docs/psABI-i386.pdf Intel386 Architecture Processor Supplement] for more information. [https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build psABI (Table 3.1: Micro-Architecture Levels)] for amd64 ABI level may be also relevant, for newer ABI level.&lt;br /&gt;
&lt;br /&gt;
== mips, mipsel ==&lt;br /&gt;
&lt;br /&gt;
MIPS32R2 since Debian 9 &#039;stretch&#039;.&lt;br /&gt;
&lt;br /&gt;
Before that, MIPS II.&lt;br /&gt;
&lt;br /&gt;
== mips64el ==&lt;br /&gt;
&lt;br /&gt;
MIPS64R2 and up.&lt;br /&gt;
&lt;br /&gt;
== powerpc ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== powerpcspe ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is impossible, even with runtime detection.&lt;br /&gt;
&lt;br /&gt;
== ppc64 ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
(Initially Altivec was in the port baseline, but was [https://lists.debian.org/msgid-search/f06cd492-95eb-b0b3-f15c-d5c2501ec0d7@physik.fu-berlin.de later removed to support some embedded systems])&lt;br /&gt;
&lt;br /&gt;
== ppc64el ==&lt;br /&gt;
&lt;br /&gt;
POWER8 and up.&lt;br /&gt;
&lt;br /&gt;
== s390x ==&lt;br /&gt;
&lt;br /&gt;
z196 since Debian 10 &#039;buster&#039;.&lt;br /&gt;
&lt;br /&gt;
== loong64 ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown).&lt;br /&gt;
&lt;br /&gt;
= Obtaining this information =&lt;br /&gt;
&lt;br /&gt;
== via the dpkg build logs ==&lt;br /&gt;
&lt;br /&gt;
Starting with dpkg 1.22.0, its build process will print some of the architecture attributes as part of its configure summary.&lt;br /&gt;
&lt;br /&gt;
Search for «Arch attributes» in the [https://buildd.debian.org/status/package.php?p=dpkg dpkg build logs].&lt;br /&gt;
&lt;br /&gt;
== via the C pre-processor ==&lt;br /&gt;
&lt;br /&gt;
 echo | cpp -dM | sort&lt;br /&gt;
&lt;br /&gt;
== via a special tool ==&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;alloca.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stddef.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;time.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 static void test_size_align(const char *name, size_t size, size_t align) {&lt;br /&gt;
   printf(&amp;quot;sizeof(%s) = %zu\n&amp;quot;, name, size);&lt;br /&gt;
   if (size != align) printf(&amp;quot;alignment(%s) = %zu\n&amp;quot;, name, align);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 #define TEST_SIZE_ALIGN(type, name) \&lt;br /&gt;
   struct test_align_##name { char a; type b; }; \&lt;br /&gt;
   test_size_align(#type, sizeof(type), offsetof(struct test_align_##name, b))&lt;br /&gt;
 &lt;br /&gt;
 static void test_endian(void) {&lt;br /&gt;
 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__&lt;br /&gt;
   printf(&amp;quot;byte order = little endian\n&amp;quot;);&lt;br /&gt;
 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__&lt;br /&gt;
   printf(&amp;quot;byte order = big endian\n&amp;quot;);&lt;br /&gt;
 #endif&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void test_char(void) {&lt;br /&gt;
   if ((int)(char)-1 == -1) printf(&amp;quot;char signedness = signed\n&amp;quot;);&lt;br /&gt;
   else if ((int)(char)-1 == 255) printf(&amp;quot;char signedness = unsigned\n&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void test_stack(void) {&lt;br /&gt;
   void *a = alloca(8);&lt;br /&gt;
   void *b = alloca(8);&lt;br /&gt;
   if (a &amp;gt; b) printf(&amp;quot;stack = grows down\n&amp;quot;);&lt;br /&gt;
   else printf(&amp;quot;stack = grows up\n&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main(void) {&lt;br /&gt;
   TEST_SIZE_ALIGN(short, short);&lt;br /&gt;
   TEST_SIZE_ALIGN(int, int);&lt;br /&gt;
   TEST_SIZE_ALIGN(long, long);&lt;br /&gt;
   TEST_SIZE_ALIGN(long long, long_long);&lt;br /&gt;
   TEST_SIZE_ALIGN(float, float);&lt;br /&gt;
   TEST_SIZE_ALIGN(double, double);&lt;br /&gt;
   TEST_SIZE_ALIGN(long double, long_double);&lt;br /&gt;
   TEST_SIZE_ALIGN(void *, pointer);&lt;br /&gt;
   TEST_SIZE_ALIGN(time_t, time_t);&lt;br /&gt;
   test_endian();&lt;br /&gt;
   test_char();&lt;br /&gt;
   test_stack();&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== via autoconf ==&lt;br /&gt;
&lt;br /&gt;
 AC_INIT(archtest, 0.1)&lt;br /&gt;
 AC_CHECK_SIZEOF(short)&lt;br /&gt;
 AC_CHECK_SIZEOF(int)&lt;br /&gt;
 AC_CHECK_SIZEOF(long)&lt;br /&gt;
 AC_CHECK_SIZEOF(long long)&lt;br /&gt;
 AC_CHECK_SIZEOF(float)&lt;br /&gt;
 AC_CHECK_SIZEOF(double)&lt;br /&gt;
 AC_CHECK_SIZEOF(long double)&lt;br /&gt;
 AC_CHECK_SIZEOF(void*)&lt;br /&gt;
 AC_C_BIGENDIAN()&lt;br /&gt;
 AC_C_CHAR_UNSIGNED()&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* Information about [Haskell/GHC Haskell] on different architectures.&lt;br /&gt;
* [https://github.com/cpredef/predef/blob/master/Architectures.md Pre-defined Compiler Macros Wiki - Architectures]&lt;br /&gt;
* [https://gcc.gnu.org/onlinedocs/cpp/Predefined-Macros.html GCC Predefined Macros]&lt;br /&gt;
* [InstructionSelection Instruction Selection]&lt;br /&gt;
* [Multiarch/Tuples]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Ports]]&lt;/div&gt;</summary>
		<author><name>Zeha</name></author>
	</entry>
	<entry>
		<id>https://wiki2025.debian.org/index.php?title=ArchitectureSpecificsMemo&amp;diff=6</id>
		<title>ArchitectureSpecificsMemo</title>
		<link rel="alternate" type="text/html" href="https://wiki2025.debian.org/index.php?title=ArchitectureSpecificsMemo&amp;diff=6"/>
		<updated>2025-07-18T21:51:52Z</updated>

		<summary type="html">&lt;p&gt;Zeha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
This page is a &#039;&#039;&#039;draft&#039;&#039;&#039;. Please help enhancing it by adding lines and filling tables. Comments at the bottom of the text are also welcome.&lt;br /&gt;
&lt;br /&gt;
This is just a quick array to recall some of the specifics of the architectures found in the Debian project.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!sizeof(short)&lt;br /&gt;
!sizeof(int)&lt;br /&gt;
!sizeof(long)&lt;br /&gt;
!sizeof(long long)&lt;br /&gt;
!sizeof(float)&lt;br /&gt;
!sizeof(double)&lt;br /&gt;
|-&lt;br /&gt;
|| &#039;&#039;&#039;any&#039;&#039;&#039; || 2 || 4 || sizeof(void *) || 8 || 4 || 8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!sizeof(void*)&lt;br /&gt;
!sizeof(long double)&lt;br /&gt;
!max_align_t alignment&lt;br /&gt;
!char&lt;br /&gt;
!endian&lt;br /&gt;
!stack grows&lt;br /&gt;
!page sizes&lt;br /&gt;
User-visible page size returned by &amp;lt;code&amp;gt;getauxval(AT_PAGESZ)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;getconf PAGESIZE&amp;lt;/code&amp;gt;, the granularity of the memory map&lt;br /&gt;
!float&lt;br /&gt;
H=hard, S=soft, P=partial, +=excess precision, ~=not usual standard&lt;br /&gt;
!double&lt;br /&gt;
Note that the columns refer to C types. H=hard, S=soft, P=partial, +=excess precision, ~=not usual standard)&lt;br /&gt;
!long double&lt;br /&gt;
Note that the columns refer to C types. H=hard, S=soft, P=partial, +=excess precision,-=long double precision &amp;lt; __float128, ~=not usual standard)&lt;br /&gt;
!sizeof(time_t)&lt;br /&gt;
With &amp;lt;code&amp;gt;_TIME_BITS=64&amp;lt;/code&amp;gt; the size is 8 on all archs&lt;br /&gt;
!GCC pre-defined macro(s)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;alpha&#039;&#039;&#039;&lt;br /&gt;
||8&lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||16||signed||LE||down||8K||?||?||?||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__alpha__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;any-amd64, amd64, kfreebsd-amd64, hurd-amd64&#039;&#039;&#039; ||8||16||16||signed||LE||down||4K ||H||H&lt;br /&gt;
||H-&lt;br /&gt;
 Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__x86_64__ &amp;amp;&amp;amp; __LP64__&amp;lt;/code&amp;gt; it&#039;s a common gotcha for x32, you need to use &amp;lt;code&amp;gt;__LP64__&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;__ILP32__&amp;lt;/code&amp;gt; to tell them apart&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arc&#039;&#039;&#039;                       ||4 ||16||?||unsigned||LE||down||8K       ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__arc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm&#039;&#039;&#039;                       ||4 ||? ||8||unsigned||LE||down||?        ||S ||S ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64&#039;&#039;&#039;       ||8 ||16||16||unsigned||LE||down||4K, 16K, 64K ||H ||H ||S ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__aarch64__ &amp;amp;&amp;amp; __LP64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64ilp32&#039;&#039;&#039;       ||4 ||16||?||unsigned||LE||down||4K, 16K, 64K ||H ||H ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__aarch64__ &amp;amp;&amp;amp; __ILP32__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armel&#039;&#039;&#039;     ||4 ||8 ||8||unsigned||LE||down||4K       ||S ||S ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__ &amp;amp;&amp;amp; __ARM_EABI__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armhf&#039;&#039;&#039;||4 ||8 ||8||unsigned||LE||down||4K       ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__ &amp;amp;&amp;amp; __ARM_EABI__ &amp;amp;&amp;amp; __ARM_PCS_VFP&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;avr32&#039;&#039;&#039;                     ||4 ||8 ||?||unsigned||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hppa&#039;&#039;&#039;                      ||4 ||8 ||8||  signed||BE||up  ||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__hppa__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;any-i386i386, kfreebsd-i386, hurd-i386&#039;&#039;&#039; ||                                       4||12||168 prior to GCC 7||  signed||LE||down||4K ||H+||H+&lt;br /&gt;
||H- &lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__i386__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ia64&#039;&#039;&#039;                     ||8 ||16||16||  signed||LE&lt;br /&gt;
||both&lt;br /&gt;
The conventional stack grows down from the top of the stack mapping, but there is also the Register Backing Store which grows up from the bottom of the stack mapping at the same time&lt;br /&gt;
||?        ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__ia64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;loong64&#039;&#039;&#039;               ||8 ||16||16||  signed||LE||down||4K-64K   ||H ||H ||S ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__loongarch__ &amp;amp;&amp;amp; __loongarch_lp64 &amp;amp;&amp;amp; __loongarch_double_float&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;m68k&#039;&#039;&#039;             ||4 ||12||2||  signed||BE||down||4K       ||S?||S?||S?||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__m68k__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips&#039;&#039;&#039;         ||4 ||8 ||8||  signed||BE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABIO32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsel&#039;&#039;&#039;       ||4 ||8 ||8||  signed||LE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABIO32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64&#039;&#039;&#039;     ||8 ||16||16||  signed||BE||down||4K-64K   ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABI64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64el&#039;&#039;&#039;     ||8 ||16||16||  signed||LE||down||4K-64K   ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABI64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32&#039;&#039;&#039;         ||4 ||8 ||?||  signed||BE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABIN32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32el&#039;&#039;&#039;       ||4 ||8 ||?||  signed||LE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABIN32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;powerpc&#039;&#039;&#039;       ||4 &lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||16||                                              unsigned||BE||down||4K-64K   ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64&#039;&#039;&#039;           ||8 ||16||16||unsigned||BE||down||4K-64K   ||? ||? ||? ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__ &amp;amp;&amp;amp; __powerpc64__ &amp;amp;&amp;amp; __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64el&#039;&#039;&#039;       ||8 ||16||16||unsigned||LE||down||4K-64K-16M||H||H ||H~||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__ &amp;amp;&amp;amp; __ppc64__ &amp;amp;&amp;amp; __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;riscv64&#039;&#039;&#039;&lt;br /&gt;
||8 &lt;br /&gt;
||16(8)&lt;br /&gt;
The RV64 ISA spec defines long double as 16 bytes, but older toolchains (pre-&amp;quot;riscv-gcc-6.1.0&amp;quot;) have implemented long double as 8 bytes on RV64; cf. https://github.com/riscv/riscv-gcc/commit/54b21fc5ae83cefec44bc2caed4a8c664c274ba0&lt;br /&gt;
||16||unsigned||LE||down||4K 4k is the default page size on all RISC-V systems. Depending on the chosen virtual memory mode (Sv32/Sv39/Sv48) additional page sizes are available as well: Sv32 supports 4k and 4M pages, Sv39 supports 4k, 2M and 1G pages and Sv48 supports 4k,  2M, 1G, and 512G pages       ||H ||H ||H~||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__riscv &amp;amp;&amp;amp; __riscv_xlen==64&amp;lt;/code&amp;gt; Older, pre-mainline RISC-V toolchains used &amp;lt;code&amp;gt;__riscv__ &amp;amp;&amp;amp; __riscv64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390&#039;&#039;&#039;                      ||4&lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||?||                                              unsigned||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__s390__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390x&#039;&#039;&#039;                     ||8 ||16||8||unsigned||BE||down||4K, 1M, 2G       ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__s390x__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sh4&#039;&#039;&#039;               ||4 ||8 ||4||  signed||LE||down||4K       ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__sh__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc&#039;&#039;&#039;      ||4 &lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||?||                                                signed||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__sparc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc64&#039;&#039;&#039;       ||8 ||16||16||  signed||BE||down||8K, 64K, 512K, 4M, 32M, 256M, 2G, 16G||? ||? ||? ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__sparc__ &amp;amp;&amp;amp; __arch64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;x32&#039;&#039;&#039;                       ||4 ||16||16||  signed||LE||down||4K ||H ||H &lt;br /&gt;
||H-&lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__x86_64__ &amp;amp;&amp;amp; __ILP32__&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!multiarch&lt;br /&gt;
!ELFCLASS&lt;br /&gt;
!ELF machine EM_&lt;br /&gt;
!ld.so(8)&lt;br /&gt;
!uname -mUsed to classify CPU architectures in CMake and many ad-hoc build systems, but note that this is a kernel and/or libc specific name despite referring to the CPU&lt;br /&gt;
!Meson[https://mesonbuild.com/Reference-tables.html Reference table] of Meson hardware architecture names&lt;br /&gt;
!qemue.g. i386 results in qemu(-system)-i386(-static)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;alpha&#039;&#039;&#039;                     ||alpha-linux-gnu            ||64||ALPHA||/lib/ld-linux.so.2||alpha||alpha|| alpha&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;amd64&#039;&#039;&#039;                     ||x86_64-linux-gnu           ||64||X86_64||/lib64/ld-linux-x86-64.so.2||x86_64||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hurd-amd64&#039;&#039;&#039;                ||x86_64-gnu                 ||64||X86_64||/lib/ld-x86-64.so||x86_64-AT386||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;kfreebsd-amd64&#039;&#039;&#039;            ||x86_64-kfreebsd-gnu        ||64||X86_64||/lib/ld-kfreebsd-x86-64.so.1||x86_64||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arc&#039;&#039;&#039;                       ||arc-linux-gnu              ||32||ARC_COMPACT2||/lib/ld-linux-arc.so.2||arc||arc||-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm&#039;&#039;&#039;                       ||arm-linux-gnu              ||32||ARM||/lib/ld-linux.so.2||arm*Many names starting with arm, e.g. armv5tel||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64&#039;&#039;&#039;       ||aarch64-linux-gnu          ||64||AARCH64||/lib/ld-linux-aarch64.so.1||aarch64||aarch64||aarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64ilp32&#039;&#039;&#039;||aarch64-linux-gnu_ilp32 ||32?||AARCH64?|| ||aarch64?|| || aarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armel&#039;&#039;&#039;     ||arm-linux-gnueabi          ||32||ARM||/lib/ld-linux.so.3||arm*||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armhf&#039;&#039;&#039;||arm-linux-gnueabihf        ||32||ARM||/lib/ld-linux-armhf.so.3||arm*||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;avr32&#039;&#039;&#039;                     ||                           ||  || || || ||avr||avrqemu-system-avr only&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hppa&#039;&#039;&#039;                      ||hppa-linux-gnu             ||32||PARISC||/lib/ld.so.1||parisc*||parisc||hppa&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;i386&#039;&#039;&#039;                      ||i386-linux-gnu             ||32||386||/lib/ld-linux.so.2||i?86i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hurd-i386&#039;&#039;&#039;                 ||i386-gnu                   ||32||386||/lib/ld.so||i?86-AT386i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;kfreebsd-i386&#039;&#039;&#039;             ||i386-kfreebsd-gnu          ||32||386||/lib/ld.so.1||i?86i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ia64&#039;&#039;&#039;                      ||ia64-linux-gnu             ||64||IA_64||/lib/ld-linux-ia64.so.2||ia64||ia64||-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;loong64&#039;&#039;&#039;               ||loongarch64-linux-gnu      ||64||LOONGARCH||/lib64/ld-linux-loongarch-lp64d.so.1||loongarch64||loongarch64||loongarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;m68k&#039;&#039;&#039;             ||m68k-linux-gnu             ||32||68K||/lib/ld.so.1||m68k||m68k||m68k&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips&#039;&#039;&#039;         ||mips-linux-gnu             ||32||MIPS||/lib/ld.so.1||mips||mips||mips&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsel&#039;&#039;&#039;       ||mipsel-linux-gnu           ||32||MIPS||/lib/ld.so.1||mips||mips||mipsel&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64&#039;&#039;&#039;       ||mips64-linux-gnuabi64      ||  || || ||mips64||mips64||mips64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64el&#039;&#039;&#039;     ||mips64el-linux-gnuabi64    ||64||MIPS||/lib64/ld.so.1||mips64||mips64||mips64el&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32&#039;&#039;&#039;      ||mips64-linux-gnuabin32     ||  || || || || ||mipsn32&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32el&#039;&#039;&#039;    ||mips64el-linux-gnuabin32   ||  || || || || ||mipsn32el&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;powerpc&#039;&#039;&#039;       ||powerpc-linux-gnu          ||32||PPC||/lib/ld.so.1||ppc||ppc||ppc&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64&#039;&#039;&#039;           ||powerpc64-linux-gnu        ||64||PPC64||/lib64/ld64.so.1||ppc64||ppc64||ppc64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64el&#039;&#039;&#039;       ||powerpc64le-linux-gnu      ||64||PPC64||/lib64/ld64.so.2||ppcle ppc64le||ppc64||ppc64le&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;riscv64&#039;&#039;&#039;        ||riscv64-linux-gnu          ||64||RISCV||/lib/ld-linux-riscv64-lp64d.so.1 ||riscv64||riscv64||riscv64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390&#039;&#039;&#039;                      ||s390-linux-gnu             ||32||S390||/lib/ld.so.1||s390||s390||(s390x)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390x&#039;&#039;&#039;                     ||s390x-linux-gnu            ||64||S390||/lib/ld64.so.1||s390x||s390x||s390x&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sh4&#039;&#039;&#039;               ||sh4-linux-gnu              ||32||SH||/lib/ld-linux.so.2||sh||sh4||sh4&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc&#039;&#039;&#039;      ||sparc-linux-gnu            ||32||SPARC32PLUS||/lib/ld-linux.so.2||sparc||sparc||sparc(32plus)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc64&#039;&#039;&#039;       ||sparc64-linux-gnu          ||64||SPARCV9||/lib64/ld-linux.so.2||sparc64||sparc64||sparc64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;x32&#039;&#039;&#039;                       ||x86_64-linux-gnux32        ||32||X86_64||/libx32/ld-linux-x32.so.2||x86_64|| ||x86_64&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Alignment =&lt;br /&gt;
&lt;br /&gt;
Note that there is alignment on the machine language level and alignment in C. Proper misalignment (for example in a packed struct) is no problem in C and allowed almost everywhere (except of SPARC, where you will receive SIGBUS on a program execution, misaligned variable/memory access) and the compiler will do the right thing (like translating a read of a variable to two loads at machine language level). On the other hand most of the constructs that lead to unaligned access not properly handled by the C compiler (especially most constructs involving pointer casting) have undefined behaviour anyway, so compiling them with optimisation enabled can cause strange effects on all architectures. Read more on a Wikipedia article [https://en.wikipedia.org/wiki/Data_structure_alignment Data structure alignment].&lt;br /&gt;
&lt;br /&gt;
On the other hand, unaligned synchronization primitives (atomics, etc) tend to be unsupported or extremely slow.  Extra joy if they cross cacheline or page boundaries.&lt;br /&gt;
&lt;br /&gt;
== alpha ==&lt;br /&gt;
&lt;br /&gt;
Some alpha may emulate see [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/alpha/kernel/traps.c kernel source]&lt;br /&gt;
&lt;br /&gt;
== arc ==&lt;br /&gt;
&lt;br /&gt;
ARCv2 processors (ARC HS38 and ARC HS48 variants, 1-4 cores) support unaligned access in hardware, except for &amp;quot;atomic instructions&amp;quot; where special considerations apply. ARCv2 features 2 types of atomic instructions: the first for 32-bit data (&amp;quot;llock&amp;quot;/&amp;quot;scond&amp;quot; pair) and the second for 64-bit data (&amp;quot;llockd&amp;quot;/&amp;quot;scondd&amp;quot;). Those atomic instructions must work on data aligned naturally. I.e. &amp;quot;llock&amp;quot;/&amp;quot;scond&amp;quot; must be only used on 32-bit word-aligned data, &amp;quot;llockd&amp;quot;/&amp;quot;scondd&amp;quot; must be only used on 64-bit double-word aligned data. If an unaligned access is done by &amp;quot;atomic instruction&amp;quot; in user-space, the offending application gets forcefully killed with visible mention of a segmentation fault.  An unaligned access done by “atomic instruction” in kernel-mode will result in an unrecoverable &amp;quot;Illegal instruction&amp;quot; exception.&lt;br /&gt;
&lt;br /&gt;
== armel/armhf/arm64 ==&lt;br /&gt;
&lt;br /&gt;
High-level summary for software engineers: Don&#039;t do unaligned access.&lt;br /&gt;
It&#039;s always inefficient, sometimes extremely inefficient, and&lt;br /&gt;
in various cases is not permitted at all.&lt;br /&gt;
&lt;br /&gt;
The short answer for the ARM case is that ARMv6 and up guarantee&lt;br /&gt;
that the processor can be configured such that some unaligned&lt;br /&gt;
accesses are fine (or at least just inefficient). Linux by default&lt;br /&gt;
enable this mode and trap:&lt;br /&gt;
* All &amp;lt;=32-bit load/store operations can be unaligned.&lt;br /&gt;
* NEON load-stores can be unaligned (unless an explicit alignment is specified in the encoding).&lt;br /&gt;
&lt;br /&gt;
But:&lt;br /&gt;
* VFP load/stores must be naturally aligned.&lt;br /&gt;
* Load-multiple/store-multiple and ldrd/strd do not work with &amp;lt;32-bit alignment, but can sometimes get fixed up by the kernel at a substantial performance penalty.&lt;br /&gt;
&lt;br /&gt;
PUSH/POP usually requires 32-bit alignment, but then the ABI requires&lt;br /&gt;
64-bit alignment of the stack, so that is less of an issue.&lt;br /&gt;
&lt;br /&gt;
Unaligned load-exclusive/store-exclusive operations are not supported.&lt;br /&gt;
&lt;br /&gt;
No unaligned accesses are permitted to memory regions of Device or&lt;br /&gt;
Strongly-ordered type. But some permutation of this will be true for&lt;br /&gt;
most architectures, and in user-space this would only affect things&lt;br /&gt;
prodding /dev/mem or otherwise mmaping from a device driver.&lt;br /&gt;
&lt;br /&gt;
ARM64 similarly makes it possible to trap unaligned accesses, but if&lt;br /&gt;
that is not enabled (which it isn&#039;t by Linux), everything apart from&lt;br /&gt;
load-exclusive/store-exclusive, load-acquire/store-release and Device&lt;br /&gt;
memory accesses will be handled by hardware.&lt;br /&gt;
&lt;br /&gt;
== avr32 ==&lt;br /&gt;
&lt;br /&gt;
Unaligned access is ok for 32bits word but not for 16bits or 64bits word see[https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/avr32/include/asm/unaligned.h kernel source]&lt;br /&gt;
&lt;br /&gt;
== i386/x32/amd64 ==&lt;br /&gt;
&lt;br /&gt;
Unaligned access is slower (but not as much as with other architectures as it is done in hardware and not in software). Moreover some MMX/SSE/vector operation need proper alignment.&lt;br /&gt;
&lt;br /&gt;
Unaligned sync primitives are supported, but there&#039;s active effort to defeature them, with Ice Lakes and newer allowing the kernel to trap.&lt;br /&gt;
&lt;br /&gt;
== ia64 ==&lt;br /&gt;
&lt;br /&gt;
Depending of config may fix with trap handler unaligned access&lt;br /&gt;
&lt;br /&gt;
== riscv64 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Short version&#039;&#039;&#039;: Don&#039;t use unaligned access.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Long version&#039;&#039;&#039;:&lt;br /&gt;
Technically the RISC-V ISA specification allows unaligned access for load and store instructions that are part of the base ISA, but only with significant limitations:&lt;br /&gt;
* Naturally aligned loads and stores are guaranteed to be atomic, but this is not the case for unaligned loads and stores. This can lead to hard-to-find bugs, so unaligned access should really be avoided.&lt;br /&gt;
* Support for unaligned access is usually not implemented in hardware and instead emulated in a trap handler, which makes it very slow.&lt;br /&gt;
&lt;br /&gt;
All synchronization primitives (LR/SC and the atomic memory read-modify-write operations (AMOs)) only allow naturally aligned access.&lt;br /&gt;
&lt;br /&gt;
= Floating point =&lt;br /&gt;
&lt;br /&gt;
First read academic paper about the [http://arxiv.org/abs/cs/0701192 pitfall] of doing multi arch floating point computation&lt;br /&gt;
and the classical &amp;quot;What Every Computer Scientist Should Know About Floating-Point Arithmetic&amp;quot; from [http://www.validlab.com/goldberg/paper.pdf here].&lt;br /&gt;
&lt;br /&gt;
== i386 ==&lt;br /&gt;
&lt;br /&gt;
i387 is a strange beast that suffer from excess precision. Moreover long double is only 80 bits&lt;br /&gt;
&lt;br /&gt;
Internal computation are done with 80 bits of precision that lead to strange and not intuitive result.&lt;br /&gt;
&lt;br /&gt;
== mips/mipsel/mips64el ==&lt;br /&gt;
&lt;br /&gt;
Some mips processors do not contain a hardware floating point unit. In this case the kernel will emulate all FPU instructions at a large performance cost.&lt;br /&gt;
&lt;br /&gt;
= C/C++ Preprocessor Symbols =&lt;br /&gt;
Generally, GNU C tends to define the symbol&lt;br /&gt;
&lt;br /&gt;
 __arch__&lt;br /&gt;
&lt;br /&gt;
A list of some common arch-specific symbols can be found on the [https://github.com/cpredef/predef/blob/master/Architectures.md Pre-defined Architecture Macros] page.&lt;br /&gt;
&lt;br /&gt;
= Signedness =&lt;br /&gt;
When programming in C, variables can be signed or unsigned.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
* `unsigned char c;` - explicit unsigned, 0 &amp;lt;= c &amp;lt;= 255&lt;br /&gt;
* `signed char c;` - explicit signed, -128 &amp;lt;= c &amp;lt;= 127&lt;br /&gt;
* `char c;` - implicit (un)signedness, depending on architecture&lt;br /&gt;
&lt;br /&gt;
To force a signedness, either declare it explicitly or use the gcc command line option -f(un)signed-char. The gcc defaults differ only due to optimisation. Other compilers may not have this issue.&lt;br /&gt;
&lt;br /&gt;
= Architecture baselines =&lt;br /&gt;
&lt;br /&gt;
Each Debian architecture has a &#039;&#039;baseline&#039;&#039; indicating the oldest or least capable CPU on which the architecture can be used. The baseline can change between Debian releases. The baseline is mostly defined by the gcc-&#039;&#039;N&#039;&#039; package, which is configured to produce baseline binaries when options like -march= are not used.&lt;br /&gt;
&lt;br /&gt;
If a package uses options that enable additional CPU features such as -msse in particular source files, then the maintainer of that package is responsible for [[InstructionSelection|making sure those CPU features are only used on CPUs that support them]]. ioquake3&#039;s Altivec support on PowerPC is an example of this technique.&lt;br /&gt;
&lt;br /&gt;
== amd64 ==&lt;br /&gt;
&lt;br /&gt;
x86_64 with no optional extensions (psABI baseline). The core specification includes MMX, SSE and SSE2 so these are OK, but SSE3 and up are not guaranteed. (The default is &#039;&#039;-march=x86-64&#039;&#039;, but not &#039;&#039;-march=x86-64-v2&#039;&#039; or later.)&lt;br /&gt;
&lt;br /&gt;
See [https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build psABI (Table 3.1: Micro-Architecture Levels)] for amd64 ABI level. Wikipedia summary: https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels&lt;br /&gt;
&lt;br /&gt;
== arc ==&lt;br /&gt;
&lt;br /&gt;
A fully featured ARC HS with additional support for double-precision FPU (&amp;quot;-mcpu=hs38_linux&amp;quot;). And this is a default &amp;quot;-mcpu&amp;quot; for ARC starting from GCC 11.&lt;br /&gt;
&lt;br /&gt;
To be more precise it&#039;s a baseline ARC HS with HW division (&amp;quot;-mdiv-rem&amp;quot;), atomic instructions (&amp;quot;-matomic&amp;quot;), 64-bit loads/stores	(&amp;quot;-mll64&amp;quot;), the most advanced multiplier (including quad half-word &amp;amp; vector operations, &amp;quot;-mmpy-option=plus_qmacw&amp;quot;) and double-precision FPU (&amp;quot;-mfpu=fpud_all&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
== arm64 ==&lt;br /&gt;
&lt;br /&gt;
aarch64 (ARMv8-A) with no optional extensions. VFPv4 and NEON are OK, but ARMv8.1-A and up are not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== armel ==&lt;br /&gt;
&lt;br /&gt;
armv5te since Debian 10 &#039;buster&#039; (gcc-8 8-20171215-1).&lt;br /&gt;
&lt;br /&gt;
Before that, armv4te.&lt;br /&gt;
&lt;br /&gt;
== armhf ==&lt;br /&gt;
&lt;br /&gt;
armv7 with VFPv3-D16 floating point. NEON is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== i386 ==&lt;br /&gt;
&lt;br /&gt;
* Pentium4 since Trixie.  This includes most notably SSE2. This was made necessary by LLVM&#039;s lack of support for processors without SSE2.&lt;br /&gt;
* i686 since [https://www.debian.org/releases/bookworm/i386/release-notes/ch-information.en.html#i386-is-i686 Debian 12 &#039;bookworm&#039;]. There&#039;s no MMX nor SSE.&lt;br /&gt;
* Before that, [https://salsa.debian.org/ddp-team/release-notes/-/blob/e7b4c032a94b02e31caff6cfdf7d71917ea00346/en/issues.dbk#L286-317 &amp;quot;almost&amp;quot;] i686 (no &amp;quot;long NOP&amp;quot;/NOPL) since Debian 9 &#039;stretch&#039; (gcc-6 6.1.1-1).&lt;br /&gt;
* Before that, i586 since gcc-4.9 4.9-20140411-1 (2014).&lt;br /&gt;
* Before that, i486 since gcc-4.1 4.1ds7-0exp7 (2006).&lt;br /&gt;
* Before that, i386.&lt;br /&gt;
&lt;br /&gt;
See [https://www.sco.com/developers/devspecs/abi386-4.pdf SYSTEM V APPLICATION BINARY INTERFACE], [https://www.uclibc.org/docs/psABI-i386.pdf Intel386 Architecture Processor Supplement] for more information. [https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build psABI (Table 3.1: Micro-Architecture Levels)] for amd64 ABI level may be also relevant, for newer ABI level.&lt;br /&gt;
&lt;br /&gt;
== mips, mipsel ==&lt;br /&gt;
&lt;br /&gt;
MIPS32R2 since Debian 9 &#039;stretch&#039;.&lt;br /&gt;
&lt;br /&gt;
Before that, MIPS II.&lt;br /&gt;
&lt;br /&gt;
== mips64el ==&lt;br /&gt;
&lt;br /&gt;
MIPS64R2 and up.&lt;br /&gt;
&lt;br /&gt;
== powerpc ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== powerpcspe ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is impossible, even with runtime detection.&lt;br /&gt;
&lt;br /&gt;
== ppc64 ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
(Initially Altivec was in the port baseline, but was [https://lists.debian.org/msgid-search/f06cd492-95eb-b0b3-f15c-d5c2501ec0d7@physik.fu-berlin.de later removed to support some embedded systems])&lt;br /&gt;
&lt;br /&gt;
== ppc64el ==&lt;br /&gt;
&lt;br /&gt;
POWER8 and up.&lt;br /&gt;
&lt;br /&gt;
== s390x ==&lt;br /&gt;
&lt;br /&gt;
z196 since Debian 10 &#039;buster&#039;.&lt;br /&gt;
&lt;br /&gt;
== loong64 ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown).&lt;br /&gt;
&lt;br /&gt;
= Obtaining this information =&lt;br /&gt;
&lt;br /&gt;
== via the dpkg build logs ==&lt;br /&gt;
&lt;br /&gt;
Starting with dpkg 1.22.0, its build process will print some of the architecture attributes as part of its configure summary.&lt;br /&gt;
&lt;br /&gt;
Search for «Arch attributes» in the [https://buildd.debian.org/status/package.php?p=dpkg dpkg build logs].&lt;br /&gt;
&lt;br /&gt;
== via the C pre-processor ==&lt;br /&gt;
&lt;br /&gt;
 echo | cpp -dM | sort&lt;br /&gt;
&lt;br /&gt;
== via a special tool ==&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;alloca.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stddef.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;time.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 static void test_size_align(const char *name, size_t size, size_t align) {&lt;br /&gt;
   printf(&amp;quot;sizeof(%s) = %zu\n&amp;quot;, name, size);&lt;br /&gt;
   if (size != align) printf(&amp;quot;alignment(%s) = %zu\n&amp;quot;, name, align);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 #define TEST_SIZE_ALIGN(type, name) \&lt;br /&gt;
   struct test_align_##name { char a; type b; }; \&lt;br /&gt;
   test_size_align(#type, sizeof(type), offsetof(struct test_align_##name, b))&lt;br /&gt;
 &lt;br /&gt;
 static void test_endian(void) {&lt;br /&gt;
 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__&lt;br /&gt;
   printf(&amp;quot;byte order = little endian\n&amp;quot;);&lt;br /&gt;
 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__&lt;br /&gt;
   printf(&amp;quot;byte order = big endian\n&amp;quot;);&lt;br /&gt;
 #endif&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void test_char(void) {&lt;br /&gt;
   if ((int)(char)-1 == -1) printf(&amp;quot;char signedness = signed\n&amp;quot;);&lt;br /&gt;
   else if ((int)(char)-1 == 255) printf(&amp;quot;char signedness = unsigned\n&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void test_stack(void) {&lt;br /&gt;
   void *a = alloca(8);&lt;br /&gt;
   void *b = alloca(8);&lt;br /&gt;
   if (a &amp;gt; b) printf(&amp;quot;stack = grows down\n&amp;quot;);&lt;br /&gt;
   else printf(&amp;quot;stack = grows up\n&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main(void) {&lt;br /&gt;
   TEST_SIZE_ALIGN(short, short);&lt;br /&gt;
   TEST_SIZE_ALIGN(int, int);&lt;br /&gt;
   TEST_SIZE_ALIGN(long, long);&lt;br /&gt;
   TEST_SIZE_ALIGN(long long, long_long);&lt;br /&gt;
   TEST_SIZE_ALIGN(float, float);&lt;br /&gt;
   TEST_SIZE_ALIGN(double, double);&lt;br /&gt;
   TEST_SIZE_ALIGN(long double, long_double);&lt;br /&gt;
   TEST_SIZE_ALIGN(void *, pointer);&lt;br /&gt;
   TEST_SIZE_ALIGN(time_t, time_t);&lt;br /&gt;
   test_endian();&lt;br /&gt;
   test_char();&lt;br /&gt;
   test_stack();&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== via autoconf ==&lt;br /&gt;
&lt;br /&gt;
 AC_INIT(archtest, 0.1)&lt;br /&gt;
 AC_CHECK_SIZEOF(short)&lt;br /&gt;
 AC_CHECK_SIZEOF(int)&lt;br /&gt;
 AC_CHECK_SIZEOF(long)&lt;br /&gt;
 AC_CHECK_SIZEOF(long long)&lt;br /&gt;
 AC_CHECK_SIZEOF(float)&lt;br /&gt;
 AC_CHECK_SIZEOF(double)&lt;br /&gt;
 AC_CHECK_SIZEOF(long double)&lt;br /&gt;
 AC_CHECK_SIZEOF(void*)&lt;br /&gt;
 AC_C_BIGENDIAN()&lt;br /&gt;
 AC_C_CHAR_UNSIGNED()&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* Information about [Haskell/GHC Haskell] on different architectures.&lt;br /&gt;
* [https://github.com/cpredef/predef/blob/master/Architectures.md Pre-defined Compiler Macros Wiki - Architectures]&lt;br /&gt;
* [https://gcc.gnu.org/onlinedocs/cpp/Predefined-Macros.html GCC Predefined Macros]&lt;br /&gt;
* [InstructionSelection Instruction Selection]&lt;br /&gt;
* [Multiarch/Tuples]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Ports]]&lt;/div&gt;</summary>
		<author><name>Zeha</name></author>
	</entry>
	<entry>
		<id>https://wiki2025.debian.org/index.php?title=ArchitectureSpecificsMemo&amp;diff=5</id>
		<title>ArchitectureSpecificsMemo</title>
		<link rel="alternate" type="text/html" href="https://wiki2025.debian.org/index.php?title=ArchitectureSpecificsMemo&amp;diff=5"/>
		<updated>2025-07-18T21:50:11Z</updated>

		<summary type="html">&lt;p&gt;Zeha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
This page is a &#039;&#039;&#039;draft&#039;&#039;&#039;. Please help enhancing it by adding lines and filling tables. Comments at the bottom of the text are also welcome.&lt;br /&gt;
&lt;br /&gt;
This is just a quick array to recall some of the specifics of the architectures found in the Debian project.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!sizeof(short)&lt;br /&gt;
!sizeof(int)&lt;br /&gt;
!sizeof(long)&lt;br /&gt;
!sizeof(long long)&lt;br /&gt;
!sizeof(float)&lt;br /&gt;
!sizeof(double)&lt;br /&gt;
|-&lt;br /&gt;
|| &#039;&#039;&#039;any&#039;&#039;&#039; || 2 || 4 || sizeof(void *) || 8 || 4 || 8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!sizeof(void*)&lt;br /&gt;
!sizeof(long double)&lt;br /&gt;
!max_align_t alignment&lt;br /&gt;
!char&lt;br /&gt;
!endian&lt;br /&gt;
!stack grows&lt;br /&gt;
!page sizes&lt;br /&gt;
User-visible page size returned by `getauxval(AT_PAGESZ)` or `getconf PAGESIZE`, the granularity of the memory map&lt;br /&gt;
!float&lt;br /&gt;
H=hard, S=soft, P=partial, +=excess precision, ~=not usual standard&lt;br /&gt;
!double&lt;br /&gt;
Note that the columns refer to C types. H=hard, S=soft, P=partial, +=excess precision, ~=not usual standard)&lt;br /&gt;
!long double&lt;br /&gt;
Note that the columns refer to C types. H=hard, S=soft, P=partial, +=excess precision,-=long double precision &amp;lt; __float128, ~=not usual standard)&lt;br /&gt;
!sizeof(time_t)&lt;br /&gt;
With &amp;lt;code&amp;gt;_TIME_BITS=64&amp;lt;/code&amp;gt; the size is 8 on all archs) &lt;br /&gt;
!GCC pre-defined macro(s)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;alpha&#039;&#039;&#039; ||8||16 long double changed size from 8 to 16 in Lenny)||16||signed||LE||down||8K||?||?||?||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__alpha__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;any-amd64, amd64, kfreebsd-amd64, hurd-amd64&#039;&#039;&#039; ||8||16||16||signed||LE||down||4K ||H||H&lt;br /&gt;
||H-&lt;br /&gt;
 Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__x86_64__ &amp;amp;&amp;amp; __LP64__&amp;lt;/code&amp;gt; it&#039;s a common gotcha for x32, you need to use &amp;lt;code&amp;gt;__LP64__&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;__ILP32__&amp;lt;/code&amp;gt; to tell them apart)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arc&#039;&#039;&#039;                       ||4 ||16||?||unsigned||LE||down||8K       ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__arc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm&#039;&#039;&#039;                       ||4 ||? ||8||unsigned||LE||down||?        ||S ||S ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64&#039;&#039;&#039;       ||8 ||16||16||unsigned||LE||down||4K, 16K, 64K ||H ||H ||S ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__aarch64__ &amp;amp;&amp;amp; __LP64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64ilp32&#039;&#039;&#039;       ||4 ||16||?||unsigned||LE||down||4K, 16K, 64K ||H ||H ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__aarch64__ &amp;amp;&amp;amp; __ILP32__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armel&#039;&#039;&#039;     ||4 ||8 ||8||unsigned||LE||down||4K       ||S ||S ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__ &amp;amp;&amp;amp; __ARM_EABI__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armhf&#039;&#039;&#039;||4 ||8 ||8||unsigned||LE||down||4K       ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__ &amp;amp;&amp;amp; __ARM_EABI__ &amp;amp;&amp;amp; __ARM_PCS_VFP&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;avr32&#039;&#039;&#039;                     ||4 ||8 ||?||unsigned||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hppa&#039;&#039;&#039;                      ||4 ||8 ||8||  signed||BE||up  ||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__hppa__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;any-i386i386, kfreebsd-i386, hurd-i386)&#039;&#039;&#039; ||                                       4||12||168 prior to GCC 7)||  signed||LE||down||4K ||H+||H+&lt;br /&gt;
||H- &lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__i386__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ia64&#039;&#039;&#039;                     ||8 ||16||16||  signed||LE&lt;br /&gt;
||both&lt;br /&gt;
The conventional stack grows down from the top of the stack mapping, but there is also the Register Backing Store which grows up from the bottom of the stack mapping at the same time)&lt;br /&gt;
||?        ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__ia64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;loong64&#039;&#039;&#039;               ||8 ||16||16||  signed||LE||down||4K-64K   ||H ||H ||S ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__loongarch__ &amp;amp;&amp;amp; __loongarch_lp64 &amp;amp;&amp;amp; __loongarch_double_float&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;m68k&#039;&#039;&#039;             ||4 ||12||2||  signed||BE||down||4K       ||S?||S?||S?||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__m68k__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips&#039;&#039;&#039;         ||4 ||8 ||8||  signed||BE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABIO32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsel&#039;&#039;&#039;       ||4 ||8 ||8||  signed||LE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABIO32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64&#039;&#039;&#039;     ||8 ||16||16||  signed||BE||down||4K-64K   ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABI64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64el&#039;&#039;&#039;     ||8 ||16||16||  signed||LE||down||4K-64K   ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABI64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32&#039;&#039;&#039;         ||4 ||8 ||?||  signed||BE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABIN32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32el&#039;&#039;&#039;       ||4 ||8 ||?||  signed||LE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABIN32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;powerpc&#039;&#039;&#039;       ||4 &lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||16||                                              unsigned||BE||down||4K-64K   ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64&#039;&#039;&#039;           ||8 ||16||16||unsigned||BE||down||4K-64K   ||? ||? ||? ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__ &amp;amp;&amp;amp; __powerpc64__ &amp;amp;&amp;amp; __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64el&#039;&#039;&#039;       ||8 ||16||16||unsigned||LE||down||4K-64K-16M||H||H ||H~||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__ &amp;amp;&amp;amp; __ppc64__ &amp;amp;&amp;amp; __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;riscv64&#039;&#039;&#039;&lt;br /&gt;
||8 &lt;br /&gt;
||16(8)&lt;br /&gt;
The RV64 ISA spec defines long double as 16 bytes, but older toolchains (pre-&amp;quot;riscv-gcc-6.1.0&amp;quot;) have implemented long double as 8 bytes on RV64; cf. https://github.com/riscv/riscv-gcc/commit/54b21fc5ae83cefec44bc2caed4a8c664c274ba0&lt;br /&gt;
||16||unsigned||LE||down||4K 4k is the default page size on all RISC-V systems. Depending on the chosen virtual memory mode (Sv32/Sv39/Sv48) additional page sizes are available as well: Sv32 supports 4k and 4M pages, Sv39 supports 4k, 2M and 1G pages and Sv48 supports 4k,  2M, 1G, and 512G pages       ||H ||H ||H~||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__riscv &amp;amp;&amp;amp; __riscv_xlen==64&amp;lt;/code&amp;gt; Older, pre-mainline RISC-V toolchains used &amp;lt;code&amp;gt;__riscv__ &amp;amp;&amp;amp; __riscv64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390&#039;&#039;&#039;                      ||4&lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||?||                                              unsigned||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__s390__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390x&#039;&#039;&#039;                     ||8 ||16||8||unsigned||BE||down||4K, 1M, 2G       ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__s390x__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sh4&#039;&#039;&#039;               ||4 ||8 ||4||  signed||LE||down||4K       ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__sh__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc&#039;&#039;&#039;      ||4 &lt;br /&gt;
||16&lt;br /&gt;
long double changed size from 8 to 16 in Lenny&lt;br /&gt;
||?||                                                signed||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__sparc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc64&#039;&#039;&#039;       ||8 ||16||16||  signed||BE||down||8K, 64K, 512K, 4M, 32M, 256M, 2G, 16G||? ||? ||? ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__sparc__ &amp;amp;&amp;amp; __arch64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;x32&#039;&#039;&#039;                       ||4 ||16||16||  signed||LE||down||4K ||H ||H &lt;br /&gt;
||H-&lt;br /&gt;
Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]&lt;br /&gt;
||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__x86_64__ &amp;amp;&amp;amp; __ILP32__&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!multiarch&lt;br /&gt;
!ELFCLASS&lt;br /&gt;
!ELF machine EM_&lt;br /&gt;
!ld.so(8)&lt;br /&gt;
!uname -mUsed to classify CPU architectures in CMake and many ad-hoc build systems, but note that this is a kernel and/or libc specific name despite referring to the CPU&lt;br /&gt;
!Meson[https://mesonbuild.com/Reference-tables.html Reference table] of Meson hardware architecture names&lt;br /&gt;
!qemue.g. i386 results in qemu(-system)-i386(-static)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;alpha&#039;&#039;&#039;                     ||alpha-linux-gnu            ||64||ALPHA||/lib/ld-linux.so.2||alpha||alpha|| alpha&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;amd64&#039;&#039;&#039;                     ||x86_64-linux-gnu           ||64||X86_64||/lib64/ld-linux-x86-64.so.2||x86_64||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hurd-amd64&#039;&#039;&#039;                ||x86_64-gnu                 ||64||X86_64||/lib/ld-x86-64.so||x86_64-AT386||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;kfreebsd-amd64&#039;&#039;&#039;            ||x86_64-kfreebsd-gnu        ||64||X86_64||/lib/ld-kfreebsd-x86-64.so.1||x86_64||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arc&#039;&#039;&#039;                       ||arc-linux-gnu              ||32||ARC_COMPACT2||/lib/ld-linux-arc.so.2||arc||arc||-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm&#039;&#039;&#039;                       ||arm-linux-gnu              ||32||ARM||/lib/ld-linux.so.2||arm*Many names starting with arm, e.g. armv5tel||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64&#039;&#039;&#039;       ||aarch64-linux-gnu          ||64||AARCH64||/lib/ld-linux-aarch64.so.1||aarch64||aarch64||aarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64ilp32&#039;&#039;&#039;||aarch64-linux-gnu_ilp32 ||32?||AARCH64?|| ||aarch64?|| || aarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armel&#039;&#039;&#039;     ||arm-linux-gnueabi          ||32||ARM||/lib/ld-linux.so.3||arm*||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armhf&#039;&#039;&#039;||arm-linux-gnueabihf        ||32||ARM||/lib/ld-linux-armhf.so.3||arm*||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;avr32&#039;&#039;&#039;                     ||                           ||  || || || ||avr||avrqemu-system-avr only&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hppa&#039;&#039;&#039;                      ||hppa-linux-gnu             ||32||PARISC||/lib/ld.so.1||parisc*||parisc||hppa&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;i386&#039;&#039;&#039;                      ||i386-linux-gnu             ||32||386||/lib/ld-linux.so.2||i?86i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hurd-i386&#039;&#039;&#039;                 ||i386-gnu                   ||32||386||/lib/ld.so||i?86-AT386i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;kfreebsd-i386&#039;&#039;&#039;             ||i386-kfreebsd-gnu          ||32||386||/lib/ld.so.1||i?86i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ia64&#039;&#039;&#039;                      ||ia64-linux-gnu             ||64||IA_64||/lib/ld-linux-ia64.so.2||ia64||ia64||-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;loong64&#039;&#039;&#039;               ||loongarch64-linux-gnu      ||64||LOONGARCH||/lib64/ld-linux-loongarch-lp64d.so.1||loongarch64||loongarch64||loongarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;m68k&#039;&#039;&#039;             ||m68k-linux-gnu             ||32||68K||/lib/ld.so.1||m68k||m68k||m68k&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips&#039;&#039;&#039;         ||mips-linux-gnu             ||32||MIPS||/lib/ld.so.1||mips||mips||mips&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsel&#039;&#039;&#039;       ||mipsel-linux-gnu           ||32||MIPS||/lib/ld.so.1||mips||mips||mipsel&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64&#039;&#039;&#039;       ||mips64-linux-gnuabi64      ||  || || ||mips64||mips64||mips64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64el&#039;&#039;&#039;     ||mips64el-linux-gnuabi64    ||64||MIPS||/lib64/ld.so.1||mips64||mips64||mips64el&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32&#039;&#039;&#039;      ||mips64-linux-gnuabin32     ||  || || || || ||mipsn32&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32el&#039;&#039;&#039;    ||mips64el-linux-gnuabin32   ||  || || || || ||mipsn32el&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;powerpc&#039;&#039;&#039;       ||powerpc-linux-gnu          ||32||PPC||/lib/ld.so.1||ppc||ppc||ppc&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64&#039;&#039;&#039;           ||powerpc64-linux-gnu        ||64||PPC64||/lib64/ld64.so.1||ppc64||ppc64||ppc64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64el&#039;&#039;&#039;       ||powerpc64le-linux-gnu      ||64||PPC64||/lib64/ld64.so.2||ppcle ppc64le||ppc64||ppc64le&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;riscv64&#039;&#039;&#039;        ||riscv64-linux-gnu          ||64||RISCV||/lib/ld-linux-riscv64-lp64d.so.1 ||riscv64||riscv64||riscv64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390&#039;&#039;&#039;                      ||s390-linux-gnu             ||32||S390||/lib/ld.so.1||s390||s390||(s390x)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390x&#039;&#039;&#039;                     ||s390x-linux-gnu            ||64||S390||/lib/ld64.so.1||s390x||s390x||s390x&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sh4&#039;&#039;&#039;               ||sh4-linux-gnu              ||32||SH||/lib/ld-linux.so.2||sh||sh4||sh4&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc&#039;&#039;&#039;      ||sparc-linux-gnu            ||32||SPARC32PLUS||/lib/ld-linux.so.2||sparc||sparc||sparc(32plus)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc64&#039;&#039;&#039;       ||sparc64-linux-gnu          ||64||SPARCV9||/lib64/ld-linux.so.2||sparc64||sparc64||sparc64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;x32&#039;&#039;&#039;                       ||x86_64-linux-gnux32        ||32||X86_64||/libx32/ld-linux-x32.so.2||x86_64|| ||x86_64&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Alignment =&lt;br /&gt;
&lt;br /&gt;
Note that there is alignment on the machine language level and alignment in C. Proper misalignment (for example in a packed struct) is no problem in C and allowed almost everywhere (except of SPARC, where you will receive SIGBUS on a program execution, misaligned variable/memory access) and the compiler will do the right thing (like translating a read of a variable to two loads at machine language level). On the other hand most of the constructs that lead to unaligned access not properly handled by the C compiler (especially most constructs involving pointer casting) have undefined behaviour anyway, so compiling them with optimisation enabled can cause strange effects on all architectures. Read more on a Wikipedia article [https://en.wikipedia.org/wiki/Data_structure_alignment Data structure alignment].&lt;br /&gt;
&lt;br /&gt;
On the other hand, unaligned synchronization primitives (atomics, etc) tend to be unsupported or extremely slow.  Extra joy if they cross cacheline or page boundaries.&lt;br /&gt;
&lt;br /&gt;
== alpha ==&lt;br /&gt;
&lt;br /&gt;
Some alpha may emulate see [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/alpha/kernel/traps.c kernel source]&lt;br /&gt;
&lt;br /&gt;
== arc ==&lt;br /&gt;
&lt;br /&gt;
ARCv2 processors (ARC HS38 and ARC HS48 variants, 1-4 cores) support unaligned access in hardware, except for &amp;quot;atomic instructions&amp;quot; where special considerations apply. ARCv2 features 2 types of atomic instructions: the first for 32-bit data (&amp;quot;llock&amp;quot;/&amp;quot;scond&amp;quot; pair) and the second for 64-bit data (&amp;quot;llockd&amp;quot;/&amp;quot;scondd&amp;quot;). Those atomic instructions must work on data aligned naturally. I.e. &amp;quot;llock&amp;quot;/&amp;quot;scond&amp;quot; must be only used on 32-bit word-aligned data, &amp;quot;llockd&amp;quot;/&amp;quot;scondd&amp;quot; must be only used on 64-bit double-word aligned data. If an unaligned access is done by &amp;quot;atomic instruction&amp;quot; in user-space, the offending application gets forcefully killed with visible mention of a segmentation fault.  An unaligned access done by “atomic instruction” in kernel-mode will result in an unrecoverable &amp;quot;Illegal instruction&amp;quot; exception.&lt;br /&gt;
&lt;br /&gt;
== armel/armhf/arm64 ==&lt;br /&gt;
&lt;br /&gt;
High-level summary for software engineers: Don&#039;t do unaligned access.&lt;br /&gt;
It&#039;s always inefficient, sometimes extremely inefficient, and&lt;br /&gt;
in various cases is not permitted at all.&lt;br /&gt;
&lt;br /&gt;
The short answer for the ARM case is that ARMv6 and up guarantee&lt;br /&gt;
that the processor can be configured such that some unaligned&lt;br /&gt;
accesses are fine (or at least just inefficient). Linux by default&lt;br /&gt;
enable this mode and trap:&lt;br /&gt;
* All &amp;lt;=32-bit load/store operations can be unaligned.&lt;br /&gt;
* NEON load-stores can be unaligned (unless an explicit alignment is specified in the encoding).&lt;br /&gt;
&lt;br /&gt;
But:&lt;br /&gt;
* VFP load/stores must be naturally aligned.&lt;br /&gt;
* Load-multiple/store-multiple and ldrd/strd do not work with &amp;lt;32-bit alignment, but can sometimes get fixed up by the kernel at a substantial performance penalty.&lt;br /&gt;
&lt;br /&gt;
PUSH/POP usually requires 32-bit alignment, but then the ABI requires&lt;br /&gt;
64-bit alignment of the stack, so that is less of an issue.&lt;br /&gt;
&lt;br /&gt;
Unaligned load-exclusive/store-exclusive operations are not supported.&lt;br /&gt;
&lt;br /&gt;
No unaligned accesses are permitted to memory regions of Device or&lt;br /&gt;
Strongly-ordered type. But some permutation of this will be true for&lt;br /&gt;
most architectures, and in user-space this would only affect things&lt;br /&gt;
prodding /dev/mem or otherwise mmaping from a device driver.&lt;br /&gt;
&lt;br /&gt;
ARM64 similarly makes it possible to trap unaligned accesses, but if&lt;br /&gt;
that is not enabled (which it isn&#039;t by Linux), everything apart from&lt;br /&gt;
load-exclusive/store-exclusive, load-acquire/store-release and Device&lt;br /&gt;
memory accesses will be handled by hardware.&lt;br /&gt;
&lt;br /&gt;
== avr32 ==&lt;br /&gt;
&lt;br /&gt;
Unaligned access is ok for 32bits word but not for 16bits or 64bits word see[https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/avr32/include/asm/unaligned.h kernel source]&lt;br /&gt;
&lt;br /&gt;
== i386/x32/amd64 ==&lt;br /&gt;
&lt;br /&gt;
Unaligned access is slower (but not as much as with other architectures as it is done in hardware and not in software). Moreover some MMX/SSE/vector operation need proper alignment.&lt;br /&gt;
&lt;br /&gt;
Unaligned sync primitives are supported, but there&#039;s active effort to defeature them, with Ice Lakes and newer allowing the kernel to trap.&lt;br /&gt;
&lt;br /&gt;
== ia64 ==&lt;br /&gt;
&lt;br /&gt;
Depending of config may fix with trap handler unaligned access&lt;br /&gt;
&lt;br /&gt;
== riscv64 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Short version&#039;&#039;&#039;: Don&#039;t use unaligned access.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Long version&#039;&#039;&#039;:&lt;br /&gt;
Technically the RISC-V ISA specification allows unaligned access for load and store instructions that are part of the base ISA, but only with significant limitations:&lt;br /&gt;
* Naturally aligned loads and stores are guaranteed to be atomic, but this is not the case for unaligned loads and stores. This can lead to hard-to-find bugs, so unaligned access should really be avoided.&lt;br /&gt;
* Support for unaligned access is usually not implemented in hardware and instead emulated in a trap handler, which makes it very slow.&lt;br /&gt;
&lt;br /&gt;
All synchronization primitives (LR/SC and the atomic memory read-modify-write operations (AMOs)) only allow naturally aligned access.&lt;br /&gt;
&lt;br /&gt;
= Floating point =&lt;br /&gt;
&lt;br /&gt;
First read academic paper about the [http://arxiv.org/abs/cs/0701192 pitfall] of doing multi arch floating point computation&lt;br /&gt;
and the classical &amp;quot;What Every Computer Scientist Should Know About Floating-Point Arithmetic&amp;quot; from [http://www.validlab.com/goldberg/paper.pdf here].&lt;br /&gt;
&lt;br /&gt;
== i386 ==&lt;br /&gt;
&lt;br /&gt;
i387 is a strange beast that suffer from excess precision. Moreover long double is only 80 bits&lt;br /&gt;
&lt;br /&gt;
Internal computation are done with 80 bits of precision that lead to strange and not intuitive result.&lt;br /&gt;
&lt;br /&gt;
== mips/mipsel/mips64el ==&lt;br /&gt;
&lt;br /&gt;
Some mips processors do not contain a hardware floating point unit. In this case the kernel will emulate all FPU instructions at a large performance cost.&lt;br /&gt;
&lt;br /&gt;
= C/C++ Preprocessor Symbols =&lt;br /&gt;
Generally, GNU C tends to define the symbol&lt;br /&gt;
&lt;br /&gt;
 __arch__&lt;br /&gt;
&lt;br /&gt;
A list of some common arch-specific symbols can be found on the [https://github.com/cpredef/predef/blob/master/Architectures.md Pre-defined Architecture Macros] page.&lt;br /&gt;
&lt;br /&gt;
= Signedness =&lt;br /&gt;
When programming in C, variables can be signed or unsigned.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
* `unsigned char c;` - explicit unsigned, 0 &amp;lt;= c &amp;lt;= 255&lt;br /&gt;
* `signed char c;` - explicit signed, -128 &amp;lt;= c &amp;lt;= 127&lt;br /&gt;
* `char c;` - implicit (un)signedness, depending on architecture&lt;br /&gt;
&lt;br /&gt;
To force a signedness, either declare it explicitly or use the gcc command line option -f(un)signed-char. The gcc defaults differ only due to optimisation. Other compilers may not have this issue.&lt;br /&gt;
&lt;br /&gt;
= Architecture baselines =&lt;br /&gt;
&lt;br /&gt;
Each Debian architecture has a &#039;&#039;baseline&#039;&#039; indicating the oldest or least capable CPU on which the architecture can be used. The baseline can change between Debian releases. The baseline is mostly defined by the gcc-&#039;&#039;N&#039;&#039; package, which is configured to produce baseline binaries when options like -march= are not used.&lt;br /&gt;
&lt;br /&gt;
If a package uses options that enable additional CPU features such as -msse in particular source files, then the maintainer of that package is responsible for [[InstructionSelection|making sure those CPU features are only used on CPUs that support them]]. ioquake3&#039;s Altivec support on PowerPC is an example of this technique.&lt;br /&gt;
&lt;br /&gt;
== amd64 ==&lt;br /&gt;
&lt;br /&gt;
x86_64 with no optional extensions (psABI baseline). The core specification includes MMX, SSE and SSE2 so these are OK, but SSE3 and up are not guaranteed. (The default is &#039;&#039;-march=x86-64&#039;&#039;, but not &#039;&#039;-march=x86-64-v2&#039;&#039; or later.)&lt;br /&gt;
&lt;br /&gt;
See [https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build psABI (Table 3.1: Micro-Architecture Levels)] for amd64 ABI level. Wikipedia summary: https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels&lt;br /&gt;
&lt;br /&gt;
== arc ==&lt;br /&gt;
&lt;br /&gt;
A fully featured ARC HS with additional support for double-precision FPU (&amp;quot;-mcpu=hs38_linux&amp;quot;). And this is a default &amp;quot;-mcpu&amp;quot; for ARC starting from GCC 11.&lt;br /&gt;
&lt;br /&gt;
To be more precise it&#039;s a baseline ARC HS with HW division (&amp;quot;-mdiv-rem&amp;quot;), atomic instructions (&amp;quot;-matomic&amp;quot;), 64-bit loads/stores	(&amp;quot;-mll64&amp;quot;), the most advanced multiplier (including quad half-word &amp;amp; vector operations, &amp;quot;-mmpy-option=plus_qmacw&amp;quot;) and double-precision FPU (&amp;quot;-mfpu=fpud_all&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
== arm64 ==&lt;br /&gt;
&lt;br /&gt;
aarch64 (ARMv8-A) with no optional extensions. VFPv4 and NEON are OK, but ARMv8.1-A and up are not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== armel ==&lt;br /&gt;
&lt;br /&gt;
armv5te since Debian 10 &#039;buster&#039; (gcc-8 8-20171215-1).&lt;br /&gt;
&lt;br /&gt;
Before that, armv4te.&lt;br /&gt;
&lt;br /&gt;
== armhf ==&lt;br /&gt;
&lt;br /&gt;
armv7 with VFPv3-D16 floating point. NEON is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== i386 ==&lt;br /&gt;
&lt;br /&gt;
* Pentium4 since Trixie.  This includes most notably SSE2. This was made necessary by LLVM&#039;s lack of support for processors without SSE2.&lt;br /&gt;
* i686 since [https://www.debian.org/releases/bookworm/i386/release-notes/ch-information.en.html#i386-is-i686 Debian 12 &#039;bookworm&#039;]. There&#039;s no MMX nor SSE.&lt;br /&gt;
* Before that, [https://salsa.debian.org/ddp-team/release-notes/-/blob/e7b4c032a94b02e31caff6cfdf7d71917ea00346/en/issues.dbk#L286-317 &amp;quot;almost&amp;quot;] i686 (no &amp;quot;long NOP&amp;quot;/NOPL) since Debian 9 &#039;stretch&#039; (gcc-6 6.1.1-1).&lt;br /&gt;
* Before that, i586 since gcc-4.9 4.9-20140411-1 (2014).&lt;br /&gt;
* Before that, i486 since gcc-4.1 4.1ds7-0exp7 (2006).&lt;br /&gt;
* Before that, i386.&lt;br /&gt;
&lt;br /&gt;
See [https://www.sco.com/developers/devspecs/abi386-4.pdf SYSTEM V APPLICATION BINARY INTERFACE], [https://www.uclibc.org/docs/psABI-i386.pdf Intel386 Architecture Processor Supplement] for more information. [https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build psABI (Table 3.1: Micro-Architecture Levels)] for amd64 ABI level may be also relevant, for newer ABI level.&lt;br /&gt;
&lt;br /&gt;
== mips, mipsel ==&lt;br /&gt;
&lt;br /&gt;
MIPS32R2 since Debian 9 &#039;stretch&#039;.&lt;br /&gt;
&lt;br /&gt;
Before that, MIPS II.&lt;br /&gt;
&lt;br /&gt;
== mips64el ==&lt;br /&gt;
&lt;br /&gt;
MIPS64R2 and up.&lt;br /&gt;
&lt;br /&gt;
== powerpc ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== powerpcspe ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is impossible, even with runtime detection.&lt;br /&gt;
&lt;br /&gt;
== ppc64 ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
(Initially Altivec was in the port baseline, but was [https://lists.debian.org/msgid-search/f06cd492-95eb-b0b3-f15c-d5c2501ec0d7@physik.fu-berlin.de later removed to support some embedded systems])&lt;br /&gt;
&lt;br /&gt;
== ppc64el ==&lt;br /&gt;
&lt;br /&gt;
POWER8 and up.&lt;br /&gt;
&lt;br /&gt;
== s390x ==&lt;br /&gt;
&lt;br /&gt;
z196 since Debian 10 &#039;buster&#039;.&lt;br /&gt;
&lt;br /&gt;
== loong64 ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown).&lt;br /&gt;
&lt;br /&gt;
= Obtaining this information =&lt;br /&gt;
&lt;br /&gt;
== via the dpkg build logs ==&lt;br /&gt;
&lt;br /&gt;
Starting with dpkg 1.22.0, its build process will print some of the architecture attributes as part of its configure summary.&lt;br /&gt;
&lt;br /&gt;
Search for «Arch attributes» in the [https://buildd.debian.org/status/package.php?p=dpkg dpkg build logs].&lt;br /&gt;
&lt;br /&gt;
== via the C pre-processor ==&lt;br /&gt;
&lt;br /&gt;
 echo | cpp -dM | sort&lt;br /&gt;
&lt;br /&gt;
== via a special tool ==&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;alloca.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stddef.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;time.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 static void test_size_align(const char *name, size_t size, size_t align) {&lt;br /&gt;
   printf(&amp;quot;sizeof(%s) = %zu\n&amp;quot;, name, size);&lt;br /&gt;
   if (size != align) printf(&amp;quot;alignment(%s) = %zu\n&amp;quot;, name, align);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 #define TEST_SIZE_ALIGN(type, name) \&lt;br /&gt;
   struct test_align_##name { char a; type b; }; \&lt;br /&gt;
   test_size_align(#type, sizeof(type), offsetof(struct test_align_##name, b))&lt;br /&gt;
 &lt;br /&gt;
 static void test_endian(void) {&lt;br /&gt;
 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__&lt;br /&gt;
   printf(&amp;quot;byte order = little endian\n&amp;quot;);&lt;br /&gt;
 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__&lt;br /&gt;
   printf(&amp;quot;byte order = big endian\n&amp;quot;);&lt;br /&gt;
 #endif&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void test_char(void) {&lt;br /&gt;
   if ((int)(char)-1 == -1) printf(&amp;quot;char signedness = signed\n&amp;quot;);&lt;br /&gt;
   else if ((int)(char)-1 == 255) printf(&amp;quot;char signedness = unsigned\n&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void test_stack(void) {&lt;br /&gt;
   void *a = alloca(8);&lt;br /&gt;
   void *b = alloca(8);&lt;br /&gt;
   if (a &amp;gt; b) printf(&amp;quot;stack = grows down\n&amp;quot;);&lt;br /&gt;
   else printf(&amp;quot;stack = grows up\n&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main(void) {&lt;br /&gt;
   TEST_SIZE_ALIGN(short, short);&lt;br /&gt;
   TEST_SIZE_ALIGN(int, int);&lt;br /&gt;
   TEST_SIZE_ALIGN(long, long);&lt;br /&gt;
   TEST_SIZE_ALIGN(long long, long_long);&lt;br /&gt;
   TEST_SIZE_ALIGN(float, float);&lt;br /&gt;
   TEST_SIZE_ALIGN(double, double);&lt;br /&gt;
   TEST_SIZE_ALIGN(long double, long_double);&lt;br /&gt;
   TEST_SIZE_ALIGN(void *, pointer);&lt;br /&gt;
   TEST_SIZE_ALIGN(time_t, time_t);&lt;br /&gt;
   test_endian();&lt;br /&gt;
   test_char();&lt;br /&gt;
   test_stack();&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== via autoconf ==&lt;br /&gt;
&lt;br /&gt;
 AC_INIT(archtest, 0.1)&lt;br /&gt;
 AC_CHECK_SIZEOF(short)&lt;br /&gt;
 AC_CHECK_SIZEOF(int)&lt;br /&gt;
 AC_CHECK_SIZEOF(long)&lt;br /&gt;
 AC_CHECK_SIZEOF(long long)&lt;br /&gt;
 AC_CHECK_SIZEOF(float)&lt;br /&gt;
 AC_CHECK_SIZEOF(double)&lt;br /&gt;
 AC_CHECK_SIZEOF(long double)&lt;br /&gt;
 AC_CHECK_SIZEOF(void*)&lt;br /&gt;
 AC_C_BIGENDIAN()&lt;br /&gt;
 AC_C_CHAR_UNSIGNED()&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* Information about [Haskell/GHC Haskell] on different architectures.&lt;br /&gt;
* [https://github.com/cpredef/predef/blob/master/Architectures.md Pre-defined Compiler Macros Wiki - Architectures]&lt;br /&gt;
* [https://gcc.gnu.org/onlinedocs/cpp/Predefined-Macros.html GCC Predefined Macros]&lt;br /&gt;
* [InstructionSelection Instruction Selection]&lt;br /&gt;
* [Multiarch/Tuples]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Ports]]&lt;/div&gt;</summary>
		<author><name>Zeha</name></author>
	</entry>
	<entry>
		<id>https://wiki2025.debian.org/index.php?title=ArchitectureSpecificsMemo&amp;diff=4</id>
		<title>ArchitectureSpecificsMemo</title>
		<link rel="alternate" type="text/html" href="https://wiki2025.debian.org/index.php?title=ArchitectureSpecificsMemo&amp;diff=4"/>
		<updated>2025-07-18T21:45:45Z</updated>

		<summary type="html">&lt;p&gt;Zeha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
This page is a &#039;&#039;&#039;draft&#039;&#039;&#039;. Please help enhancing it by adding lines and filling tables. Comments at the bottom of the text are also welcome.&lt;br /&gt;
&lt;br /&gt;
This is just a quick array to recall some of the specifics of the architectures found in the Debian project.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!sizeof(short)&lt;br /&gt;
!sizeof(int)&lt;br /&gt;
!sizeof(long)&lt;br /&gt;
!sizeof(long long)&lt;br /&gt;
!sizeof(float)&lt;br /&gt;
!sizeof(double)&lt;br /&gt;
|-&lt;br /&gt;
|| &#039;&#039;&#039;any&#039;&#039;&#039; || 2 || 4 || sizeof(void *) || 8 || 4 || 8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!sizeof(void*)&lt;br /&gt;
!sizeof(long double)&lt;br /&gt;
!max_align_t alignment&lt;br /&gt;
!char&lt;br /&gt;
!endian&lt;br /&gt;
!stack grows&lt;br /&gt;
!page sizes&lt;br /&gt;
User-visible page size returned by `getauxval(AT_PAGESZ)` or `getconf PAGESIZE`, the granularity of the memory map&lt;br /&gt;
!float&lt;br /&gt;
H=hard, S=soft, P=partial, +=excess precision, ~=not usual standard&lt;br /&gt;
!double&lt;br /&gt;
Note that the columns refer to C types. H=hard, S=soft, P=partial, +=excess precision, ~=not usual standard)&lt;br /&gt;
!long double&lt;br /&gt;
Note that the columns refer to C types. H=hard, S=soft, P=partial, +=excess precision,-=long double precision &amp;lt; __float128, ~=not usual standard)&lt;br /&gt;
!sizeof(time_t)&lt;br /&gt;
With &amp;lt;code&amp;gt;_TIME_BITS=64&amp;lt;/code&amp;gt; the size is 8 on all archs) &lt;br /&gt;
!GCC pre-defined macro(s)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;alpha&#039;&#039;&#039; ||8||16long double changed size from 8 to 16 in Lenny)||16||signed||LE||down||8K||?||?||?||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__alpha__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;any-amd64, amd64, kfreebsd-amd64, hurd-amd64&#039;&#039;&#039; ||8||16||16||signed||LE||down||4K ||H||H||H- Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__x86_64__ &amp;amp;&amp;amp; __LP64__&amp;lt;/code&amp;gt; it&#039;s a common gotcha for x32, you need to use &amp;lt;code&amp;gt;__LP64__&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;__ILP32__&amp;lt;/code&amp;gt; to tell them apart)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arc&#039;&#039;&#039;                       ||4 ||16||?||unsigned||LE||down||8K       ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__arc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm&#039;&#039;&#039;                       ||4 ||? ||8||unsigned||LE||down||?        ||S ||S ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64&#039;&#039;&#039;       ||8 ||16||16||unsigned||LE||down||4K, 16K, 64K ||H ||H ||S ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__aarch64__ &amp;amp;&amp;amp; __LP64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64ilp32&#039;&#039;&#039;       ||4 ||16||?||unsigned||LE||down||4K, 16K, 64K ||H ||H ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__aarch64__ &amp;amp;&amp;amp; __ILP32__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armel&#039;&#039;&#039;     ||4 ||8 ||8||unsigned||LE||down||4K       ||S ||S ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__ &amp;amp;&amp;amp; __ARM_EABI__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armhf&#039;&#039;&#039;||4 ||8 ||8||unsigned||LE||down||4K       ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__ &amp;amp;&amp;amp; __ARM_EABI__ &amp;amp;&amp;amp; __ARM_PCS_VFP&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;avr32&#039;&#039;&#039;                     ||4 ||8 ||?||unsigned||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hppa&#039;&#039;&#039;                      ||4 ||8 ||8||  signed||BE||up  ||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__hppa__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;any-i386i386, kfreebsd-i386, hurd-i386)&#039;&#039;&#039; ||                                       4||12||168 prior to GCC 7)||  signed||LE||down||4K ||H+||H+||H- Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision])||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__i386__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ia64&#039;&#039;&#039;                     ||8 ||16||16||  signed||LE||bothThe conventional stack grows down from the top of the stack mapping, but there is also the Register Backing Store which grows up from the bottom of the stack mapping at the same time)||?        ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__ia64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;loong64&#039;&#039;&#039;               ||8 ||16||16||  signed||LE||down||4K-64K   ||H ||H ||S ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__loongarch__ &amp;amp;&amp;amp; __loongarch_lp64 &amp;amp;&amp;amp; __loongarch_double_float&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;m68k&#039;&#039;&#039;             ||4 ||12||2||  signed||BE||down||4K       ||S?||S?||S?||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__m68k__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips There are also 6 mips*r6* ports: see [MipsRev6]&#039;&#039;&#039;         ||4 ||8 ||8||  signed||BE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABIO32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsel&#039;&#039;&#039;       ||4 ||8 ||8||  signed||LE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABIO32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64&#039;&#039;&#039;     ||8 ||16||16||  signed||BE||down||4K-64K   ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABI64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64el&#039;&#039;&#039;     ||8 ||16||16||  signed||LE||down||4K-64K   ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABI64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32&#039;&#039;&#039;         ||4 ||8 ||?||  signed||BE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABIN32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32el&#039;&#039;&#039;       ||4 ||8 ||?||  signed||LE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABIN32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;powerpc&#039;&#039;&#039;       ||4 ||16long double changed size from 8 to 16 in Lenny)                               ||16||                                              unsigned||BE||down||4K-64K   ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64&#039;&#039;&#039;           ||8 ||16||16||unsigned||BE||down||4K-64K   ||? ||? ||? ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__ &amp;amp;&amp;amp; __powerpc64__ &amp;amp;&amp;amp; __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64el&#039;&#039;&#039;       ||8 ||16||16||unsigned||LE||down||4K-64K-16M||H||H ||H~||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__ &amp;amp;&amp;amp; __ppc64__ &amp;amp;&amp;amp; __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;riscv64&#039;&#039;&#039;                   ||8 ||16(8)The RV64 ISA spec defines long double as 16 bytes, but older toolchains (pre-&amp;quot;riscv-gcc-6.1.0&amp;quot;) have implemented long double as 8 bytes on RV64; cf. https://github.com/riscv/riscv-gcc/commit/54b21fc5ae83cefec44bc2caed4a8c664c274ba0||16||unsigned||LE||down||4K 4k is the default page size on all RISC-V systems. Depending on the chosen virtual memory mode (Sv32/Sv39/Sv48) additional page sizes are available as well: Sv32 supports 4k and 4M pages, Sv39 supports 4k, 2M and 1G pages and Sv48 supports 4k,  2M, 1G, and 512G pages       ||H ||H ||H~||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__riscv &amp;amp;&amp;amp; __riscv_xlen==64&amp;lt;/code&amp;gt; Older, pre-mainline RISC-V toolchains used &amp;lt;code&amp;gt;__riscv__ &amp;amp;&amp;amp; __riscv64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390&#039;&#039;&#039;                      ||4||16long double changed size from 8 to 16 in Lenny                                ||?||                                              unsigned||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__s390__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390x&#039;&#039;&#039;                     ||8 ||16||8||unsigned||BE||down||4K, 1M, 2G       ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__s390x__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sh4&#039;&#039;&#039;               ||4 ||8 ||4||  signed||LE||down||4K       ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__sh__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc&#039;&#039;&#039;      ||4 ||16long double changed size from 8 to 16 in Lenny                                  ||?||                                                signed||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__sparc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc64&#039;&#039;&#039;       ||8 ||16||16||  signed||BE||down||8K, 64K, 512K, 4M, 32M, 256M, 2G, 16G||? ||? ||? ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__sparc__ &amp;amp;&amp;amp; __arch64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;x32&#039;&#039;&#039;                       ||4 ||16||16||  signed||LE||down||4K ||H ||H ||H- Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__x86_64__ &amp;amp;&amp;amp; __ILP32__&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!multiarch&lt;br /&gt;
!ELFCLASS&lt;br /&gt;
!ELF machine EM_&lt;br /&gt;
!ld.so(8)&lt;br /&gt;
!uname -mUsed to classify CPU architectures in CMake and many ad-hoc build systems, but note that this is a kernel and/or libc specific name despite referring to the CPU&lt;br /&gt;
!Meson[https://mesonbuild.com/Reference-tables.html Reference table] of Meson hardware architecture names&lt;br /&gt;
!qemue.g. i386 results in qemu(-system)-i386(-static)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;alpha&#039;&#039;&#039;                     ||alpha-linux-gnu            ||64||ALPHA||/lib/ld-linux.so.2||alpha||alpha|| alpha&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;amd64&#039;&#039;&#039;                     ||x86_64-linux-gnu           ||64||X86_64||/lib64/ld-linux-x86-64.so.2||x86_64||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hurd-amd64&#039;&#039;&#039;                ||x86_64-gnu                 ||64||X86_64||/lib/ld-x86-64.so||x86_64-AT386||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;kfreebsd-amd64&#039;&#039;&#039;            ||x86_64-kfreebsd-gnu        ||64||X86_64||/lib/ld-kfreebsd-x86-64.so.1||x86_64||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arc&#039;&#039;&#039;                       ||arc-linux-gnu              ||32||ARC_COMPACT2||/lib/ld-linux-arc.so.2||arc||arc||-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm&#039;&#039;&#039;                       ||arm-linux-gnu              ||32||ARM||/lib/ld-linux.so.2||arm*Many names starting with arm, e.g. armv5tel||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64&#039;&#039;&#039;       ||aarch64-linux-gnu          ||64||AARCH64||/lib/ld-linux-aarch64.so.1||aarch64||aarch64||aarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64ilp32&#039;&#039;&#039;||aarch64-linux-gnu_ilp32 ||32?||AARCH64?|| ||aarch64?|| || aarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armel&#039;&#039;&#039;     ||arm-linux-gnueabi          ||32||ARM||/lib/ld-linux.so.3||arm*||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armhf&#039;&#039;&#039;||arm-linux-gnueabihf        ||32||ARM||/lib/ld-linux-armhf.so.3||arm*||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;avr32&#039;&#039;&#039;                     ||                           ||  || || || ||avr||avrqemu-system-avr only&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hppa&#039;&#039;&#039;                      ||hppa-linux-gnu             ||32||PARISC||/lib/ld.so.1||parisc*||parisc||hppa&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;i386&#039;&#039;&#039;                      ||i386-linux-gnu             ||32||386||/lib/ld-linux.so.2||i?86i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hurd-i386&#039;&#039;&#039;                 ||i386-gnu                   ||32||386||/lib/ld.so||i?86-AT386i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;kfreebsd-i386&#039;&#039;&#039;             ||i386-kfreebsd-gnu          ||32||386||/lib/ld.so.1||i?86i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ia64&#039;&#039;&#039;                      ||ia64-linux-gnu             ||64||IA_64||/lib/ld-linux-ia64.so.2||ia64||ia64||-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;loong64&#039;&#039;&#039;               ||loongarch64-linux-gnu      ||64||LOONGARCH||/lib64/ld-linux-loongarch-lp64d.so.1||loongarch64||loongarch64||loongarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;m68k&#039;&#039;&#039;             ||m68k-linux-gnu             ||32||68K||/lib/ld.so.1||m68k||m68k||m68k&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips&#039;&#039;&#039;         ||mips-linux-gnu             ||32||MIPS||/lib/ld.so.1||mips||mips||mips&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsel&#039;&#039;&#039;       ||mipsel-linux-gnu           ||32||MIPS||/lib/ld.so.1||mips||mips||mipsel&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64&#039;&#039;&#039;       ||mips64-linux-gnuabi64      ||  || || ||mips64||mips64||mips64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64el&#039;&#039;&#039;     ||mips64el-linux-gnuabi64    ||64||MIPS||/lib64/ld.so.1||mips64||mips64||mips64el&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32&#039;&#039;&#039;      ||mips64-linux-gnuabin32     ||  || || || || ||mipsn32&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32el&#039;&#039;&#039;    ||mips64el-linux-gnuabin32   ||  || || || || ||mipsn32el&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;powerpc&#039;&#039;&#039;       ||powerpc-linux-gnu          ||32||PPC||/lib/ld.so.1||ppc||ppc||ppc&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64&#039;&#039;&#039;           ||powerpc64-linux-gnu        ||64||PPC64||/lib64/ld64.so.1||ppc64||ppc64||ppc64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64el&#039;&#039;&#039;       ||powerpc64le-linux-gnu      ||64||PPC64||/lib64/ld64.so.2||ppcle ppc64le||ppc64||ppc64le&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;riscv64&#039;&#039;&#039;        ||riscv64-linux-gnu          ||64||RISCV||/lib/ld-linux-riscv64-lp64d.so.1 ||riscv64||riscv64||riscv64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390&#039;&#039;&#039;                      ||s390-linux-gnu             ||32||S390||/lib/ld.so.1||s390||s390||(s390x)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390x&#039;&#039;&#039;                     ||s390x-linux-gnu            ||64||S390||/lib/ld64.so.1||s390x||s390x||s390x&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sh4&#039;&#039;&#039;               ||sh4-linux-gnu              ||32||SH||/lib/ld-linux.so.2||sh||sh4||sh4&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc&#039;&#039;&#039;      ||sparc-linux-gnu            ||32||SPARC32PLUS||/lib/ld-linux.so.2||sparc||sparc||sparc(32plus)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc64&#039;&#039;&#039;       ||sparc64-linux-gnu          ||64||SPARCV9||/lib64/ld-linux.so.2||sparc64||sparc64||sparc64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;x32&#039;&#039;&#039;                       ||x86_64-linux-gnux32        ||32||X86_64||/libx32/ld-linux-x32.so.2||x86_64|| ||x86_64&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Alignment =&lt;br /&gt;
&lt;br /&gt;
Note that there is alignment on the machine language level and alignment in C. Proper misalignment (for example in a packed struct) is no problem in C and allowed almost everywhere (except of SPARC, where you will receive SIGBUS on a program execution, misaligned variable/memory access) and the compiler will do the right thing (like translating a read of a variable to two loads at machine language level). On the other hand most of the constructs that lead to unaligned access not properly handled by the C compiler (especially most constructs involving pointer casting) have undefined behaviour anyway, so compiling them with optimisation enabled can cause strange effects on all architectures. Read more on a Wikipedia article [https://en.wikipedia.org/wiki/Data_structure_alignment Data structure alignment].&lt;br /&gt;
&lt;br /&gt;
On the other hand, unaligned synchronization primitives (atomics, etc) tend to be unsupported or extremely slow.  Extra joy if they cross cacheline or page boundaries.&lt;br /&gt;
&lt;br /&gt;
== alpha ==&lt;br /&gt;
&lt;br /&gt;
Some alpha may emulate see [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/alpha/kernel/traps.c kernel source]&lt;br /&gt;
&lt;br /&gt;
== arc ==&lt;br /&gt;
&lt;br /&gt;
ARCv2 processors (ARC HS38 and ARC HS48 variants, 1-4 cores) support unaligned access in hardware, except for &amp;quot;atomic instructions&amp;quot; where special considerations apply. ARCv2 features 2 types of atomic instructions: the first for 32-bit data (&amp;quot;llock&amp;quot;/&amp;quot;scond&amp;quot; pair) and the second for 64-bit data (&amp;quot;llockd&amp;quot;/&amp;quot;scondd&amp;quot;). Those atomic instructions must work on data aligned naturally. I.e. &amp;quot;llock&amp;quot;/&amp;quot;scond&amp;quot; must be only used on 32-bit word-aligned data, &amp;quot;llockd&amp;quot;/&amp;quot;scondd&amp;quot; must be only used on 64-bit double-word aligned data. If an unaligned access is done by &amp;quot;atomic instruction&amp;quot; in user-space, the offending application gets forcefully killed with visible mention of a segmentation fault.  An unaligned access done by “atomic instruction” in kernel-mode will result in an unrecoverable &amp;quot;Illegal instruction&amp;quot; exception.&lt;br /&gt;
&lt;br /&gt;
== armel/armhf/arm64 ==&lt;br /&gt;
&lt;br /&gt;
High-level summary for software engineers: Don&#039;t do unaligned access.&lt;br /&gt;
It&#039;s always inefficient, sometimes extremely inefficient, and&lt;br /&gt;
in various cases is not permitted at all.&lt;br /&gt;
&lt;br /&gt;
The short answer for the ARM case is that ARMv6 and up guarantee&lt;br /&gt;
that the processor can be configured such that some unaligned&lt;br /&gt;
accesses are fine (or at least just inefficient). Linux by default&lt;br /&gt;
enable this mode and trap:&lt;br /&gt;
* All &amp;lt;=32-bit load/store operations can be unaligned.&lt;br /&gt;
* NEON load-stores can be unaligned (unless an explicit alignment is specified in the encoding).&lt;br /&gt;
&lt;br /&gt;
But:&lt;br /&gt;
* VFP load/stores must be naturally aligned.&lt;br /&gt;
* Load-multiple/store-multiple and ldrd/strd do not work with &amp;lt;32-bit alignment, but can sometimes get fixed up by the kernel at a substantial performance penalty.&lt;br /&gt;
&lt;br /&gt;
PUSH/POP usually requires 32-bit alignment, but then the ABI requires&lt;br /&gt;
64-bit alignment of the stack, so that is less of an issue.&lt;br /&gt;
&lt;br /&gt;
Unaligned load-exclusive/store-exclusive operations are not supported.&lt;br /&gt;
&lt;br /&gt;
No unaligned accesses are permitted to memory regions of Device or&lt;br /&gt;
Strongly-ordered type. But some permutation of this will be true for&lt;br /&gt;
most architectures, and in user-space this would only affect things&lt;br /&gt;
prodding /dev/mem or otherwise mmaping from a device driver.&lt;br /&gt;
&lt;br /&gt;
ARM64 similarly makes it possible to trap unaligned accesses, but if&lt;br /&gt;
that is not enabled (which it isn&#039;t by Linux), everything apart from&lt;br /&gt;
load-exclusive/store-exclusive, load-acquire/store-release and Device&lt;br /&gt;
memory accesses will be handled by hardware.&lt;br /&gt;
&lt;br /&gt;
== avr32 ==&lt;br /&gt;
&lt;br /&gt;
Unaligned access is ok for 32bits word but not for 16bits or 64bits word see[https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/avr32/include/asm/unaligned.h kernel source]&lt;br /&gt;
&lt;br /&gt;
== i386/x32/amd64 ==&lt;br /&gt;
&lt;br /&gt;
Unaligned access is slower (but not as much as with other architectures as it is done in hardware and not in software). Moreover some MMX/SSE/vector operation need proper alignment.&lt;br /&gt;
&lt;br /&gt;
Unaligned sync primitives are supported, but there&#039;s active effort to defeature them, with Ice Lakes and newer allowing the kernel to trap.&lt;br /&gt;
&lt;br /&gt;
== ia64 ==&lt;br /&gt;
&lt;br /&gt;
Depending of config may fix with trap handler unaligned access&lt;br /&gt;
&lt;br /&gt;
== riscv64 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Short version&#039;&#039;&#039;: Don&#039;t use unaligned access.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Long version&#039;&#039;&#039;:&lt;br /&gt;
Technically the RISC-V ISA specification allows unaligned access for load and store instructions that are part of the base ISA, but only with significant limitations:&lt;br /&gt;
* Naturally aligned loads and stores are guaranteed to be atomic, but this is not the case for unaligned loads and stores. This can lead to hard-to-find bugs, so unaligned access should really be avoided.&lt;br /&gt;
* Support for unaligned access is usually not implemented in hardware and instead emulated in a trap handler, which makes it very slow.&lt;br /&gt;
&lt;br /&gt;
All synchronization primitives (LR/SC and the atomic memory read-modify-write operations (AMOs)) only allow naturally aligned access.&lt;br /&gt;
&lt;br /&gt;
= Floating point =&lt;br /&gt;
&lt;br /&gt;
First read academic paper about the [http://arxiv.org/abs/cs/0701192 pitfall] of doing multi arch floating point computation&lt;br /&gt;
and the classical &amp;quot;What Every Computer Scientist Should Know About Floating-Point Arithmetic&amp;quot; from [http://www.validlab.com/goldberg/paper.pdf here].&lt;br /&gt;
&lt;br /&gt;
== i386 ==&lt;br /&gt;
&lt;br /&gt;
i387 is a strange beast that suffer from excess precision. Moreover long double is only 80 bits&lt;br /&gt;
&lt;br /&gt;
Internal computation are done with 80 bits of precision that lead to strange and not intuitive result.&lt;br /&gt;
&lt;br /&gt;
== mips/mipsel/mips64el ==&lt;br /&gt;
&lt;br /&gt;
Some mips processors do not contain a hardware floating point unit. In this case the kernel will emulate all FPU instructions at a large performance cost.&lt;br /&gt;
&lt;br /&gt;
= C/C++ Preprocessor Symbols =&lt;br /&gt;
Generally, GNU C tends to define the symbol&lt;br /&gt;
&lt;br /&gt;
 __arch__&lt;br /&gt;
&lt;br /&gt;
A list of some common arch-specific symbols can be found on the [https://github.com/cpredef/predef/blob/master/Architectures.md Pre-defined Architecture Macros] page.&lt;br /&gt;
&lt;br /&gt;
= Signedness =&lt;br /&gt;
When programming in C, variables can be signed or unsigned.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
* `unsigned char c;` - explicit unsigned, 0 &amp;lt;= c &amp;lt;= 255&lt;br /&gt;
* `signed char c;` - explicit signed, -128 &amp;lt;= c &amp;lt;= 127&lt;br /&gt;
* `char c;` - implicit (un)signedness, depending on architecture&lt;br /&gt;
&lt;br /&gt;
To force a signedness, either declare it explicitly or use the gcc command line option -f(un)signed-char. The gcc defaults differ only due to optimisation. Other compilers may not have this issue.&lt;br /&gt;
&lt;br /&gt;
= Architecture baselines =&lt;br /&gt;
&lt;br /&gt;
Each Debian architecture has a &#039;&#039;baseline&#039;&#039; indicating the oldest or least capable CPU on which the architecture can be used. The baseline can change between Debian releases. The baseline is mostly defined by the gcc-&#039;&#039;N&#039;&#039; package, which is configured to produce baseline binaries when options like -march= are not used.&lt;br /&gt;
&lt;br /&gt;
If a package uses options that enable additional CPU features such as -msse in particular source files, then the maintainer of that package is responsible for [[InstructionSelection|making sure those CPU features are only used on CPUs that support them]]. ioquake3&#039;s Altivec support on PowerPC is an example of this technique.&lt;br /&gt;
&lt;br /&gt;
== amd64 ==&lt;br /&gt;
&lt;br /&gt;
x86_64 with no optional extensions (psABI baseline). The core specification includes MMX, SSE and SSE2 so these are OK, but SSE3 and up are not guaranteed. (The default is &#039;&#039;-march=x86-64&#039;&#039;, but not &#039;&#039;-march=x86-64-v2&#039;&#039; or later.)&lt;br /&gt;
&lt;br /&gt;
See [https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build psABI (Table 3.1: Micro-Architecture Levels)] for amd64 ABI level. Wikipedia summary: https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels&lt;br /&gt;
&lt;br /&gt;
== arc ==&lt;br /&gt;
&lt;br /&gt;
A fully featured ARC HS with additional support for double-precision FPU (&amp;quot;-mcpu=hs38_linux&amp;quot;). And this is a default &amp;quot;-mcpu&amp;quot; for ARC starting from GCC 11.&lt;br /&gt;
&lt;br /&gt;
To be more precise it&#039;s a baseline ARC HS with HW division (&amp;quot;-mdiv-rem&amp;quot;), atomic instructions (&amp;quot;-matomic&amp;quot;), 64-bit loads/stores	(&amp;quot;-mll64&amp;quot;), the most advanced multiplier (including quad half-word &amp;amp; vector operations, &amp;quot;-mmpy-option=plus_qmacw&amp;quot;) and double-precision FPU (&amp;quot;-mfpu=fpud_all&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
== arm64 ==&lt;br /&gt;
&lt;br /&gt;
aarch64 (ARMv8-A) with no optional extensions. VFPv4 and NEON are OK, but ARMv8.1-A and up are not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== armel ==&lt;br /&gt;
&lt;br /&gt;
armv5te since Debian 10 &#039;buster&#039; (gcc-8 8-20171215-1).&lt;br /&gt;
&lt;br /&gt;
Before that, armv4te.&lt;br /&gt;
&lt;br /&gt;
== armhf ==&lt;br /&gt;
&lt;br /&gt;
armv7 with VFPv3-D16 floating point. NEON is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== i386 ==&lt;br /&gt;
&lt;br /&gt;
* Pentium4 since Trixie.  This includes most notably SSE2. This was made necessary by LLVM&#039;s lack of support for processors without SSE2.&lt;br /&gt;
* i686 since [https://www.debian.org/releases/bookworm/i386/release-notes/ch-information.en.html#i386-is-i686 Debian 12 &#039;bookworm&#039;]. There&#039;s no MMX nor SSE.&lt;br /&gt;
* Before that, [https://salsa.debian.org/ddp-team/release-notes/-/blob/e7b4c032a94b02e31caff6cfdf7d71917ea00346/en/issues.dbk#L286-317 &amp;quot;almost&amp;quot;] i686 (no &amp;quot;long NOP&amp;quot;/NOPL) since Debian 9 &#039;stretch&#039; (gcc-6 6.1.1-1).&lt;br /&gt;
* Before that, i586 since gcc-4.9 4.9-20140411-1 (2014).&lt;br /&gt;
* Before that, i486 since gcc-4.1 4.1ds7-0exp7 (2006).&lt;br /&gt;
* Before that, i386.&lt;br /&gt;
&lt;br /&gt;
See [https://www.sco.com/developers/devspecs/abi386-4.pdf SYSTEM V APPLICATION BINARY INTERFACE], [https://www.uclibc.org/docs/psABI-i386.pdf Intel386 Architecture Processor Supplement] for more information. [https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build psABI (Table 3.1: Micro-Architecture Levels)] for amd64 ABI level may be also relevant, for newer ABI level.&lt;br /&gt;
&lt;br /&gt;
== mips, mipsel ==&lt;br /&gt;
&lt;br /&gt;
MIPS32R2 since Debian 9 &#039;stretch&#039;.&lt;br /&gt;
&lt;br /&gt;
Before that, MIPS II.&lt;br /&gt;
&lt;br /&gt;
== mips64el ==&lt;br /&gt;
&lt;br /&gt;
MIPS64R2 and up.&lt;br /&gt;
&lt;br /&gt;
== powerpc ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== powerpcspe ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is impossible, even with runtime detection.&lt;br /&gt;
&lt;br /&gt;
== ppc64 ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
(Initially Altivec was in the port baseline, but was [https://lists.debian.org/msgid-search/f06cd492-95eb-b0b3-f15c-d5c2501ec0d7@physik.fu-berlin.de later removed to support some embedded systems])&lt;br /&gt;
&lt;br /&gt;
== ppc64el ==&lt;br /&gt;
&lt;br /&gt;
POWER8 and up.&lt;br /&gt;
&lt;br /&gt;
== s390x ==&lt;br /&gt;
&lt;br /&gt;
z196 since Debian 10 &#039;buster&#039;.&lt;br /&gt;
&lt;br /&gt;
== loong64 ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown).&lt;br /&gt;
&lt;br /&gt;
= Obtaining this information =&lt;br /&gt;
&lt;br /&gt;
== via the dpkg build logs ==&lt;br /&gt;
&lt;br /&gt;
Starting with dpkg 1.22.0, its build process will print some of the architecture attributes as part of its configure summary.&lt;br /&gt;
&lt;br /&gt;
Search for «Arch attributes» in the [https://buildd.debian.org/status/package.php?p=dpkg dpkg build logs].&lt;br /&gt;
&lt;br /&gt;
== via the C pre-processor ==&lt;br /&gt;
&lt;br /&gt;
 echo | cpp -dM | sort&lt;br /&gt;
&lt;br /&gt;
== via a special tool ==&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;alloca.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stddef.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;time.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 static void test_size_align(const char *name, size_t size, size_t align) {&lt;br /&gt;
   printf(&amp;quot;sizeof(%s) = %zu\n&amp;quot;, name, size);&lt;br /&gt;
   if (size != align) printf(&amp;quot;alignment(%s) = %zu\n&amp;quot;, name, align);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 #define TEST_SIZE_ALIGN(type, name) \&lt;br /&gt;
   struct test_align_##name { char a; type b; }; \&lt;br /&gt;
   test_size_align(#type, sizeof(type), offsetof(struct test_align_##name, b))&lt;br /&gt;
 &lt;br /&gt;
 static void test_endian(void) {&lt;br /&gt;
 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__&lt;br /&gt;
   printf(&amp;quot;byte order = little endian\n&amp;quot;);&lt;br /&gt;
 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__&lt;br /&gt;
   printf(&amp;quot;byte order = big endian\n&amp;quot;);&lt;br /&gt;
 #endif&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void test_char(void) {&lt;br /&gt;
   if ((int)(char)-1 == -1) printf(&amp;quot;char signedness = signed\n&amp;quot;);&lt;br /&gt;
   else if ((int)(char)-1 == 255) printf(&amp;quot;char signedness = unsigned\n&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void test_stack(void) {&lt;br /&gt;
   void *a = alloca(8);&lt;br /&gt;
   void *b = alloca(8);&lt;br /&gt;
   if (a &amp;gt; b) printf(&amp;quot;stack = grows down\n&amp;quot;);&lt;br /&gt;
   else printf(&amp;quot;stack = grows up\n&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main(void) {&lt;br /&gt;
   TEST_SIZE_ALIGN(short, short);&lt;br /&gt;
   TEST_SIZE_ALIGN(int, int);&lt;br /&gt;
   TEST_SIZE_ALIGN(long, long);&lt;br /&gt;
   TEST_SIZE_ALIGN(long long, long_long);&lt;br /&gt;
   TEST_SIZE_ALIGN(float, float);&lt;br /&gt;
   TEST_SIZE_ALIGN(double, double);&lt;br /&gt;
   TEST_SIZE_ALIGN(long double, long_double);&lt;br /&gt;
   TEST_SIZE_ALIGN(void *, pointer);&lt;br /&gt;
   TEST_SIZE_ALIGN(time_t, time_t);&lt;br /&gt;
   test_endian();&lt;br /&gt;
   test_char();&lt;br /&gt;
   test_stack();&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== via autoconf ==&lt;br /&gt;
&lt;br /&gt;
 AC_INIT(archtest, 0.1)&lt;br /&gt;
 AC_CHECK_SIZEOF(short)&lt;br /&gt;
 AC_CHECK_SIZEOF(int)&lt;br /&gt;
 AC_CHECK_SIZEOF(long)&lt;br /&gt;
 AC_CHECK_SIZEOF(long long)&lt;br /&gt;
 AC_CHECK_SIZEOF(float)&lt;br /&gt;
 AC_CHECK_SIZEOF(double)&lt;br /&gt;
 AC_CHECK_SIZEOF(long double)&lt;br /&gt;
 AC_CHECK_SIZEOF(void*)&lt;br /&gt;
 AC_C_BIGENDIAN()&lt;br /&gt;
 AC_C_CHAR_UNSIGNED()&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* Information about [Haskell/GHC Haskell] on different architectures.&lt;br /&gt;
* [https://github.com/cpredef/predef/blob/master/Architectures.md Pre-defined Compiler Macros Wiki - Architectures]&lt;br /&gt;
* [https://gcc.gnu.org/onlinedocs/cpp/Predefined-Macros.html GCC Predefined Macros]&lt;br /&gt;
* [InstructionSelection Instruction Selection]&lt;br /&gt;
* [Multiarch/Tuples]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Ports]]&lt;/div&gt;</summary>
		<author><name>Zeha</name></author>
	</entry>
	<entry>
		<id>https://wiki2025.debian.org/index.php?title=Main_Page&amp;diff=3</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki2025.debian.org/index.php?title=Main_Page&amp;diff=3"/>
		<updated>2025-07-18T21:44:42Z</updated>

		<summary type="html">&lt;p&gt;Zeha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[ArchitectureSpecificsMemo]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;MediaWiki has been installed.&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Consult the [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents User&#039;s Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/postorius/lists/mediawiki-announce.lists.wikimedia.org/ MediaWiki release mailing list]&lt;br /&gt;
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]&lt;br /&gt;
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Learn how to combat spam on your wiki]&lt;/div&gt;</summary>
		<author><name>Zeha</name></author>
	</entry>
	<entry>
		<id>https://wiki2025.debian.org/index.php?title=ArchitectureSpecificsMemo&amp;diff=2</id>
		<title>ArchitectureSpecificsMemo</title>
		<link rel="alternate" type="text/html" href="https://wiki2025.debian.org/index.php?title=ArchitectureSpecificsMemo&amp;diff=2"/>
		<updated>2025-07-18T21:43:36Z</updated>

		<summary type="html">&lt;p&gt;Zeha: Created page with &amp;quot;__TOC__  This page is a &amp;#039;&amp;#039;&amp;#039;draft&amp;#039;&amp;#039;&amp;#039;. Please help enhancing it by adding lines and filling tables. Comments at the bottom of the text are also welcome.  This is just a quick array to recall some of the specifics of the architectures found in the Debian project.  {| class=&amp;quot;wikitable&amp;quot; |- !DEB ARCH !sizeof(short) !sizeof(int) !sizeof(long) !sizeof(long long) !sizeof(float) !sizeof(double) |- || &amp;#039;&amp;#039;&amp;#039;any&amp;#039;&amp;#039;&amp;#039; || 2 || 4 || sizeof(void *) || 8 || 4 || 8 |}  {| class=&amp;quot;wikitable&amp;quot; !DE...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
This page is a &#039;&#039;&#039;draft&#039;&#039;&#039;. Please help enhancing it by adding lines and filling tables. Comments at the bottom of the text are also welcome.&lt;br /&gt;
&lt;br /&gt;
This is just a quick array to recall some of the specifics of the architectures found in the Debian project.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!sizeof(short)&lt;br /&gt;
!sizeof(int)&lt;br /&gt;
!sizeof(long)&lt;br /&gt;
!sizeof(long long)&lt;br /&gt;
!sizeof(float)&lt;br /&gt;
!sizeof(double)&lt;br /&gt;
|-&lt;br /&gt;
|| &#039;&#039;&#039;any&#039;&#039;&#039; || 2 || 4 || sizeof(void *) || 8 || 4 || 8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!sizeof(void*)&lt;br /&gt;
!sizeof(long double)&lt;br /&gt;
!max_align_t alignment&lt;br /&gt;
!char&lt;br /&gt;
!endian&lt;br /&gt;
!stack grows&lt;br /&gt;
!page sizesUser-visible page size returned by `getauxval(AT_PAGESZ)` or `getconf PAGESIZE`, the granularity of the memory map&lt;br /&gt;
!floatH=hard, S=soft, P=partial, +=excess precision, ~=not usual standard&lt;br /&gt;
!doubleNote that the columns refer to C types. H=hard, S=soft, P=partial, +=excess precision, ~=not usual standard)&lt;br /&gt;
!long doubleNote that the columns refer to C types. H=hard, S=soft, P=partial, +=excess precision,-=long double precision &amp;lt; __float128, ~=not usual standard)&lt;br /&gt;
!sizeof(time_t)With &amp;lt;code&amp;gt;_TIME_BITS=64&amp;lt;/code&amp;gt; the size is 8 on all archs) &lt;br /&gt;
!GCC pre-defined macro(s)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;alpha&#039;&#039;&#039; ||8||16long double changed size from 8 to 16 in Lenny)||16||signed||LE||down||8K||?||?||?||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__alpha__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;any-amd64, amd64, kfreebsd-amd64, hurd-amd64&#039;&#039;&#039; ||8||16||16||signed||LE||down||4K ||H||H||H- Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__x86_64__ &amp;amp;&amp;amp; __LP64__&amp;lt;/code&amp;gt; it&#039;s a common gotcha for x32, you need to use &amp;lt;code&amp;gt;__LP64__&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;__ILP32__&amp;lt;/code&amp;gt; to tell them apart)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arc&#039;&#039;&#039;                       ||4 ||16||?||unsigned||LE||down||8K       ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__arc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm&#039;&#039;&#039;                       ||4 ||? ||8||unsigned||LE||down||?        ||S ||S ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64&#039;&#039;&#039;       ||8 ||16||16||unsigned||LE||down||4K, 16K, 64K ||H ||H ||S ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__aarch64__ &amp;amp;&amp;amp; __LP64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64ilp32&#039;&#039;&#039;       ||4 ||16||?||unsigned||LE||down||4K, 16K, 64K ||H ||H ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__aarch64__ &amp;amp;&amp;amp; __ILP32__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armel&#039;&#039;&#039;     ||4 ||8 ||8||unsigned||LE||down||4K       ||S ||S ||S ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__ &amp;amp;&amp;amp; __ARM_EABI__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armhf&#039;&#039;&#039;||4 ||8 ||8||unsigned||LE||down||4K       ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__arm__ &amp;amp;&amp;amp; __ARM_EABI__ &amp;amp;&amp;amp; __ARM_PCS_VFP&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;avr32&#039;&#039;&#039;                     ||4 ||8 ||?||unsigned||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hppa&#039;&#039;&#039;                      ||4 ||8 ||8||  signed||BE||up  ||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__hppa__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;any-i386i386, kfreebsd-i386, hurd-i386)&#039;&#039;&#039; ||                                       4||12||168 prior to GCC 7)||  signed||LE||down||4K ||H+||H+||H- Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision])||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__i386__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ia64&#039;&#039;&#039;                     ||8 ||16||16||  signed||LE||bothThe conventional stack grows down from the top of the stack mapping, but there is also the Register Backing Store which grows up from the bottom of the stack mapping at the same time)||?        ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__ia64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;loong64&#039;&#039;&#039;               ||8 ||16||16||  signed||LE||down||4K-64K   ||H ||H ||S ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__loongarch__ &amp;amp;&amp;amp; __loongarch_lp64 &amp;amp;&amp;amp; __loongarch_double_float&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;m68k&#039;&#039;&#039;             ||4 ||12||2||  signed||BE||down||4K       ||S?||S?||S?||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__m68k__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips There are also 6 mips*r6* ports: see [MipsRev6]&#039;&#039;&#039;         ||4 ||8 ||8||  signed||BE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABIO32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsel&#039;&#039;&#039;       ||4 ||8 ||8||  signed||LE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABIO32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64&#039;&#039;&#039;     ||8 ||16||16||  signed||BE||down||4K-64K   ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABI64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64el&#039;&#039;&#039;     ||8 ||16||16||  signed||LE||down||4K-64K   ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABI64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32&#039;&#039;&#039;         ||4 ||8 ||?||  signed||BE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEB &amp;amp;&amp;amp; _MIPS_SIM==_ABIN32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32el&#039;&#039;&#039;       ||4 ||8 ||?||  signed||LE||down||4K-64K   ||H ||H ||H ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__mips__ &amp;amp;&amp;amp; _MIPSEL &amp;amp;&amp;amp; _MIPS_SIM==_ABIN32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;powerpc&#039;&#039;&#039;       ||4 ||16long double changed size from 8 to 16 in Lenny)                               ||16||                                              unsigned||BE||down||4K-64K   ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64&#039;&#039;&#039;           ||8 ||16||16||unsigned||BE||down||4K-64K   ||? ||? ||? ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__ &amp;amp;&amp;amp; __powerpc64__ &amp;amp;&amp;amp; __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64el&#039;&#039;&#039;       ||8 ||16||16||unsigned||LE||down||4K-64K-16M||H||H ||H~||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__powerpc__ &amp;amp;&amp;amp; __ppc64__ &amp;amp;&amp;amp; __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;riscv64&#039;&#039;&#039;                   ||8 ||16(8)The RV64 ISA spec defines long double as 16 bytes, but older toolchains (pre-&amp;quot;riscv-gcc-6.1.0&amp;quot;) have implemented long double as 8 bytes on RV64; cf. https://github.com/riscv/riscv-gcc/commit/54b21fc5ae83cefec44bc2caed4a8c664c274ba0||16||unsigned||LE||down||4K 4k is the default page size on all RISC-V systems. Depending on the chosen virtual memory mode (Sv32/Sv39/Sv48) additional page sizes are available as well: Sv32 supports 4k and 4M pages, Sv39 supports 4k, 2M and 1G pages and Sv48 supports 4k,  2M, 1G, and 512G pages       ||H ||H ||H~||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__riscv &amp;amp;&amp;amp; __riscv_xlen==64&amp;lt;/code&amp;gt; Older, pre-mainline RISC-V toolchains used &amp;lt;code&amp;gt;__riscv__ &amp;amp;&amp;amp; __riscv64&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390&#039;&#039;&#039;                      ||4||16long double changed size from 8 to 16 in Lenny                                ||?||                                              unsigned||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__s390__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390x&#039;&#039;&#039;                     ||8 ||16||8||unsigned||BE||down||4K, 1M, 2G       ||H ||H ||H ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__s390x__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sh4&#039;&#039;&#039;               ||4 ||8 ||4||  signed||LE||down||4K       ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__sh__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc&#039;&#039;&#039;      ||4 ||16long double changed size from 8 to 16 in Lenny                                  ||?||                                                signed||BE||down||?        ||? ||? ||? ||4&lt;br /&gt;
||&amp;lt;code&amp;gt;__sparc__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc64&#039;&#039;&#039;       ||8 ||16||16||  signed||BE||down||8K, 64K, 512K, 4M, 32M, 256M, 2G, 16G||? ||? ||? ||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__sparc__ &amp;amp;&amp;amp; __arch64__&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;x32&#039;&#039;&#039;                       ||4 ||16||16||  signed||LE||down||4K ||H ||H ||H- Use 80bits extended precision see [http://en.wikipedia.org/wiki/Extended_precision extended precision]||8&lt;br /&gt;
||&amp;lt;code&amp;gt;__x86_64__ &amp;amp;&amp;amp; __ILP32__&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DEB ARCH&lt;br /&gt;
!multiarch&lt;br /&gt;
!ELFCLASS&lt;br /&gt;
!ELF machine EM_&lt;br /&gt;
!ld.so(8)&lt;br /&gt;
!uname -mUsed to classify CPU architectures in CMake and many ad-hoc build systems, but note that this is a kernel and/or libc specific name despite referring to the CPU&lt;br /&gt;
!Meson[https://mesonbuild.com/Reference-tables.html Reference table] of Meson hardware architecture names&lt;br /&gt;
!qemue.g. i386 results in qemu(-system)-i386(-static)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;alpha&#039;&#039;&#039;                     ||alpha-linux-gnu            ||64||ALPHA||/lib/ld-linux.so.2||alpha||alpha|| alpha&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;amd64&#039;&#039;&#039;                     ||x86_64-linux-gnu           ||64||X86_64||/lib64/ld-linux-x86-64.so.2||x86_64||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hurd-amd64&#039;&#039;&#039;                ||x86_64-gnu                 ||64||X86_64||/lib/ld-x86-64.so||x86_64-AT386||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;kfreebsd-amd64&#039;&#039;&#039;            ||x86_64-kfreebsd-gnu        ||64||X86_64||/lib/ld-kfreebsd-x86-64.so.1||x86_64||x86_64||x86_64(-microvm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arc&#039;&#039;&#039;                       ||arc-linux-gnu              ||32||ARC_COMPACT2||/lib/ld-linux-arc.so.2||arc||arc||-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm&#039;&#039;&#039;                       ||arm-linux-gnu              ||32||ARM||/lib/ld-linux.so.2||arm*Many names starting with arm, e.g. armv5tel||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64&#039;&#039;&#039;       ||aarch64-linux-gnu          ||64||AARCH64||/lib/ld-linux-aarch64.so.1||aarch64||aarch64||aarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;arm64ilp32&#039;&#039;&#039;||aarch64-linux-gnu_ilp32 ||32?||AARCH64?|| ||aarch64?|| || aarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armel&#039;&#039;&#039;     ||arm-linux-gnueabi          ||32||ARM||/lib/ld-linux.so.3||arm*||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;armhf&#039;&#039;&#039;||arm-linux-gnueabihf        ||32||ARM||/lib/ld-linux-armhf.so.3||arm*||arm||arm&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;avr32&#039;&#039;&#039;                     ||                           ||  || || || ||avr||avrqemu-system-avr only&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hppa&#039;&#039;&#039;                      ||hppa-linux-gnu             ||32||PARISC||/lib/ld.so.1||parisc*||parisc||hppa&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;i386&#039;&#039;&#039;                      ||i386-linux-gnu             ||32||386||/lib/ld-linux.so.2||i?86i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;hurd-i386&#039;&#039;&#039;                 ||i386-gnu                   ||32||386||/lib/ld.so||i?86-AT386i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;kfreebsd-i386&#039;&#039;&#039;             ||i386-kfreebsd-gnu          ||32||386||/lib/ld.so.1||i?86i386, i486, i586, i686||x86||i386&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ia64&#039;&#039;&#039;                      ||ia64-linux-gnu             ||64||IA_64||/lib/ld-linux-ia64.so.2||ia64||ia64||-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;loong64&#039;&#039;&#039;               ||loongarch64-linux-gnu      ||64||LOONGARCH||/lib64/ld-linux-loongarch-lp64d.so.1||loongarch64||loongarch64||loongarch64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;m68k&#039;&#039;&#039;             ||m68k-linux-gnu             ||32||68K||/lib/ld.so.1||m68k||m68k||m68k&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips&#039;&#039;&#039;         ||mips-linux-gnu             ||32||MIPS||/lib/ld.so.1||mips||mips||mips&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsel&#039;&#039;&#039;       ||mipsel-linux-gnu           ||32||MIPS||/lib/ld.so.1||mips||mips||mipsel&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64&#039;&#039;&#039;       ||mips64-linux-gnuabi64      ||  || || ||mips64||mips64||mips64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mips64el&#039;&#039;&#039;     ||mips64el-linux-gnuabi64    ||64||MIPS||/lib64/ld.so.1||mips64||mips64||mips64el&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32&#039;&#039;&#039;      ||mips64-linux-gnuabin32     ||  || || || || ||mipsn32&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;mipsn32el&#039;&#039;&#039;    ||mips64el-linux-gnuabin32   ||  || || || || ||mipsn32el&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;powerpc&#039;&#039;&#039;       ||powerpc-linux-gnu          ||32||PPC||/lib/ld.so.1||ppc||ppc||ppc&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64&#039;&#039;&#039;           ||powerpc64-linux-gnu        ||64||PPC64||/lib64/ld64.so.1||ppc64||ppc64||ppc64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;ppc64el&#039;&#039;&#039;       ||powerpc64le-linux-gnu      ||64||PPC64||/lib64/ld64.so.2||ppcle ppc64le||ppc64||ppc64le&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;riscv64&#039;&#039;&#039;        ||riscv64-linux-gnu          ||64||RISCV||/lib/ld-linux-riscv64-lp64d.so.1 ||riscv64||riscv64||riscv64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390&#039;&#039;&#039;                      ||s390-linux-gnu             ||32||S390||/lib/ld.so.1||s390||s390||(s390x)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;s390x&#039;&#039;&#039;                     ||s390x-linux-gnu            ||64||S390||/lib/ld64.so.1||s390x||s390x||s390x&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sh4&#039;&#039;&#039;               ||sh4-linux-gnu              ||32||SH||/lib/ld-linux.so.2||sh||sh4||sh4&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc&#039;&#039;&#039;      ||sparc-linux-gnu            ||32||SPARC32PLUS||/lib/ld-linux.so.2||sparc||sparc||sparc(32plus)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;sparc64&#039;&#039;&#039;       ||sparc64-linux-gnu          ||64||SPARCV9||/lib64/ld-linux.so.2||sparc64||sparc64||sparc64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;&#039;x32&#039;&#039;&#039;                       ||x86_64-linux-gnux32        ||32||X86_64||/libx32/ld-linux-x32.so.2||x86_64|| ||x86_64&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Alignment =&lt;br /&gt;
&lt;br /&gt;
Note that there is alignment on the machine language level and alignment in C. Proper misalignment (for example in a packed struct) is no problem in C and allowed almost everywhere (except of SPARC, where you will receive SIGBUS on a program execution, misaligned variable/memory access) and the compiler will do the right thing (like translating a read of a variable to two loads at machine language level). On the other hand most of the constructs that lead to unaligned access not properly handled by the C compiler (especially most constructs involving pointer casting) have undefined behaviour anyway, so compiling them with optimisation enabled can cause strange effects on all architectures. Read more on a Wikipedia article [https://en.wikipedia.org/wiki/Data_structure_alignment Data structure alignment].&lt;br /&gt;
&lt;br /&gt;
On the other hand, unaligned synchronization primitives (atomics, etc) tend to be unsupported or extremely slow.  Extra joy if they cross cacheline or page boundaries.&lt;br /&gt;
&lt;br /&gt;
== alpha ==&lt;br /&gt;
&lt;br /&gt;
Some alpha may emulate see [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/alpha/kernel/traps.c kernel source]&lt;br /&gt;
&lt;br /&gt;
== arc ==&lt;br /&gt;
&lt;br /&gt;
ARCv2 processors (ARC HS38 and ARC HS48 variants, 1-4 cores) support unaligned access in hardware, except for &amp;quot;atomic instructions&amp;quot; where special considerations apply. ARCv2 features 2 types of atomic instructions: the first for 32-bit data (&amp;quot;llock&amp;quot;/&amp;quot;scond&amp;quot; pair) and the second for 64-bit data (&amp;quot;llockd&amp;quot;/&amp;quot;scondd&amp;quot;). Those atomic instructions must work on data aligned naturally. I.e. &amp;quot;llock&amp;quot;/&amp;quot;scond&amp;quot; must be only used on 32-bit word-aligned data, &amp;quot;llockd&amp;quot;/&amp;quot;scondd&amp;quot; must be only used on 64-bit double-word aligned data. If an unaligned access is done by &amp;quot;atomic instruction&amp;quot; in user-space, the offending application gets forcefully killed with visible mention of a segmentation fault.  An unaligned access done by “atomic instruction” in kernel-mode will result in an unrecoverable &amp;quot;Illegal instruction&amp;quot; exception.&lt;br /&gt;
&lt;br /&gt;
== armel/armhf/arm64 ==&lt;br /&gt;
&lt;br /&gt;
High-level summary for software engineers: Don&#039;t do unaligned access.&lt;br /&gt;
It&#039;s always inefficient, sometimes extremely inefficient, and&lt;br /&gt;
in various cases is not permitted at all.&lt;br /&gt;
&lt;br /&gt;
The short answer for the ARM case is that ARMv6 and up guarantee&lt;br /&gt;
that the processor can be configured such that some unaligned&lt;br /&gt;
accesses are fine (or at least just inefficient). Linux by default&lt;br /&gt;
enable this mode and trap:&lt;br /&gt;
* All &amp;lt;=32-bit load/store operations can be unaligned.&lt;br /&gt;
* NEON load-stores can be unaligned (unless an explicit alignment is specified in the encoding).&lt;br /&gt;
&lt;br /&gt;
But:&lt;br /&gt;
* VFP load/stores must be naturally aligned.&lt;br /&gt;
* Load-multiple/store-multiple and ldrd/strd do not work with &amp;lt;32-bit alignment, but can sometimes get fixed up by the kernel at a substantial performance penalty.&lt;br /&gt;
&lt;br /&gt;
PUSH/POP usually requires 32-bit alignment, but then the ABI requires&lt;br /&gt;
64-bit alignment of the stack, so that is less of an issue.&lt;br /&gt;
&lt;br /&gt;
Unaligned load-exclusive/store-exclusive operations are not supported.&lt;br /&gt;
&lt;br /&gt;
No unaligned accesses are permitted to memory regions of Device or&lt;br /&gt;
Strongly-ordered type. But some permutation of this will be true for&lt;br /&gt;
most architectures, and in user-space this would only affect things&lt;br /&gt;
prodding /dev/mem or otherwise mmaping from a device driver.&lt;br /&gt;
&lt;br /&gt;
ARM64 similarly makes it possible to trap unaligned accesses, but if&lt;br /&gt;
that is not enabled (which it isn&#039;t by Linux), everything apart from&lt;br /&gt;
load-exclusive/store-exclusive, load-acquire/store-release and Device&lt;br /&gt;
memory accesses will be handled by hardware.&lt;br /&gt;
&lt;br /&gt;
== avr32 ==&lt;br /&gt;
&lt;br /&gt;
Unaligned access is ok for 32bits word but not for 16bits or 64bits word see[https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/avr32/include/asm/unaligned.h kernel source]&lt;br /&gt;
&lt;br /&gt;
== i386/x32/amd64 ==&lt;br /&gt;
&lt;br /&gt;
Unaligned access is slower (but not as much as with other architectures as it is done in hardware and not in software). Moreover some MMX/SSE/vector operation need proper alignment.&lt;br /&gt;
&lt;br /&gt;
Unaligned sync primitives are supported, but there&#039;s active effort to defeature them, with Ice Lakes and newer allowing the kernel to trap.&lt;br /&gt;
&lt;br /&gt;
== ia64 ==&lt;br /&gt;
&lt;br /&gt;
Depending of config may fix with trap handler unaligned access&lt;br /&gt;
&lt;br /&gt;
== riscv64 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Short version&#039;&#039;&#039;: Don&#039;t use unaligned access.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Long version&#039;&#039;&#039;:&lt;br /&gt;
Technically the RISC-V ISA specification allows unaligned access for load and store instructions that are part of the base ISA, but only with significant limitations:&lt;br /&gt;
* Naturally aligned loads and stores are guaranteed to be atomic, but this is not the case for unaligned loads and stores. This can lead to hard-to-find bugs, so unaligned access should really be avoided.&lt;br /&gt;
* Support for unaligned access is usually not implemented in hardware and instead emulated in a trap handler, which makes it very slow.&lt;br /&gt;
&lt;br /&gt;
All synchronization primitives (LR/SC and the atomic memory read-modify-write operations (AMOs)) only allow naturally aligned access.&lt;br /&gt;
&lt;br /&gt;
= Floating point =&lt;br /&gt;
&lt;br /&gt;
First read academic paper about the [http://arxiv.org/abs/cs/0701192 pitfall] of doing multi arch floating point computation&lt;br /&gt;
and the classical &amp;quot;What Every Computer Scientist Should Know About Floating-Point Arithmetic&amp;quot; from [http://www.validlab.com/goldberg/paper.pdf here].&lt;br /&gt;
&lt;br /&gt;
== i386 ==&lt;br /&gt;
&lt;br /&gt;
i387 is a strange beast that suffer from excess precision. Moreover long double is only 80 bits&lt;br /&gt;
&lt;br /&gt;
Internal computation are done with 80 bits of precision that lead to strange and not intuitive result.&lt;br /&gt;
&lt;br /&gt;
== mips/mipsel/mips64el ==&lt;br /&gt;
&lt;br /&gt;
Some mips processors do not contain a hardware floating point unit. In this case the kernel will emulate all FPU instructions at a large performance cost.&lt;br /&gt;
&lt;br /&gt;
= C/C++ Preprocessor Symbols =&lt;br /&gt;
Generally, GNU C tends to define the symbol&lt;br /&gt;
&lt;br /&gt;
 __arch__&lt;br /&gt;
&lt;br /&gt;
A list of some common arch-specific symbols can be found on the [https://github.com/cpredef/predef/blob/master/Architectures.md Pre-defined Architecture Macros] page.&lt;br /&gt;
&lt;br /&gt;
= Signedness =&lt;br /&gt;
When programming in C, variables can be signed or unsigned.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
* `unsigned char c;` - explicit unsigned, 0 &amp;lt;= c &amp;lt;= 255&lt;br /&gt;
* `signed char c;` - explicit signed, -128 &amp;lt;= c &amp;lt;= 127&lt;br /&gt;
* `char c;` - implicit (un)signedness, depending on architecture&lt;br /&gt;
&lt;br /&gt;
To force a signedness, either declare it explicitly or use the gcc command line option -f(un)signed-char. The gcc defaults differ only due to optimisation. Other compilers may not have this issue.&lt;br /&gt;
&lt;br /&gt;
= Architecture baselines =&lt;br /&gt;
&lt;br /&gt;
Each Debian architecture has a &#039;&#039;baseline&#039;&#039; indicating the oldest or least capable CPU on which the architecture can be used. The baseline can change between Debian releases. The baseline is mostly defined by the gcc-&#039;&#039;N&#039;&#039; package, which is configured to produce baseline binaries when options like -march= are not used.&lt;br /&gt;
&lt;br /&gt;
If a package uses options that enable additional CPU features such as -msse in particular source files, then the maintainer of that package is responsible for [[InstructionSelection|making sure those CPU features are only used on CPUs that support them]]. ioquake3&#039;s Altivec support on PowerPC is an example of this technique.&lt;br /&gt;
&lt;br /&gt;
== amd64 ==&lt;br /&gt;
&lt;br /&gt;
x86_64 with no optional extensions (psABI baseline). The core specification includes MMX, SSE and SSE2 so these are OK, but SSE3 and up are not guaranteed. (The default is &#039;&#039;-march=x86-64&#039;&#039;, but not &#039;&#039;-march=x86-64-v2&#039;&#039; or later.)&lt;br /&gt;
&lt;br /&gt;
See [https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build psABI (Table 3.1: Micro-Architecture Levels)] for amd64 ABI level. Wikipedia summary: https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels&lt;br /&gt;
&lt;br /&gt;
== arc ==&lt;br /&gt;
&lt;br /&gt;
A fully featured ARC HS with additional support for double-precision FPU (&amp;quot;-mcpu=hs38_linux&amp;quot;). And this is a default &amp;quot;-mcpu&amp;quot; for ARC starting from GCC 11.&lt;br /&gt;
&lt;br /&gt;
To be more precise it&#039;s a baseline ARC HS with HW division (&amp;quot;-mdiv-rem&amp;quot;), atomic instructions (&amp;quot;-matomic&amp;quot;), 64-bit loads/stores	(&amp;quot;-mll64&amp;quot;), the most advanced multiplier (including quad half-word &amp;amp; vector operations, &amp;quot;-mmpy-option=plus_qmacw&amp;quot;) and double-precision FPU (&amp;quot;-mfpu=fpud_all&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
== arm64 ==&lt;br /&gt;
&lt;br /&gt;
aarch64 (ARMv8-A) with no optional extensions. VFPv4 and NEON are OK, but ARMv8.1-A and up are not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== armel ==&lt;br /&gt;
&lt;br /&gt;
armv5te since Debian 10 &#039;buster&#039; (gcc-8 8-20171215-1).&lt;br /&gt;
&lt;br /&gt;
Before that, armv4te.&lt;br /&gt;
&lt;br /&gt;
== armhf ==&lt;br /&gt;
&lt;br /&gt;
armv7 with VFPv3-D16 floating point. NEON is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== i386 ==&lt;br /&gt;
&lt;br /&gt;
* Pentium4 since Trixie.  This includes most notably SSE2. This was made necessary by LLVM&#039;s lack of support for processors without SSE2.&lt;br /&gt;
* i686 since [https://www.debian.org/releases/bookworm/i386/release-notes/ch-information.en.html#i386-is-i686 Debian 12 &#039;bookworm&#039;]. There&#039;s no MMX nor SSE.&lt;br /&gt;
* Before that, [https://salsa.debian.org/ddp-team/release-notes/-/blob/e7b4c032a94b02e31caff6cfdf7d71917ea00346/en/issues.dbk#L286-317 &amp;quot;almost&amp;quot;] i686 (no &amp;quot;long NOP&amp;quot;/NOPL) since Debian 9 &#039;stretch&#039; (gcc-6 6.1.1-1).&lt;br /&gt;
* Before that, i586 since gcc-4.9 4.9-20140411-1 (2014).&lt;br /&gt;
* Before that, i486 since gcc-4.1 4.1ds7-0exp7 (2006).&lt;br /&gt;
* Before that, i386.&lt;br /&gt;
&lt;br /&gt;
See [https://www.sco.com/developers/devspecs/abi386-4.pdf SYSTEM V APPLICATION BINARY INTERFACE], [https://www.uclibc.org/docs/psABI-i386.pdf Intel386 Architecture Processor Supplement] for more information. [https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build psABI (Table 3.1: Micro-Architecture Levels)] for amd64 ABI level may be also relevant, for newer ABI level.&lt;br /&gt;
&lt;br /&gt;
== mips, mipsel ==&lt;br /&gt;
&lt;br /&gt;
MIPS32R2 since Debian 9 &#039;stretch&#039;.&lt;br /&gt;
&lt;br /&gt;
Before that, MIPS II.&lt;br /&gt;
&lt;br /&gt;
== mips64el ==&lt;br /&gt;
&lt;br /&gt;
MIPS64R2 and up.&lt;br /&gt;
&lt;br /&gt;
== powerpc ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
== powerpcspe ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is impossible, even with runtime detection.&lt;br /&gt;
&lt;br /&gt;
== ppc64 ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown). Altivec is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
(Initially Altivec was in the port baseline, but was [https://lists.debian.org/msgid-search/f06cd492-95eb-b0b3-f15c-d5c2501ec0d7@physik.fu-berlin.de later removed to support some embedded systems])&lt;br /&gt;
&lt;br /&gt;
== ppc64el ==&lt;br /&gt;
&lt;br /&gt;
POWER8 and up.&lt;br /&gt;
&lt;br /&gt;
== s390x ==&lt;br /&gt;
&lt;br /&gt;
z196 since Debian 10 &#039;buster&#039;.&lt;br /&gt;
&lt;br /&gt;
== loong64 ==&lt;br /&gt;
&lt;br /&gt;
(TODO: exact baseline unknown).&lt;br /&gt;
&lt;br /&gt;
= Obtaining this information =&lt;br /&gt;
&lt;br /&gt;
== via the dpkg build logs ==&lt;br /&gt;
&lt;br /&gt;
Starting with dpkg 1.22.0, its build process will print some of the architecture attributes as part of its configure summary.&lt;br /&gt;
&lt;br /&gt;
Search for «Arch attributes» in the [https://buildd.debian.org/status/package.php?p=dpkg dpkg build logs].&lt;br /&gt;
&lt;br /&gt;
== via the C pre-processor ==&lt;br /&gt;
&lt;br /&gt;
 echo | cpp -dM | sort&lt;br /&gt;
&lt;br /&gt;
== via a special tool ==&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;alloca.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stddef.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;time.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 static void test_size_align(const char *name, size_t size, size_t align) {&lt;br /&gt;
   printf(&amp;quot;sizeof(%s) = %zu\n&amp;quot;, name, size);&lt;br /&gt;
   if (size != align) printf(&amp;quot;alignment(%s) = %zu\n&amp;quot;, name, align);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 #define TEST_SIZE_ALIGN(type, name) \&lt;br /&gt;
   struct test_align_##name { char a; type b; }; \&lt;br /&gt;
   test_size_align(#type, sizeof(type), offsetof(struct test_align_##name, b))&lt;br /&gt;
 &lt;br /&gt;
 static void test_endian(void) {&lt;br /&gt;
 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__&lt;br /&gt;
   printf(&amp;quot;byte order = little endian\n&amp;quot;);&lt;br /&gt;
 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__&lt;br /&gt;
   printf(&amp;quot;byte order = big endian\n&amp;quot;);&lt;br /&gt;
 #endif&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void test_char(void) {&lt;br /&gt;
   if ((int)(char)-1 == -1) printf(&amp;quot;char signedness = signed\n&amp;quot;);&lt;br /&gt;
   else if ((int)(char)-1 == 255) printf(&amp;quot;char signedness = unsigned\n&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void test_stack(void) {&lt;br /&gt;
   void *a = alloca(8);&lt;br /&gt;
   void *b = alloca(8);&lt;br /&gt;
   if (a &amp;gt; b) printf(&amp;quot;stack = grows down\n&amp;quot;);&lt;br /&gt;
   else printf(&amp;quot;stack = grows up\n&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main(void) {&lt;br /&gt;
   TEST_SIZE_ALIGN(short, short);&lt;br /&gt;
   TEST_SIZE_ALIGN(int, int);&lt;br /&gt;
   TEST_SIZE_ALIGN(long, long);&lt;br /&gt;
   TEST_SIZE_ALIGN(long long, long_long);&lt;br /&gt;
   TEST_SIZE_ALIGN(float, float);&lt;br /&gt;
   TEST_SIZE_ALIGN(double, double);&lt;br /&gt;
   TEST_SIZE_ALIGN(long double, long_double);&lt;br /&gt;
   TEST_SIZE_ALIGN(void *, pointer);&lt;br /&gt;
   TEST_SIZE_ALIGN(time_t, time_t);&lt;br /&gt;
   test_endian();&lt;br /&gt;
   test_char();&lt;br /&gt;
   test_stack();&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== via autoconf ==&lt;br /&gt;
&lt;br /&gt;
 AC_INIT(archtest, 0.1)&lt;br /&gt;
 AC_CHECK_SIZEOF(short)&lt;br /&gt;
 AC_CHECK_SIZEOF(int)&lt;br /&gt;
 AC_CHECK_SIZEOF(long)&lt;br /&gt;
 AC_CHECK_SIZEOF(long long)&lt;br /&gt;
 AC_CHECK_SIZEOF(float)&lt;br /&gt;
 AC_CHECK_SIZEOF(double)&lt;br /&gt;
 AC_CHECK_SIZEOF(long double)&lt;br /&gt;
 AC_CHECK_SIZEOF(void*)&lt;br /&gt;
 AC_C_BIGENDIAN()&lt;br /&gt;
 AC_C_CHAR_UNSIGNED()&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* Information about [Haskell/GHC Haskell] on different architectures.&lt;br /&gt;
* [https://github.com/cpredef/predef/blob/master/Architectures.md Pre-defined Compiler Macros Wiki - Architectures]&lt;br /&gt;
* [https://gcc.gnu.org/onlinedocs/cpp/Predefined-Macros.html GCC Predefined Macros]&lt;br /&gt;
* [InstructionSelection Instruction Selection]&lt;br /&gt;
* [Multiarch/Tuples]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Ports]]&lt;/div&gt;</summary>
		<author><name>Zeha</name></author>
	</entry>
</feed>