3 # Copyright 2018 The Go Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style
5 # license that can be found in the LICENSE file.
7 # Code in Makefile.am will invoke this script with two arguments.
8 # The first is a GOARCH value. The second is a keyword.
9 # The script will print the value of that keyword for that GOARCH.
11 # - bigendian: true or false
12 # - cachelinesize: the cache line size in bytes
13 # (for performance only; it's not essential to get this right)
14 # - defaultphyspagesize: the default physical page size in bytes
15 # (not currently used, but maybe some day)
16 # - family: the processor family, from ALLGOARCHFAMILY in configure.ac
17 # - int64align: alignment of int64 type in bytes
18 # - maxalign: maximum alignment of values of Go types in bytes
19 # - minframesize: size of smallest possible function frame in bytes
20 # (not currently used, may never be used)
21 # - pcquantum: minimum size of a single instruction in bytes
22 # - ptrsize: size of a pointer in bytes
24 if test $# -ne 2; then
25 echo 1>&2 "usage: goarch <goarch> <keyword>"
35 defaultphyspagesize
=4096
52 defaultphyspagesize
=8192
77 defaultphyspagesize
=65536
89 defaultphyspagesize
=65536
100 mips | mipsle | mips64p32 | mips64p32le
)
104 defaultphyspagesize
=16384
118 defaultphyspagesize
=16384
137 defaultphyspagesize
=65536
145 defaultphyspagesize
=65536
194 defaultphyspagesize
=8192
201 defaultphyspagesize
=8192
206 defaultphyspagesize
=65536
209 echo 1>&2 "unrecognized goarch value \"$goarch\""
214 if test "$family" = "unknown"; then
215 echo 1>&2 "internal error: no family for goarch value \"$goarch\""
227 echo $defaultphyspagesize
248 echo 1>&2 "unrecognized keyword \"$keyword\""