Re: svn commit: r303033 - head/share/man/man7

2017-05-04 Thread Bruce Evans

On Thu, 4 May 2017, Ed Maste wrote:


On 4 May 2017 at 09:44, Ed Schouten  wrote:

Hi Ed,

2016-07-19 19:46 GMT+02:00 Ed Maste :

+.It arm Ta soft Ta soft, double precision

...

+.It mipsTa soft Ta identical to double


I was wondering, what's the difference between two ways of phrasing
it? If long double is double precision, it's identical to double,
right?


Wrong.  long double is a different type with a different rank to double.
It cannot be identical.

"identical" is a fuzzy way of saying that the representation is
identical and all operations are the same at the level of the represention.



Yes, good point. I copied the text that was on the wiki page and
missed making it consistent here. Probably the style used by the arm
entry is the one we want.


The arm entry is not technically incorrect, but is less useful.  It
would be satisfied by long doubles with twice the number of bits (half
padding) in a different order.

These tables probably shouldn't attempt to give any details except the
size and the padding.  Padding and representation are not mentioned for
integers at all, because everying knows that integers are 2's complement
with no padding.  Long doubles have padding on supported arches iff they
are longer than double but shorter than quad, but the tables don't give
enough details to determine this, and this is just one of the complications
for long doubles.   also doesn't give enough details.  It has
to be augmented by _fpmath.h to see the details of the representation.

Bruce
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r303033 - head/share/man/man7

2017-05-04 Thread Ed Maste
On 4 May 2017 at 09:44, Ed Schouten  wrote:
> Hi Ed,
>
> 2016-07-19 19:46 GMT+02:00 Ed Maste :
>> +.It arm Ta soft Ta soft, double precision
> ...
>> +.It mipsTa soft Ta identical to double
>
> I was wondering, what's the difference between two ways of phrasing
> it? If long double is double precision, it's identical to double,
> right?

Yes, good point. I copied the text that was on the wiki page and
missed making it consistent here. Probably the style used by the arm
entry is the one we want.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r303033 - head/share/man/man7

2017-05-04 Thread Warner Losh
On Thu, May 4, 2017 at 7:44 AM, Ed Schouten  wrote:
> Hi Ed,
>
> 2016-07-19 19:46 GMT+02:00 Ed Maste :
>> +.It arm Ta soft Ta soft, double precision
> ...
>> +.It mipsTa soft Ta identical to double
>
> I was wondering, what's the difference between two ways of phrasing
> it? If long double is double precision, it's identical to double,
> right?
>
>> +.It Dv BYTE_ORDER Ta Either Dv BIG_ENDIAN or Dv LITTLE_ENDIAN .
>> +.Dv PDP11_ENDIAN is not used on FreeBSD.
>
> Would it make more sense to describe GCC/Clang's officially documented
> endianness macros here?
>
> __BYTE_ORDER__
> __ORDER_LITTLE_ENDIAN__
> __ORDER_BIG_ENDIAN__
> __ORDER_PDP_ENDIAN__

I don't think so. We don't use them in the source tree (except to
implement these macros). These are not standardized, so we use our
macros as a standard. We want everybody to use them always, except in
code we get from upstream.

Warner
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r303033 - head/share/man/man7

2017-05-04 Thread Ed Schouten
Hi Ed,

2016-07-19 19:46 GMT+02:00 Ed Maste :
> +.It arm Ta soft Ta soft, double precision
...
> +.It mipsTa soft Ta identical to double

I was wondering, what's the difference between two ways of phrasing
it? If long double is double precision, it's identical to double,
right?

> +.It Dv BYTE_ORDER Ta Either Dv BIG_ENDIAN or Dv LITTLE_ENDIAN .
> +.Dv PDP11_ENDIAN is not used on FreeBSD.

Would it make more sense to describe GCC/Clang's officially documented
endianness macros here?

__BYTE_ORDER__
__ORDER_LITTLE_ENDIAN__
__ORDER_BIG_ENDIAN__
__ORDER_PDP_ENDIAN__

-- 
Ed Schouten 
Nuxi, 's-Hertogenbosch, the Netherlands
KvK-nr.: 62051717
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r303033 - head/share/man/man7

2016-07-20 Thread Bruce Evans

On Tue, 19 Jul 2016, Warner Losh wrote:


On Tue, Jul 19, 2016 at 9:01 PM, Jan Beich  wrote:

Ed Maste  writes:


+.Ss Predefined Macros
+The compiler provides a number of predefined macros.
+Some of these provide architecture-specific details and are explained below.
+Other macros, including those required by the language standard, are not
+included here.

[...]

+cc -x c -Dm -E /dev/null


Typo: -Dm vs. -dM


+.It Dv BYTE_ORDER Ta Either Dv BIG_ENDIAN or Dv LITTLE_ENDIAN .


Are these really compiler macros? I think,  defines them.


These are non-compiler-predefined macros.  They are namespace pollution
in  which is only there in the __BSD_VISIBLE case.


sys/endian.h defines them (and it implements that by including machine/endian.h
in part).


$ clang38 -x c -dM -E /dev/null | fgrep ENDIAN
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __LITTLE_ENDIAN__ 1
#define __ORDER_BIG_ENDIAN__ 4321
#define __ORDER_LITTLE_ENDIAN__ 1234
#define __ORDER_PDP_ENDIAN__ 3412


These are the related compiler definitions in the implementation
namespace.  Their spelling is quite different and there are no
consistency checks between values, but the ABI requires similar values.
The values are as different as the spellings in some cases.
__LITTLE_ENDIAN__ is 1, but FreeBSD's _LITTLE_ENDIAN is 1234.
Actually, the semantics of these is very different too.  FreeBSD's
_LITTLE_ENDIAN corresponds to __ORDER_LITTLE_ENDIAN.


$ gcc5 -x c -dM -E /dev/null | fgrep ENDIAN
#define __ORDER_LITTLE_ENDIAN__ 1234
#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __ORDER_PDP_ENDIAN__ 3412
#define __ORDER_BIG_ENDIAN__ 4321
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__


gcc apparently doesn't even have the confusing __LITTLE_ENDIAN__.


This is why they are defined in machine/endian.h. Compilers have been
somewhat inconsistent in the past.


But they aren't defined in machine/endian.h.  Compilers had no trace
of them in the past.  Even gcc-4.2 in the present /usr/src doesn't have
them.  The FreeBSD macros should be used since they have been portable
in BSD for at last 25 years, with a better spelling which is unsuitable
for standards because it is not ugly enough to not be already in use
with possibly inconsistent semantics.

glibc is different again.  In an old version (2.6), it uses __BYTE_ORDER
where FreeBSD uses _BYTE_ORDER and compilers use __BYTE_ORDER__.  It
also defines the FreeBSD pollution BYTE_ORDER in string/endian.h and
uses this in dangerous places like netinet/icmp6.h, but in the
standard netinet/in.h which doesn't allow this, it is more careful
and uses __BYTE_ORDER.

The man page might need to be more careful about this.  BYTE_ORDER is
not a compiler predefine or standard spelling and determing the
applicable spelling is time-consuming.

Bruce
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r303033 - head/share/man/man7

2016-07-19 Thread Warner Losh
On Tue, Jul 19, 2016 at 9:01 PM, Jan Beich  wrote:
> Ed Maste  writes:
>
>> +.It Sy Architecture Ta Sy Page Sizes
>> +.It amd64   Ta 4K, 2M, 1G
>
> Does FreeBSD support 1G pages nowadays?
>
> $ sysctl hw.pagesizes
> hw.pagesizes: 4096 2097152 0
>
> $ dmesg | fgrep -i 1gb
>   AMD Features=0x2c100800
>
>> +.Ss Predefined Macros
>> +The compiler provides a number of predefined macros.
>> +Some of these provide architecture-specific details and are explained below.
>> +Other macros, including those required by the language standard, are not
>> +included here.
> [...]
>> +cc -x c -Dm -E /dev/null
>
> Typo: -Dm vs. -dM
>
>> +.It Dv BYTE_ORDER Ta Either Dv BIG_ENDIAN or Dv LITTLE_ENDIAN .
>
> Are these really compiler macros? I think,  defines them.

sys/endian.h defines them (and it implements that by including machine/endian.h
in part).

> $ clang38 -x c -dM -E /dev/null | fgrep ENDIAN
> #define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
> #define __LITTLE_ENDIAN__ 1
> #define __ORDER_BIG_ENDIAN__ 4321
> #define __ORDER_LITTLE_ENDIAN__ 1234
> #define __ORDER_PDP_ENDIAN__ 3412
>
> $ gcc5 -x c -dM -E /dev/null | fgrep ENDIAN
> #define __ORDER_LITTLE_ENDIAN__ 1234
> #define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__
> #define __ORDER_PDP_ENDIAN__ 3412
> #define __ORDER_BIG_ENDIAN__ 4321
> #define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__

This is why they are defined in machine/endian.h. Compilers have been
somewhat inconsistent in the past.

Warner
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r303033 - head/share/man/man7

2016-07-19 Thread Konstantin Belousov
On Wed, Jul 20, 2016 at 05:01:03AM +0200, Jan Beich wrote:
> Ed Maste  writes:
> 
> > +.It Sy Architecture Ta Sy Page Sizes
> > +.It amd64   Ta 4K, 2M, 1G
> 
> Does FreeBSD support 1G pages nowadays?
Define what do you mean by 'support'.  The direct map is mapped with 1G
pages where possible, and the mappings are demoted when page attributes
change.

Neither kernel nor userspace mappings are promoted to 1G superpages
in the current pmap.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r303033 - head/share/man/man7

2016-07-19 Thread Jan Beich
Ed Maste  writes:

> +.It Sy Architecture Ta Sy Page Sizes
> +.It amd64   Ta 4K, 2M, 1G

Does FreeBSD support 1G pages nowadays?

$ sysctl hw.pagesizes
hw.pagesizes: 4096 2097152 0

$ dmesg | fgrep -i 1gb
  AMD Features=0x2c100800

> +.Ss Predefined Macros
> +The compiler provides a number of predefined macros.
> +Some of these provide architecture-specific details and are explained below.
> +Other macros, including those required by the language standard, are not
> +included here.
[...]
> +cc -x c -Dm -E /dev/null

Typo: -Dm vs. -dM

> +.It Dv BYTE_ORDER Ta Either Dv BIG_ENDIAN or Dv LITTLE_ENDIAN .

Are these really compiler macros? I think,  defines them.

$ clang38 -x c -dM -E /dev/null | fgrep ENDIAN
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __LITTLE_ENDIAN__ 1
#define __ORDER_BIG_ENDIAN__ 4321
#define __ORDER_LITTLE_ENDIAN__ 1234
#define __ORDER_PDP_ENDIAN__ 3412

$ gcc5 -x c -dM -E /dev/null | fgrep ENDIAN
#define __ORDER_LITTLE_ENDIAN__ 1234
#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __ORDER_PDP_ENDIAN__ 3412
#define __ORDER_BIG_ENDIAN__ 4321
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__


signature.asc
Description: PGP signature


Re: svn commit: r303033 - head/share/man/man7

2016-07-19 Thread Conrad Meyer
On Tue, Jul 19, 2016 at 12:51 PM, Ed Maste  wrote:
> On 19 July 2016 at 15:37, Conrad Meyer  wrote:
>>
>> ILP32 was only added on CURRENT during the 11 timeframe (the r276479
>> 3.5.0 import), and can't be relied upon for stable/10 or 9, FWIW.
>> (Not useful for ports, for example.)
>>
>> Sure, it's probably okay that this manual page only describes the
>> release it is present in.
>
> Good point; I should add a note to clarify this in the page itself.

Alternatively, it looks like a pretty trivial backport.  But I'm not
volunteering :-).

Best,
Conrad
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r303033 - head/share/man/man7

2016-07-19 Thread Ed Maste
On 19 July 2016 at 15:37, Conrad Meyer  wrote:
>
> ILP32 was only added on CURRENT during the 11 timeframe (the r276479
> 3.5.0 import), and can't be relied upon for stable/10 or 9, FWIW.
> (Not useful for ports, for example.)
>
> Sure, it's probably okay that this manual page only describes the
> release it is present in.

Good point; I should add a note to clarify this in the page itself.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r303033 - head/share/man/man7

2016-07-19 Thread Conrad Meyer
On Tue, Jul 19, 2016 at 10:46 AM, Ed Maste  wrote:
> Author: emaste
> Date: Tue Jul 19 17:46:09 2016
> New Revision: 303033
> URL: https://svnweb.freebsd.org/changeset/base/303033
>
> Log:
>   add an arch.7 man page with architecture-specific details
>
>   Based on details collected on the wiki, at
>   https://wiki.freebsd.org/EdMaste/ArchitectureSpecifics
>   Further details to be added over time.
>
>   Sponsored by: The FreeBSD Foundation
>   Differential Revision:https://reviews.freebsd.org/D7096
>
> Added:
>   head/share/man/man7/arch.7   (contents, props changed)
> Modified:
>   head/share/man/man7/Makefile
>
> ...
> Added: head/share/man/man7/arch.7
> ==
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/share/man/man7/arch.7  Tue Jul 19 17:46:09 2016(r303033)
> @@ -0,0 +1,171 @@
> ...
> +.Ss Predefined Macros
> +The compiler provides a number of predefined macros.
> +Some of these provide architecture-specific details and are explained below.
> +Other macros, including those required by the language standard, are not
> +included here.
> +.Pp
> +The full set of predefined macros can be obtained with this command:
> +.Bd -literal -offset indent
> +cc -x c -Dm -E /dev/null
> +.Ed
> +.Pp
> +Common type size and endianness macros:
> +.Bl -column -offset indent "BYTE_ORDER" ".Sy Meaning"
> +.It Sy Macro Ta Sy Meaning
> +.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

ILP32 was only added on CURRENT during the 11 timeframe (the r276479
3.5.0 import), and can't be relied upon for stable/10 or 9, FWIW.
(Not useful for ports, for example.)

Sure, it's probably okay that this manual page only describes the
release it is present in.

Best,
Conrad
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r303033 - head/share/man/man7

2016-07-19 Thread Nathan Whitehorn

Thank you! This is super useful.
-Nathan

On 07/19/16 10:46, Ed Maste wrote:

Author: emaste
Date: Tue Jul 19 17:46:09 2016
New Revision: 303033
URL: https://svnweb.freebsd.org/changeset/base/303033

Log:
   add an arch.7 man page with architecture-specific details
   
   Based on details collected on the wiki, at

   https://wiki.freebsd.org/EdMaste/ArchitectureSpecifics
   Further details to be added over time.
   
   Sponsored by:	The FreeBSD Foundation

   Differential Revision:   https://reviews.freebsd.org/D7096

Added:
   head/share/man/man7/arch.7   (contents, props changed)
Modified:
   head/share/man/man7/Makefile

Modified: head/share/man/man7/Makefile
==
--- head/share/man/man7/MakefileTue Jul 19 17:31:48 2016
(r303032)
+++ head/share/man/man7/MakefileTue Jul 19 17:46:09 2016
(r303033)
@@ -7,6 +7,7 @@ PACKAGE=runtime-manuals
  
  #MISSING: eqnchar.7 ms.7 term.7

  MAN=  adding_user.7 \
+   arch.7 \
ascii.7 \
bsd.snmpmod.mk.7 \
build.7 \

Added: head/share/man/man7/arch.7
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man7/arch.7  Tue Jul 19 17:46:09 2016(r303033)
@@ -0,0 +1,171 @@
+.\" Copyright (c) 2016 The FreeBSD Foundation. All rights reserved.
+.\"
+.\" This documentation was created by Ed Maste under sponsorship of
+.\" The FreeBSD Foundation.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 19, 2016
+.Dt ARCH 7
+.Os
+.Sh NAME
+.Nm arch
+.Nd Architecture-specific details
+.Sh DESCRIPTION
+Differences between CPU architectures and platforms supported by
+.Fx .
+.Pp
+.Ss Type sizes
+On all supported architectures,
+.Bl -column -offset -indent "long long" "Size"
+.It Sy Type Ta Sy Size
+.It short Ta 2
+.It int Ta 4
+.It long Ta sizeof(void*)
+.It long long Ta 8
+.It float Ta 4
+.It double Ta 8
+.El
+.Bl -column -offset indent ".Sy Architecture" ".Sy sizeof(void *)" ".Sy 
"sizeof(long double)"
+.It Sy Architecture Ta Sy sizeof(void *) Ta Sy sizeof(long double)
+.It amd64   Ta 8 Ta 16
+.It arm Ta 4 Ta  8
+.It armeb   Ta 4 Ta  8
+.It armv6   Ta 4 Ta  8
+.It arm64   Ta 8 Ta 16
+.It i386Ta 4 Ta 12
+.It mipsTa 4 Ta  8
+.It mipsel  Ta 4 Ta  8
+.It mipsn32 Ta 4 Ta  8
+.It mips64  Ta 8 Ta  8
+.It mips64elTa 8 Ta  8
+.It powerpc Ta 4 Ta  8
+.It powerpc64   Ta 8 Ta  8
+.It riscv   Ta 8 Ta
+.It sparc64 Ta 8 Ta 16
+.El
+.Ss Endianness and Char Signedness
+.Bl -column -offset indent ".Sy Architecture" ".Sy Endianness" ".Sy "char 
Signedness"
+.It Sy Architecture Ta Sy Endianness Ta Sy char Signedness
+.It amd64   Ta little Ta   signed
+.It arm Ta little Ta unsigned
+.It armeb   Ta bigTa unsigned
+.It armv6   Ta little Ta unsigned
+.It arm64   Ta little Ta unsigned
+.It i386Ta little Ta   signed
+.It mipsTa little Ta   signed
+.It mipsel  Ta bigTa   signed
+.It mipsn32 Ta little Ta   signed
+.It mips64  Ta little Ta   signed
+.It mips64elTa little Ta   signed
+.It powerpc Ta bigTa unsigned
+.It powerpc64   Ta bigTa unsigned
+.It riscv   Ta little Ta   signed
+.It sparc64 Ta bigTa   signed
+.El
+.Ss Page Size
+.Bl -column -offset indent ".Sy Architecture" ".Sy Page Sizes"
+.It Sy Architecture Ta Sy Page Sizes
+.It amd64   Ta 4K, 2M, 1G
+.It arm Ta 4K
+.It armeb   Ta 4K
+.It armv6   Ta 4K
+.It arm64   Ta 4K, 2M, 1G
+.It i386Ta 4K, 2M (PAE), 4M
+.It mipsTa 4K
+.It mipsel

svn commit: r303033 - head/share/man/man7

2016-07-19 Thread Ed Maste
Author: emaste
Date: Tue Jul 19 17:46:09 2016
New Revision: 303033
URL: https://svnweb.freebsd.org/changeset/base/303033

Log:
  add an arch.7 man page with architecture-specific details
  
  Based on details collected on the wiki, at
  https://wiki.freebsd.org/EdMaste/ArchitectureSpecifics
  Further details to be added over time.
  
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D7096

Added:
  head/share/man/man7/arch.7   (contents, props changed)
Modified:
  head/share/man/man7/Makefile

Modified: head/share/man/man7/Makefile
==
--- head/share/man/man7/MakefileTue Jul 19 17:31:48 2016
(r303032)
+++ head/share/man/man7/MakefileTue Jul 19 17:46:09 2016
(r303033)
@@ -7,6 +7,7 @@ PACKAGE=runtime-manuals
 
 #MISSING: eqnchar.7 ms.7 term.7
 MAN=   adding_user.7 \
+   arch.7 \
ascii.7 \
bsd.snmpmod.mk.7 \
build.7 \

Added: head/share/man/man7/arch.7
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man7/arch.7  Tue Jul 19 17:46:09 2016(r303033)
@@ -0,0 +1,171 @@
+.\" Copyright (c) 2016 The FreeBSD Foundation. All rights reserved.
+.\"
+.\" This documentation was created by Ed Maste under sponsorship of
+.\" The FreeBSD Foundation.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 19, 2016
+.Dt ARCH 7
+.Os
+.Sh NAME
+.Nm arch
+.Nd Architecture-specific details
+.Sh DESCRIPTION
+Differences between CPU architectures and platforms supported by
+.Fx .
+.Pp
+.Ss Type sizes
+On all supported architectures,
+.Bl -column -offset -indent "long long" "Size"
+.It Sy Type Ta Sy Size
+.It short Ta 2
+.It int Ta 4
+.It long Ta sizeof(void*)
+.It long long Ta 8
+.It float Ta 4
+.It double Ta 8
+.El
+.Bl -column -offset indent ".Sy Architecture" ".Sy sizeof(void *)" ".Sy 
"sizeof(long double)"
+.It Sy Architecture Ta Sy sizeof(void *) Ta Sy sizeof(long double)
+.It amd64   Ta 8 Ta 16
+.It arm Ta 4 Ta  8
+.It armeb   Ta 4 Ta  8
+.It armv6   Ta 4 Ta  8
+.It arm64   Ta 8 Ta 16
+.It i386Ta 4 Ta 12
+.It mipsTa 4 Ta  8
+.It mipsel  Ta 4 Ta  8
+.It mipsn32 Ta 4 Ta  8
+.It mips64  Ta 8 Ta  8
+.It mips64elTa 8 Ta  8
+.It powerpc Ta 4 Ta  8
+.It powerpc64   Ta 8 Ta  8
+.It riscv   Ta 8 Ta
+.It sparc64 Ta 8 Ta 16
+.El
+.Ss Endianness and Char Signedness
+.Bl -column -offset indent ".Sy Architecture" ".Sy Endianness" ".Sy "char 
Signedness"
+.It Sy Architecture Ta Sy Endianness Ta Sy char Signedness
+.It amd64   Ta little Ta   signed
+.It arm Ta little Ta unsigned
+.It armeb   Ta bigTa unsigned
+.It armv6   Ta little Ta unsigned
+.It arm64   Ta little Ta unsigned
+.It i386Ta little Ta   signed
+.It mipsTa little Ta   signed
+.It mipsel  Ta bigTa   signed
+.It mipsn32 Ta little Ta   signed
+.It mips64  Ta little Ta   signed
+.It mips64elTa little Ta   signed
+.It powerpc Ta bigTa unsigned
+.It powerpc64   Ta bigTa unsigned
+.It riscv   Ta little Ta   signed
+.It sparc64 Ta bigTa   signed
+.El
+.Ss Page Size
+.Bl -column -offset indent ".Sy Architecture" ".Sy Page Sizes"
+.It Sy Architecture Ta Sy Page Sizes
+.It amd64   Ta 4K, 2M, 1G
+.It arm Ta 4K
+.It armeb   Ta 4K
+.It armv6   Ta 4K
+.It arm64   Ta 4K, 2M, 1G
+.It i386Ta 4K, 2M (PAE), 4M
+.It mipsTa 4K
+.It mipsel  Ta 4K
+.It mipsn32 Ta 4K
+.It mips64  Ta 4K
+.It mips64elTa 4K
+.It powerpc