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

Warner Losh imp at bsdimp.com
Wed Jul 20 05:08:56 UTC 2016


On Tue, Jul 19, 2016 at 9:01 PM, Jan Beich <jbeich at vfemail.net> wrote:
> Ed Maste <emaste at FreeBSD.org> 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<SYSCALL,NX,Page1GB,RDTSCP,LM>
>
>> +.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, <machine/endian.h> 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


More information about the svn-src-all mailing list