Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F132013807
D52820.id163446.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D52820.id163446.diff
View Options
diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7
--- a/share/man/man7/arch.7
+++ b/share/man/man7/arch.7
@@ -340,13 +340,33 @@
.Ed
.Pp
Common type size and endianness macros:
-.Bl -column -offset indent "BYTE_ORDER" "Meaning"
+.Bl -column -offset indent "__SIZEOF_POINTER__" "Meaning"
.It Sy Macro Ta Sy Meaning
+.It Dv __SIZEOF_LONG__ Ta size in bytes of long
+.It Dv __SIZEOF_POINTER__ Ta size in bytes of intptr_t and pointer
+.It Dv __SIZEOF_SIZE_T__ Ta size in bytes of size_t
.It Dv __LP64__ Ta 64-bit (8-byte) long and pointer, 32-bit (4-byte) int
.It Dv __ILP32__ Ta 32-bit (4-byte) int, long and pointer
.It Dv BYTE_ORDER Ta Either Dv BIG_ENDIAN or Dv LITTLE_ENDIAN .
.El
.Pp
+Because systems were historically either
+.Dv __ILP32__
+or
+.Dv __LP64__
+it has been common for programmers to test of one and assume the other
+one in an else branch.
+With the arrival of CHERI architectures, this is no longer the case and
+.Dv __SIZEOF_*__
+macros should be used for machine independent code and care should be
+taken when introducing new uses of
+.Dv __ILP32__
+or
+.Dv __LP64__ .
+Compilers for CHERI targets do not define
+.Dv __LP64__
+as their pointers are 128-bit capabilities.
+.Pp
Architecture-specific macros:
.Bl -column -offset indent "Architecture" "Predefined macros"
.It Sy Architecture Ta Sy Predefined macros
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Oct 13, 11:10 PM (8 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23308373
Default Alt Text
D52820.id163446.diff (1 KB)
Attached To
Mode
D52820: arch.7: deprecate __ILP32__ and __LP64__ macros
Attached
Detach File
Event Timeline
Log In to Comment