diff --git a/AUTHORS b/AUTHORS
index 8b8105b1ad..b2a6b3fc45 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -928,6 +928,7 @@ Maxim Khitrov
Maxime de Roucy
Máximo Cuadros Ortiz
Maxwell Krohn
+Maya Rashish
Mayank Kumar
MediaMath, Inc
Meir Fischer
diff --git a/api/except.txt b/api/except.txt
index a608d5783e..2a1287ce90 100644
--- a/api/except.txt
+++ b/api/except.txt
@@ -457,4 +457,5 @@ pkg syscall (freebsd-arm-cgo), type Stat_t struct, Nlink uint16
pkg syscall (freebsd-arm-cgo), type Stat_t struct, Rdev uint32
pkg syscall (freebsd-arm-cgo), type Statfs_t struct, Mntfromname [88]int8
pkg syscall (freebsd-arm-cgo), type Statfs_t struct, Mntonname [88]int8
-pkg text/scanner, const GoTokens = 1012
\ No newline at end of file
+pkg text/scanner, const GoTokens = 1012
+pkg unicode, const Version = "10.0.0"
diff --git a/api/next.txt b/api/next.txt
index aaea62d70b..24c4daf1ad 100644
--- a/api/next.txt
+++ b/api/next.txt
@@ -1,3 +1,8042 @@
+pkg bytes, func ToValidUTF8([]uint8, []uint8) []uint8
+pkg crypto/ed25519, const PrivateKeySize = 64
+pkg crypto/ed25519, const PrivateKeySize ideal-int
+pkg crypto/ed25519, const PublicKeySize = 32
+pkg crypto/ed25519, const PublicKeySize ideal-int
+pkg crypto/ed25519, const SeedSize = 32
+pkg crypto/ed25519, const SeedSize ideal-int
+pkg crypto/ed25519, const SignatureSize = 64
+pkg crypto/ed25519, const SignatureSize ideal-int
+pkg crypto/ed25519, func GenerateKey(io.Reader) (PublicKey, PrivateKey, error)
+pkg crypto/ed25519, func NewKeyFromSeed([]uint8) PrivateKey
+pkg crypto/ed25519, func Sign(PrivateKey, []uint8) []uint8
+pkg crypto/ed25519, func Verify(PublicKey, []uint8, []uint8) bool
+pkg crypto/ed25519, method (PrivateKey) Public() crypto.PublicKey
+pkg crypto/ed25519, method (PrivateKey) Seed() []uint8
+pkg crypto/ed25519, method (PrivateKey) Sign(io.Reader, []uint8, crypto.SignerOpts) ([]uint8, error)
+pkg crypto/ed25519, type PrivateKey []uint8
+pkg crypto/ed25519, type PublicKey []uint8
+pkg database/sql, method (*NullInt32) Scan(interface{}) error
+pkg database/sql, method (*NullTime) Scan(interface{}) error
+pkg database/sql, method (NullInt32) Value() (driver.Value, error)
+pkg database/sql, method (NullTime) Value() (driver.Value, error)
+pkg database/sql, type NullInt32 struct
+pkg database/sql, type NullInt32 struct, Int32 int32
+pkg database/sql, type NullInt32 struct, Valid bool
+pkg database/sql, type NullTime struct
+pkg database/sql, type NullTime struct, Time time.Time
+pkg database/sql, type NullTime struct, Valid bool
+pkg debug/dwarf, method (*UnsupportedType) Common() *CommonType
+pkg debug/dwarf, method (*UnsupportedType) Size() int64
+pkg debug/dwarf, method (*UnsupportedType) String() string
+pkg debug/dwarf, type UnsupportedType struct
+pkg debug/dwarf, type UnsupportedType struct, Tag Tag
+pkg debug/dwarf, type UnsupportedType struct, embedded CommonType
+pkg encoding/csv, method (*ParseError) Unwrap() error
+pkg encoding/json, method (*MarshalerError) Unwrap() error
+pkg errors, func As(error, interface{}) bool
+pkg errors, func Caller(int) Frame
+pkg errors, func Is(error, error) bool
+pkg errors, func Opaque(error) error
+pkg errors, func Unwrap(error) error
+pkg errors, method (Frame) Format(Printer)
+pkg errors, type Formatter interface { Error, FormatError }
+pkg errors, type Formatter interface, Error() string
+pkg errors, type Formatter interface, FormatError(Printer) error
+pkg errors, type Frame struct
+pkg errors, type Printer interface { Detail, Print, Printf }
+pkg errors, type Printer interface, Detail() bool
+pkg errors, type Printer interface, Print(...interface{})
+pkg errors, type Printer interface, Printf(string, ...interface{})
+pkg errors, type Wrapper interface { Unwrap }
+pkg errors, type Wrapper interface, Unwrap() error
+pkg go/constant, func Make(interface{}) Value
+pkg go/constant, func Val(Value) interface{}
+pkg go/token, func IsExported(string) bool
+pkg go/token, func IsIdentifier(string) bool
+pkg go/token, func IsKeyword(string) bool
+pkg log, func Writer() io.Writer
+pkg log/syslog (netbsd-arm64), const LOG_ALERT = 1
+pkg log/syslog (netbsd-arm64), const LOG_ALERT Priority
+pkg log/syslog (netbsd-arm64), const LOG_AUTH = 32
+pkg log/syslog (netbsd-arm64), const LOG_AUTH Priority
+pkg log/syslog (netbsd-arm64), const LOG_AUTHPRIV = 80
+pkg log/syslog (netbsd-arm64), const LOG_AUTHPRIV Priority
+pkg log/syslog (netbsd-arm64), const LOG_CRIT = 2
+pkg log/syslog (netbsd-arm64), const LOG_CRIT Priority
+pkg log/syslog (netbsd-arm64), const LOG_CRON = 72
+pkg log/syslog (netbsd-arm64), const LOG_CRON Priority
+pkg log/syslog (netbsd-arm64), const LOG_DAEMON = 24
+pkg log/syslog (netbsd-arm64), const LOG_DAEMON Priority
+pkg log/syslog (netbsd-arm64), const LOG_DEBUG = 7
+pkg log/syslog (netbsd-arm64), const LOG_DEBUG Priority
+pkg log/syslog (netbsd-arm64), const LOG_EMERG = 0
+pkg log/syslog (netbsd-arm64), const LOG_EMERG Priority
+pkg log/syslog (netbsd-arm64), const LOG_ERR = 3
+pkg log/syslog (netbsd-arm64), const LOG_ERR Priority
+pkg log/syslog (netbsd-arm64), const LOG_FTP = 88
+pkg log/syslog (netbsd-arm64), const LOG_FTP Priority
+pkg log/syslog (netbsd-arm64), const LOG_INFO = 6
+pkg log/syslog (netbsd-arm64), const LOG_INFO Priority
+pkg log/syslog (netbsd-arm64), const LOG_KERN = 0
+pkg log/syslog (netbsd-arm64), const LOG_KERN Priority
+pkg log/syslog (netbsd-arm64), const LOG_LOCAL0 = 128
+pkg log/syslog (netbsd-arm64), const LOG_LOCAL0 Priority
+pkg log/syslog (netbsd-arm64), const LOG_LOCAL1 = 136
+pkg log/syslog (netbsd-arm64), const LOG_LOCAL1 Priority
+pkg log/syslog (netbsd-arm64), const LOG_LOCAL2 = 144
+pkg log/syslog (netbsd-arm64), const LOG_LOCAL2 Priority
+pkg log/syslog (netbsd-arm64), const LOG_LOCAL3 = 152
+pkg log/syslog (netbsd-arm64), const LOG_LOCAL3 Priority
+pkg log/syslog (netbsd-arm64), const LOG_LOCAL4 = 160
+pkg log/syslog (netbsd-arm64), const LOG_LOCAL4 Priority
+pkg log/syslog (netbsd-arm64), const LOG_LOCAL5 = 168
+pkg log/syslog (netbsd-arm64), const LOG_LOCAL5 Priority
+pkg log/syslog (netbsd-arm64), const LOG_LOCAL6 = 176
+pkg log/syslog (netbsd-arm64), const LOG_LOCAL6 Priority
+pkg log/syslog (netbsd-arm64), const LOG_LOCAL7 = 184
+pkg log/syslog (netbsd-arm64), const LOG_LOCAL7 Priority
+pkg log/syslog (netbsd-arm64), const LOG_LPR = 48
+pkg log/syslog (netbsd-arm64), const LOG_LPR Priority
+pkg log/syslog (netbsd-arm64), const LOG_MAIL = 16
+pkg log/syslog (netbsd-arm64), const LOG_MAIL Priority
+pkg log/syslog (netbsd-arm64), const LOG_NEWS = 56
+pkg log/syslog (netbsd-arm64), const LOG_NEWS Priority
+pkg log/syslog (netbsd-arm64), const LOG_NOTICE = 5
+pkg log/syslog (netbsd-arm64), const LOG_NOTICE Priority
+pkg log/syslog (netbsd-arm64), const LOG_SYSLOG = 40
+pkg log/syslog (netbsd-arm64), const LOG_SYSLOG Priority
+pkg log/syslog (netbsd-arm64), const LOG_USER = 8
+pkg log/syslog (netbsd-arm64), const LOG_USER Priority
+pkg log/syslog (netbsd-arm64), const LOG_UUCP = 64
+pkg log/syslog (netbsd-arm64), const LOG_UUCP Priority
+pkg log/syslog (netbsd-arm64), const LOG_WARNING = 4
+pkg log/syslog (netbsd-arm64), const LOG_WARNING Priority
+pkg log/syslog (netbsd-arm64), func Dial(string, string, Priority, string) (*Writer, error)
+pkg log/syslog (netbsd-arm64), func New(Priority, string) (*Writer, error)
+pkg log/syslog (netbsd-arm64), func NewLogger(Priority, int) (*log.Logger, error)
+pkg log/syslog (netbsd-arm64), method (*Writer) Alert(string) error
+pkg log/syslog (netbsd-arm64), method (*Writer) Close() error
+pkg log/syslog (netbsd-arm64), method (*Writer) Crit(string) error
+pkg log/syslog (netbsd-arm64), method (*Writer) Debug(string) error
+pkg log/syslog (netbsd-arm64), method (*Writer) Emerg(string) error
+pkg log/syslog (netbsd-arm64), method (*Writer) Err(string) error
+pkg log/syslog (netbsd-arm64), method (*Writer) Info(string) error
+pkg log/syslog (netbsd-arm64), method (*Writer) Notice(string) error
+pkg log/syslog (netbsd-arm64), method (*Writer) Warning(string) error
+pkg log/syslog (netbsd-arm64), method (*Writer) Write([]uint8) (int, error)
+pkg log/syslog (netbsd-arm64), type Priority int
+pkg log/syslog (netbsd-arm64), type Writer struct
+pkg log/syslog (netbsd-arm64-cgo), const LOG_ALERT = 1
+pkg log/syslog (netbsd-arm64-cgo), const LOG_ALERT Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_AUTH = 32
+pkg log/syslog (netbsd-arm64-cgo), const LOG_AUTH Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_AUTHPRIV = 80
+pkg log/syslog (netbsd-arm64-cgo), const LOG_AUTHPRIV Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_CRIT = 2
+pkg log/syslog (netbsd-arm64-cgo), const LOG_CRIT Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_CRON = 72
+pkg log/syslog (netbsd-arm64-cgo), const LOG_CRON Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_DAEMON = 24
+pkg log/syslog (netbsd-arm64-cgo), const LOG_DAEMON Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_DEBUG = 7
+pkg log/syslog (netbsd-arm64-cgo), const LOG_DEBUG Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_EMERG = 0
+pkg log/syslog (netbsd-arm64-cgo), const LOG_EMERG Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_ERR = 3
+pkg log/syslog (netbsd-arm64-cgo), const LOG_ERR Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_FTP = 88
+pkg log/syslog (netbsd-arm64-cgo), const LOG_FTP Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_INFO = 6
+pkg log/syslog (netbsd-arm64-cgo), const LOG_INFO Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_KERN = 0
+pkg log/syslog (netbsd-arm64-cgo), const LOG_KERN Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_LOCAL0 = 128
+pkg log/syslog (netbsd-arm64-cgo), const LOG_LOCAL0 Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_LOCAL1 = 136
+pkg log/syslog (netbsd-arm64-cgo), const LOG_LOCAL1 Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_LOCAL2 = 144
+pkg log/syslog (netbsd-arm64-cgo), const LOG_LOCAL2 Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_LOCAL3 = 152
+pkg log/syslog (netbsd-arm64-cgo), const LOG_LOCAL3 Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_LOCAL4 = 160
+pkg log/syslog (netbsd-arm64-cgo), const LOG_LOCAL4 Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_LOCAL5 = 168
+pkg log/syslog (netbsd-arm64-cgo), const LOG_LOCAL5 Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_LOCAL6 = 176
+pkg log/syslog (netbsd-arm64-cgo), const LOG_LOCAL6 Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_LOCAL7 = 184
+pkg log/syslog (netbsd-arm64-cgo), const LOG_LOCAL7 Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_LPR = 48
+pkg log/syslog (netbsd-arm64-cgo), const LOG_LPR Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_MAIL = 16
+pkg log/syslog (netbsd-arm64-cgo), const LOG_MAIL Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_NEWS = 56
+pkg log/syslog (netbsd-arm64-cgo), const LOG_NEWS Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_NOTICE = 5
+pkg log/syslog (netbsd-arm64-cgo), const LOG_NOTICE Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_SYSLOG = 40
+pkg log/syslog (netbsd-arm64-cgo), const LOG_SYSLOG Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_USER = 8
+pkg log/syslog (netbsd-arm64-cgo), const LOG_USER Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_UUCP = 64
+pkg log/syslog (netbsd-arm64-cgo), const LOG_UUCP Priority
+pkg log/syslog (netbsd-arm64-cgo), const LOG_WARNING = 4
+pkg log/syslog (netbsd-arm64-cgo), const LOG_WARNING Priority
+pkg log/syslog (netbsd-arm64-cgo), func Dial(string, string, Priority, string) (*Writer, error)
+pkg log/syslog (netbsd-arm64-cgo), func New(Priority, string) (*Writer, error)
+pkg log/syslog (netbsd-arm64-cgo), func NewLogger(Priority, int) (*log.Logger, error)
+pkg log/syslog (netbsd-arm64-cgo), method (*Writer) Alert(string) error
+pkg log/syslog (netbsd-arm64-cgo), method (*Writer) Close() error
+pkg log/syslog (netbsd-arm64-cgo), method (*Writer) Crit(string) error
+pkg log/syslog (netbsd-arm64-cgo), method (*Writer) Debug(string) error
+pkg log/syslog (netbsd-arm64-cgo), method (*Writer) Emerg(string) error
+pkg log/syslog (netbsd-arm64-cgo), method (*Writer) Err(string) error
+pkg log/syslog (netbsd-arm64-cgo), method (*Writer) Info(string) error
+pkg log/syslog (netbsd-arm64-cgo), method (*Writer) Notice(string) error
+pkg log/syslog (netbsd-arm64-cgo), method (*Writer) Warning(string) error
+pkg log/syslog (netbsd-arm64-cgo), method (*Writer) Write([]uint8) (int, error)
+pkg log/syslog (netbsd-arm64-cgo), type Priority int
+pkg log/syslog (netbsd-arm64-cgo), type Writer struct
+pkg math/big, method (*Int) TrailingZeroBits() uint
+pkg math/big, method (*Rat) SetUint64(uint64) *Rat
+pkg net, method (*DNSConfigError) Unwrap() error
+pkg net, method (*DNSError) Is(error) bool
+pkg net, method (*OpError) Is(error) bool
+pkg net, method (*OpError) Unwrap() error
+pkg net, type DNSError struct, IsNotFound bool
+pkg net, type ListenConfig struct, KeepAlive time.Duration
+pkg net/http, const SameSiteNoneMode = 4
+pkg net/http, const SameSiteNoneMode SameSite
+pkg net/http, const StatusEarlyHints = 103
+pkg net/http, const StatusEarlyHints ideal-int
+pkg net/http, func NewRequestWithContext(context.Context, string, string, io.Reader) (*Request, error)
+pkg net/http, method (*Request) Clone(context.Context) *Request
+pkg net/http, method (*Transport) Clone() *Transport
+pkg net/http, method (Header) Clone() Header
+pkg net/http, type Server struct, BaseContext func(net.Listener) context.Context
+pkg net/http, type Server struct, ConnContext func(context.Context, net.Conn) context.Context
+pkg net/http, type Transport struct, ForceAttemptHTTP2 bool
+pkg net/http, type Transport struct, ReadBufferSize int
+pkg net/http, type Transport struct, WriteBufferSize int
+pkg net/url, method (*Error) Unwrap() error
+pkg os (netbsd-arm64), const DevNull = "/dev/null"
+pkg os (netbsd-arm64), const O_APPEND = 8
+pkg os (netbsd-arm64), const O_CREATE = 512
+pkg os (netbsd-arm64), const O_EXCL = 2048
+pkg os (netbsd-arm64), const O_SYNC = 128
+pkg os (netbsd-arm64), const O_TRUNC = 1024
+pkg os (netbsd-arm64), const PathListSeparator = 58
+pkg os (netbsd-arm64), const PathSeparator = 47
+pkg os (netbsd-arm64-cgo), const DevNull = "/dev/null"
+pkg os (netbsd-arm64-cgo), const O_APPEND = 8
+pkg os (netbsd-arm64-cgo), const O_CREATE = 512
+pkg os (netbsd-arm64-cgo), const O_EXCL = 2048
+pkg os (netbsd-arm64-cgo), const O_SYNC = 128
+pkg os (netbsd-arm64-cgo), const O_TRUNC = 1024
+pkg os (netbsd-arm64-cgo), const PathListSeparator = 58
+pkg os (netbsd-arm64-cgo), const PathSeparator = 47
+pkg os, func UserConfigDir() (string, error)
+pkg os, method (*LinkError) Unwrap() error
+pkg os, method (*PathError) Unwrap() error
+pkg os, method (*SyscallError) Unwrap() error
+pkg os, var ErrTemporary error
+pkg os, var ErrTimeout error
+pkg os/exec, method (*Cmd) String() string
+pkg os/exec, method (*Error) Unwrap() error
+pkg path/filepath (netbsd-arm64), const ListSeparator = 58
+pkg path/filepath (netbsd-arm64), const Separator = 47
+pkg path/filepath (netbsd-arm64-cgo), const ListSeparator = 58
+pkg path/filepath (netbsd-arm64-cgo), const Separator = 47
+pkg reflect, method (Value) IsZero() bool
+pkg runtime (netbsd-arm64), const GOARCH = "arm64"
+pkg runtime (netbsd-arm64), const GOOS = "netbsd"
+pkg runtime (netbsd-arm64-cgo), const GOARCH = "arm64"
+pkg runtime (netbsd-arm64-cgo), const GOOS = "netbsd"
+pkg strings, func ToValidUTF8(string, string) string
+pkg syscall (netbsd-arm64), const AF_APPLETALK = 16
+pkg syscall (netbsd-arm64), const AF_APPLETALK ideal-int
+pkg syscall (netbsd-arm64), const AF_ARP = 28
+pkg syscall (netbsd-arm64), const AF_ARP ideal-int
+pkg syscall (netbsd-arm64), const AF_BLUETOOTH = 31
+pkg syscall (netbsd-arm64), const AF_BLUETOOTH ideal-int
+pkg syscall (netbsd-arm64), const AF_CCITT = 10
+pkg syscall (netbsd-arm64), const AF_CCITT ideal-int
+pkg syscall (netbsd-arm64), const AF_CHAOS = 5
+pkg syscall (netbsd-arm64), const AF_CHAOS ideal-int
+pkg syscall (netbsd-arm64), const AF_CNT = 21
+pkg syscall (netbsd-arm64), const AF_CNT ideal-int
+pkg syscall (netbsd-arm64), const AF_COIP = 20
+pkg syscall (netbsd-arm64), const AF_COIP ideal-int
+pkg syscall (netbsd-arm64), const AF_DATAKIT = 9
+pkg syscall (netbsd-arm64), const AF_DATAKIT ideal-int
+pkg syscall (netbsd-arm64), const AF_DECnet = 12
+pkg syscall (netbsd-arm64), const AF_DECnet ideal-int
+pkg syscall (netbsd-arm64), const AF_DLI = 13
+pkg syscall (netbsd-arm64), const AF_DLI ideal-int
+pkg syscall (netbsd-arm64), const AF_E164 = 26
+pkg syscall (netbsd-arm64), const AF_E164 ideal-int
+pkg syscall (netbsd-arm64), const AF_ECMA = 8
+pkg syscall (netbsd-arm64), const AF_ECMA ideal-int
+pkg syscall (netbsd-arm64), const AF_HYLINK = 15
+pkg syscall (netbsd-arm64), const AF_HYLINK ideal-int
+pkg syscall (netbsd-arm64), const AF_IEEE80211 = 32
+pkg syscall (netbsd-arm64), const AF_IEEE80211 ideal-int
+pkg syscall (netbsd-arm64), const AF_IMPLINK = 3
+pkg syscall (netbsd-arm64), const AF_IMPLINK ideal-int
+pkg syscall (netbsd-arm64), const AF_INET6 = 24
+pkg syscall (netbsd-arm64), const AF_IPX = 23
+pkg syscall (netbsd-arm64), const AF_IPX ideal-int
+pkg syscall (netbsd-arm64), const AF_ISDN = 26
+pkg syscall (netbsd-arm64), const AF_ISDN ideal-int
+pkg syscall (netbsd-arm64), const AF_ISO = 7
+pkg syscall (netbsd-arm64), const AF_ISO ideal-int
+pkg syscall (netbsd-arm64), const AF_LAT = 14
+pkg syscall (netbsd-arm64), const AF_LAT ideal-int
+pkg syscall (netbsd-arm64), const AF_LINK = 18
+pkg syscall (netbsd-arm64), const AF_LINK ideal-int
+pkg syscall (netbsd-arm64), const AF_LOCAL = 1
+pkg syscall (netbsd-arm64), const AF_LOCAL ideal-int
+pkg syscall (netbsd-arm64), const AF_MAX = 35
+pkg syscall (netbsd-arm64), const AF_MAX ideal-int
+pkg syscall (netbsd-arm64), const AF_MPLS = 33
+pkg syscall (netbsd-arm64), const AF_MPLS ideal-int
+pkg syscall (netbsd-arm64), const AF_NATM = 27
+pkg syscall (netbsd-arm64), const AF_NATM ideal-int
+pkg syscall (netbsd-arm64), const AF_NS = 6
+pkg syscall (netbsd-arm64), const AF_NS ideal-int
+pkg syscall (netbsd-arm64), const AF_OROUTE = 17
+pkg syscall (netbsd-arm64), const AF_OROUTE ideal-int
+pkg syscall (netbsd-arm64), const AF_OSI = 7
+pkg syscall (netbsd-arm64), const AF_OSI ideal-int
+pkg syscall (netbsd-arm64), const AF_PUP = 4
+pkg syscall (netbsd-arm64), const AF_PUP ideal-int
+pkg syscall (netbsd-arm64), const AF_ROUTE = 34
+pkg syscall (netbsd-arm64), const AF_ROUTE ideal-int
+pkg syscall (netbsd-arm64), const AF_SNA = 11
+pkg syscall (netbsd-arm64), const AF_SNA ideal-int
+pkg syscall (netbsd-arm64), const ARPHRD_ARCNET = 7
+pkg syscall (netbsd-arm64), const ARPHRD_ARCNET ideal-int
+pkg syscall (netbsd-arm64), const ARPHRD_ETHER = 1
+pkg syscall (netbsd-arm64), const ARPHRD_ETHER ideal-int
+pkg syscall (netbsd-arm64), const ARPHRD_FRELAY = 15
+pkg syscall (netbsd-arm64), const ARPHRD_FRELAY ideal-int
+pkg syscall (netbsd-arm64), const ARPHRD_IEEE1394 = 24
+pkg syscall (netbsd-arm64), const ARPHRD_IEEE1394 ideal-int
+pkg syscall (netbsd-arm64), const ARPHRD_IEEE802 = 6
+pkg syscall (netbsd-arm64), const ARPHRD_IEEE802 ideal-int
+pkg syscall (netbsd-arm64), const ARPHRD_STRIP = 23
+pkg syscall (netbsd-arm64), const ARPHRD_STRIP ideal-int
+pkg syscall (netbsd-arm64), const B0 = 0
+pkg syscall (netbsd-arm64), const B0 ideal-int
+pkg syscall (netbsd-arm64), const B110 = 110
+pkg syscall (netbsd-arm64), const B110 ideal-int
+pkg syscall (netbsd-arm64), const B115200 = 115200
+pkg syscall (netbsd-arm64), const B115200 ideal-int
+pkg syscall (netbsd-arm64), const B1200 = 1200
+pkg syscall (netbsd-arm64), const B1200 ideal-int
+pkg syscall (netbsd-arm64), const B134 = 134
+pkg syscall (netbsd-arm64), const B134 ideal-int
+pkg syscall (netbsd-arm64), const B14400 = 14400
+pkg syscall (netbsd-arm64), const B14400 ideal-int
+pkg syscall (netbsd-arm64), const B150 = 150
+pkg syscall (netbsd-arm64), const B150 ideal-int
+pkg syscall (netbsd-arm64), const B1800 = 1800
+pkg syscall (netbsd-arm64), const B1800 ideal-int
+pkg syscall (netbsd-arm64), const B19200 = 19200
+pkg syscall (netbsd-arm64), const B19200 ideal-int
+pkg syscall (netbsd-arm64), const B200 = 200
+pkg syscall (netbsd-arm64), const B200 ideal-int
+pkg syscall (netbsd-arm64), const B230400 = 230400
+pkg syscall (netbsd-arm64), const B230400 ideal-int
+pkg syscall (netbsd-arm64), const B2400 = 2400
+pkg syscall (netbsd-arm64), const B2400 ideal-int
+pkg syscall (netbsd-arm64), const B28800 = 28800
+pkg syscall (netbsd-arm64), const B28800 ideal-int
+pkg syscall (netbsd-arm64), const B300 = 300
+pkg syscall (netbsd-arm64), const B300 ideal-int
+pkg syscall (netbsd-arm64), const B38400 = 38400
+pkg syscall (netbsd-arm64), const B38400 ideal-int
+pkg syscall (netbsd-arm64), const B460800 = 460800
+pkg syscall (netbsd-arm64), const B460800 ideal-int
+pkg syscall (netbsd-arm64), const B4800 = 4800
+pkg syscall (netbsd-arm64), const B4800 ideal-int
+pkg syscall (netbsd-arm64), const B50 = 50
+pkg syscall (netbsd-arm64), const B50 ideal-int
+pkg syscall (netbsd-arm64), const B57600 = 57600
+pkg syscall (netbsd-arm64), const B57600 ideal-int
+pkg syscall (netbsd-arm64), const B600 = 600
+pkg syscall (netbsd-arm64), const B600 ideal-int
+pkg syscall (netbsd-arm64), const B7200 = 7200
+pkg syscall (netbsd-arm64), const B7200 ideal-int
+pkg syscall (netbsd-arm64), const B75 = 75
+pkg syscall (netbsd-arm64), const B75 ideal-int
+pkg syscall (netbsd-arm64), const B76800 = 76800
+pkg syscall (netbsd-arm64), const B76800 ideal-int
+pkg syscall (netbsd-arm64), const B921600 = 921600
+pkg syscall (netbsd-arm64), const B921600 ideal-int
+pkg syscall (netbsd-arm64), const B9600 = 9600
+pkg syscall (netbsd-arm64), const B9600 ideal-int
+pkg syscall (netbsd-arm64), const BIOCFEEDBACK = 2147762813
+pkg syscall (netbsd-arm64), const BIOCFEEDBACK ideal-int
+pkg syscall (netbsd-arm64), const BIOCFLUSH = 536887912
+pkg syscall (netbsd-arm64), const BIOCFLUSH ideal-int
+pkg syscall (netbsd-arm64), const BIOCGBLEN = 1074020966
+pkg syscall (netbsd-arm64), const BIOCGBLEN ideal-int
+pkg syscall (netbsd-arm64), const BIOCGDLT = 1074020970
+pkg syscall (netbsd-arm64), const BIOCGDLT ideal-int
+pkg syscall (netbsd-arm64), const BIOCGDLTLIST = 3222291063
+pkg syscall (netbsd-arm64), const BIOCGDLTLIST ideal-int
+pkg syscall (netbsd-arm64), const BIOCGETIF = 1083196011
+pkg syscall (netbsd-arm64), const BIOCGETIF ideal-int
+pkg syscall (netbsd-arm64), const BIOCGFEEDBACK = 1074020988
+pkg syscall (netbsd-arm64), const BIOCGFEEDBACK ideal-int
+pkg syscall (netbsd-arm64), const BIOCGHDRCMPLT = 1074020980
+pkg syscall (netbsd-arm64), const BIOCGHDRCMPLT ideal-int
+pkg syscall (netbsd-arm64), const BIOCGRTIMEOUT = 1074807419
+pkg syscall (netbsd-arm64), const BIOCGRTIMEOUT ideal-int
+pkg syscall (netbsd-arm64), const BIOCGSEESENT = 1074020984
+pkg syscall (netbsd-arm64), const BIOCGSEESENT ideal-int
+pkg syscall (netbsd-arm64), const BIOCGSTATS = 1082147439
+pkg syscall (netbsd-arm64), const BIOCGSTATS ideal-int
+pkg syscall (netbsd-arm64), const BIOCGSTATSOLD = 1074283119
+pkg syscall (netbsd-arm64), const BIOCGSTATSOLD ideal-int
+pkg syscall (netbsd-arm64), const BIOCIMMEDIATE = 2147762800
+pkg syscall (netbsd-arm64), const BIOCIMMEDIATE ideal-int
+pkg syscall (netbsd-arm64), const BIOCPROMISC = 536887913
+pkg syscall (netbsd-arm64), const BIOCPROMISC ideal-int
+pkg syscall (netbsd-arm64), const BIOCSBLEN = 3221504614
+pkg syscall (netbsd-arm64), const BIOCSBLEN ideal-int
+pkg syscall (netbsd-arm64), const BIOCSDLT = 2147762806
+pkg syscall (netbsd-arm64), const BIOCSDLT ideal-int
+pkg syscall (netbsd-arm64), const BIOCSETF = 2148549223
+pkg syscall (netbsd-arm64), const BIOCSETF ideal-int
+pkg syscall (netbsd-arm64), const BIOCSETIF = 2156937836
+pkg syscall (netbsd-arm64), const BIOCSETIF ideal-int
+pkg syscall (netbsd-arm64), const BIOCSFEEDBACK = 2147762813
+pkg syscall (netbsd-arm64), const BIOCSFEEDBACK ideal-int
+pkg syscall (netbsd-arm64), const BIOCSHDRCMPLT = 2147762805
+pkg syscall (netbsd-arm64), const BIOCSHDRCMPLT ideal-int
+pkg syscall (netbsd-arm64), const BIOCSRTIMEOUT = 2148549242
+pkg syscall (netbsd-arm64), const BIOCSRTIMEOUT ideal-int
+pkg syscall (netbsd-arm64), const BIOCSSEESENT = 2147762809
+pkg syscall (netbsd-arm64), const BIOCSSEESENT ideal-int
+pkg syscall (netbsd-arm64), const BIOCSTCPF = 2148549234
+pkg syscall (netbsd-arm64), const BIOCSTCPF ideal-int
+pkg syscall (netbsd-arm64), const BIOCSUDPF = 2148549235
+pkg syscall (netbsd-arm64), const BIOCSUDPF ideal-int
+pkg syscall (netbsd-arm64), const BIOCVERSION = 1074020977
+pkg syscall (netbsd-arm64), const BIOCVERSION ideal-int
+pkg syscall (netbsd-arm64), const BPF_A = 16
+pkg syscall (netbsd-arm64), const BPF_A ideal-int
+pkg syscall (netbsd-arm64), const BPF_ABS = 32
+pkg syscall (netbsd-arm64), const BPF_ABS ideal-int
+pkg syscall (netbsd-arm64), const BPF_ADD = 0
+pkg syscall (netbsd-arm64), const BPF_ADD ideal-int
+pkg syscall (netbsd-arm64), const BPF_ALIGNMENT = 8
+pkg syscall (netbsd-arm64), const BPF_ALIGNMENT ideal-int
+pkg syscall (netbsd-arm64), const BPF_ALIGNMENT32 = 4
+pkg syscall (netbsd-arm64), const BPF_ALIGNMENT32 ideal-int
+pkg syscall (netbsd-arm64), const BPF_ALU = 4
+pkg syscall (netbsd-arm64), const BPF_ALU ideal-int
+pkg syscall (netbsd-arm64), const BPF_AND = 80
+pkg syscall (netbsd-arm64), const BPF_AND ideal-int
+pkg syscall (netbsd-arm64), const BPF_B = 16
+pkg syscall (netbsd-arm64), const BPF_B ideal-int
+pkg syscall (netbsd-arm64), const BPF_DFLTBUFSIZE = 1048576
+pkg syscall (netbsd-arm64), const BPF_DFLTBUFSIZE ideal-int
+pkg syscall (netbsd-arm64), const BPF_DIV = 48
+pkg syscall (netbsd-arm64), const BPF_DIV ideal-int
+pkg syscall (netbsd-arm64), const BPF_H = 8
+pkg syscall (netbsd-arm64), const BPF_H ideal-int
+pkg syscall (netbsd-arm64), const BPF_IMM = 0
+pkg syscall (netbsd-arm64), const BPF_IMM ideal-int
+pkg syscall (netbsd-arm64), const BPF_IND = 64
+pkg syscall (netbsd-arm64), const BPF_IND ideal-int
+pkg syscall (netbsd-arm64), const BPF_JA = 0
+pkg syscall (netbsd-arm64), const BPF_JA ideal-int
+pkg syscall (netbsd-arm64), const BPF_JEQ = 16
+pkg syscall (netbsd-arm64), const BPF_JEQ ideal-int
+pkg syscall (netbsd-arm64), const BPF_JGE = 48
+pkg syscall (netbsd-arm64), const BPF_JGE ideal-int
+pkg syscall (netbsd-arm64), const BPF_JGT = 32
+pkg syscall (netbsd-arm64), const BPF_JGT ideal-int
+pkg syscall (netbsd-arm64), const BPF_JMP = 5
+pkg syscall (netbsd-arm64), const BPF_JMP ideal-int
+pkg syscall (netbsd-arm64), const BPF_JSET = 64
+pkg syscall (netbsd-arm64), const BPF_JSET ideal-int
+pkg syscall (netbsd-arm64), const BPF_K = 0
+pkg syscall (netbsd-arm64), const BPF_K ideal-int
+pkg syscall (netbsd-arm64), const BPF_LD = 0
+pkg syscall (netbsd-arm64), const BPF_LD ideal-int
+pkg syscall (netbsd-arm64), const BPF_LDX = 1
+pkg syscall (netbsd-arm64), const BPF_LDX ideal-int
+pkg syscall (netbsd-arm64), const BPF_LEN = 128
+pkg syscall (netbsd-arm64), const BPF_LEN ideal-int
+pkg syscall (netbsd-arm64), const BPF_LSH = 96
+pkg syscall (netbsd-arm64), const BPF_LSH ideal-int
+pkg syscall (netbsd-arm64), const BPF_MAJOR_VERSION = 1
+pkg syscall (netbsd-arm64), const BPF_MAJOR_VERSION ideal-int
+pkg syscall (netbsd-arm64), const BPF_MAXBUFSIZE = 16777216
+pkg syscall (netbsd-arm64), const BPF_MAXBUFSIZE ideal-int
+pkg syscall (netbsd-arm64), const BPF_MAXINSNS = 512
+pkg syscall (netbsd-arm64), const BPF_MAXINSNS ideal-int
+pkg syscall (netbsd-arm64), const BPF_MEM = 96
+pkg syscall (netbsd-arm64), const BPF_MEM ideal-int
+pkg syscall (netbsd-arm64), const BPF_MEMWORDS = 16
+pkg syscall (netbsd-arm64), const BPF_MEMWORDS ideal-int
+pkg syscall (netbsd-arm64), const BPF_MINBUFSIZE = 32
+pkg syscall (netbsd-arm64), const BPF_MINBUFSIZE ideal-int
+pkg syscall (netbsd-arm64), const BPF_MINOR_VERSION = 1
+pkg syscall (netbsd-arm64), const BPF_MINOR_VERSION ideal-int
+pkg syscall (netbsd-arm64), const BPF_MISC = 7
+pkg syscall (netbsd-arm64), const BPF_MISC ideal-int
+pkg syscall (netbsd-arm64), const BPF_MSH = 160
+pkg syscall (netbsd-arm64), const BPF_MSH ideal-int
+pkg syscall (netbsd-arm64), const BPF_MUL = 32
+pkg syscall (netbsd-arm64), const BPF_MUL ideal-int
+pkg syscall (netbsd-arm64), const BPF_NEG = 128
+pkg syscall (netbsd-arm64), const BPF_NEG ideal-int
+pkg syscall (netbsd-arm64), const BPF_OR = 64
+pkg syscall (netbsd-arm64), const BPF_OR ideal-int
+pkg syscall (netbsd-arm64), const BPF_RELEASE = 199606
+pkg syscall (netbsd-arm64), const BPF_RELEASE ideal-int
+pkg syscall (netbsd-arm64), const BPF_RET = 6
+pkg syscall (netbsd-arm64), const BPF_RET ideal-int
+pkg syscall (netbsd-arm64), const BPF_RSH = 112
+pkg syscall (netbsd-arm64), const BPF_RSH ideal-int
+pkg syscall (netbsd-arm64), const BPF_ST = 2
+pkg syscall (netbsd-arm64), const BPF_ST ideal-int
+pkg syscall (netbsd-arm64), const BPF_STX = 3
+pkg syscall (netbsd-arm64), const BPF_STX ideal-int
+pkg syscall (netbsd-arm64), const BPF_SUB = 16
+pkg syscall (netbsd-arm64), const BPF_SUB ideal-int
+pkg syscall (netbsd-arm64), const BPF_TAX = 0
+pkg syscall (netbsd-arm64), const BPF_TAX ideal-int
+pkg syscall (netbsd-arm64), const BPF_TXA = 128
+pkg syscall (netbsd-arm64), const BPF_TXA ideal-int
+pkg syscall (netbsd-arm64), const BPF_W = 0
+pkg syscall (netbsd-arm64), const BPF_W ideal-int
+pkg syscall (netbsd-arm64), const BPF_X = 8
+pkg syscall (netbsd-arm64), const BPF_X ideal-int
+pkg syscall (netbsd-arm64), const BRKINT = 2
+pkg syscall (netbsd-arm64), const BRKINT ideal-int
+pkg syscall (netbsd-arm64), const CFLUSH = 15
+pkg syscall (netbsd-arm64), const CFLUSH ideal-int
+pkg syscall (netbsd-arm64), const CLOCAL = 32768
+pkg syscall (netbsd-arm64), const CLOCAL ideal-int
+pkg syscall (netbsd-arm64), const CLONE_CSIGNAL = 255
+pkg syscall (netbsd-arm64), const CLONE_CSIGNAL ideal-int
+pkg syscall (netbsd-arm64), const CLONE_FILES = 1024
+pkg syscall (netbsd-arm64), const CLONE_FILES ideal-int
+pkg syscall (netbsd-arm64), const CLONE_FS = 512
+pkg syscall (netbsd-arm64), const CLONE_FS ideal-int
+pkg syscall (netbsd-arm64), const CLONE_PID = 4096
+pkg syscall (netbsd-arm64), const CLONE_PID ideal-int
+pkg syscall (netbsd-arm64), const CLONE_PTRACE = 8192
+pkg syscall (netbsd-arm64), const CLONE_PTRACE ideal-int
+pkg syscall (netbsd-arm64), const CLONE_SIGHAND = 2048
+pkg syscall (netbsd-arm64), const CLONE_SIGHAND ideal-int
+pkg syscall (netbsd-arm64), const CLONE_VFORK = 16384
+pkg syscall (netbsd-arm64), const CLONE_VFORK ideal-int
+pkg syscall (netbsd-arm64), const CLONE_VM = 256
+pkg syscall (netbsd-arm64), const CLONE_VM ideal-int
+pkg syscall (netbsd-arm64), const CREAD = 2048
+pkg syscall (netbsd-arm64), const CREAD ideal-int
+pkg syscall (netbsd-arm64), const CS5 = 0
+pkg syscall (netbsd-arm64), const CS5 ideal-int
+pkg syscall (netbsd-arm64), const CS6 = 256
+pkg syscall (netbsd-arm64), const CS6 ideal-int
+pkg syscall (netbsd-arm64), const CS7 = 512
+pkg syscall (netbsd-arm64), const CS7 ideal-int
+pkg syscall (netbsd-arm64), const CS8 = 768
+pkg syscall (netbsd-arm64), const CS8 ideal-int
+pkg syscall (netbsd-arm64), const CSIZE = 768
+pkg syscall (netbsd-arm64), const CSIZE ideal-int
+pkg syscall (netbsd-arm64), const CSTART = 17
+pkg syscall (netbsd-arm64), const CSTART ideal-int
+pkg syscall (netbsd-arm64), const CSTATUS = 20
+pkg syscall (netbsd-arm64), const CSTATUS ideal-int
+pkg syscall (netbsd-arm64), const CSTOP = 19
+pkg syscall (netbsd-arm64), const CSTOP ideal-int
+pkg syscall (netbsd-arm64), const CSTOPB = 1024
+pkg syscall (netbsd-arm64), const CSTOPB ideal-int
+pkg syscall (netbsd-arm64), const CSUSP = 26
+pkg syscall (netbsd-arm64), const CSUSP ideal-int
+pkg syscall (netbsd-arm64), const CTL_MAXNAME = 12
+pkg syscall (netbsd-arm64), const CTL_MAXNAME ideal-int
+pkg syscall (netbsd-arm64), const CTL_NET = 4
+pkg syscall (netbsd-arm64), const CTL_NET ideal-int
+pkg syscall (netbsd-arm64), const CTL_QUERY = -2
+pkg syscall (netbsd-arm64), const CTL_QUERY ideal-int
+pkg syscall (netbsd-arm64), const DIOCBSFLUSH = 536896632
+pkg syscall (netbsd-arm64), const DIOCBSFLUSH ideal-int
+pkg syscall (netbsd-arm64), const DLT_A429 = 184
+pkg syscall (netbsd-arm64), const DLT_A429 ideal-int
+pkg syscall (netbsd-arm64), const DLT_A653_ICM = 185
+pkg syscall (netbsd-arm64), const DLT_A653_ICM ideal-int
+pkg syscall (netbsd-arm64), const DLT_AIRONET_HEADER = 120
+pkg syscall (netbsd-arm64), const DLT_AIRONET_HEADER ideal-int
+pkg syscall (netbsd-arm64), const DLT_AOS = 222
+pkg syscall (netbsd-arm64), const DLT_AOS ideal-int
+pkg syscall (netbsd-arm64), const DLT_APPLE_IP_OVER_IEEE1394 = 138
+pkg syscall (netbsd-arm64), const DLT_APPLE_IP_OVER_IEEE1394 ideal-int
+pkg syscall (netbsd-arm64), const DLT_ARCNET = 7
+pkg syscall (netbsd-arm64), const DLT_ARCNET ideal-int
+pkg syscall (netbsd-arm64), const DLT_ARCNET_LINUX = 129
+pkg syscall (netbsd-arm64), const DLT_ARCNET_LINUX ideal-int
+pkg syscall (netbsd-arm64), const DLT_ATM_CLIP = 19
+pkg syscall (netbsd-arm64), const DLT_ATM_CLIP ideal-int
+pkg syscall (netbsd-arm64), const DLT_ATM_RFC1483 = 11
+pkg syscall (netbsd-arm64), const DLT_ATM_RFC1483 ideal-int
+pkg syscall (netbsd-arm64), const DLT_AURORA = 126
+pkg syscall (netbsd-arm64), const DLT_AURORA ideal-int
+pkg syscall (netbsd-arm64), const DLT_AX25 = 3
+pkg syscall (netbsd-arm64), const DLT_AX25 ideal-int
+pkg syscall (netbsd-arm64), const DLT_AX25_KISS = 202
+pkg syscall (netbsd-arm64), const DLT_AX25_KISS ideal-int
+pkg syscall (netbsd-arm64), const DLT_BACNET_MS_TP = 165
+pkg syscall (netbsd-arm64), const DLT_BACNET_MS_TP ideal-int
+pkg syscall (netbsd-arm64), const DLT_BLUETOOTH_HCI_H4 = 187
+pkg syscall (netbsd-arm64), const DLT_BLUETOOTH_HCI_H4 ideal-int
+pkg syscall (netbsd-arm64), const DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 201
+pkg syscall (netbsd-arm64), const DLT_BLUETOOTH_HCI_H4_WITH_PHDR ideal-int
+pkg syscall (netbsd-arm64), const DLT_CAN20B = 190
+pkg syscall (netbsd-arm64), const DLT_CAN20B ideal-int
+pkg syscall (netbsd-arm64), const DLT_CAN_SOCKETCAN = 227
+pkg syscall (netbsd-arm64), const DLT_CAN_SOCKETCAN ideal-int
+pkg syscall (netbsd-arm64), const DLT_CHAOS = 5
+pkg syscall (netbsd-arm64), const DLT_CHAOS ideal-int
+pkg syscall (netbsd-arm64), const DLT_CISCO_IOS = 118
+pkg syscall (netbsd-arm64), const DLT_CISCO_IOS ideal-int
+pkg syscall (netbsd-arm64), const DLT_C_HDLC = 104
+pkg syscall (netbsd-arm64), const DLT_C_HDLC ideal-int
+pkg syscall (netbsd-arm64), const DLT_C_HDLC_WITH_DIR = 205
+pkg syscall (netbsd-arm64), const DLT_C_HDLC_WITH_DIR ideal-int
+pkg syscall (netbsd-arm64), const DLT_DECT = 221
+pkg syscall (netbsd-arm64), const DLT_DECT ideal-int
+pkg syscall (netbsd-arm64), const DLT_DOCSIS = 143
+pkg syscall (netbsd-arm64), const DLT_DOCSIS ideal-int
+pkg syscall (netbsd-arm64), const DLT_ECONET = 115
+pkg syscall (netbsd-arm64), const DLT_ECONET ideal-int
+pkg syscall (netbsd-arm64), const DLT_EN10MB = 1
+pkg syscall (netbsd-arm64), const DLT_EN10MB ideal-int
+pkg syscall (netbsd-arm64), const DLT_EN3MB = 2
+pkg syscall (netbsd-arm64), const DLT_EN3MB ideal-int
+pkg syscall (netbsd-arm64), const DLT_ENC = 109
+pkg syscall (netbsd-arm64), const DLT_ENC ideal-int
+pkg syscall (netbsd-arm64), const DLT_ERF = 197
+pkg syscall (netbsd-arm64), const DLT_ERF ideal-int
+pkg syscall (netbsd-arm64), const DLT_ERF_ETH = 175
+pkg syscall (netbsd-arm64), const DLT_ERF_ETH ideal-int
+pkg syscall (netbsd-arm64), const DLT_ERF_POS = 176
+pkg syscall (netbsd-arm64), const DLT_ERF_POS ideal-int
+pkg syscall (netbsd-arm64), const DLT_FC_2 = 224
+pkg syscall (netbsd-arm64), const DLT_FC_2 ideal-int
+pkg syscall (netbsd-arm64), const DLT_FC_2_WITH_FRAME_DELIMS = 225
+pkg syscall (netbsd-arm64), const DLT_FC_2_WITH_FRAME_DELIMS ideal-int
+pkg syscall (netbsd-arm64), const DLT_FDDI = 10
+pkg syscall (netbsd-arm64), const DLT_FDDI ideal-int
+pkg syscall (netbsd-arm64), const DLT_FLEXRAY = 210
+pkg syscall (netbsd-arm64), const DLT_FLEXRAY ideal-int
+pkg syscall (netbsd-arm64), const DLT_FRELAY = 107
+pkg syscall (netbsd-arm64), const DLT_FRELAY ideal-int
+pkg syscall (netbsd-arm64), const DLT_FRELAY_WITH_DIR = 206
+pkg syscall (netbsd-arm64), const DLT_FRELAY_WITH_DIR ideal-int
+pkg syscall (netbsd-arm64), const DLT_GCOM_SERIAL = 173
+pkg syscall (netbsd-arm64), const DLT_GCOM_SERIAL ideal-int
+pkg syscall (netbsd-arm64), const DLT_GCOM_T1E1 = 172
+pkg syscall (netbsd-arm64), const DLT_GCOM_T1E1 ideal-int
+pkg syscall (netbsd-arm64), const DLT_GPF_F = 171
+pkg syscall (netbsd-arm64), const DLT_GPF_F ideal-int
+pkg syscall (netbsd-arm64), const DLT_GPF_T = 170
+pkg syscall (netbsd-arm64), const DLT_GPF_T ideal-int
+pkg syscall (netbsd-arm64), const DLT_GPRS_LLC = 169
+pkg syscall (netbsd-arm64), const DLT_GPRS_LLC ideal-int
+pkg syscall (netbsd-arm64), const DLT_GSMTAP_ABIS = 218
+pkg syscall (netbsd-arm64), const DLT_GSMTAP_ABIS ideal-int
+pkg syscall (netbsd-arm64), const DLT_GSMTAP_UM = 217
+pkg syscall (netbsd-arm64), const DLT_GSMTAP_UM ideal-int
+pkg syscall (netbsd-arm64), const DLT_HDLC = 16
+pkg syscall (netbsd-arm64), const DLT_HDLC ideal-int
+pkg syscall (netbsd-arm64), const DLT_HHDLC = 121
+pkg syscall (netbsd-arm64), const DLT_HHDLC ideal-int
+pkg syscall (netbsd-arm64), const DLT_HIPPI = 15
+pkg syscall (netbsd-arm64), const DLT_HIPPI ideal-int
+pkg syscall (netbsd-arm64), const DLT_IBM_SN = 146
+pkg syscall (netbsd-arm64), const DLT_IBM_SN ideal-int
+pkg syscall (netbsd-arm64), const DLT_IBM_SP = 145
+pkg syscall (netbsd-arm64), const DLT_IBM_SP ideal-int
+pkg syscall (netbsd-arm64), const DLT_IEEE802 = 6
+pkg syscall (netbsd-arm64), const DLT_IEEE802 ideal-int
+pkg syscall (netbsd-arm64), const DLT_IEEE802_11 = 105
+pkg syscall (netbsd-arm64), const DLT_IEEE802_11 ideal-int
+pkg syscall (netbsd-arm64), const DLT_IEEE802_11_RADIO = 127
+pkg syscall (netbsd-arm64), const DLT_IEEE802_11_RADIO ideal-int
+pkg syscall (netbsd-arm64), const DLT_IEEE802_11_RADIO_AVS = 163
+pkg syscall (netbsd-arm64), const DLT_IEEE802_11_RADIO_AVS ideal-int
+pkg syscall (netbsd-arm64), const DLT_IEEE802_15_4 = 195
+pkg syscall (netbsd-arm64), const DLT_IEEE802_15_4 ideal-int
+pkg syscall (netbsd-arm64), const DLT_IEEE802_15_4_LINUX = 191
+pkg syscall (netbsd-arm64), const DLT_IEEE802_15_4_LINUX ideal-int
+pkg syscall (netbsd-arm64), const DLT_IEEE802_15_4_NONASK_PHY = 215
+pkg syscall (netbsd-arm64), const DLT_IEEE802_15_4_NONASK_PHY ideal-int
+pkg syscall (netbsd-arm64), const DLT_IEEE802_16_MAC_CPS = 188
+pkg syscall (netbsd-arm64), const DLT_IEEE802_16_MAC_CPS ideal-int
+pkg syscall (netbsd-arm64), const DLT_IEEE802_16_MAC_CPS_RADIO = 193
+pkg syscall (netbsd-arm64), const DLT_IEEE802_16_MAC_CPS_RADIO ideal-int
+pkg syscall (netbsd-arm64), const DLT_IPMB = 199
+pkg syscall (netbsd-arm64), const DLT_IPMB ideal-int
+pkg syscall (netbsd-arm64), const DLT_IPMB_LINUX = 209
+pkg syscall (netbsd-arm64), const DLT_IPMB_LINUX ideal-int
+pkg syscall (netbsd-arm64), const DLT_IPNET = 226
+pkg syscall (netbsd-arm64), const DLT_IPNET ideal-int
+pkg syscall (netbsd-arm64), const DLT_IPV4 = 228
+pkg syscall (netbsd-arm64), const DLT_IPV4 ideal-int
+pkg syscall (netbsd-arm64), const DLT_IPV6 = 229
+pkg syscall (netbsd-arm64), const DLT_IPV6 ideal-int
+pkg syscall (netbsd-arm64), const DLT_IP_OVER_FC = 122
+pkg syscall (netbsd-arm64), const DLT_IP_OVER_FC ideal-int
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_ATM1 = 137
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_ATM1 ideal-int
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_ATM2 = 135
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_ATM2 ideal-int
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_CHDLC = 181
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_CHDLC ideal-int
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_ES = 132
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_ES ideal-int
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_ETHER = 178
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_ETHER ideal-int
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_FRELAY = 180
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_FRELAY ideal-int
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_GGSN = 133
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_GGSN ideal-int
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_ISM = 194
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_ISM ideal-int
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_MFR = 134
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_MFR ideal-int
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_MLFR = 131
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_MLFR ideal-int
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_MLPPP = 130
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_MLPPP ideal-int
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_MONITOR = 164
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_MONITOR ideal-int
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_PIC_PEER = 174
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_PIC_PEER ideal-int
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_PPP = 179
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_PPP ideal-int
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_PPPOE = 167
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_PPPOE ideal-int
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_PPPOE_ATM = 168
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_PPPOE_ATM ideal-int
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_SERVICES = 136
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_SERVICES ideal-int
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_ST = 200
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_ST ideal-int
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_VP = 183
+pkg syscall (netbsd-arm64), const DLT_JUNIPER_VP ideal-int
+pkg syscall (netbsd-arm64), const DLT_LAPB_WITH_DIR = 207
+pkg syscall (netbsd-arm64), const DLT_LAPB_WITH_DIR ideal-int
+pkg syscall (netbsd-arm64), const DLT_LAPD = 203
+pkg syscall (netbsd-arm64), const DLT_LAPD ideal-int
+pkg syscall (netbsd-arm64), const DLT_LIN = 212
+pkg syscall (netbsd-arm64), const DLT_LIN ideal-int
+pkg syscall (netbsd-arm64), const DLT_LINUX_EVDEV = 216
+pkg syscall (netbsd-arm64), const DLT_LINUX_EVDEV ideal-int
+pkg syscall (netbsd-arm64), const DLT_LINUX_IRDA = 144
+pkg syscall (netbsd-arm64), const DLT_LINUX_IRDA ideal-int
+pkg syscall (netbsd-arm64), const DLT_LINUX_LAPD = 177
+pkg syscall (netbsd-arm64), const DLT_LINUX_LAPD ideal-int
+pkg syscall (netbsd-arm64), const DLT_LINUX_SLL = 113
+pkg syscall (netbsd-arm64), const DLT_LINUX_SLL ideal-int
+pkg syscall (netbsd-arm64), const DLT_LOOP = 108
+pkg syscall (netbsd-arm64), const DLT_LOOP ideal-int
+pkg syscall (netbsd-arm64), const DLT_LTALK = 114
+pkg syscall (netbsd-arm64), const DLT_LTALK ideal-int
+pkg syscall (netbsd-arm64), const DLT_MFR = 182
+pkg syscall (netbsd-arm64), const DLT_MFR ideal-int
+pkg syscall (netbsd-arm64), const DLT_MOST = 211
+pkg syscall (netbsd-arm64), const DLT_MOST ideal-int
+pkg syscall (netbsd-arm64), const DLT_MPLS = 219
+pkg syscall (netbsd-arm64), const DLT_MPLS ideal-int
+pkg syscall (netbsd-arm64), const DLT_MTP2 = 140
+pkg syscall (netbsd-arm64), const DLT_MTP2 ideal-int
+pkg syscall (netbsd-arm64), const DLT_MTP2_WITH_PHDR = 139
+pkg syscall (netbsd-arm64), const DLT_MTP2_WITH_PHDR ideal-int
+pkg syscall (netbsd-arm64), const DLT_MTP3 = 141
+pkg syscall (netbsd-arm64), const DLT_MTP3 ideal-int
+pkg syscall (netbsd-arm64), const DLT_NULL = 0
+pkg syscall (netbsd-arm64), const DLT_NULL ideal-int
+pkg syscall (netbsd-arm64), const DLT_PCI_EXP = 125
+pkg syscall (netbsd-arm64), const DLT_PCI_EXP ideal-int
+pkg syscall (netbsd-arm64), const DLT_PFLOG = 117
+pkg syscall (netbsd-arm64), const DLT_PFLOG ideal-int
+pkg syscall (netbsd-arm64), const DLT_PFSYNC = 18
+pkg syscall (netbsd-arm64), const DLT_PFSYNC ideal-int
+pkg syscall (netbsd-arm64), const DLT_PPI = 192
+pkg syscall (netbsd-arm64), const DLT_PPI ideal-int
+pkg syscall (netbsd-arm64), const DLT_PPP = 9
+pkg syscall (netbsd-arm64), const DLT_PPP ideal-int
+pkg syscall (netbsd-arm64), const DLT_PPP_BSDOS = 14
+pkg syscall (netbsd-arm64), const DLT_PPP_BSDOS ideal-int
+pkg syscall (netbsd-arm64), const DLT_PPP_ETHER = 51
+pkg syscall (netbsd-arm64), const DLT_PPP_ETHER ideal-int
+pkg syscall (netbsd-arm64), const DLT_PPP_PPPD = 166
+pkg syscall (netbsd-arm64), const DLT_PPP_PPPD ideal-int
+pkg syscall (netbsd-arm64), const DLT_PPP_SERIAL = 50
+pkg syscall (netbsd-arm64), const DLT_PPP_SERIAL ideal-int
+pkg syscall (netbsd-arm64), const DLT_PPP_WITH_DIR = 204
+pkg syscall (netbsd-arm64), const DLT_PPP_WITH_DIR ideal-int
+pkg syscall (netbsd-arm64), const DLT_PRISM_HEADER = 119
+pkg syscall (netbsd-arm64), const DLT_PRISM_HEADER ideal-int
+pkg syscall (netbsd-arm64), const DLT_PRONET = 4
+pkg syscall (netbsd-arm64), const DLT_PRONET ideal-int
+pkg syscall (netbsd-arm64), const DLT_RAIF1 = 198
+pkg syscall (netbsd-arm64), const DLT_RAIF1 ideal-int
+pkg syscall (netbsd-arm64), const DLT_RAW = 12
+pkg syscall (netbsd-arm64), const DLT_RAW ideal-int
+pkg syscall (netbsd-arm64), const DLT_RAWAF_MASK = 35913728
+pkg syscall (netbsd-arm64), const DLT_RAWAF_MASK ideal-int
+pkg syscall (netbsd-arm64), const DLT_RIO = 124
+pkg syscall (netbsd-arm64), const DLT_RIO ideal-int
+pkg syscall (netbsd-arm64), const DLT_SCCP = 142
+pkg syscall (netbsd-arm64), const DLT_SCCP ideal-int
+pkg syscall (netbsd-arm64), const DLT_SITA = 196
+pkg syscall (netbsd-arm64), const DLT_SITA ideal-int
+pkg syscall (netbsd-arm64), const DLT_SLIP = 8
+pkg syscall (netbsd-arm64), const DLT_SLIP ideal-int
+pkg syscall (netbsd-arm64), const DLT_SLIP_BSDOS = 13
+pkg syscall (netbsd-arm64), const DLT_SLIP_BSDOS ideal-int
+pkg syscall (netbsd-arm64), const DLT_SUNATM = 123
+pkg syscall (netbsd-arm64), const DLT_SUNATM ideal-int
+pkg syscall (netbsd-arm64), const DLT_SYMANTEC_FIREWALL = 99
+pkg syscall (netbsd-arm64), const DLT_SYMANTEC_FIREWALL ideal-int
+pkg syscall (netbsd-arm64), const DLT_TZSP = 128
+pkg syscall (netbsd-arm64), const DLT_TZSP ideal-int
+pkg syscall (netbsd-arm64), const DLT_USB = 186
+pkg syscall (netbsd-arm64), const DLT_USB ideal-int
+pkg syscall (netbsd-arm64), const DLT_USB_LINUX = 189
+pkg syscall (netbsd-arm64), const DLT_USB_LINUX ideal-int
+pkg syscall (netbsd-arm64), const DLT_USB_LINUX_MMAPPED = 220
+pkg syscall (netbsd-arm64), const DLT_USB_LINUX_MMAPPED ideal-int
+pkg syscall (netbsd-arm64), const DLT_WIHART = 223
+pkg syscall (netbsd-arm64), const DLT_WIHART ideal-int
+pkg syscall (netbsd-arm64), const DLT_X2E_SERIAL = 213
+pkg syscall (netbsd-arm64), const DLT_X2E_SERIAL ideal-int
+pkg syscall (netbsd-arm64), const DLT_X2E_XORAYA = 214
+pkg syscall (netbsd-arm64), const DLT_X2E_XORAYA ideal-int
+pkg syscall (netbsd-arm64), const DT_BLK = 6
+pkg syscall (netbsd-arm64), const DT_BLK ideal-int
+pkg syscall (netbsd-arm64), const DT_CHR = 2
+pkg syscall (netbsd-arm64), const DT_CHR ideal-int
+pkg syscall (netbsd-arm64), const DT_DIR = 4
+pkg syscall (netbsd-arm64), const DT_DIR ideal-int
+pkg syscall (netbsd-arm64), const DT_FIFO = 1
+pkg syscall (netbsd-arm64), const DT_FIFO ideal-int
+pkg syscall (netbsd-arm64), const DT_LNK = 10
+pkg syscall (netbsd-arm64), const DT_LNK ideal-int
+pkg syscall (netbsd-arm64), const DT_REG = 8
+pkg syscall (netbsd-arm64), const DT_REG ideal-int
+pkg syscall (netbsd-arm64), const DT_SOCK = 12
+pkg syscall (netbsd-arm64), const DT_SOCK ideal-int
+pkg syscall (netbsd-arm64), const DT_UNKNOWN = 0
+pkg syscall (netbsd-arm64), const DT_UNKNOWN ideal-int
+pkg syscall (netbsd-arm64), const DT_WHT = 14
+pkg syscall (netbsd-arm64), const DT_WHT ideal-int
+pkg syscall (netbsd-arm64), const E2BIG = 7
+pkg syscall (netbsd-arm64), const EACCES = 13
+pkg syscall (netbsd-arm64), const EADDRINUSE = 48
+pkg syscall (netbsd-arm64), const EADDRNOTAVAIL = 49
+pkg syscall (netbsd-arm64), const EAFNOSUPPORT = 47
+pkg syscall (netbsd-arm64), const EAGAIN = 35
+pkg syscall (netbsd-arm64), const EALREADY = 37
+pkg syscall (netbsd-arm64), const EAUTH = 80
+pkg syscall (netbsd-arm64), const EAUTH Errno
+pkg syscall (netbsd-arm64), const EBADF = 9
+pkg syscall (netbsd-arm64), const EBADMSG = 88
+pkg syscall (netbsd-arm64), const EBADMSG Errno
+pkg syscall (netbsd-arm64), const EBADRPC = 72
+pkg syscall (netbsd-arm64), const EBADRPC Errno
+pkg syscall (netbsd-arm64), const EBUSY = 16
+pkg syscall (netbsd-arm64), const ECANCELED = 87
+pkg syscall (netbsd-arm64), const ECHILD = 10
+pkg syscall (netbsd-arm64), const ECHO = 8
+pkg syscall (netbsd-arm64), const ECHO ideal-int
+pkg syscall (netbsd-arm64), const ECHOCTL = 64
+pkg syscall (netbsd-arm64), const ECHOCTL ideal-int
+pkg syscall (netbsd-arm64), const ECHOE = 2
+pkg syscall (netbsd-arm64), const ECHOE ideal-int
+pkg syscall (netbsd-arm64), const ECHOK = 4
+pkg syscall (netbsd-arm64), const ECHOK ideal-int
+pkg syscall (netbsd-arm64), const ECHOKE = 1
+pkg syscall (netbsd-arm64), const ECHOKE ideal-int
+pkg syscall (netbsd-arm64), const ECHONL = 16
+pkg syscall (netbsd-arm64), const ECHONL ideal-int
+pkg syscall (netbsd-arm64), const ECHOPRT = 32
+pkg syscall (netbsd-arm64), const ECHOPRT ideal-int
+pkg syscall (netbsd-arm64), const ECONNABORTED = 53
+pkg syscall (netbsd-arm64), const ECONNREFUSED = 61
+pkg syscall (netbsd-arm64), const ECONNRESET = 54
+pkg syscall (netbsd-arm64), const EDEADLK = 11
+pkg syscall (netbsd-arm64), const EDESTADDRREQ = 39
+pkg syscall (netbsd-arm64), const EDOM = 33
+pkg syscall (netbsd-arm64), const EDQUOT = 69
+pkg syscall (netbsd-arm64), const EEXIST = 17
+pkg syscall (netbsd-arm64), const EFAULT = 14
+pkg syscall (netbsd-arm64), const EFBIG = 27
+pkg syscall (netbsd-arm64), const EFTYPE = 79
+pkg syscall (netbsd-arm64), const EFTYPE Errno
+pkg syscall (netbsd-arm64), const EHOSTDOWN = 64
+pkg syscall (netbsd-arm64), const EHOSTUNREACH = 65
+pkg syscall (netbsd-arm64), const EIDRM = 82
+pkg syscall (netbsd-arm64), const EILSEQ = 85
+pkg syscall (netbsd-arm64), const EINPROGRESS = 36
+pkg syscall (netbsd-arm64), const EINTR = 4
+pkg syscall (netbsd-arm64), const EINVAL = 22
+pkg syscall (netbsd-arm64), const EIO = 5
+pkg syscall (netbsd-arm64), const EISCONN = 56
+pkg syscall (netbsd-arm64), const EISDIR = 21
+pkg syscall (netbsd-arm64), const ELAST = 96
+pkg syscall (netbsd-arm64), const ELAST Errno
+pkg syscall (netbsd-arm64), const ELOOP = 62
+pkg syscall (netbsd-arm64), const EMFILE = 24
+pkg syscall (netbsd-arm64), const EMLINK = 31
+pkg syscall (netbsd-arm64), const EMSGSIZE = 40
+pkg syscall (netbsd-arm64), const EMULTIHOP = 94
+pkg syscall (netbsd-arm64), const EMULTIHOP Errno
+pkg syscall (netbsd-arm64), const EMUL_LINUX = 1
+pkg syscall (netbsd-arm64), const EMUL_LINUX ideal-int
+pkg syscall (netbsd-arm64), const EMUL_LINUX32 = 5
+pkg syscall (netbsd-arm64), const EMUL_LINUX32 ideal-int
+pkg syscall (netbsd-arm64), const EMUL_MAXID = 6
+pkg syscall (netbsd-arm64), const EMUL_MAXID ideal-int
+pkg syscall (netbsd-arm64), const ENAMETOOLONG = 63
+pkg syscall (netbsd-arm64), const ENEEDAUTH = 81
+pkg syscall (netbsd-arm64), const ENEEDAUTH Errno
+pkg syscall (netbsd-arm64), const ENETDOWN = 50
+pkg syscall (netbsd-arm64), const ENETRESET = 52
+pkg syscall (netbsd-arm64), const ENETUNREACH = 51
+pkg syscall (netbsd-arm64), const ENFILE = 23
+pkg syscall (netbsd-arm64), const ENOATTR = 93
+pkg syscall (netbsd-arm64), const ENOATTR Errno
+pkg syscall (netbsd-arm64), const ENOBUFS = 55
+pkg syscall (netbsd-arm64), const ENODATA = 89
+pkg syscall (netbsd-arm64), const ENODATA Errno
+pkg syscall (netbsd-arm64), const ENODEV = 19
+pkg syscall (netbsd-arm64), const ENOEXEC = 8
+pkg syscall (netbsd-arm64), const ENOLCK = 77
+pkg syscall (netbsd-arm64), const ENOLINK = 95
+pkg syscall (netbsd-arm64), const ENOLINK Errno
+pkg syscall (netbsd-arm64), const ENOMEM = 12
+pkg syscall (netbsd-arm64), const ENOMSG = 83
+pkg syscall (netbsd-arm64), const ENOPROTOOPT = 42
+pkg syscall (netbsd-arm64), const ENOSPC = 28
+pkg syscall (netbsd-arm64), const ENOSR = 90
+pkg syscall (netbsd-arm64), const ENOSR Errno
+pkg syscall (netbsd-arm64), const ENOSTR = 91
+pkg syscall (netbsd-arm64), const ENOSTR Errno
+pkg syscall (netbsd-arm64), const ENOSYS = 78
+pkg syscall (netbsd-arm64), const ENOTBLK = 15
+pkg syscall (netbsd-arm64), const ENOTCONN = 57
+pkg syscall (netbsd-arm64), const ENOTDIR = 20
+pkg syscall (netbsd-arm64), const ENOTEMPTY = 66
+pkg syscall (netbsd-arm64), const ENOTSOCK = 38
+pkg syscall (netbsd-arm64), const ENOTSUP = 86
+pkg syscall (netbsd-arm64), const ENOTTY = 25
+pkg syscall (netbsd-arm64), const ENXIO = 6
+pkg syscall (netbsd-arm64), const EOPNOTSUPP = 45
+pkg syscall (netbsd-arm64), const EOVERFLOW = 84
+pkg syscall (netbsd-arm64), const EPERM = 1
+pkg syscall (netbsd-arm64), const EPFNOSUPPORT = 46
+pkg syscall (netbsd-arm64), const EPIPE = 32
+pkg syscall (netbsd-arm64), const EPROCLIM = 67
+pkg syscall (netbsd-arm64), const EPROCLIM Errno
+pkg syscall (netbsd-arm64), const EPROCUNAVAIL = 76
+pkg syscall (netbsd-arm64), const EPROCUNAVAIL Errno
+pkg syscall (netbsd-arm64), const EPROGMISMATCH = 75
+pkg syscall (netbsd-arm64), const EPROGMISMATCH Errno
+pkg syscall (netbsd-arm64), const EPROGUNAVAIL = 74
+pkg syscall (netbsd-arm64), const EPROGUNAVAIL Errno
+pkg syscall (netbsd-arm64), const EPROTO = 96
+pkg syscall (netbsd-arm64), const EPROTO Errno
+pkg syscall (netbsd-arm64), const EPROTONOSUPPORT = 43
+pkg syscall (netbsd-arm64), const EPROTOTYPE = 41
+pkg syscall (netbsd-arm64), const ERANGE = 34
+pkg syscall (netbsd-arm64), const EREMOTE = 71
+pkg syscall (netbsd-arm64), const EROFS = 30
+pkg syscall (netbsd-arm64), const ERPCMISMATCH = 73
+pkg syscall (netbsd-arm64), const ERPCMISMATCH Errno
+pkg syscall (netbsd-arm64), const ESHUTDOWN = 58
+pkg syscall (netbsd-arm64), const ESOCKTNOSUPPORT = 44
+pkg syscall (netbsd-arm64), const ESPIPE = 29
+pkg syscall (netbsd-arm64), const ESRCH = 3
+pkg syscall (netbsd-arm64), const ESTALE = 70
+pkg syscall (netbsd-arm64), const ETHERCAP_JUMBO_MTU = 4
+pkg syscall (netbsd-arm64), const ETHERCAP_JUMBO_MTU ideal-int
+pkg syscall (netbsd-arm64), const ETHERCAP_VLAN_HWTAGGING = 2
+pkg syscall (netbsd-arm64), const ETHERCAP_VLAN_HWTAGGING ideal-int
+pkg syscall (netbsd-arm64), const ETHERCAP_VLAN_MTU = 1
+pkg syscall (netbsd-arm64), const ETHERCAP_VLAN_MTU ideal-int
+pkg syscall (netbsd-arm64), const ETHERMIN = 46
+pkg syscall (netbsd-arm64), const ETHERMIN ideal-int
+pkg syscall (netbsd-arm64), const ETHERMTU = 1500
+pkg syscall (netbsd-arm64), const ETHERMTU ideal-int
+pkg syscall (netbsd-arm64), const ETHERMTU_JUMBO = 9000
+pkg syscall (netbsd-arm64), const ETHERMTU_JUMBO ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_8023 = 4
+pkg syscall (netbsd-arm64), const ETHERTYPE_8023 ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_AARP = 33011
+pkg syscall (netbsd-arm64), const ETHERTYPE_AARP ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_ACCTON = 33680
+pkg syscall (netbsd-arm64), const ETHERTYPE_ACCTON ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_AEONIC = 32822
+pkg syscall (netbsd-arm64), const ETHERTYPE_AEONIC ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_ALPHA = 33098
+pkg syscall (netbsd-arm64), const ETHERTYPE_ALPHA ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_AMBER = 24584
+pkg syscall (netbsd-arm64), const ETHERTYPE_AMBER ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_AMOEBA = 33093
+pkg syscall (netbsd-arm64), const ETHERTYPE_AMOEBA ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_APOLLO = 33015
+pkg syscall (netbsd-arm64), const ETHERTYPE_APOLLO ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_APOLLODOMAIN = 32793
+pkg syscall (netbsd-arm64), const ETHERTYPE_APOLLODOMAIN ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_APPLETALK = 32923
+pkg syscall (netbsd-arm64), const ETHERTYPE_APPLETALK ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_APPLITEK = 32967
+pkg syscall (netbsd-arm64), const ETHERTYPE_APPLITEK ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_ARGONAUT = 32826
+pkg syscall (netbsd-arm64), const ETHERTYPE_ARGONAUT ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_ARP = 2054
+pkg syscall (netbsd-arm64), const ETHERTYPE_ARP ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_AT = 32923
+pkg syscall (netbsd-arm64), const ETHERTYPE_AT ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_ATALK = 32923
+pkg syscall (netbsd-arm64), const ETHERTYPE_ATALK ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_ATOMIC = 34527
+pkg syscall (netbsd-arm64), const ETHERTYPE_ATOMIC ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_ATT = 32873
+pkg syscall (netbsd-arm64), const ETHERTYPE_ATT ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_ATTSTANFORD = 32776
+pkg syscall (netbsd-arm64), const ETHERTYPE_ATTSTANFORD ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_AUTOPHON = 32874
+pkg syscall (netbsd-arm64), const ETHERTYPE_AUTOPHON ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_AXIS = 34902
+pkg syscall (netbsd-arm64), const ETHERTYPE_AXIS ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_BCLOOP = 36867
+pkg syscall (netbsd-arm64), const ETHERTYPE_BCLOOP ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_BOFL = 33026
+pkg syscall (netbsd-arm64), const ETHERTYPE_BOFL ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_CABLETRON = 28724
+pkg syscall (netbsd-arm64), const ETHERTYPE_CABLETRON ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_CHAOS = 2052
+pkg syscall (netbsd-arm64), const ETHERTYPE_CHAOS ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_COMDESIGN = 32876
+pkg syscall (netbsd-arm64), const ETHERTYPE_COMDESIGN ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_COMPUGRAPHIC = 32877
+pkg syscall (netbsd-arm64), const ETHERTYPE_COMPUGRAPHIC ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_COUNTERPOINT = 32866
+pkg syscall (netbsd-arm64), const ETHERTYPE_COUNTERPOINT ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_CRONUS = 32772
+pkg syscall (netbsd-arm64), const ETHERTYPE_CRONUS ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_CRONUSVLN = 32771
+pkg syscall (netbsd-arm64), const ETHERTYPE_CRONUSVLN ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_DCA = 4660
+pkg syscall (netbsd-arm64), const ETHERTYPE_DCA ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_DDE = 32891
+pkg syscall (netbsd-arm64), const ETHERTYPE_DDE ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_DEBNI = 43690
+pkg syscall (netbsd-arm64), const ETHERTYPE_DEBNI ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_DECAM = 32840
+pkg syscall (netbsd-arm64), const ETHERTYPE_DECAM ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_DECCUST = 24582
+pkg syscall (netbsd-arm64), const ETHERTYPE_DECCUST ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_DECDIAG = 24581
+pkg syscall (netbsd-arm64), const ETHERTYPE_DECDIAG ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_DECDNS = 32828
+pkg syscall (netbsd-arm64), const ETHERTYPE_DECDNS ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_DECDTS = 32830
+pkg syscall (netbsd-arm64), const ETHERTYPE_DECDTS ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_DECEXPER = 24576
+pkg syscall (netbsd-arm64), const ETHERTYPE_DECEXPER ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_DECLAST = 32833
+pkg syscall (netbsd-arm64), const ETHERTYPE_DECLAST ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_DECLTM = 32831
+pkg syscall (netbsd-arm64), const ETHERTYPE_DECLTM ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_DECMUMPS = 24585
+pkg syscall (netbsd-arm64), const ETHERTYPE_DECMUMPS ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_DECNETBIOS = 32832
+pkg syscall (netbsd-arm64), const ETHERTYPE_DECNETBIOS ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_DELTACON = 34526
+pkg syscall (netbsd-arm64), const ETHERTYPE_DELTACON ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_DIDDLE = 17185
+pkg syscall (netbsd-arm64), const ETHERTYPE_DIDDLE ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_DLOG1 = 1632
+pkg syscall (netbsd-arm64), const ETHERTYPE_DLOG1 ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_DLOG2 = 1633
+pkg syscall (netbsd-arm64), const ETHERTYPE_DLOG2 ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_DN = 24579
+pkg syscall (netbsd-arm64), const ETHERTYPE_DN ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_DOGFIGHT = 6537
+pkg syscall (netbsd-arm64), const ETHERTYPE_DOGFIGHT ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_DSMD = 32825
+pkg syscall (netbsd-arm64), const ETHERTYPE_DSMD ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_ECMA = 2051
+pkg syscall (netbsd-arm64), const ETHERTYPE_ECMA ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_ENCRYPT = 32829
+pkg syscall (netbsd-arm64), const ETHERTYPE_ENCRYPT ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_ES = 32861
+pkg syscall (netbsd-arm64), const ETHERTYPE_ES ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_EXCELAN = 32784
+pkg syscall (netbsd-arm64), const ETHERTYPE_EXCELAN ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_EXPERDATA = 32841
+pkg syscall (netbsd-arm64), const ETHERTYPE_EXPERDATA ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_FLIP = 33094
+pkg syscall (netbsd-arm64), const ETHERTYPE_FLIP ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_FLOWCONTROL = 34824
+pkg syscall (netbsd-arm64), const ETHERTYPE_FLOWCONTROL ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_FRARP = 2056
+pkg syscall (netbsd-arm64), const ETHERTYPE_FRARP ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_GENDYN = 32872
+pkg syscall (netbsd-arm64), const ETHERTYPE_GENDYN ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_HAYES = 33072
+pkg syscall (netbsd-arm64), const ETHERTYPE_HAYES ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_HIPPI_FP = 33152
+pkg syscall (netbsd-arm64), const ETHERTYPE_HIPPI_FP ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_HITACHI = 34848
+pkg syscall (netbsd-arm64), const ETHERTYPE_HITACHI ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_HP = 32773
+pkg syscall (netbsd-arm64), const ETHERTYPE_HP ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_IEEEPUP = 2560
+pkg syscall (netbsd-arm64), const ETHERTYPE_IEEEPUP ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_IEEEPUPAT = 2561
+pkg syscall (netbsd-arm64), const ETHERTYPE_IEEEPUPAT ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_IMLBL = 19522
+pkg syscall (netbsd-arm64), const ETHERTYPE_IMLBL ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_IMLBLDIAG = 16972
+pkg syscall (netbsd-arm64), const ETHERTYPE_IMLBLDIAG ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_IP = 2048
+pkg syscall (netbsd-arm64), const ETHERTYPE_IP ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_IPAS = 34668
+pkg syscall (netbsd-arm64), const ETHERTYPE_IPAS ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_IPV6 = 34525
+pkg syscall (netbsd-arm64), const ETHERTYPE_IPV6 ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_IPX = 33079
+pkg syscall (netbsd-arm64), const ETHERTYPE_IPX ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_IPXNEW = 32823
+pkg syscall (netbsd-arm64), const ETHERTYPE_IPXNEW ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_KALPANA = 34178
+pkg syscall (netbsd-arm64), const ETHERTYPE_KALPANA ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_LANBRIDGE = 32824
+pkg syscall (netbsd-arm64), const ETHERTYPE_LANBRIDGE ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_LANPROBE = 34952
+pkg syscall (netbsd-arm64), const ETHERTYPE_LANPROBE ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_LAT = 24580
+pkg syscall (netbsd-arm64), const ETHERTYPE_LAT ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_LBACK = 36864
+pkg syscall (netbsd-arm64), const ETHERTYPE_LBACK ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_LITTLE = 32864
+pkg syscall (netbsd-arm64), const ETHERTYPE_LITTLE ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_LOGICRAFT = 33096
+pkg syscall (netbsd-arm64), const ETHERTYPE_LOGICRAFT ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_LOOPBACK = 36864
+pkg syscall (netbsd-arm64), const ETHERTYPE_LOOPBACK ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_MATRA = 32890
+pkg syscall (netbsd-arm64), const ETHERTYPE_MATRA ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_MAX = 65535
+pkg syscall (netbsd-arm64), const ETHERTYPE_MAX ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_MERIT = 32892
+pkg syscall (netbsd-arm64), const ETHERTYPE_MERIT ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_MICP = 34618
+pkg syscall (netbsd-arm64), const ETHERTYPE_MICP ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_MOPDL = 24577
+pkg syscall (netbsd-arm64), const ETHERTYPE_MOPDL ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_MOPRC = 24578
+pkg syscall (netbsd-arm64), const ETHERTYPE_MOPRC ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_MOTOROLA = 33165
+pkg syscall (netbsd-arm64), const ETHERTYPE_MOTOROLA ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_MPLS = 34887
+pkg syscall (netbsd-arm64), const ETHERTYPE_MPLS ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_MPLS_MCAST = 34888
+pkg syscall (netbsd-arm64), const ETHERTYPE_MPLS_MCAST ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_MUMPS = 33087
+pkg syscall (netbsd-arm64), const ETHERTYPE_MUMPS ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPCC = 15364
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPCC ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPCLAIM = 15369
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPCLAIM ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPCLREQ = 15365
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPCLREQ ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPCLRSP = 15366
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPCLRSP ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPCREQ = 15362
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPCREQ ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPCRSP = 15363
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPCRSP ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPDG = 15367
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPDG ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPDGB = 15368
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPDGB ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPDLTE = 15370
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPDLTE ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPRAR = 15372
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPRAR ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPRAS = 15371
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPRAS ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPRST = 15373
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPRST ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPSCD = 15361
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPSCD ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPVCD = 15360
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBPVCD ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBS = 2050
+pkg syscall (netbsd-arm64), const ETHERTYPE_NBS ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_NCD = 33097
+pkg syscall (netbsd-arm64), const ETHERTYPE_NCD ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_NESTAR = 32774
+pkg syscall (netbsd-arm64), const ETHERTYPE_NESTAR ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_NETBEUI = 33169
+pkg syscall (netbsd-arm64), const ETHERTYPE_NETBEUI ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_NOVELL = 33080
+pkg syscall (netbsd-arm64), const ETHERTYPE_NOVELL ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_NS = 1536
+pkg syscall (netbsd-arm64), const ETHERTYPE_NS ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_NSAT = 1537
+pkg syscall (netbsd-arm64), const ETHERTYPE_NSAT ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_NSCOMPAT = 2055
+pkg syscall (netbsd-arm64), const ETHERTYPE_NSCOMPAT ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_NTRAILER = 16
+pkg syscall (netbsd-arm64), const ETHERTYPE_NTRAILER ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_OS9 = 28679
+pkg syscall (netbsd-arm64), const ETHERTYPE_OS9 ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_OS9NET = 28681
+pkg syscall (netbsd-arm64), const ETHERTYPE_OS9NET ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_PACER = 32966
+pkg syscall (netbsd-arm64), const ETHERTYPE_PACER ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_PAE = 34958
+pkg syscall (netbsd-arm64), const ETHERTYPE_PAE ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_PCS = 16962
+pkg syscall (netbsd-arm64), const ETHERTYPE_PCS ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_PLANNING = 32836
+pkg syscall (netbsd-arm64), const ETHERTYPE_PLANNING ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_PPP = 34827
+pkg syscall (netbsd-arm64), const ETHERTYPE_PPP ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_PPPOE = 34916
+pkg syscall (netbsd-arm64), const ETHERTYPE_PPPOE ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_PPPOEDISC = 34915
+pkg syscall (netbsd-arm64), const ETHERTYPE_PPPOEDISC ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_PRIMENTS = 28721
+pkg syscall (netbsd-arm64), const ETHERTYPE_PRIMENTS ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_PUP = 512
+pkg syscall (netbsd-arm64), const ETHERTYPE_PUP ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_PUPAT = 512
+pkg syscall (netbsd-arm64), const ETHERTYPE_PUPAT ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_RACAL = 28720
+pkg syscall (netbsd-arm64), const ETHERTYPE_RACAL ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_RATIONAL = 33104
+pkg syscall (netbsd-arm64), const ETHERTYPE_RATIONAL ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_RAWFR = 25945
+pkg syscall (netbsd-arm64), const ETHERTYPE_RAWFR ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_RCL = 6549
+pkg syscall (netbsd-arm64), const ETHERTYPE_RCL ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_RDP = 34617
+pkg syscall (netbsd-arm64), const ETHERTYPE_RDP ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_RETIX = 33010
+pkg syscall (netbsd-arm64), const ETHERTYPE_RETIX ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_REVARP = 32821
+pkg syscall (netbsd-arm64), const ETHERTYPE_REVARP ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_SCA = 24583
+pkg syscall (netbsd-arm64), const ETHERTYPE_SCA ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_SECTRA = 34523
+pkg syscall (netbsd-arm64), const ETHERTYPE_SECTRA ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_SECUREDATA = 34669
+pkg syscall (netbsd-arm64), const ETHERTYPE_SECUREDATA ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_SGITW = 33150
+pkg syscall (netbsd-arm64), const ETHERTYPE_SGITW ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_SG_BOUNCE = 32790
+pkg syscall (netbsd-arm64), const ETHERTYPE_SG_BOUNCE ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_SG_DIAG = 32787
+pkg syscall (netbsd-arm64), const ETHERTYPE_SG_DIAG ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_SG_NETGAMES = 32788
+pkg syscall (netbsd-arm64), const ETHERTYPE_SG_NETGAMES ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_SG_RESV = 32789
+pkg syscall (netbsd-arm64), const ETHERTYPE_SG_RESV ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_SIMNET = 21000
+pkg syscall (netbsd-arm64), const ETHERTYPE_SIMNET ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_SLOWPROTOCOLS = 34825
+pkg syscall (netbsd-arm64), const ETHERTYPE_SLOWPROTOCOLS ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_SNA = 32981
+pkg syscall (netbsd-arm64), const ETHERTYPE_SNA ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_SNMP = 33100
+pkg syscall (netbsd-arm64), const ETHERTYPE_SNMP ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_SONIX = 64245
+pkg syscall (netbsd-arm64), const ETHERTYPE_SONIX ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_SPIDER = 32927
+pkg syscall (netbsd-arm64), const ETHERTYPE_SPIDER ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_SPRITE = 1280
+pkg syscall (netbsd-arm64), const ETHERTYPE_SPRITE ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_STP = 33153
+pkg syscall (netbsd-arm64), const ETHERTYPE_STP ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_TALARIS = 33067
+pkg syscall (netbsd-arm64), const ETHERTYPE_TALARIS ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_TALARISMC = 34091
+pkg syscall (netbsd-arm64), const ETHERTYPE_TALARISMC ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_TCPCOMP = 34667
+pkg syscall (netbsd-arm64), const ETHERTYPE_TCPCOMP ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_TCPSM = 36866
+pkg syscall (netbsd-arm64), const ETHERTYPE_TCPSM ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_TEC = 33103
+pkg syscall (netbsd-arm64), const ETHERTYPE_TEC ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_TIGAN = 32815
+pkg syscall (netbsd-arm64), const ETHERTYPE_TIGAN ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_TRAIL = 4096
+pkg syscall (netbsd-arm64), const ETHERTYPE_TRAIL ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_TRANSETHER = 25944
+pkg syscall (netbsd-arm64), const ETHERTYPE_TRANSETHER ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_TYMSHARE = 32814
+pkg syscall (netbsd-arm64), const ETHERTYPE_TYMSHARE ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_UBBST = 28677
+pkg syscall (netbsd-arm64), const ETHERTYPE_UBBST ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_UBDEBUG = 2304
+pkg syscall (netbsd-arm64), const ETHERTYPE_UBDEBUG ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_UBDIAGLOOP = 28674
+pkg syscall (netbsd-arm64), const ETHERTYPE_UBDIAGLOOP ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_UBDL = 28672
+pkg syscall (netbsd-arm64), const ETHERTYPE_UBDL ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_UBNIU = 28673
+pkg syscall (netbsd-arm64), const ETHERTYPE_UBNIU ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_UBNMC = 28675
+pkg syscall (netbsd-arm64), const ETHERTYPE_UBNMC ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_VALID = 5632
+pkg syscall (netbsd-arm64), const ETHERTYPE_VALID ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_VARIAN = 32989
+pkg syscall (netbsd-arm64), const ETHERTYPE_VARIAN ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_VAXELN = 32827
+pkg syscall (netbsd-arm64), const ETHERTYPE_VAXELN ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_VEECO = 32871
+pkg syscall (netbsd-arm64), const ETHERTYPE_VEECO ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_VEXP = 32859
+pkg syscall (netbsd-arm64), const ETHERTYPE_VEXP ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_VGLAB = 33073
+pkg syscall (netbsd-arm64), const ETHERTYPE_VGLAB ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_VINES = 2989
+pkg syscall (netbsd-arm64), const ETHERTYPE_VINES ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_VINESECHO = 2991
+pkg syscall (netbsd-arm64), const ETHERTYPE_VINESECHO ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_VINESLOOP = 2990
+pkg syscall (netbsd-arm64), const ETHERTYPE_VINESLOOP ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_VITAL = 65280
+pkg syscall (netbsd-arm64), const ETHERTYPE_VITAL ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_VLAN = 33024
+pkg syscall (netbsd-arm64), const ETHERTYPE_VLAN ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_VLTLMAN = 32896
+pkg syscall (netbsd-arm64), const ETHERTYPE_VLTLMAN ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_VPROD = 32860
+pkg syscall (netbsd-arm64), const ETHERTYPE_VPROD ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_VURESERVED = 33095
+pkg syscall (netbsd-arm64), const ETHERTYPE_VURESERVED ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_WATERLOO = 33072
+pkg syscall (netbsd-arm64), const ETHERTYPE_WATERLOO ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_WELLFLEET = 33027
+pkg syscall (netbsd-arm64), const ETHERTYPE_WELLFLEET ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_X25 = 2053
+pkg syscall (netbsd-arm64), const ETHERTYPE_X25 ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_X75 = 2049
+pkg syscall (netbsd-arm64), const ETHERTYPE_X75 ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_XNSSM = 36865
+pkg syscall (netbsd-arm64), const ETHERTYPE_XNSSM ideal-int
+pkg syscall (netbsd-arm64), const ETHERTYPE_XTP = 33149
+pkg syscall (netbsd-arm64), const ETHERTYPE_XTP ideal-int
+pkg syscall (netbsd-arm64), const ETHER_ADDR_LEN = 6
+pkg syscall (netbsd-arm64), const ETHER_ADDR_LEN ideal-int
+pkg syscall (netbsd-arm64), const ETHER_CRC_LEN = 4
+pkg syscall (netbsd-arm64), const ETHER_CRC_LEN ideal-int
+pkg syscall (netbsd-arm64), const ETHER_CRC_POLY_BE = 79764918
+pkg syscall (netbsd-arm64), const ETHER_CRC_POLY_BE ideal-int
+pkg syscall (netbsd-arm64), const ETHER_CRC_POLY_LE = 3988292384
+pkg syscall (netbsd-arm64), const ETHER_CRC_POLY_LE ideal-int
+pkg syscall (netbsd-arm64), const ETHER_HDR_LEN = 14
+pkg syscall (netbsd-arm64), const ETHER_HDR_LEN ideal-int
+pkg syscall (netbsd-arm64), const ETHER_MAX_LEN = 1518
+pkg syscall (netbsd-arm64), const ETHER_MAX_LEN ideal-int
+pkg syscall (netbsd-arm64), const ETHER_MAX_LEN_JUMBO = 9018
+pkg syscall (netbsd-arm64), const ETHER_MAX_LEN_JUMBO ideal-int
+pkg syscall (netbsd-arm64), const ETHER_MIN_LEN = 64
+pkg syscall (netbsd-arm64), const ETHER_MIN_LEN ideal-int
+pkg syscall (netbsd-arm64), const ETHER_PPPOE_ENCAP_LEN = 8
+pkg syscall (netbsd-arm64), const ETHER_PPPOE_ENCAP_LEN ideal-int
+pkg syscall (netbsd-arm64), const ETHER_TYPE_LEN = 2
+pkg syscall (netbsd-arm64), const ETHER_TYPE_LEN ideal-int
+pkg syscall (netbsd-arm64), const ETHER_VLAN_ENCAP_LEN = 4
+pkg syscall (netbsd-arm64), const ETHER_VLAN_ENCAP_LEN ideal-int
+pkg syscall (netbsd-arm64), const ETIME = 92
+pkg syscall (netbsd-arm64), const ETIME Errno
+pkg syscall (netbsd-arm64), const ETIMEDOUT = 60
+pkg syscall (netbsd-arm64), const ETOOMANYREFS = 59
+pkg syscall (netbsd-arm64), const ETXTBSY = 26
+pkg syscall (netbsd-arm64), const EUSERS = 68
+pkg syscall (netbsd-arm64), const EVFILT_AIO = 2
+pkg syscall (netbsd-arm64), const EVFILT_AIO ideal-int
+pkg syscall (netbsd-arm64), const EVFILT_PROC = 4
+pkg syscall (netbsd-arm64), const EVFILT_PROC ideal-int
+pkg syscall (netbsd-arm64), const EVFILT_READ = 0
+pkg syscall (netbsd-arm64), const EVFILT_READ ideal-int
+pkg syscall (netbsd-arm64), const EVFILT_SIGNAL = 5
+pkg syscall (netbsd-arm64), const EVFILT_SIGNAL ideal-int
+pkg syscall (netbsd-arm64), const EVFILT_SYSCOUNT = 7
+pkg syscall (netbsd-arm64), const EVFILT_SYSCOUNT ideal-int
+pkg syscall (netbsd-arm64), const EVFILT_TIMER = 6
+pkg syscall (netbsd-arm64), const EVFILT_TIMER ideal-int
+pkg syscall (netbsd-arm64), const EVFILT_VNODE = 3
+pkg syscall (netbsd-arm64), const EVFILT_VNODE ideal-int
+pkg syscall (netbsd-arm64), const EVFILT_WRITE = 1
+pkg syscall (netbsd-arm64), const EVFILT_WRITE ideal-int
+pkg syscall (netbsd-arm64), const EV_ADD = 1
+pkg syscall (netbsd-arm64), const EV_ADD ideal-int
+pkg syscall (netbsd-arm64), const EV_CLEAR = 32
+pkg syscall (netbsd-arm64), const EV_CLEAR ideal-int
+pkg syscall (netbsd-arm64), const EV_DELETE = 2
+pkg syscall (netbsd-arm64), const EV_DELETE ideal-int
+pkg syscall (netbsd-arm64), const EV_DISABLE = 8
+pkg syscall (netbsd-arm64), const EV_DISABLE ideal-int
+pkg syscall (netbsd-arm64), const EV_ENABLE = 4
+pkg syscall (netbsd-arm64), const EV_ENABLE ideal-int
+pkg syscall (netbsd-arm64), const EV_EOF = 32768
+pkg syscall (netbsd-arm64), const EV_EOF ideal-int
+pkg syscall (netbsd-arm64), const EV_ERROR = 16384
+pkg syscall (netbsd-arm64), const EV_ERROR ideal-int
+pkg syscall (netbsd-arm64), const EV_FLAG1 = 8192
+pkg syscall (netbsd-arm64), const EV_FLAG1 ideal-int
+pkg syscall (netbsd-arm64), const EV_ONESHOT = 16
+pkg syscall (netbsd-arm64), const EV_ONESHOT ideal-int
+pkg syscall (netbsd-arm64), const EV_SYSFLAGS = 61440
+pkg syscall (netbsd-arm64), const EV_SYSFLAGS ideal-int
+pkg syscall (netbsd-arm64), const EWOULDBLOCK = 35
+pkg syscall (netbsd-arm64), const EXDEV = 18
+pkg syscall (netbsd-arm64), const EXTA = 19200
+pkg syscall (netbsd-arm64), const EXTA ideal-int
+pkg syscall (netbsd-arm64), const EXTB = 38400
+pkg syscall (netbsd-arm64), const EXTB ideal-int
+pkg syscall (netbsd-arm64), const EXTPROC = 2048
+pkg syscall (netbsd-arm64), const EXTPROC ideal-int
+pkg syscall (netbsd-arm64), const FD_CLOEXEC = 1
+pkg syscall (netbsd-arm64), const FD_CLOEXEC ideal-int
+pkg syscall (netbsd-arm64), const FD_SETSIZE = 256
+pkg syscall (netbsd-arm64), const FD_SETSIZE ideal-int
+pkg syscall (netbsd-arm64), const FLUSHO = 8388608
+pkg syscall (netbsd-arm64), const FLUSHO ideal-int
+pkg syscall (netbsd-arm64), const F_CLOSEM = 10
+pkg syscall (netbsd-arm64), const F_CLOSEM ideal-int
+pkg syscall (netbsd-arm64), const F_DUPFD = 0
+pkg syscall (netbsd-arm64), const F_DUPFD ideal-int
+pkg syscall (netbsd-arm64), const F_DUPFD_CLOEXEC = 12
+pkg syscall (netbsd-arm64), const F_DUPFD_CLOEXEC ideal-int
+pkg syscall (netbsd-arm64), const F_FSCTL = -2147483648
+pkg syscall (netbsd-arm64), const F_FSCTL ideal-int
+pkg syscall (netbsd-arm64), const F_FSDIRMASK = 1879048192
+pkg syscall (netbsd-arm64), const F_FSDIRMASK ideal-int
+pkg syscall (netbsd-arm64), const F_FSIN = 268435456
+pkg syscall (netbsd-arm64), const F_FSIN ideal-int
+pkg syscall (netbsd-arm64), const F_FSINOUT = 805306368
+pkg syscall (netbsd-arm64), const F_FSINOUT ideal-int
+pkg syscall (netbsd-arm64), const F_FSOUT = 536870912
+pkg syscall (netbsd-arm64), const F_FSOUT ideal-int
+pkg syscall (netbsd-arm64), const F_FSPRIV = 32768
+pkg syscall (netbsd-arm64), const F_FSPRIV ideal-int
+pkg syscall (netbsd-arm64), const F_FSVOID = 1073741824
+pkg syscall (netbsd-arm64), const F_FSVOID ideal-int
+pkg syscall (netbsd-arm64), const F_GETFD = 1
+pkg syscall (netbsd-arm64), const F_GETFD ideal-int
+pkg syscall (netbsd-arm64), const F_GETFL = 3
+pkg syscall (netbsd-arm64), const F_GETFL ideal-int
+pkg syscall (netbsd-arm64), const F_GETLK = 7
+pkg syscall (netbsd-arm64), const F_GETLK ideal-int
+pkg syscall (netbsd-arm64), const F_GETNOSIGPIPE = 13
+pkg syscall (netbsd-arm64), const F_GETNOSIGPIPE ideal-int
+pkg syscall (netbsd-arm64), const F_GETOWN = 5
+pkg syscall (netbsd-arm64), const F_GETOWN ideal-int
+pkg syscall (netbsd-arm64), const F_MAXFD = 11
+pkg syscall (netbsd-arm64), const F_MAXFD ideal-int
+pkg syscall (netbsd-arm64), const F_OK = 0
+pkg syscall (netbsd-arm64), const F_OK ideal-int
+pkg syscall (netbsd-arm64), const F_PARAM_MASK = 4095
+pkg syscall (netbsd-arm64), const F_PARAM_MASK ideal-int
+pkg syscall (netbsd-arm64), const F_PARAM_MAX = 4095
+pkg syscall (netbsd-arm64), const F_PARAM_MAX ideal-int
+pkg syscall (netbsd-arm64), const F_RDLCK = 1
+pkg syscall (netbsd-arm64), const F_RDLCK ideal-int
+pkg syscall (netbsd-arm64), const F_SETFD = 2
+pkg syscall (netbsd-arm64), const F_SETFD ideal-int
+pkg syscall (netbsd-arm64), const F_SETFL = 4
+pkg syscall (netbsd-arm64), const F_SETFL ideal-int
+pkg syscall (netbsd-arm64), const F_SETLK = 8
+pkg syscall (netbsd-arm64), const F_SETLK ideal-int
+pkg syscall (netbsd-arm64), const F_SETLKW = 9
+pkg syscall (netbsd-arm64), const F_SETLKW ideal-int
+pkg syscall (netbsd-arm64), const F_SETNOSIGPIPE = 14
+pkg syscall (netbsd-arm64), const F_SETNOSIGPIPE ideal-int
+pkg syscall (netbsd-arm64), const F_SETOWN = 6
+pkg syscall (netbsd-arm64), const F_SETOWN ideal-int
+pkg syscall (netbsd-arm64), const F_UNLCK = 2
+pkg syscall (netbsd-arm64), const F_UNLCK ideal-int
+pkg syscall (netbsd-arm64), const F_WRLCK = 3
+pkg syscall (netbsd-arm64), const F_WRLCK ideal-int
+pkg syscall (netbsd-arm64), const HUPCL = 16384
+pkg syscall (netbsd-arm64), const HUPCL ideal-int
+pkg syscall (netbsd-arm64), const ICANON = 256
+pkg syscall (netbsd-arm64), const ICANON ideal-int
+pkg syscall (netbsd-arm64), const ICMP6_FILTER = 18
+pkg syscall (netbsd-arm64), const ICMP6_FILTER ideal-int
+pkg syscall (netbsd-arm64), const ICRNL = 256
+pkg syscall (netbsd-arm64), const ICRNL ideal-int
+pkg syscall (netbsd-arm64), const IEXTEN = 1024
+pkg syscall (netbsd-arm64), const IEXTEN ideal-int
+pkg syscall (netbsd-arm64), const IFAN_ARRIVAL = 0
+pkg syscall (netbsd-arm64), const IFAN_ARRIVAL ideal-int
+pkg syscall (netbsd-arm64), const IFAN_DEPARTURE = 1
+pkg syscall (netbsd-arm64), const IFAN_DEPARTURE ideal-int
+pkg syscall (netbsd-arm64), const IFA_ROUTE = 1
+pkg syscall (netbsd-arm64), const IFA_ROUTE ideal-int
+pkg syscall (netbsd-arm64), const IFF_ALLMULTI = 512
+pkg syscall (netbsd-arm64), const IFF_ALLMULTI ideal-int
+pkg syscall (netbsd-arm64), const IFF_CANTCHANGE = 36690
+pkg syscall (netbsd-arm64), const IFF_CANTCHANGE ideal-int
+pkg syscall (netbsd-arm64), const IFF_DEBUG = 4
+pkg syscall (netbsd-arm64), const IFF_DEBUG ideal-int
+pkg syscall (netbsd-arm64), const IFF_LINK0 = 4096
+pkg syscall (netbsd-arm64), const IFF_LINK0 ideal-int
+pkg syscall (netbsd-arm64), const IFF_LINK1 = 8192
+pkg syscall (netbsd-arm64), const IFF_LINK1 ideal-int
+pkg syscall (netbsd-arm64), const IFF_LINK2 = 16384
+pkg syscall (netbsd-arm64), const IFF_LINK2 ideal-int
+pkg syscall (netbsd-arm64), const IFF_LOOPBACK = 8
+pkg syscall (netbsd-arm64), const IFF_MULTICAST = 32768
+pkg syscall (netbsd-arm64), const IFF_NOARP = 128
+pkg syscall (netbsd-arm64), const IFF_NOARP ideal-int
+pkg syscall (netbsd-arm64), const IFF_NOTRAILERS = 32
+pkg syscall (netbsd-arm64), const IFF_NOTRAILERS ideal-int
+pkg syscall (netbsd-arm64), const IFF_OACTIVE = 1024
+pkg syscall (netbsd-arm64), const IFF_OACTIVE ideal-int
+pkg syscall (netbsd-arm64), const IFF_POINTOPOINT = 16
+pkg syscall (netbsd-arm64), const IFF_POINTOPOINT ideal-int
+pkg syscall (netbsd-arm64), const IFF_PROMISC = 256
+pkg syscall (netbsd-arm64), const IFF_PROMISC ideal-int
+pkg syscall (netbsd-arm64), const IFF_RUNNING = 64
+pkg syscall (netbsd-arm64), const IFF_RUNNING ideal-int
+pkg syscall (netbsd-arm64), const IFF_SIMPLEX = 2048
+pkg syscall (netbsd-arm64), const IFF_SIMPLEX ideal-int
+pkg syscall (netbsd-arm64), const IFNAMSIZ = 16
+pkg syscall (netbsd-arm64), const IFNAMSIZ ideal-int
+pkg syscall (netbsd-arm64), const IFT_1822 = 2
+pkg syscall (netbsd-arm64), const IFT_1822 ideal-int
+pkg syscall (netbsd-arm64), const IFT_A12MPPSWITCH = 130
+pkg syscall (netbsd-arm64), const IFT_A12MPPSWITCH ideal-int
+pkg syscall (netbsd-arm64), const IFT_AAL2 = 187
+pkg syscall (netbsd-arm64), const IFT_AAL2 ideal-int
+pkg syscall (netbsd-arm64), const IFT_AAL5 = 49
+pkg syscall (netbsd-arm64), const IFT_AAL5 ideal-int
+pkg syscall (netbsd-arm64), const IFT_ADSL = 94
+pkg syscall (netbsd-arm64), const IFT_ADSL ideal-int
+pkg syscall (netbsd-arm64), const IFT_AFLANE8023 = 59
+pkg syscall (netbsd-arm64), const IFT_AFLANE8023 ideal-int
+pkg syscall (netbsd-arm64), const IFT_AFLANE8025 = 60
+pkg syscall (netbsd-arm64), const IFT_AFLANE8025 ideal-int
+pkg syscall (netbsd-arm64), const IFT_ARAP = 88
+pkg syscall (netbsd-arm64), const IFT_ARAP ideal-int
+pkg syscall (netbsd-arm64), const IFT_ARCNET = 35
+pkg syscall (netbsd-arm64), const IFT_ARCNET ideal-int
+pkg syscall (netbsd-arm64), const IFT_ARCNETPLUS = 36
+pkg syscall (netbsd-arm64), const IFT_ARCNETPLUS ideal-int
+pkg syscall (netbsd-arm64), const IFT_ASYNC = 84
+pkg syscall (netbsd-arm64), const IFT_ASYNC ideal-int
+pkg syscall (netbsd-arm64), const IFT_ATM = 37
+pkg syscall (netbsd-arm64), const IFT_ATM ideal-int
+pkg syscall (netbsd-arm64), const IFT_ATMDXI = 105
+pkg syscall (netbsd-arm64), const IFT_ATMDXI ideal-int
+pkg syscall (netbsd-arm64), const IFT_ATMFUNI = 106
+pkg syscall (netbsd-arm64), const IFT_ATMFUNI ideal-int
+pkg syscall (netbsd-arm64), const IFT_ATMIMA = 107
+pkg syscall (netbsd-arm64), const IFT_ATMIMA ideal-int
+pkg syscall (netbsd-arm64), const IFT_ATMLOGICAL = 80
+pkg syscall (netbsd-arm64), const IFT_ATMLOGICAL ideal-int
+pkg syscall (netbsd-arm64), const IFT_ATMRADIO = 189
+pkg syscall (netbsd-arm64), const IFT_ATMRADIO ideal-int
+pkg syscall (netbsd-arm64), const IFT_ATMSUBINTERFACE = 134
+pkg syscall (netbsd-arm64), const IFT_ATMSUBINTERFACE ideal-int
+pkg syscall (netbsd-arm64), const IFT_ATMVCIENDPT = 194
+pkg syscall (netbsd-arm64), const IFT_ATMVCIENDPT ideal-int
+pkg syscall (netbsd-arm64), const IFT_ATMVIRTUAL = 149
+pkg syscall (netbsd-arm64), const IFT_ATMVIRTUAL ideal-int
+pkg syscall (netbsd-arm64), const IFT_BGPPOLICYACCOUNTING = 162
+pkg syscall (netbsd-arm64), const IFT_BGPPOLICYACCOUNTING ideal-int
+pkg syscall (netbsd-arm64), const IFT_BRIDGE = 209
+pkg syscall (netbsd-arm64), const IFT_BRIDGE ideal-int
+pkg syscall (netbsd-arm64), const IFT_BSC = 83
+pkg syscall (netbsd-arm64), const IFT_BSC ideal-int
+pkg syscall (netbsd-arm64), const IFT_CARP = 248
+pkg syscall (netbsd-arm64), const IFT_CARP ideal-int
+pkg syscall (netbsd-arm64), const IFT_CCTEMUL = 61
+pkg syscall (netbsd-arm64), const IFT_CCTEMUL ideal-int
+pkg syscall (netbsd-arm64), const IFT_CEPT = 19
+pkg syscall (netbsd-arm64), const IFT_CEPT ideal-int
+pkg syscall (netbsd-arm64), const IFT_CES = 133
+pkg syscall (netbsd-arm64), const IFT_CES ideal-int
+pkg syscall (netbsd-arm64), const IFT_CHANNEL = 70
+pkg syscall (netbsd-arm64), const IFT_CHANNEL ideal-int
+pkg syscall (netbsd-arm64), const IFT_CNR = 85
+pkg syscall (netbsd-arm64), const IFT_CNR ideal-int
+pkg syscall (netbsd-arm64), const IFT_COFFEE = 132
+pkg syscall (netbsd-arm64), const IFT_COFFEE ideal-int
+pkg syscall (netbsd-arm64), const IFT_COMPOSITELINK = 155
+pkg syscall (netbsd-arm64), const IFT_COMPOSITELINK ideal-int
+pkg syscall (netbsd-arm64), const IFT_DCN = 141
+pkg syscall (netbsd-arm64), const IFT_DCN ideal-int
+pkg syscall (netbsd-arm64), const IFT_DIGITALPOWERLINE = 138
+pkg syscall (netbsd-arm64), const IFT_DIGITALPOWERLINE ideal-int
+pkg syscall (netbsd-arm64), const IFT_DIGITALWRAPPEROVERHEADCHANNEL = 186
+pkg syscall (netbsd-arm64), const IFT_DIGITALWRAPPEROVERHEADCHANNEL ideal-int
+pkg syscall (netbsd-arm64), const IFT_DLSW = 74
+pkg syscall (netbsd-arm64), const IFT_DLSW ideal-int
+pkg syscall (netbsd-arm64), const IFT_DOCSCABLEDOWNSTREAM = 128
+pkg syscall (netbsd-arm64), const IFT_DOCSCABLEDOWNSTREAM ideal-int
+pkg syscall (netbsd-arm64), const IFT_DOCSCABLEMACLAYER = 127
+pkg syscall (netbsd-arm64), const IFT_DOCSCABLEMACLAYER ideal-int
+pkg syscall (netbsd-arm64), const IFT_DOCSCABLEUPSTREAM = 129
+pkg syscall (netbsd-arm64), const IFT_DOCSCABLEUPSTREAM ideal-int
+pkg syscall (netbsd-arm64), const IFT_DOCSCABLEUPSTREAMCHANNEL = 205
+pkg syscall (netbsd-arm64), const IFT_DOCSCABLEUPSTREAMCHANNEL ideal-int
+pkg syscall (netbsd-arm64), const IFT_DS0 = 81
+pkg syscall (netbsd-arm64), const IFT_DS0 ideal-int
+pkg syscall (netbsd-arm64), const IFT_DS0BUNDLE = 82
+pkg syscall (netbsd-arm64), const IFT_DS0BUNDLE ideal-int
+pkg syscall (netbsd-arm64), const IFT_DS1FDL = 170
+pkg syscall (netbsd-arm64), const IFT_DS1FDL ideal-int
+pkg syscall (netbsd-arm64), const IFT_DS3 = 30
+pkg syscall (netbsd-arm64), const IFT_DS3 ideal-int
+pkg syscall (netbsd-arm64), const IFT_DTM = 140
+pkg syscall (netbsd-arm64), const IFT_DTM ideal-int
+pkg syscall (netbsd-arm64), const IFT_DVBASILN = 172
+pkg syscall (netbsd-arm64), const IFT_DVBASILN ideal-int
+pkg syscall (netbsd-arm64), const IFT_DVBASIOUT = 173
+pkg syscall (netbsd-arm64), const IFT_DVBASIOUT ideal-int
+pkg syscall (netbsd-arm64), const IFT_DVBRCCDOWNSTREAM = 147
+pkg syscall (netbsd-arm64), const IFT_DVBRCCDOWNSTREAM ideal-int
+pkg syscall (netbsd-arm64), const IFT_DVBRCCMACLAYER = 146
+pkg syscall (netbsd-arm64), const IFT_DVBRCCMACLAYER ideal-int
+pkg syscall (netbsd-arm64), const IFT_DVBRCCUPSTREAM = 148
+pkg syscall (netbsd-arm64), const IFT_DVBRCCUPSTREAM ideal-int
+pkg syscall (netbsd-arm64), const IFT_ECONET = 206
+pkg syscall (netbsd-arm64), const IFT_ECONET ideal-int
+pkg syscall (netbsd-arm64), const IFT_EON = 25
+pkg syscall (netbsd-arm64), const IFT_EON ideal-int
+pkg syscall (netbsd-arm64), const IFT_EPLRS = 87
+pkg syscall (netbsd-arm64), const IFT_EPLRS ideal-int
+pkg syscall (netbsd-arm64), const IFT_ESCON = 73
+pkg syscall (netbsd-arm64), const IFT_ESCON ideal-int
+pkg syscall (netbsd-arm64), const IFT_ETHER = 6
+pkg syscall (netbsd-arm64), const IFT_ETHER ideal-int
+pkg syscall (netbsd-arm64), const IFT_FAITH = 242
+pkg syscall (netbsd-arm64), const IFT_FAITH ideal-int
+pkg syscall (netbsd-arm64), const IFT_FAST = 125
+pkg syscall (netbsd-arm64), const IFT_FAST ideal-int
+pkg syscall (netbsd-arm64), const IFT_FASTETHER = 62
+pkg syscall (netbsd-arm64), const IFT_FASTETHER ideal-int
+pkg syscall (netbsd-arm64), const IFT_FASTETHERFX = 69
+pkg syscall (netbsd-arm64), const IFT_FASTETHERFX ideal-int
+pkg syscall (netbsd-arm64), const IFT_FDDI = 15
+pkg syscall (netbsd-arm64), const IFT_FDDI ideal-int
+pkg syscall (netbsd-arm64), const IFT_FIBRECHANNEL = 56
+pkg syscall (netbsd-arm64), const IFT_FIBRECHANNEL ideal-int
+pkg syscall (netbsd-arm64), const IFT_FRAMERELAYINTERCONNECT = 58
+pkg syscall (netbsd-arm64), const IFT_FRAMERELAYINTERCONNECT ideal-int
+pkg syscall (netbsd-arm64), const IFT_FRAMERELAYMPI = 92
+pkg syscall (netbsd-arm64), const IFT_FRAMERELAYMPI ideal-int
+pkg syscall (netbsd-arm64), const IFT_FRDLCIENDPT = 193
+pkg syscall (netbsd-arm64), const IFT_FRDLCIENDPT ideal-int
+pkg syscall (netbsd-arm64), const IFT_FRELAY = 32
+pkg syscall (netbsd-arm64), const IFT_FRELAY ideal-int
+pkg syscall (netbsd-arm64), const IFT_FRELAYDCE = 44
+pkg syscall (netbsd-arm64), const IFT_FRELAYDCE ideal-int
+pkg syscall (netbsd-arm64), const IFT_FRF16MFRBUNDLE = 163
+pkg syscall (netbsd-arm64), const IFT_FRF16MFRBUNDLE ideal-int
+pkg syscall (netbsd-arm64), const IFT_FRFORWARD = 158
+pkg syscall (netbsd-arm64), const IFT_FRFORWARD ideal-int
+pkg syscall (netbsd-arm64), const IFT_G703AT2MB = 67
+pkg syscall (netbsd-arm64), const IFT_G703AT2MB ideal-int
+pkg syscall (netbsd-arm64), const IFT_G703AT64K = 66
+pkg syscall (netbsd-arm64), const IFT_G703AT64K ideal-int
+pkg syscall (netbsd-arm64), const IFT_GIF = 240
+pkg syscall (netbsd-arm64), const IFT_GIF ideal-int
+pkg syscall (netbsd-arm64), const IFT_GIGABITETHERNET = 117
+pkg syscall (netbsd-arm64), const IFT_GIGABITETHERNET ideal-int
+pkg syscall (netbsd-arm64), const IFT_GR303IDT = 178
+pkg syscall (netbsd-arm64), const IFT_GR303IDT ideal-int
+pkg syscall (netbsd-arm64), const IFT_GR303RDT = 177
+pkg syscall (netbsd-arm64), const IFT_GR303RDT ideal-int
+pkg syscall (netbsd-arm64), const IFT_H323GATEKEEPER = 164
+pkg syscall (netbsd-arm64), const IFT_H323GATEKEEPER ideal-int
+pkg syscall (netbsd-arm64), const IFT_H323PROXY = 165
+pkg syscall (netbsd-arm64), const IFT_H323PROXY ideal-int
+pkg syscall (netbsd-arm64), const IFT_HDH1822 = 3
+pkg syscall (netbsd-arm64), const IFT_HDH1822 ideal-int
+pkg syscall (netbsd-arm64), const IFT_HDLC = 118
+pkg syscall (netbsd-arm64), const IFT_HDLC ideal-int
+pkg syscall (netbsd-arm64), const IFT_HDSL2 = 168
+pkg syscall (netbsd-arm64), const IFT_HDSL2 ideal-int
+pkg syscall (netbsd-arm64), const IFT_HIPERLAN2 = 183
+pkg syscall (netbsd-arm64), const IFT_HIPERLAN2 ideal-int
+pkg syscall (netbsd-arm64), const IFT_HIPPI = 47
+pkg syscall (netbsd-arm64), const IFT_HIPPI ideal-int
+pkg syscall (netbsd-arm64), const IFT_HIPPIINTERFACE = 57
+pkg syscall (netbsd-arm64), const IFT_HIPPIINTERFACE ideal-int
+pkg syscall (netbsd-arm64), const IFT_HOSTPAD = 90
+pkg syscall (netbsd-arm64), const IFT_HOSTPAD ideal-int
+pkg syscall (netbsd-arm64), const IFT_HSSI = 46
+pkg syscall (netbsd-arm64), const IFT_HSSI ideal-int
+pkg syscall (netbsd-arm64), const IFT_HY = 14
+pkg syscall (netbsd-arm64), const IFT_HY ideal-int
+pkg syscall (netbsd-arm64), const IFT_IBM370PARCHAN = 72
+pkg syscall (netbsd-arm64), const IFT_IBM370PARCHAN ideal-int
+pkg syscall (netbsd-arm64), const IFT_IDSL = 154
+pkg syscall (netbsd-arm64), const IFT_IDSL ideal-int
+pkg syscall (netbsd-arm64), const IFT_IEEE1394 = 144
+pkg syscall (netbsd-arm64), const IFT_IEEE1394 ideal-int
+pkg syscall (netbsd-arm64), const IFT_IEEE80211 = 71
+pkg syscall (netbsd-arm64), const IFT_IEEE80211 ideal-int
+pkg syscall (netbsd-arm64), const IFT_IEEE80212 = 55
+pkg syscall (netbsd-arm64), const IFT_IEEE80212 ideal-int
+pkg syscall (netbsd-arm64), const IFT_IEEE8023ADLAG = 161
+pkg syscall (netbsd-arm64), const IFT_IEEE8023ADLAG ideal-int
+pkg syscall (netbsd-arm64), const IFT_IFGSN = 145
+pkg syscall (netbsd-arm64), const IFT_IFGSN ideal-int
+pkg syscall (netbsd-arm64), const IFT_IMT = 190
+pkg syscall (netbsd-arm64), const IFT_IMT ideal-int
+pkg syscall (netbsd-arm64), const IFT_INFINIBAND = 199
+pkg syscall (netbsd-arm64), const IFT_INFINIBAND ideal-int
+pkg syscall (netbsd-arm64), const IFT_INTERLEAVE = 124
+pkg syscall (netbsd-arm64), const IFT_INTERLEAVE ideal-int
+pkg syscall (netbsd-arm64), const IFT_IP = 126
+pkg syscall (netbsd-arm64), const IFT_IP ideal-int
+pkg syscall (netbsd-arm64), const IFT_IPFORWARD = 142
+pkg syscall (netbsd-arm64), const IFT_IPFORWARD ideal-int
+pkg syscall (netbsd-arm64), const IFT_IPOVERATM = 114
+pkg syscall (netbsd-arm64), const IFT_IPOVERATM ideal-int
+pkg syscall (netbsd-arm64), const IFT_IPOVERCDLC = 109
+pkg syscall (netbsd-arm64), const IFT_IPOVERCDLC ideal-int
+pkg syscall (netbsd-arm64), const IFT_IPOVERCLAW = 110
+pkg syscall (netbsd-arm64), const IFT_IPOVERCLAW ideal-int
+pkg syscall (netbsd-arm64), const IFT_IPSWITCH = 78
+pkg syscall (netbsd-arm64), const IFT_IPSWITCH ideal-int
+pkg syscall (netbsd-arm64), const IFT_ISDN = 63
+pkg syscall (netbsd-arm64), const IFT_ISDN ideal-int
+pkg syscall (netbsd-arm64), const IFT_ISDNBASIC = 20
+pkg syscall (netbsd-arm64), const IFT_ISDNBASIC ideal-int
+pkg syscall (netbsd-arm64), const IFT_ISDNPRIMARY = 21
+pkg syscall (netbsd-arm64), const IFT_ISDNPRIMARY ideal-int
+pkg syscall (netbsd-arm64), const IFT_ISDNS = 75
+pkg syscall (netbsd-arm64), const IFT_ISDNS ideal-int
+pkg syscall (netbsd-arm64), const IFT_ISDNU = 76
+pkg syscall (netbsd-arm64), const IFT_ISDNU ideal-int
+pkg syscall (netbsd-arm64), const IFT_ISO88022LLC = 41
+pkg syscall (netbsd-arm64), const IFT_ISO88022LLC ideal-int
+pkg syscall (netbsd-arm64), const IFT_ISO88023 = 7
+pkg syscall (netbsd-arm64), const IFT_ISO88023 ideal-int
+pkg syscall (netbsd-arm64), const IFT_ISO88024 = 8
+pkg syscall (netbsd-arm64), const IFT_ISO88024 ideal-int
+pkg syscall (netbsd-arm64), const IFT_ISO88025 = 9
+pkg syscall (netbsd-arm64), const IFT_ISO88025 ideal-int
+pkg syscall (netbsd-arm64), const IFT_ISO88025CRFPINT = 98
+pkg syscall (netbsd-arm64), const IFT_ISO88025CRFPINT ideal-int
+pkg syscall (netbsd-arm64), const IFT_ISO88025DTR = 86
+pkg syscall (netbsd-arm64), const IFT_ISO88025DTR ideal-int
+pkg syscall (netbsd-arm64), const IFT_ISO88025FIBER = 115
+pkg syscall (netbsd-arm64), const IFT_ISO88025FIBER ideal-int
+pkg syscall (netbsd-arm64), const IFT_ISO88026 = 10
+pkg syscall (netbsd-arm64), const IFT_ISO88026 ideal-int
+pkg syscall (netbsd-arm64), const IFT_ISUP = 179
+pkg syscall (netbsd-arm64), const IFT_ISUP ideal-int
+pkg syscall (netbsd-arm64), const IFT_L2VLAN = 135
+pkg syscall (netbsd-arm64), const IFT_L2VLAN ideal-int
+pkg syscall (netbsd-arm64), const IFT_L3IPVLAN = 136
+pkg syscall (netbsd-arm64), const IFT_L3IPVLAN ideal-int
+pkg syscall (netbsd-arm64), const IFT_L3IPXVLAN = 137
+pkg syscall (netbsd-arm64), const IFT_L3IPXVLAN ideal-int
+pkg syscall (netbsd-arm64), const IFT_LAPB = 16
+pkg syscall (netbsd-arm64), const IFT_LAPB ideal-int
+pkg syscall (netbsd-arm64), const IFT_LAPD = 77
+pkg syscall (netbsd-arm64), const IFT_LAPD ideal-int
+pkg syscall (netbsd-arm64), const IFT_LAPF = 119
+pkg syscall (netbsd-arm64), const IFT_LAPF ideal-int
+pkg syscall (netbsd-arm64), const IFT_LINEGROUP = 210
+pkg syscall (netbsd-arm64), const IFT_LINEGROUP ideal-int
+pkg syscall (netbsd-arm64), const IFT_LOCALTALK = 42
+pkg syscall (netbsd-arm64), const IFT_LOCALTALK ideal-int
+pkg syscall (netbsd-arm64), const IFT_LOOP = 24
+pkg syscall (netbsd-arm64), const IFT_LOOP ideal-int
+pkg syscall (netbsd-arm64), const IFT_MEDIAMAILOVERIP = 139
+pkg syscall (netbsd-arm64), const IFT_MEDIAMAILOVERIP ideal-int
+pkg syscall (netbsd-arm64), const IFT_MFSIGLINK = 167
+pkg syscall (netbsd-arm64), const IFT_MFSIGLINK ideal-int
+pkg syscall (netbsd-arm64), const IFT_MIOX25 = 38
+pkg syscall (netbsd-arm64), const IFT_MIOX25 ideal-int
+pkg syscall (netbsd-arm64), const IFT_MODEM = 48
+pkg syscall (netbsd-arm64), const IFT_MODEM ideal-int
+pkg syscall (netbsd-arm64), const IFT_MPC = 113
+pkg syscall (netbsd-arm64), const IFT_MPC ideal-int
+pkg syscall (netbsd-arm64), const IFT_MPLS = 166
+pkg syscall (netbsd-arm64), const IFT_MPLS ideal-int
+pkg syscall (netbsd-arm64), const IFT_MPLSTUNNEL = 150
+pkg syscall (netbsd-arm64), const IFT_MPLSTUNNEL ideal-int
+pkg syscall (netbsd-arm64), const IFT_MSDSL = 143
+pkg syscall (netbsd-arm64), const IFT_MSDSL ideal-int
+pkg syscall (netbsd-arm64), const IFT_MVL = 191
+pkg syscall (netbsd-arm64), const IFT_MVL ideal-int
+pkg syscall (netbsd-arm64), const IFT_MYRINET = 99
+pkg syscall (netbsd-arm64), const IFT_MYRINET ideal-int
+pkg syscall (netbsd-arm64), const IFT_NFAS = 175
+pkg syscall (netbsd-arm64), const IFT_NFAS ideal-int
+pkg syscall (netbsd-arm64), const IFT_NSIP = 27
+pkg syscall (netbsd-arm64), const IFT_NSIP ideal-int
+pkg syscall (netbsd-arm64), const IFT_OPTICALCHANNEL = 195
+pkg syscall (netbsd-arm64), const IFT_OPTICALCHANNEL ideal-int
+pkg syscall (netbsd-arm64), const IFT_OPTICALTRANSPORT = 196
+pkg syscall (netbsd-arm64), const IFT_OPTICALTRANSPORT ideal-int
+pkg syscall (netbsd-arm64), const IFT_OTHER = 1
+pkg syscall (netbsd-arm64), const IFT_OTHER ideal-int
+pkg syscall (netbsd-arm64), const IFT_P10 = 12
+pkg syscall (netbsd-arm64), const IFT_P10 ideal-int
+pkg syscall (netbsd-arm64), const IFT_P80 = 13
+pkg syscall (netbsd-arm64), const IFT_P80 ideal-int
+pkg syscall (netbsd-arm64), const IFT_PARA = 34
+pkg syscall (netbsd-arm64), const IFT_PARA ideal-int
+pkg syscall (netbsd-arm64), const IFT_PFLOG = 245
+pkg syscall (netbsd-arm64), const IFT_PFLOG ideal-int
+pkg syscall (netbsd-arm64), const IFT_PFSYNC = 246
+pkg syscall (netbsd-arm64), const IFT_PFSYNC ideal-int
+pkg syscall (netbsd-arm64), const IFT_PLC = 174
+pkg syscall (netbsd-arm64), const IFT_PLC ideal-int
+pkg syscall (netbsd-arm64), const IFT_PON155 = 207
+pkg syscall (netbsd-arm64), const IFT_PON155 ideal-int
+pkg syscall (netbsd-arm64), const IFT_PON622 = 208
+pkg syscall (netbsd-arm64), const IFT_PON622 ideal-int
+pkg syscall (netbsd-arm64), const IFT_POS = 171
+pkg syscall (netbsd-arm64), const IFT_POS ideal-int
+pkg syscall (netbsd-arm64), const IFT_PPP = 23
+pkg syscall (netbsd-arm64), const IFT_PPP ideal-int
+pkg syscall (netbsd-arm64), const IFT_PPPMULTILINKBUNDLE = 108
+pkg syscall (netbsd-arm64), const IFT_PPPMULTILINKBUNDLE ideal-int
+pkg syscall (netbsd-arm64), const IFT_PROPATM = 197
+pkg syscall (netbsd-arm64), const IFT_PROPATM ideal-int
+pkg syscall (netbsd-arm64), const IFT_PROPBWAP2MP = 184
+pkg syscall (netbsd-arm64), const IFT_PROPBWAP2MP ideal-int
+pkg syscall (netbsd-arm64), const IFT_PROPCNLS = 89
+pkg syscall (netbsd-arm64), const IFT_PROPCNLS ideal-int
+pkg syscall (netbsd-arm64), const IFT_PROPDOCSWIRELESSDOWNSTREAM = 181
+pkg syscall (netbsd-arm64), const IFT_PROPDOCSWIRELESSDOWNSTREAM ideal-int
+pkg syscall (netbsd-arm64), const IFT_PROPDOCSWIRELESSMACLAYER = 180
+pkg syscall (netbsd-arm64), const IFT_PROPDOCSWIRELESSMACLAYER ideal-int
+pkg syscall (netbsd-arm64), const IFT_PROPDOCSWIRELESSUPSTREAM = 182
+pkg syscall (netbsd-arm64), const IFT_PROPDOCSWIRELESSUPSTREAM ideal-int
+pkg syscall (netbsd-arm64), const IFT_PROPMUX = 54
+pkg syscall (netbsd-arm64), const IFT_PROPMUX ideal-int
+pkg syscall (netbsd-arm64), const IFT_PROPVIRTUAL = 53
+pkg syscall (netbsd-arm64), const IFT_PROPVIRTUAL ideal-int
+pkg syscall (netbsd-arm64), const IFT_PROPWIRELESSP2P = 157
+pkg syscall (netbsd-arm64), const IFT_PROPWIRELESSP2P ideal-int
+pkg syscall (netbsd-arm64), const IFT_PTPSERIAL = 22
+pkg syscall (netbsd-arm64), const IFT_PTPSERIAL ideal-int
+pkg syscall (netbsd-arm64), const IFT_PVC = 241
+pkg syscall (netbsd-arm64), const IFT_PVC ideal-int
+pkg syscall (netbsd-arm64), const IFT_Q2931 = 201
+pkg syscall (netbsd-arm64), const IFT_Q2931 ideal-int
+pkg syscall (netbsd-arm64), const IFT_QLLC = 68
+pkg syscall (netbsd-arm64), const IFT_QLLC ideal-int
+pkg syscall (netbsd-arm64), const IFT_RADIOMAC = 188
+pkg syscall (netbsd-arm64), const IFT_RADIOMAC ideal-int
+pkg syscall (netbsd-arm64), const IFT_RADSL = 95
+pkg syscall (netbsd-arm64), const IFT_RADSL ideal-int
+pkg syscall (netbsd-arm64), const IFT_REACHDSL = 192
+pkg syscall (netbsd-arm64), const IFT_REACHDSL ideal-int
+pkg syscall (netbsd-arm64), const IFT_RFC1483 = 159
+pkg syscall (netbsd-arm64), const IFT_RFC1483 ideal-int
+pkg syscall (netbsd-arm64), const IFT_RS232 = 33
+pkg syscall (netbsd-arm64), const IFT_RS232 ideal-int
+pkg syscall (netbsd-arm64), const IFT_RSRB = 79
+pkg syscall (netbsd-arm64), const IFT_RSRB ideal-int
+pkg syscall (netbsd-arm64), const IFT_SDLC = 17
+pkg syscall (netbsd-arm64), const IFT_SDLC ideal-int
+pkg syscall (netbsd-arm64), const IFT_SDSL = 96
+pkg syscall (netbsd-arm64), const IFT_SDSL ideal-int
+pkg syscall (netbsd-arm64), const IFT_SHDSL = 169
+pkg syscall (netbsd-arm64), const IFT_SHDSL ideal-int
+pkg syscall (netbsd-arm64), const IFT_SIP = 31
+pkg syscall (netbsd-arm64), const IFT_SIP ideal-int
+pkg syscall (netbsd-arm64), const IFT_SIPSIG = 204
+pkg syscall (netbsd-arm64), const IFT_SIPSIG ideal-int
+pkg syscall (netbsd-arm64), const IFT_SIPTG = 203
+pkg syscall (netbsd-arm64), const IFT_SIPTG ideal-int
+pkg syscall (netbsd-arm64), const IFT_SLIP = 28
+pkg syscall (netbsd-arm64), const IFT_SLIP ideal-int
+pkg syscall (netbsd-arm64), const IFT_SMDSDXI = 43
+pkg syscall (netbsd-arm64), const IFT_SMDSDXI ideal-int
+pkg syscall (netbsd-arm64), const IFT_SMDSICIP = 52
+pkg syscall (netbsd-arm64), const IFT_SMDSICIP ideal-int
+pkg syscall (netbsd-arm64), const IFT_SONET = 39
+pkg syscall (netbsd-arm64), const IFT_SONET ideal-int
+pkg syscall (netbsd-arm64), const IFT_SONETOVERHEADCHANNEL = 185
+pkg syscall (netbsd-arm64), const IFT_SONETOVERHEADCHANNEL ideal-int
+pkg syscall (netbsd-arm64), const IFT_SONETPATH = 50
+pkg syscall (netbsd-arm64), const IFT_SONETPATH ideal-int
+pkg syscall (netbsd-arm64), const IFT_SONETVT = 51
+pkg syscall (netbsd-arm64), const IFT_SONETVT ideal-int
+pkg syscall (netbsd-arm64), const IFT_SRP = 151
+pkg syscall (netbsd-arm64), const IFT_SRP ideal-int
+pkg syscall (netbsd-arm64), const IFT_SS7SIGLINK = 156
+pkg syscall (netbsd-arm64), const IFT_SS7SIGLINK ideal-int
+pkg syscall (netbsd-arm64), const IFT_STACKTOSTACK = 111
+pkg syscall (netbsd-arm64), const IFT_STACKTOSTACK ideal-int
+pkg syscall (netbsd-arm64), const IFT_STARLAN = 11
+pkg syscall (netbsd-arm64), const IFT_STARLAN ideal-int
+pkg syscall (netbsd-arm64), const IFT_STF = 215
+pkg syscall (netbsd-arm64), const IFT_STF ideal-int
+pkg syscall (netbsd-arm64), const IFT_T1 = 18
+pkg syscall (netbsd-arm64), const IFT_T1 ideal-int
+pkg syscall (netbsd-arm64), const IFT_TDLC = 116
+pkg syscall (netbsd-arm64), const IFT_TDLC ideal-int
+pkg syscall (netbsd-arm64), const IFT_TELINK = 200
+pkg syscall (netbsd-arm64), const IFT_TELINK ideal-int
+pkg syscall (netbsd-arm64), const IFT_TERMPAD = 91
+pkg syscall (netbsd-arm64), const IFT_TERMPAD ideal-int
+pkg syscall (netbsd-arm64), const IFT_TR008 = 176
+pkg syscall (netbsd-arm64), const IFT_TR008 ideal-int
+pkg syscall (netbsd-arm64), const IFT_TRANSPHDLC = 123
+pkg syscall (netbsd-arm64), const IFT_TRANSPHDLC ideal-int
+pkg syscall (netbsd-arm64), const IFT_TUNNEL = 131
+pkg syscall (netbsd-arm64), const IFT_TUNNEL ideal-int
+pkg syscall (netbsd-arm64), const IFT_ULTRA = 29
+pkg syscall (netbsd-arm64), const IFT_ULTRA ideal-int
+pkg syscall (netbsd-arm64), const IFT_USB = 160
+pkg syscall (netbsd-arm64), const IFT_USB ideal-int
+pkg syscall (netbsd-arm64), const IFT_V11 = 64
+pkg syscall (netbsd-arm64), const IFT_V11 ideal-int
+pkg syscall (netbsd-arm64), const IFT_V35 = 45
+pkg syscall (netbsd-arm64), const IFT_V35 ideal-int
+pkg syscall (netbsd-arm64), const IFT_V36 = 65
+pkg syscall (netbsd-arm64), const IFT_V36 ideal-int
+pkg syscall (netbsd-arm64), const IFT_V37 = 120
+pkg syscall (netbsd-arm64), const IFT_V37 ideal-int
+pkg syscall (netbsd-arm64), const IFT_VDSL = 97
+pkg syscall (netbsd-arm64), const IFT_VDSL ideal-int
+pkg syscall (netbsd-arm64), const IFT_VIRTUALIPADDRESS = 112
+pkg syscall (netbsd-arm64), const IFT_VIRTUALIPADDRESS ideal-int
+pkg syscall (netbsd-arm64), const IFT_VIRTUALTG = 202
+pkg syscall (netbsd-arm64), const IFT_VIRTUALTG ideal-int
+pkg syscall (netbsd-arm64), const IFT_VOICEDID = 213
+pkg syscall (netbsd-arm64), const IFT_VOICEDID ideal-int
+pkg syscall (netbsd-arm64), const IFT_VOICEEM = 100
+pkg syscall (netbsd-arm64), const IFT_VOICEEM ideal-int
+pkg syscall (netbsd-arm64), const IFT_VOICEEMFGD = 211
+pkg syscall (netbsd-arm64), const IFT_VOICEEMFGD ideal-int
+pkg syscall (netbsd-arm64), const IFT_VOICEENCAP = 103
+pkg syscall (netbsd-arm64), const IFT_VOICEENCAP ideal-int
+pkg syscall (netbsd-arm64), const IFT_VOICEFGDEANA = 212
+pkg syscall (netbsd-arm64), const IFT_VOICEFGDEANA ideal-int
+pkg syscall (netbsd-arm64), const IFT_VOICEFXO = 101
+pkg syscall (netbsd-arm64), const IFT_VOICEFXO ideal-int
+pkg syscall (netbsd-arm64), const IFT_VOICEFXS = 102
+pkg syscall (netbsd-arm64), const IFT_VOICEFXS ideal-int
+pkg syscall (netbsd-arm64), const IFT_VOICEOVERATM = 152
+pkg syscall (netbsd-arm64), const IFT_VOICEOVERATM ideal-int
+pkg syscall (netbsd-arm64), const IFT_VOICEOVERCABLE = 198
+pkg syscall (netbsd-arm64), const IFT_VOICEOVERCABLE ideal-int
+pkg syscall (netbsd-arm64), const IFT_VOICEOVERFRAMERELAY = 153
+pkg syscall (netbsd-arm64), const IFT_VOICEOVERFRAMERELAY ideal-int
+pkg syscall (netbsd-arm64), const IFT_VOICEOVERIP = 104
+pkg syscall (netbsd-arm64), const IFT_VOICEOVERIP ideal-int
+pkg syscall (netbsd-arm64), const IFT_X213 = 93
+pkg syscall (netbsd-arm64), const IFT_X213 ideal-int
+pkg syscall (netbsd-arm64), const IFT_X25 = 5
+pkg syscall (netbsd-arm64), const IFT_X25 ideal-int
+pkg syscall (netbsd-arm64), const IFT_X25DDN = 4
+pkg syscall (netbsd-arm64), const IFT_X25DDN ideal-int
+pkg syscall (netbsd-arm64), const IFT_X25HUNTGROUP = 122
+pkg syscall (netbsd-arm64), const IFT_X25HUNTGROUP ideal-int
+pkg syscall (netbsd-arm64), const IFT_X25MLP = 121
+pkg syscall (netbsd-arm64), const IFT_X25MLP ideal-int
+pkg syscall (netbsd-arm64), const IFT_X25PLE = 40
+pkg syscall (netbsd-arm64), const IFT_X25PLE ideal-int
+pkg syscall (netbsd-arm64), const IFT_XETHER = 26
+pkg syscall (netbsd-arm64), const IFT_XETHER ideal-int
+pkg syscall (netbsd-arm64), const IGNBRK = 1
+pkg syscall (netbsd-arm64), const IGNBRK ideal-int
+pkg syscall (netbsd-arm64), const IGNCR = 128
+pkg syscall (netbsd-arm64), const IGNCR ideal-int
+pkg syscall (netbsd-arm64), const IGNPAR = 4
+pkg syscall (netbsd-arm64), const IGNPAR ideal-int
+pkg syscall (netbsd-arm64), const IMAXBEL = 8192
+pkg syscall (netbsd-arm64), const IMAXBEL ideal-int
+pkg syscall (netbsd-arm64), const INLCR = 64
+pkg syscall (netbsd-arm64), const INLCR ideal-int
+pkg syscall (netbsd-arm64), const INPCK = 16
+pkg syscall (netbsd-arm64), const INPCK ideal-int
+pkg syscall (netbsd-arm64), const IN_CLASSA_HOST = 16777215
+pkg syscall (netbsd-arm64), const IN_CLASSA_HOST ideal-int
+pkg syscall (netbsd-arm64), const IN_CLASSA_MAX = 128
+pkg syscall (netbsd-arm64), const IN_CLASSA_MAX ideal-int
+pkg syscall (netbsd-arm64), const IN_CLASSA_NET = 4278190080
+pkg syscall (netbsd-arm64), const IN_CLASSA_NET ideal-int
+pkg syscall (netbsd-arm64), const IN_CLASSA_NSHIFT = 24
+pkg syscall (netbsd-arm64), const IN_CLASSA_NSHIFT ideal-int
+pkg syscall (netbsd-arm64), const IN_CLASSB_HOST = 65535
+pkg syscall (netbsd-arm64), const IN_CLASSB_HOST ideal-int
+pkg syscall (netbsd-arm64), const IN_CLASSB_MAX = 65536
+pkg syscall (netbsd-arm64), const IN_CLASSB_MAX ideal-int
+pkg syscall (netbsd-arm64), const IN_CLASSB_NET = 4294901760
+pkg syscall (netbsd-arm64), const IN_CLASSB_NET ideal-int
+pkg syscall (netbsd-arm64), const IN_CLASSB_NSHIFT = 16
+pkg syscall (netbsd-arm64), const IN_CLASSB_NSHIFT ideal-int
+pkg syscall (netbsd-arm64), const IN_CLASSC_HOST = 255
+pkg syscall (netbsd-arm64), const IN_CLASSC_HOST ideal-int
+pkg syscall (netbsd-arm64), const IN_CLASSC_NET = 4294967040
+pkg syscall (netbsd-arm64), const IN_CLASSC_NET ideal-int
+pkg syscall (netbsd-arm64), const IN_CLASSC_NSHIFT = 8
+pkg syscall (netbsd-arm64), const IN_CLASSC_NSHIFT ideal-int
+pkg syscall (netbsd-arm64), const IN_CLASSD_HOST = 268435455
+pkg syscall (netbsd-arm64), const IN_CLASSD_HOST ideal-int
+pkg syscall (netbsd-arm64), const IN_CLASSD_NET = 4026531840
+pkg syscall (netbsd-arm64), const IN_CLASSD_NET ideal-int
+pkg syscall (netbsd-arm64), const IN_CLASSD_NSHIFT = 28
+pkg syscall (netbsd-arm64), const IN_CLASSD_NSHIFT ideal-int
+pkg syscall (netbsd-arm64), const IN_LOOPBACKNET = 127
+pkg syscall (netbsd-arm64), const IN_LOOPBACKNET ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_AH = 51
+pkg syscall (netbsd-arm64), const IPPROTO_AH ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_CARP = 112
+pkg syscall (netbsd-arm64), const IPPROTO_CARP ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_DONE = 257
+pkg syscall (netbsd-arm64), const IPPROTO_DONE ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_DSTOPTS = 60
+pkg syscall (netbsd-arm64), const IPPROTO_DSTOPTS ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_EGP = 8
+pkg syscall (netbsd-arm64), const IPPROTO_EGP ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_ENCAP = 98
+pkg syscall (netbsd-arm64), const IPPROTO_ENCAP ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_EON = 80
+pkg syscall (netbsd-arm64), const IPPROTO_EON ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_ESP = 50
+pkg syscall (netbsd-arm64), const IPPROTO_ESP ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_ETHERIP = 97
+pkg syscall (netbsd-arm64), const IPPROTO_ETHERIP ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_FRAGMENT = 44
+pkg syscall (netbsd-arm64), const IPPROTO_FRAGMENT ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_GGP = 3
+pkg syscall (netbsd-arm64), const IPPROTO_GGP ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_GRE = 47
+pkg syscall (netbsd-arm64), const IPPROTO_GRE ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_HOPOPTS = 0
+pkg syscall (netbsd-arm64), const IPPROTO_HOPOPTS ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_ICMP = 1
+pkg syscall (netbsd-arm64), const IPPROTO_ICMP ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_ICMPV6 = 58
+pkg syscall (netbsd-arm64), const IPPROTO_ICMPV6 ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_IDP = 22
+pkg syscall (netbsd-arm64), const IPPROTO_IDP ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_IGMP = 2
+pkg syscall (netbsd-arm64), const IPPROTO_IGMP ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_IPCOMP = 108
+pkg syscall (netbsd-arm64), const IPPROTO_IPCOMP ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_IPIP = 4
+pkg syscall (netbsd-arm64), const IPPROTO_IPIP ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_IPV4 = 4
+pkg syscall (netbsd-arm64), const IPPROTO_IPV4 ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_IPV6_ICMP = 58
+pkg syscall (netbsd-arm64), const IPPROTO_IPV6_ICMP ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_MAX = 256
+pkg syscall (netbsd-arm64), const IPPROTO_MAX ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_MAXID = 52
+pkg syscall (netbsd-arm64), const IPPROTO_MAXID ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_MOBILE = 55
+pkg syscall (netbsd-arm64), const IPPROTO_MOBILE ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_NONE = 59
+pkg syscall (netbsd-arm64), const IPPROTO_NONE ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_PFSYNC = 240
+pkg syscall (netbsd-arm64), const IPPROTO_PFSYNC ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_PIM = 103
+pkg syscall (netbsd-arm64), const IPPROTO_PIM ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_PUP = 12
+pkg syscall (netbsd-arm64), const IPPROTO_PUP ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_RAW = 255
+pkg syscall (netbsd-arm64), const IPPROTO_RAW ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_ROUTING = 43
+pkg syscall (netbsd-arm64), const IPPROTO_ROUTING ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_RSVP = 46
+pkg syscall (netbsd-arm64), const IPPROTO_RSVP ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_TP = 29
+pkg syscall (netbsd-arm64), const IPPROTO_TP ideal-int
+pkg syscall (netbsd-arm64), const IPPROTO_VRRP = 112
+pkg syscall (netbsd-arm64), const IPPROTO_VRRP ideal-int
+pkg syscall (netbsd-arm64), const IPV6_CHECKSUM = 26
+pkg syscall (netbsd-arm64), const IPV6_CHECKSUM ideal-int
+pkg syscall (netbsd-arm64), const IPV6_DEFAULT_MULTICAST_HOPS = 1
+pkg syscall (netbsd-arm64), const IPV6_DEFAULT_MULTICAST_HOPS ideal-int
+pkg syscall (netbsd-arm64), const IPV6_DEFAULT_MULTICAST_LOOP = 1
+pkg syscall (netbsd-arm64), const IPV6_DEFAULT_MULTICAST_LOOP ideal-int
+pkg syscall (netbsd-arm64), const IPV6_DEFHLIM = 64
+pkg syscall (netbsd-arm64), const IPV6_DEFHLIM ideal-int
+pkg syscall (netbsd-arm64), const IPV6_DONTFRAG = 62
+pkg syscall (netbsd-arm64), const IPV6_DONTFRAG ideal-int
+pkg syscall (netbsd-arm64), const IPV6_DSTOPTS = 50
+pkg syscall (netbsd-arm64), const IPV6_DSTOPTS ideal-int
+pkg syscall (netbsd-arm64), const IPV6_FAITH = 29
+pkg syscall (netbsd-arm64), const IPV6_FAITH ideal-int
+pkg syscall (netbsd-arm64), const IPV6_FLOWINFO_MASK = 4294967055
+pkg syscall (netbsd-arm64), const IPV6_FLOWINFO_MASK ideal-int
+pkg syscall (netbsd-arm64), const IPV6_FLOWLABEL_MASK = 4294905600
+pkg syscall (netbsd-arm64), const IPV6_FLOWLABEL_MASK ideal-int
+pkg syscall (netbsd-arm64), const IPV6_FRAGTTL = 120
+pkg syscall (netbsd-arm64), const IPV6_FRAGTTL ideal-int
+pkg syscall (netbsd-arm64), const IPV6_HLIMDEC = 1
+pkg syscall (netbsd-arm64), const IPV6_HLIMDEC ideal-int
+pkg syscall (netbsd-arm64), const IPV6_HOPLIMIT = 47
+pkg syscall (netbsd-arm64), const IPV6_HOPLIMIT ideal-int
+pkg syscall (netbsd-arm64), const IPV6_HOPOPTS = 49
+pkg syscall (netbsd-arm64), const IPV6_HOPOPTS ideal-int
+pkg syscall (netbsd-arm64), const IPV6_IPSEC_POLICY = 28
+pkg syscall (netbsd-arm64), const IPV6_IPSEC_POLICY ideal-int
+pkg syscall (netbsd-arm64), const IPV6_JOIN_GROUP = 12
+pkg syscall (netbsd-arm64), const IPV6_LEAVE_GROUP = 13
+pkg syscall (netbsd-arm64), const IPV6_MAXHLIM = 255
+pkg syscall (netbsd-arm64), const IPV6_MAXHLIM ideal-int
+pkg syscall (netbsd-arm64), const IPV6_MAXPACKET = 65535
+pkg syscall (netbsd-arm64), const IPV6_MAXPACKET ideal-int
+pkg syscall (netbsd-arm64), const IPV6_MMTU = 1280
+pkg syscall (netbsd-arm64), const IPV6_MMTU ideal-int
+pkg syscall (netbsd-arm64), const IPV6_MULTICAST_HOPS = 10
+pkg syscall (netbsd-arm64), const IPV6_MULTICAST_IF = 9
+pkg syscall (netbsd-arm64), const IPV6_MULTICAST_LOOP = 11
+pkg syscall (netbsd-arm64), const IPV6_NEXTHOP = 48
+pkg syscall (netbsd-arm64), const IPV6_NEXTHOP ideal-int
+pkg syscall (netbsd-arm64), const IPV6_PATHMTU = 44
+pkg syscall (netbsd-arm64), const IPV6_PATHMTU ideal-int
+pkg syscall (netbsd-arm64), const IPV6_PKTINFO = 46
+pkg syscall (netbsd-arm64), const IPV6_PKTINFO ideal-int
+pkg syscall (netbsd-arm64), const IPV6_PORTRANGE = 14
+pkg syscall (netbsd-arm64), const IPV6_PORTRANGE ideal-int
+pkg syscall (netbsd-arm64), const IPV6_PORTRANGE_DEFAULT = 0
+pkg syscall (netbsd-arm64), const IPV6_PORTRANGE_DEFAULT ideal-int
+pkg syscall (netbsd-arm64), const IPV6_PORTRANGE_HIGH = 1
+pkg syscall (netbsd-arm64), const IPV6_PORTRANGE_HIGH ideal-int
+pkg syscall (netbsd-arm64), const IPV6_PORTRANGE_LOW = 2
+pkg syscall (netbsd-arm64), const IPV6_PORTRANGE_LOW ideal-int
+pkg syscall (netbsd-arm64), const IPV6_RECVDSTOPTS = 40
+pkg syscall (netbsd-arm64), const IPV6_RECVDSTOPTS ideal-int
+pkg syscall (netbsd-arm64), const IPV6_RECVHOPLIMIT = 37
+pkg syscall (netbsd-arm64), const IPV6_RECVHOPLIMIT ideal-int
+pkg syscall (netbsd-arm64), const IPV6_RECVHOPOPTS = 39
+pkg syscall (netbsd-arm64), const IPV6_RECVHOPOPTS ideal-int
+pkg syscall (netbsd-arm64), const IPV6_RECVPATHMTU = 43
+pkg syscall (netbsd-arm64), const IPV6_RECVPATHMTU ideal-int
+pkg syscall (netbsd-arm64), const IPV6_RECVPKTINFO = 36
+pkg syscall (netbsd-arm64), const IPV6_RECVPKTINFO ideal-int
+pkg syscall (netbsd-arm64), const IPV6_RECVRTHDR = 38
+pkg syscall (netbsd-arm64), const IPV6_RECVRTHDR ideal-int
+pkg syscall (netbsd-arm64), const IPV6_RECVTCLASS = 57
+pkg syscall (netbsd-arm64), const IPV6_RECVTCLASS ideal-int
+pkg syscall (netbsd-arm64), const IPV6_RTHDR = 51
+pkg syscall (netbsd-arm64), const IPV6_RTHDR ideal-int
+pkg syscall (netbsd-arm64), const IPV6_RTHDRDSTOPTS = 35
+pkg syscall (netbsd-arm64), const IPV6_RTHDRDSTOPTS ideal-int
+pkg syscall (netbsd-arm64), const IPV6_RTHDR_LOOSE = 0
+pkg syscall (netbsd-arm64), const IPV6_RTHDR_LOOSE ideal-int
+pkg syscall (netbsd-arm64), const IPV6_RTHDR_STRICT = 1
+pkg syscall (netbsd-arm64), const IPV6_RTHDR_STRICT ideal-int
+pkg syscall (netbsd-arm64), const IPV6_RTHDR_TYPE_0 = 0
+pkg syscall (netbsd-arm64), const IPV6_RTHDR_TYPE_0 ideal-int
+pkg syscall (netbsd-arm64), const IPV6_SOCKOPT_RESERVED1 = 3
+pkg syscall (netbsd-arm64), const IPV6_SOCKOPT_RESERVED1 ideal-int
+pkg syscall (netbsd-arm64), const IPV6_TCLASS = 61
+pkg syscall (netbsd-arm64), const IPV6_TCLASS ideal-int
+pkg syscall (netbsd-arm64), const IPV6_UNICAST_HOPS = 4
+pkg syscall (netbsd-arm64), const IPV6_USE_MIN_MTU = 42
+pkg syscall (netbsd-arm64), const IPV6_USE_MIN_MTU ideal-int
+pkg syscall (netbsd-arm64), const IPV6_V6ONLY = 27
+pkg syscall (netbsd-arm64), const IPV6_VERSION = 96
+pkg syscall (netbsd-arm64), const IPV6_VERSION ideal-int
+pkg syscall (netbsd-arm64), const IPV6_VERSION_MASK = 240
+pkg syscall (netbsd-arm64), const IPV6_VERSION_MASK ideal-int
+pkg syscall (netbsd-arm64), const IP_ADD_MEMBERSHIP = 12
+pkg syscall (netbsd-arm64), const IP_DEFAULT_MULTICAST_LOOP = 1
+pkg syscall (netbsd-arm64), const IP_DEFAULT_MULTICAST_LOOP ideal-int
+pkg syscall (netbsd-arm64), const IP_DEFAULT_MULTICAST_TTL = 1
+pkg syscall (netbsd-arm64), const IP_DEFAULT_MULTICAST_TTL ideal-int
+pkg syscall (netbsd-arm64), const IP_DF = 16384
+pkg syscall (netbsd-arm64), const IP_DF ideal-int
+pkg syscall (netbsd-arm64), const IP_DROP_MEMBERSHIP = 13
+pkg syscall (netbsd-arm64), const IP_EF = 32768
+pkg syscall (netbsd-arm64), const IP_EF ideal-int
+pkg syscall (netbsd-arm64), const IP_ERRORMTU = 21
+pkg syscall (netbsd-arm64), const IP_ERRORMTU ideal-int
+pkg syscall (netbsd-arm64), const IP_HDRINCL = 2
+pkg syscall (netbsd-arm64), const IP_HDRINCL ideal-int
+pkg syscall (netbsd-arm64), const IP_IPSEC_POLICY = 22
+pkg syscall (netbsd-arm64), const IP_IPSEC_POLICY ideal-int
+pkg syscall (netbsd-arm64), const IP_MAXPACKET = 65535
+pkg syscall (netbsd-arm64), const IP_MAXPACKET ideal-int
+pkg syscall (netbsd-arm64), const IP_MAX_MEMBERSHIPS = 20
+pkg syscall (netbsd-arm64), const IP_MAX_MEMBERSHIPS ideal-int
+pkg syscall (netbsd-arm64), const IP_MF = 8192
+pkg syscall (netbsd-arm64), const IP_MF ideal-int
+pkg syscall (netbsd-arm64), const IP_MINFRAGSIZE = 69
+pkg syscall (netbsd-arm64), const IP_MINFRAGSIZE ideal-int
+pkg syscall (netbsd-arm64), const IP_MINTTL = 24
+pkg syscall (netbsd-arm64), const IP_MINTTL ideal-int
+pkg syscall (netbsd-arm64), const IP_MSS = 576
+pkg syscall (netbsd-arm64), const IP_MSS ideal-int
+pkg syscall (netbsd-arm64), const IP_MULTICAST_IF = 9
+pkg syscall (netbsd-arm64), const IP_MULTICAST_LOOP = 11
+pkg syscall (netbsd-arm64), const IP_MULTICAST_TTL = 10
+pkg syscall (netbsd-arm64), const IP_OFFMASK = 8191
+pkg syscall (netbsd-arm64), const IP_OFFMASK ideal-int
+pkg syscall (netbsd-arm64), const IP_OPTIONS = 1
+pkg syscall (netbsd-arm64), const IP_OPTIONS ideal-int
+pkg syscall (netbsd-arm64), const IP_PORTRANGE = 19
+pkg syscall (netbsd-arm64), const IP_PORTRANGE ideal-int
+pkg syscall (netbsd-arm64), const IP_PORTRANGE_DEFAULT = 0
+pkg syscall (netbsd-arm64), const IP_PORTRANGE_DEFAULT ideal-int
+pkg syscall (netbsd-arm64), const IP_PORTRANGE_HIGH = 1
+pkg syscall (netbsd-arm64), const IP_PORTRANGE_HIGH ideal-int
+pkg syscall (netbsd-arm64), const IP_PORTRANGE_LOW = 2
+pkg syscall (netbsd-arm64), const IP_PORTRANGE_LOW ideal-int
+pkg syscall (netbsd-arm64), const IP_RECVDSTADDR = 7
+pkg syscall (netbsd-arm64), const IP_RECVDSTADDR ideal-int
+pkg syscall (netbsd-arm64), const IP_RECVIF = 20
+pkg syscall (netbsd-arm64), const IP_RECVIF ideal-int
+pkg syscall (netbsd-arm64), const IP_RECVOPTS = 5
+pkg syscall (netbsd-arm64), const IP_RECVOPTS ideal-int
+pkg syscall (netbsd-arm64), const IP_RECVRETOPTS = 6
+pkg syscall (netbsd-arm64), const IP_RECVRETOPTS ideal-int
+pkg syscall (netbsd-arm64), const IP_RECVTTL = 23
+pkg syscall (netbsd-arm64), const IP_RECVTTL ideal-int
+pkg syscall (netbsd-arm64), const IP_RETOPTS = 8
+pkg syscall (netbsd-arm64), const IP_RETOPTS ideal-int
+pkg syscall (netbsd-arm64), const IP_RF = 32768
+pkg syscall (netbsd-arm64), const IP_RF ideal-int
+pkg syscall (netbsd-arm64), const IP_TOS = 3
+pkg syscall (netbsd-arm64), const IP_TTL = 4
+pkg syscall (netbsd-arm64), const ISIG = 128
+pkg syscall (netbsd-arm64), const ISIG ideal-int
+pkg syscall (netbsd-arm64), const ISTRIP = 32
+pkg syscall (netbsd-arm64), const ISTRIP ideal-int
+pkg syscall (netbsd-arm64), const IXANY = 2048
+pkg syscall (netbsd-arm64), const IXANY ideal-int
+pkg syscall (netbsd-arm64), const IXOFF = 1024
+pkg syscall (netbsd-arm64), const IXOFF ideal-int
+pkg syscall (netbsd-arm64), const IXON = 512
+pkg syscall (netbsd-arm64), const IXON ideal-int
+pkg syscall (netbsd-arm64), const LOCK_EX = 2
+pkg syscall (netbsd-arm64), const LOCK_EX ideal-int
+pkg syscall (netbsd-arm64), const LOCK_NB = 4
+pkg syscall (netbsd-arm64), const LOCK_NB ideal-int
+pkg syscall (netbsd-arm64), const LOCK_SH = 1
+pkg syscall (netbsd-arm64), const LOCK_SH ideal-int
+pkg syscall (netbsd-arm64), const LOCK_UN = 8
+pkg syscall (netbsd-arm64), const LOCK_UN ideal-int
+pkg syscall (netbsd-arm64), const MADV_DONTNEED = 4
+pkg syscall (netbsd-arm64), const MADV_DONTNEED ideal-int
+pkg syscall (netbsd-arm64), const MADV_FREE = 6
+pkg syscall (netbsd-arm64), const MADV_FREE ideal-int
+pkg syscall (netbsd-arm64), const MADV_NORMAL = 0
+pkg syscall (netbsd-arm64), const MADV_NORMAL ideal-int
+pkg syscall (netbsd-arm64), const MADV_RANDOM = 1
+pkg syscall (netbsd-arm64), const MADV_RANDOM ideal-int
+pkg syscall (netbsd-arm64), const MADV_SEQUENTIAL = 2
+pkg syscall (netbsd-arm64), const MADV_SEQUENTIAL ideal-int
+pkg syscall (netbsd-arm64), const MADV_SPACEAVAIL = 5
+pkg syscall (netbsd-arm64), const MADV_SPACEAVAIL ideal-int
+pkg syscall (netbsd-arm64), const MADV_WILLNEED = 3
+pkg syscall (netbsd-arm64), const MADV_WILLNEED ideal-int
+pkg syscall (netbsd-arm64), const MAP_ALIGNMENT_16MB = 402653184
+pkg syscall (netbsd-arm64), const MAP_ALIGNMENT_16MB ideal-int
+pkg syscall (netbsd-arm64), const MAP_ALIGNMENT_1TB = 671088640
+pkg syscall (netbsd-arm64), const MAP_ALIGNMENT_1TB ideal-int
+pkg syscall (netbsd-arm64), const MAP_ALIGNMENT_256TB = 805306368
+pkg syscall (netbsd-arm64), const MAP_ALIGNMENT_256TB ideal-int
+pkg syscall (netbsd-arm64), const MAP_ALIGNMENT_4GB = 536870912
+pkg syscall (netbsd-arm64), const MAP_ALIGNMENT_4GB ideal-int
+pkg syscall (netbsd-arm64), const MAP_ALIGNMENT_64KB = 268435456
+pkg syscall (netbsd-arm64), const MAP_ALIGNMENT_64KB ideal-int
+pkg syscall (netbsd-arm64), const MAP_ALIGNMENT_64PB = 939524096
+pkg syscall (netbsd-arm64), const MAP_ALIGNMENT_64PB ideal-int
+pkg syscall (netbsd-arm64), const MAP_ALIGNMENT_MASK = -16777216
+pkg syscall (netbsd-arm64), const MAP_ALIGNMENT_MASK ideal-int
+pkg syscall (netbsd-arm64), const MAP_ALIGNMENT_SHIFT = 24
+pkg syscall (netbsd-arm64), const MAP_ALIGNMENT_SHIFT ideal-int
+pkg syscall (netbsd-arm64), const MAP_ANON = 4096
+pkg syscall (netbsd-arm64), const MAP_ANON ideal-int
+pkg syscall (netbsd-arm64), const MAP_FILE = 0
+pkg syscall (netbsd-arm64), const MAP_FILE ideal-int
+pkg syscall (netbsd-arm64), const MAP_FIXED = 16
+pkg syscall (netbsd-arm64), const MAP_FIXED ideal-int
+pkg syscall (netbsd-arm64), const MAP_HASSEMAPHORE = 512
+pkg syscall (netbsd-arm64), const MAP_HASSEMAPHORE ideal-int
+pkg syscall (netbsd-arm64), const MAP_INHERIT = 128
+pkg syscall (netbsd-arm64), const MAP_INHERIT ideal-int
+pkg syscall (netbsd-arm64), const MAP_INHERIT_COPY = 1
+pkg syscall (netbsd-arm64), const MAP_INHERIT_COPY ideal-int
+pkg syscall (netbsd-arm64), const MAP_INHERIT_DEFAULT = 1
+pkg syscall (netbsd-arm64), const MAP_INHERIT_DEFAULT ideal-int
+pkg syscall (netbsd-arm64), const MAP_INHERIT_DONATE_COPY = 3
+pkg syscall (netbsd-arm64), const MAP_INHERIT_DONATE_COPY ideal-int
+pkg syscall (netbsd-arm64), const MAP_INHERIT_NONE = 2
+pkg syscall (netbsd-arm64), const MAP_INHERIT_NONE ideal-int
+pkg syscall (netbsd-arm64), const MAP_INHERIT_SHARE = 0
+pkg syscall (netbsd-arm64), const MAP_INHERIT_SHARE ideal-int
+pkg syscall (netbsd-arm64), const MAP_NORESERVE = 64
+pkg syscall (netbsd-arm64), const MAP_NORESERVE ideal-int
+pkg syscall (netbsd-arm64), const MAP_PRIVATE = 2
+pkg syscall (netbsd-arm64), const MAP_PRIVATE ideal-int
+pkg syscall (netbsd-arm64), const MAP_RENAME = 32
+pkg syscall (netbsd-arm64), const MAP_RENAME ideal-int
+pkg syscall (netbsd-arm64), const MAP_SHARED = 1
+pkg syscall (netbsd-arm64), const MAP_SHARED ideal-int
+pkg syscall (netbsd-arm64), const MAP_STACK = 8192
+pkg syscall (netbsd-arm64), const MAP_STACK ideal-int
+pkg syscall (netbsd-arm64), const MAP_TRYFIXED = 1024
+pkg syscall (netbsd-arm64), const MAP_TRYFIXED ideal-int
+pkg syscall (netbsd-arm64), const MAP_WIRED = 2048
+pkg syscall (netbsd-arm64), const MAP_WIRED ideal-int
+pkg syscall (netbsd-arm64), const MCL_CURRENT = 1
+pkg syscall (netbsd-arm64), const MCL_CURRENT ideal-int
+pkg syscall (netbsd-arm64), const MCL_FUTURE = 2
+pkg syscall (netbsd-arm64), const MCL_FUTURE ideal-int
+pkg syscall (netbsd-arm64), const MSG_BCAST = 256
+pkg syscall (netbsd-arm64), const MSG_BCAST ideal-int
+pkg syscall (netbsd-arm64), const MSG_CMSG_CLOEXEC = 2048
+pkg syscall (netbsd-arm64), const MSG_CMSG_CLOEXEC ideal-int
+pkg syscall (netbsd-arm64), const MSG_CONTROLMBUF = 33554432
+pkg syscall (netbsd-arm64), const MSG_CONTROLMBUF ideal-int
+pkg syscall (netbsd-arm64), const MSG_CTRUNC = 32
+pkg syscall (netbsd-arm64), const MSG_CTRUNC ideal-int
+pkg syscall (netbsd-arm64), const MSG_DONTROUTE = 4
+pkg syscall (netbsd-arm64), const MSG_DONTROUTE ideal-int
+pkg syscall (netbsd-arm64), const MSG_DONTWAIT = 128
+pkg syscall (netbsd-arm64), const MSG_DONTWAIT ideal-int
+pkg syscall (netbsd-arm64), const MSG_EOR = 8
+pkg syscall (netbsd-arm64), const MSG_EOR ideal-int
+pkg syscall (netbsd-arm64), const MSG_IOVUSRSPACE = 67108864
+pkg syscall (netbsd-arm64), const MSG_IOVUSRSPACE ideal-int
+pkg syscall (netbsd-arm64), const MSG_LENUSRSPACE = 134217728
+pkg syscall (netbsd-arm64), const MSG_LENUSRSPACE ideal-int
+pkg syscall (netbsd-arm64), const MSG_MCAST = 512
+pkg syscall (netbsd-arm64), const MSG_MCAST ideal-int
+pkg syscall (netbsd-arm64), const MSG_NAMEMBUF = 16777216
+pkg syscall (netbsd-arm64), const MSG_NAMEMBUF ideal-int
+pkg syscall (netbsd-arm64), const MSG_NBIO = 4096
+pkg syscall (netbsd-arm64), const MSG_NBIO ideal-int
+pkg syscall (netbsd-arm64), const MSG_NOSIGNAL = 1024
+pkg syscall (netbsd-arm64), const MSG_NOSIGNAL ideal-int
+pkg syscall (netbsd-arm64), const MSG_OOB = 1
+pkg syscall (netbsd-arm64), const MSG_OOB ideal-int
+pkg syscall (netbsd-arm64), const MSG_PEEK = 2
+pkg syscall (netbsd-arm64), const MSG_PEEK ideal-int
+pkg syscall (netbsd-arm64), const MSG_TRUNC = 16
+pkg syscall (netbsd-arm64), const MSG_TRUNC ideal-int
+pkg syscall (netbsd-arm64), const MSG_USERFLAGS = 16777215
+pkg syscall (netbsd-arm64), const MSG_USERFLAGS ideal-int
+pkg syscall (netbsd-arm64), const MSG_WAITALL = 64
+pkg syscall (netbsd-arm64), const MSG_WAITALL ideal-int
+pkg syscall (netbsd-arm64), const MS_ASYNC = 1
+pkg syscall (netbsd-arm64), const MS_ASYNC ideal-int
+pkg syscall (netbsd-arm64), const MS_INVALIDATE = 2
+pkg syscall (netbsd-arm64), const MS_INVALIDATE ideal-int
+pkg syscall (netbsd-arm64), const MS_SYNC = 4
+pkg syscall (netbsd-arm64), const MS_SYNC ideal-int
+pkg syscall (netbsd-arm64), const NAME_MAX = 511
+pkg syscall (netbsd-arm64), const NAME_MAX ideal-int
+pkg syscall (netbsd-arm64), const NET_RT_DUMP = 1
+pkg syscall (netbsd-arm64), const NET_RT_DUMP ideal-int
+pkg syscall (netbsd-arm64), const NET_RT_FLAGS = 2
+pkg syscall (netbsd-arm64), const NET_RT_FLAGS ideal-int
+pkg syscall (netbsd-arm64), const NET_RT_IFLIST = 5
+pkg syscall (netbsd-arm64), const NET_RT_IFLIST ideal-int
+pkg syscall (netbsd-arm64), const NET_RT_MAXID = 6
+pkg syscall (netbsd-arm64), const NET_RT_MAXID ideal-int
+pkg syscall (netbsd-arm64), const NET_RT_OIFLIST = 4
+pkg syscall (netbsd-arm64), const NET_RT_OIFLIST ideal-int
+pkg syscall (netbsd-arm64), const NET_RT_OOIFLIST = 3
+pkg syscall (netbsd-arm64), const NET_RT_OOIFLIST ideal-int
+pkg syscall (netbsd-arm64), const NOFLSH = 2147483648
+pkg syscall (netbsd-arm64), const NOFLSH ideal-int
+pkg syscall (netbsd-arm64), const NOTE_ATTRIB = 8
+pkg syscall (netbsd-arm64), const NOTE_ATTRIB ideal-int
+pkg syscall (netbsd-arm64), const NOTE_CHILD = 4
+pkg syscall (netbsd-arm64), const NOTE_CHILD ideal-int
+pkg syscall (netbsd-arm64), const NOTE_DELETE = 1
+pkg syscall (netbsd-arm64), const NOTE_DELETE ideal-int
+pkg syscall (netbsd-arm64), const NOTE_EXEC = 536870912
+pkg syscall (netbsd-arm64), const NOTE_EXEC ideal-int
+pkg syscall (netbsd-arm64), const NOTE_EXIT = 2147483648
+pkg syscall (netbsd-arm64), const NOTE_EXIT ideal-int
+pkg syscall (netbsd-arm64), const NOTE_EXTEND = 4
+pkg syscall (netbsd-arm64), const NOTE_EXTEND ideal-int
+pkg syscall (netbsd-arm64), const NOTE_FORK = 1073741824
+pkg syscall (netbsd-arm64), const NOTE_FORK ideal-int
+pkg syscall (netbsd-arm64), const NOTE_LINK = 16
+pkg syscall (netbsd-arm64), const NOTE_LINK ideal-int
+pkg syscall (netbsd-arm64), const NOTE_LOWAT = 1
+pkg syscall (netbsd-arm64), const NOTE_LOWAT ideal-int
+pkg syscall (netbsd-arm64), const NOTE_PCTRLMASK = 4026531840
+pkg syscall (netbsd-arm64), const NOTE_PCTRLMASK ideal-int
+pkg syscall (netbsd-arm64), const NOTE_PDATAMASK = 1048575
+pkg syscall (netbsd-arm64), const NOTE_PDATAMASK ideal-int
+pkg syscall (netbsd-arm64), const NOTE_RENAME = 32
+pkg syscall (netbsd-arm64), const NOTE_RENAME ideal-int
+pkg syscall (netbsd-arm64), const NOTE_REVOKE = 64
+pkg syscall (netbsd-arm64), const NOTE_REVOKE ideal-int
+pkg syscall (netbsd-arm64), const NOTE_TRACK = 1
+pkg syscall (netbsd-arm64), const NOTE_TRACK ideal-int
+pkg syscall (netbsd-arm64), const NOTE_TRACKERR = 2
+pkg syscall (netbsd-arm64), const NOTE_TRACKERR ideal-int
+pkg syscall (netbsd-arm64), const NOTE_WRITE = 2
+pkg syscall (netbsd-arm64), const NOTE_WRITE ideal-int
+pkg syscall (netbsd-arm64), const OCRNL = 16
+pkg syscall (netbsd-arm64), const OCRNL ideal-int
+pkg syscall (netbsd-arm64), const OFIOGETBMAP = 3221513850
+pkg syscall (netbsd-arm64), const OFIOGETBMAP ideal-int
+pkg syscall (netbsd-arm64), const ONLCR = 2
+pkg syscall (netbsd-arm64), const ONLCR ideal-int
+pkg syscall (netbsd-arm64), const ONLRET = 64
+pkg syscall (netbsd-arm64), const ONLRET ideal-int
+pkg syscall (netbsd-arm64), const ONOCR = 32
+pkg syscall (netbsd-arm64), const ONOCR ideal-int
+pkg syscall (netbsd-arm64), const ONOEOT = 8
+pkg syscall (netbsd-arm64), const ONOEOT ideal-int
+pkg syscall (netbsd-arm64), const OPOST = 1
+pkg syscall (netbsd-arm64), const OPOST ideal-int
+pkg syscall (netbsd-arm64), const O_ACCMODE = 3
+pkg syscall (netbsd-arm64), const O_ACCMODE ideal-int
+pkg syscall (netbsd-arm64), const O_ALT_IO = 262144
+pkg syscall (netbsd-arm64), const O_ALT_IO ideal-int
+pkg syscall (netbsd-arm64), const O_APPEND = 8
+pkg syscall (netbsd-arm64), const O_ASYNC = 64
+pkg syscall (netbsd-arm64), const O_CLOEXEC = 4194304
+pkg syscall (netbsd-arm64), const O_CREAT = 512
+pkg syscall (netbsd-arm64), const O_DIRECT = 524288
+pkg syscall (netbsd-arm64), const O_DIRECT ideal-int
+pkg syscall (netbsd-arm64), const O_DIRECTORY = 2097152
+pkg syscall (netbsd-arm64), const O_DIRECTORY ideal-int
+pkg syscall (netbsd-arm64), const O_DSYNC = 65536
+pkg syscall (netbsd-arm64), const O_DSYNC ideal-int
+pkg syscall (netbsd-arm64), const O_EXCL = 2048
+pkg syscall (netbsd-arm64), const O_EXLOCK = 32
+pkg syscall (netbsd-arm64), const O_EXLOCK ideal-int
+pkg syscall (netbsd-arm64), const O_FSYNC = 128
+pkg syscall (netbsd-arm64), const O_FSYNC ideal-int
+pkg syscall (netbsd-arm64), const O_NDELAY = 4
+pkg syscall (netbsd-arm64), const O_NDELAY ideal-int
+pkg syscall (netbsd-arm64), const O_NOCTTY = 32768
+pkg syscall (netbsd-arm64), const O_NOFOLLOW = 256
+pkg syscall (netbsd-arm64), const O_NOFOLLOW ideal-int
+pkg syscall (netbsd-arm64), const O_NONBLOCK = 4
+pkg syscall (netbsd-arm64), const O_NOSIGPIPE = 16777216
+pkg syscall (netbsd-arm64), const O_NOSIGPIPE ideal-int
+pkg syscall (netbsd-arm64), const O_RSYNC = 131072
+pkg syscall (netbsd-arm64), const O_RSYNC ideal-int
+pkg syscall (netbsd-arm64), const O_SHLOCK = 16
+pkg syscall (netbsd-arm64), const O_SHLOCK ideal-int
+pkg syscall (netbsd-arm64), const O_SYNC = 128
+pkg syscall (netbsd-arm64), const O_TRUNC = 1024
+pkg syscall (netbsd-arm64), const PARENB = 4096
+pkg syscall (netbsd-arm64), const PARENB ideal-int
+pkg syscall (netbsd-arm64), const PARMRK = 8
+pkg syscall (netbsd-arm64), const PARMRK ideal-int
+pkg syscall (netbsd-arm64), const PARODD = 8192
+pkg syscall (netbsd-arm64), const PARODD ideal-int
+pkg syscall (netbsd-arm64), const PENDIN = 536870912
+pkg syscall (netbsd-arm64), const PENDIN ideal-int
+pkg syscall (netbsd-arm64), const PRIO_PGRP = 1
+pkg syscall (netbsd-arm64), const PRIO_PGRP ideal-int
+pkg syscall (netbsd-arm64), const PRIO_PROCESS = 0
+pkg syscall (netbsd-arm64), const PRIO_PROCESS ideal-int
+pkg syscall (netbsd-arm64), const PRIO_USER = 2
+pkg syscall (netbsd-arm64), const PRIO_USER ideal-int
+pkg syscall (netbsd-arm64), const PRI_IOFLUSH = 124
+pkg syscall (netbsd-arm64), const PRI_IOFLUSH ideal-int
+pkg syscall (netbsd-arm64), const PROT_EXEC = 4
+pkg syscall (netbsd-arm64), const PROT_EXEC ideal-int
+pkg syscall (netbsd-arm64), const PROT_NONE = 0
+pkg syscall (netbsd-arm64), const PROT_NONE ideal-int
+pkg syscall (netbsd-arm64), const PROT_READ = 1
+pkg syscall (netbsd-arm64), const PROT_READ ideal-int
+pkg syscall (netbsd-arm64), const PROT_WRITE = 2
+pkg syscall (netbsd-arm64), const PROT_WRITE ideal-int
+pkg syscall (netbsd-arm64), const PTRACE_CONT = 7
+pkg syscall (netbsd-arm64), const PTRACE_CONT ideal-int
+pkg syscall (netbsd-arm64), const PTRACE_KILL = 8
+pkg syscall (netbsd-arm64), const PTRACE_KILL ideal-int
+pkg syscall (netbsd-arm64), const PTRACE_TRACEME = 0
+pkg syscall (netbsd-arm64), const PTRACE_TRACEME ideal-int
+pkg syscall (netbsd-arm64), const RLIMIT_AS = 10
+pkg syscall (netbsd-arm64), const RLIMIT_AS ideal-int
+pkg syscall (netbsd-arm64), const RLIMIT_CORE = 4
+pkg syscall (netbsd-arm64), const RLIMIT_CORE ideal-int
+pkg syscall (netbsd-arm64), const RLIMIT_CPU = 0
+pkg syscall (netbsd-arm64), const RLIMIT_CPU ideal-int
+pkg syscall (netbsd-arm64), const RLIMIT_DATA = 2
+pkg syscall (netbsd-arm64), const RLIMIT_DATA ideal-int
+pkg syscall (netbsd-arm64), const RLIMIT_FSIZE = 1
+pkg syscall (netbsd-arm64), const RLIMIT_FSIZE ideal-int
+pkg syscall (netbsd-arm64), const RLIMIT_NOFILE = 8
+pkg syscall (netbsd-arm64), const RLIMIT_NOFILE ideal-int
+pkg syscall (netbsd-arm64), const RLIMIT_STACK = 3
+pkg syscall (netbsd-arm64), const RLIMIT_STACK ideal-int
+pkg syscall (netbsd-arm64), const RLIM_INFINITY = 9223372036854775807
+pkg syscall (netbsd-arm64), const RLIM_INFINITY ideal-int
+pkg syscall (netbsd-arm64), const RTAX_AUTHOR = 6
+pkg syscall (netbsd-arm64), const RTAX_AUTHOR ideal-int
+pkg syscall (netbsd-arm64), const RTAX_BRD = 7
+pkg syscall (netbsd-arm64), const RTAX_BRD ideal-int
+pkg syscall (netbsd-arm64), const RTAX_DST = 0
+pkg syscall (netbsd-arm64), const RTAX_DST ideal-int
+pkg syscall (netbsd-arm64), const RTAX_GATEWAY = 1
+pkg syscall (netbsd-arm64), const RTAX_GATEWAY ideal-int
+pkg syscall (netbsd-arm64), const RTAX_GENMASK = 3
+pkg syscall (netbsd-arm64), const RTAX_GENMASK ideal-int
+pkg syscall (netbsd-arm64), const RTAX_IFA = 5
+pkg syscall (netbsd-arm64), const RTAX_IFA ideal-int
+pkg syscall (netbsd-arm64), const RTAX_IFP = 4
+pkg syscall (netbsd-arm64), const RTAX_IFP ideal-int
+pkg syscall (netbsd-arm64), const RTAX_MAX = 9
+pkg syscall (netbsd-arm64), const RTAX_MAX ideal-int
+pkg syscall (netbsd-arm64), const RTAX_NETMASK = 2
+pkg syscall (netbsd-arm64), const RTAX_NETMASK ideal-int
+pkg syscall (netbsd-arm64), const RTAX_TAG = 8
+pkg syscall (netbsd-arm64), const RTAX_TAG ideal-int
+pkg syscall (netbsd-arm64), const RTA_AUTHOR = 64
+pkg syscall (netbsd-arm64), const RTA_AUTHOR ideal-int
+pkg syscall (netbsd-arm64), const RTA_BRD = 128
+pkg syscall (netbsd-arm64), const RTA_BRD ideal-int
+pkg syscall (netbsd-arm64), const RTA_DST = 1
+pkg syscall (netbsd-arm64), const RTA_DST ideal-int
+pkg syscall (netbsd-arm64), const RTA_GATEWAY = 2
+pkg syscall (netbsd-arm64), const RTA_GATEWAY ideal-int
+pkg syscall (netbsd-arm64), const RTA_GENMASK = 8
+pkg syscall (netbsd-arm64), const RTA_GENMASK ideal-int
+pkg syscall (netbsd-arm64), const RTA_IFA = 32
+pkg syscall (netbsd-arm64), const RTA_IFA ideal-int
+pkg syscall (netbsd-arm64), const RTA_IFP = 16
+pkg syscall (netbsd-arm64), const RTA_IFP ideal-int
+pkg syscall (netbsd-arm64), const RTA_NETMASK = 4
+pkg syscall (netbsd-arm64), const RTA_NETMASK ideal-int
+pkg syscall (netbsd-arm64), const RTA_TAG = 256
+pkg syscall (netbsd-arm64), const RTA_TAG ideal-int
+pkg syscall (netbsd-arm64), const RTF_ANNOUNCE = 131072
+pkg syscall (netbsd-arm64), const RTF_ANNOUNCE ideal-int
+pkg syscall (netbsd-arm64), const RTF_BLACKHOLE = 4096
+pkg syscall (netbsd-arm64), const RTF_BLACKHOLE ideal-int
+pkg syscall (netbsd-arm64), const RTF_CLONED = 8192
+pkg syscall (netbsd-arm64), const RTF_CLONED ideal-int
+pkg syscall (netbsd-arm64), const RTF_CLONING = 256
+pkg syscall (netbsd-arm64), const RTF_CLONING ideal-int
+pkg syscall (netbsd-arm64), const RTF_DONE = 64
+pkg syscall (netbsd-arm64), const RTF_DONE ideal-int
+pkg syscall (netbsd-arm64), const RTF_DYNAMIC = 16
+pkg syscall (netbsd-arm64), const RTF_DYNAMIC ideal-int
+pkg syscall (netbsd-arm64), const RTF_GATEWAY = 2
+pkg syscall (netbsd-arm64), const RTF_GATEWAY ideal-int
+pkg syscall (netbsd-arm64), const RTF_HOST = 4
+pkg syscall (netbsd-arm64), const RTF_HOST ideal-int
+pkg syscall (netbsd-arm64), const RTF_LLINFO = 1024
+pkg syscall (netbsd-arm64), const RTF_LLINFO ideal-int
+pkg syscall (netbsd-arm64), const RTF_MASK = 128
+pkg syscall (netbsd-arm64), const RTF_MASK ideal-int
+pkg syscall (netbsd-arm64), const RTF_MODIFIED = 32
+pkg syscall (netbsd-arm64), const RTF_MODIFIED ideal-int
+pkg syscall (netbsd-arm64), const RTF_PROTO1 = 32768
+pkg syscall (netbsd-arm64), const RTF_PROTO1 ideal-int
+pkg syscall (netbsd-arm64), const RTF_PROTO2 = 16384
+pkg syscall (netbsd-arm64), const RTF_PROTO2 ideal-int
+pkg syscall (netbsd-arm64), const RTF_REJECT = 8
+pkg syscall (netbsd-arm64), const RTF_REJECT ideal-int
+pkg syscall (netbsd-arm64), const RTF_SRC = 65536
+pkg syscall (netbsd-arm64), const RTF_SRC ideal-int
+pkg syscall (netbsd-arm64), const RTF_STATIC = 2048
+pkg syscall (netbsd-arm64), const RTF_STATIC ideal-int
+pkg syscall (netbsd-arm64), const RTF_UP = 1
+pkg syscall (netbsd-arm64), const RTF_UP ideal-int
+pkg syscall (netbsd-arm64), const RTF_XRESOLVE = 512
+pkg syscall (netbsd-arm64), const RTF_XRESOLVE ideal-int
+pkg syscall (netbsd-arm64), const RTM_ADD = 1
+pkg syscall (netbsd-arm64), const RTM_ADD ideal-int
+pkg syscall (netbsd-arm64), const RTM_CHANGE = 3
+pkg syscall (netbsd-arm64), const RTM_CHANGE ideal-int
+pkg syscall (netbsd-arm64), const RTM_CHGADDR = 21
+pkg syscall (netbsd-arm64), const RTM_CHGADDR ideal-int
+pkg syscall (netbsd-arm64), const RTM_DELADDR = 13
+pkg syscall (netbsd-arm64), const RTM_DELADDR ideal-int
+pkg syscall (netbsd-arm64), const RTM_DELETE = 2
+pkg syscall (netbsd-arm64), const RTM_DELETE ideal-int
+pkg syscall (netbsd-arm64), const RTM_GET = 4
+pkg syscall (netbsd-arm64), const RTM_GET ideal-int
+pkg syscall (netbsd-arm64), const RTM_IEEE80211 = 17
+pkg syscall (netbsd-arm64), const RTM_IEEE80211 ideal-int
+pkg syscall (netbsd-arm64), const RTM_IFANNOUNCE = 16
+pkg syscall (netbsd-arm64), const RTM_IFANNOUNCE ideal-int
+pkg syscall (netbsd-arm64), const RTM_IFINFO = 20
+pkg syscall (netbsd-arm64), const RTM_IFINFO ideal-int
+pkg syscall (netbsd-arm64), const RTM_LLINFO_UPD = 19
+pkg syscall (netbsd-arm64), const RTM_LLINFO_UPD ideal-int
+pkg syscall (netbsd-arm64), const RTM_LOCK = 8
+pkg syscall (netbsd-arm64), const RTM_LOCK ideal-int
+pkg syscall (netbsd-arm64), const RTM_LOSING = 5
+pkg syscall (netbsd-arm64), const RTM_LOSING ideal-int
+pkg syscall (netbsd-arm64), const RTM_MISS = 7
+pkg syscall (netbsd-arm64), const RTM_MISS ideal-int
+pkg syscall (netbsd-arm64), const RTM_NEWADDR = 12
+pkg syscall (netbsd-arm64), const RTM_NEWADDR ideal-int
+pkg syscall (netbsd-arm64), const RTM_OIFINFO = 15
+pkg syscall (netbsd-arm64), const RTM_OIFINFO ideal-int
+pkg syscall (netbsd-arm64), const RTM_OLDADD = 9
+pkg syscall (netbsd-arm64), const RTM_OLDADD ideal-int
+pkg syscall (netbsd-arm64), const RTM_OLDDEL = 10
+pkg syscall (netbsd-arm64), const RTM_OLDDEL ideal-int
+pkg syscall (netbsd-arm64), const RTM_OOIFINFO = 14
+pkg syscall (netbsd-arm64), const RTM_OOIFINFO ideal-int
+pkg syscall (netbsd-arm64), const RTM_REDIRECT = 6
+pkg syscall (netbsd-arm64), const RTM_REDIRECT ideal-int
+pkg syscall (netbsd-arm64), const RTM_RESOLVE = 11
+pkg syscall (netbsd-arm64), const RTM_RESOLVE ideal-int
+pkg syscall (netbsd-arm64), const RTM_RTTUNIT = 1000000
+pkg syscall (netbsd-arm64), const RTM_RTTUNIT ideal-int
+pkg syscall (netbsd-arm64), const RTM_SETGATE = 18
+pkg syscall (netbsd-arm64), const RTM_SETGATE ideal-int
+pkg syscall (netbsd-arm64), const RTM_VERSION = 4
+pkg syscall (netbsd-arm64), const RTM_VERSION ideal-int
+pkg syscall (netbsd-arm64), const RTV_EXPIRE = 4
+pkg syscall (netbsd-arm64), const RTV_EXPIRE ideal-int
+pkg syscall (netbsd-arm64), const RTV_HOPCOUNT = 2
+pkg syscall (netbsd-arm64), const RTV_HOPCOUNT ideal-int
+pkg syscall (netbsd-arm64), const RTV_MTU = 1
+pkg syscall (netbsd-arm64), const RTV_MTU ideal-int
+pkg syscall (netbsd-arm64), const RTV_RPIPE = 8
+pkg syscall (netbsd-arm64), const RTV_RPIPE ideal-int
+pkg syscall (netbsd-arm64), const RTV_RTT = 64
+pkg syscall (netbsd-arm64), const RTV_RTT ideal-int
+pkg syscall (netbsd-arm64), const RTV_RTTVAR = 128
+pkg syscall (netbsd-arm64), const RTV_RTTVAR ideal-int
+pkg syscall (netbsd-arm64), const RTV_SPIPE = 16
+pkg syscall (netbsd-arm64), const RTV_SPIPE ideal-int
+pkg syscall (netbsd-arm64), const RTV_SSTHRESH = 32
+pkg syscall (netbsd-arm64), const RTV_SSTHRESH ideal-int
+pkg syscall (netbsd-arm64), const RUSAGE_CHILDREN = -1
+pkg syscall (netbsd-arm64), const RUSAGE_CHILDREN ideal-int
+pkg syscall (netbsd-arm64), const RUSAGE_SELF = 0
+pkg syscall (netbsd-arm64), const RUSAGE_SELF ideal-int
+pkg syscall (netbsd-arm64), const SCM_CREDS = 4
+pkg syscall (netbsd-arm64), const SCM_CREDS ideal-int
+pkg syscall (netbsd-arm64), const SCM_RIGHTS = 1
+pkg syscall (netbsd-arm64), const SCM_RIGHTS ideal-int
+pkg syscall (netbsd-arm64), const SCM_TIMESTAMP = 8
+pkg syscall (netbsd-arm64), const SCM_TIMESTAMP ideal-int
+pkg syscall (netbsd-arm64), const SIGBUS = 10
+pkg syscall (netbsd-arm64), const SIGCHLD = 20
+pkg syscall (netbsd-arm64), const SIGCHLD Signal
+pkg syscall (netbsd-arm64), const SIGCONT = 19
+pkg syscall (netbsd-arm64), const SIGCONT Signal
+pkg syscall (netbsd-arm64), const SIGEMT = 7
+pkg syscall (netbsd-arm64), const SIGEMT Signal
+pkg syscall (netbsd-arm64), const SIGINFO = 29
+pkg syscall (netbsd-arm64), const SIGINFO Signal
+pkg syscall (netbsd-arm64), const SIGIO = 23
+pkg syscall (netbsd-arm64), const SIGIO Signal
+pkg syscall (netbsd-arm64), const SIGIOT = 6
+pkg syscall (netbsd-arm64), const SIGIOT Signal
+pkg syscall (netbsd-arm64), const SIGPROF = 27
+pkg syscall (netbsd-arm64), const SIGPROF Signal
+pkg syscall (netbsd-arm64), const SIGPWR = 32
+pkg syscall (netbsd-arm64), const SIGPWR Signal
+pkg syscall (netbsd-arm64), const SIGSTOP = 17
+pkg syscall (netbsd-arm64), const SIGSTOP Signal
+pkg syscall (netbsd-arm64), const SIGSYS = 12
+pkg syscall (netbsd-arm64), const SIGSYS Signal
+pkg syscall (netbsd-arm64), const SIGTSTP = 18
+pkg syscall (netbsd-arm64), const SIGTSTP Signal
+pkg syscall (netbsd-arm64), const SIGTTIN = 21
+pkg syscall (netbsd-arm64), const SIGTTIN Signal
+pkg syscall (netbsd-arm64), const SIGTTOU = 22
+pkg syscall (netbsd-arm64), const SIGTTOU Signal
+pkg syscall (netbsd-arm64), const SIGURG = 16
+pkg syscall (netbsd-arm64), const SIGURG Signal
+pkg syscall (netbsd-arm64), const SIGUSR1 = 30
+pkg syscall (netbsd-arm64), const SIGUSR1 Signal
+pkg syscall (netbsd-arm64), const SIGUSR2 = 31
+pkg syscall (netbsd-arm64), const SIGUSR2 Signal
+pkg syscall (netbsd-arm64), const SIGVTALRM = 26
+pkg syscall (netbsd-arm64), const SIGVTALRM Signal
+pkg syscall (netbsd-arm64), const SIGWINCH = 28
+pkg syscall (netbsd-arm64), const SIGWINCH Signal
+pkg syscall (netbsd-arm64), const SIGXCPU = 24
+pkg syscall (netbsd-arm64), const SIGXCPU Signal
+pkg syscall (netbsd-arm64), const SIGXFSZ = 25
+pkg syscall (netbsd-arm64), const SIGXFSZ Signal
+pkg syscall (netbsd-arm64), const SIOCADDMULTI = 2156947761
+pkg syscall (netbsd-arm64), const SIOCADDMULTI ideal-int
+pkg syscall (netbsd-arm64), const SIOCADDRT = 2151182858
+pkg syscall (netbsd-arm64), const SIOCADDRT ideal-int
+pkg syscall (netbsd-arm64), const SIOCAIFADDR = 2151704858
+pkg syscall (netbsd-arm64), const SIOCAIFADDR ideal-int
+pkg syscall (netbsd-arm64), const SIOCALIFADDR = 2165860636
+pkg syscall (netbsd-arm64), const SIOCALIFADDR ideal-int
+pkg syscall (netbsd-arm64), const SIOCATMARK = 1074033415
+pkg syscall (netbsd-arm64), const SIOCATMARK ideal-int
+pkg syscall (netbsd-arm64), const SIOCDELMULTI = 2156947762
+pkg syscall (netbsd-arm64), const SIOCDELMULTI ideal-int
+pkg syscall (netbsd-arm64), const SIOCDELRT = 2151182859
+pkg syscall (netbsd-arm64), const SIOCDELRT ideal-int
+pkg syscall (netbsd-arm64), const SIOCDIFADDR = 2156947737
+pkg syscall (netbsd-arm64), const SIOCDIFADDR ideal-int
+pkg syscall (netbsd-arm64), const SIOCDIFPHYADDR = 2156947785
+pkg syscall (netbsd-arm64), const SIOCDIFPHYADDR ideal-int
+pkg syscall (netbsd-arm64), const SIOCDLIFADDR = 2165860638
+pkg syscall (netbsd-arm64), const SIOCDLIFADDR ideal-int
+pkg syscall (netbsd-arm64), const SIOCGDRVSPEC = 3223873915
+pkg syscall (netbsd-arm64), const SIOCGDRVSPEC ideal-int
+pkg syscall (netbsd-arm64), const SIOCGETPFSYNC = 3230689784
+pkg syscall (netbsd-arm64), const SIOCGETPFSYNC ideal-int
+pkg syscall (netbsd-arm64), const SIOCGETSGCNT = 3223352628
+pkg syscall (netbsd-arm64), const SIOCGETSGCNT ideal-int
+pkg syscall (netbsd-arm64), const SIOCGETVIFCNT = 3223876915
+pkg syscall (netbsd-arm64), const SIOCGETVIFCNT ideal-int
+pkg syscall (netbsd-arm64), const SIOCGHIWAT = 1074033409
+pkg syscall (netbsd-arm64), const SIOCGHIWAT ideal-int
+pkg syscall (netbsd-arm64), const SIOCGIFADDR = 3230689569
+pkg syscall (netbsd-arm64), const SIOCGIFADDR ideal-int
+pkg syscall (netbsd-arm64), const SIOCGIFADDRPREF = 3231213856
+pkg syscall (netbsd-arm64), const SIOCGIFADDRPREF ideal-int
+pkg syscall (netbsd-arm64), const SIOCGIFALIAS = 3225446683
+pkg syscall (netbsd-arm64), const SIOCGIFALIAS ideal-int
+pkg syscall (netbsd-arm64), const SIOCGIFBRDADDR = 3230689571
+pkg syscall (netbsd-arm64), const SIOCGIFBRDADDR ideal-int
+pkg syscall (netbsd-arm64), const SIOCGIFCAP = 3223349622
+pkg syscall (netbsd-arm64), const SIOCGIFCAP ideal-int
+pkg syscall (netbsd-arm64), const SIOCGIFCONF = 3222300966
+pkg syscall (netbsd-arm64), const SIOCGIFCONF ideal-int
+pkg syscall (netbsd-arm64), const SIOCGIFDATA = 3231213957
+pkg syscall (netbsd-arm64), const SIOCGIFDATA ideal-int
+pkg syscall (netbsd-arm64), const SIOCGIFDLT = 3230689655
+pkg syscall (netbsd-arm64), const SIOCGIFDLT ideal-int
+pkg syscall (netbsd-arm64), const SIOCGIFDSTADDR = 3230689570
+pkg syscall (netbsd-arm64), const SIOCGIFDSTADDR ideal-int
+pkg syscall (netbsd-arm64), const SIOCGIFFLAGS = 3230689553
+pkg syscall (netbsd-arm64), const SIOCGIFFLAGS ideal-int
+pkg syscall (netbsd-arm64), const SIOCGIFGENERIC = 3230689594
+pkg syscall (netbsd-arm64), const SIOCGIFGENERIC ideal-int
+pkg syscall (netbsd-arm64), const SIOCGIFMEDIA = 3224398134
+pkg syscall (netbsd-arm64), const SIOCGIFMEDIA ideal-int
+pkg syscall (netbsd-arm64), const SIOCGIFMETRIC = 3230689559
+pkg syscall (netbsd-arm64), const SIOCGIFMETRIC ideal-int
+pkg syscall (netbsd-arm64), const SIOCGIFMTU = 3230689662
+pkg syscall (netbsd-arm64), const SIOCGIFMTU ideal-int
+pkg syscall (netbsd-arm64), const SIOCGIFNETMASK = 3230689573
+pkg syscall (netbsd-arm64), const SIOCGIFNETMASK ideal-int
+pkg syscall (netbsd-arm64), const SIOCGIFPDSTADDR = 3230689608
+pkg syscall (netbsd-arm64), const SIOCGIFPDSTADDR ideal-int
+pkg syscall (netbsd-arm64), const SIOCGIFPSRCADDR = 3230689607
+pkg syscall (netbsd-arm64), const SIOCGIFPSRCADDR ideal-int
+pkg syscall (netbsd-arm64), const SIOCGLIFADDR = 3239602461
+pkg syscall (netbsd-arm64), const SIOCGLIFADDR ideal-int
+pkg syscall (netbsd-arm64), const SIOCGLIFPHYADDR = 3239602507
+pkg syscall (netbsd-arm64), const SIOCGLIFPHYADDR ideal-int
+pkg syscall (netbsd-arm64), const SIOCGLINKSTR = 3223873927
+pkg syscall (netbsd-arm64), const SIOCGLINKSTR ideal-int
+pkg syscall (netbsd-arm64), const SIOCGLOWAT = 1074033411
+pkg syscall (netbsd-arm64), const SIOCGLOWAT ideal-int
+pkg syscall (netbsd-arm64), const SIOCGPGRP = 1074033417
+pkg syscall (netbsd-arm64), const SIOCGPGRP ideal-int
+pkg syscall (netbsd-arm64), const SIOCGVH = 3230689667
+pkg syscall (netbsd-arm64), const SIOCGVH ideal-int
+pkg syscall (netbsd-arm64), const SIOCIFCREATE = 2156947834
+pkg syscall (netbsd-arm64), const SIOCIFCREATE ideal-int
+pkg syscall (netbsd-arm64), const SIOCIFDESTROY = 2156947833
+pkg syscall (netbsd-arm64), const SIOCIFDESTROY ideal-int
+pkg syscall (netbsd-arm64), const SIOCIFGCLONERS = 3222301048
+pkg syscall (netbsd-arm64), const SIOCIFGCLONERS ideal-int
+pkg syscall (netbsd-arm64), const SIOCINITIFADDR = 3228592516
+pkg syscall (netbsd-arm64), const SIOCINITIFADDR ideal-int
+pkg syscall (netbsd-arm64), const SIOCSDRVSPEC = 2150132091
+pkg syscall (netbsd-arm64), const SIOCSDRVSPEC ideal-int
+pkg syscall (netbsd-arm64), const SIOCSETPFSYNC = 2156947959
+pkg syscall (netbsd-arm64), const SIOCSETPFSYNC ideal-int
+pkg syscall (netbsd-arm64), const SIOCSHIWAT = 2147775232
+pkg syscall (netbsd-arm64), const SIOCSHIWAT ideal-int
+pkg syscall (netbsd-arm64), const SIOCSIFADDR = 2156947724
+pkg syscall (netbsd-arm64), const SIOCSIFADDR ideal-int
+pkg syscall (netbsd-arm64), const SIOCSIFADDRPREF = 2157472031
+pkg syscall (netbsd-arm64), const SIOCSIFADDRPREF ideal-int
+pkg syscall (netbsd-arm64), const SIOCSIFBRDADDR = 2156947731
+pkg syscall (netbsd-arm64), const SIOCSIFBRDADDR ideal-int
+pkg syscall (netbsd-arm64), const SIOCSIFCAP = 2149607797
+pkg syscall (netbsd-arm64), const SIOCSIFCAP ideal-int
+pkg syscall (netbsd-arm64), const SIOCSIFDSTADDR = 2156947726
+pkg syscall (netbsd-arm64), const SIOCSIFDSTADDR ideal-int
+pkg syscall (netbsd-arm64), const SIOCSIFFLAGS = 2156947728
+pkg syscall (netbsd-arm64), const SIOCSIFFLAGS ideal-int
+pkg syscall (netbsd-arm64), const SIOCSIFGENERIC = 2156947769
+pkg syscall (netbsd-arm64), const SIOCSIFGENERIC ideal-int
+pkg syscall (netbsd-arm64), const SIOCSIFMEDIA = 3230689589
+pkg syscall (netbsd-arm64), const SIOCSIFMEDIA ideal-int
+pkg syscall (netbsd-arm64), const SIOCSIFMETRIC = 2156947736
+pkg syscall (netbsd-arm64), const SIOCSIFMETRIC ideal-int
+pkg syscall (netbsd-arm64), const SIOCSIFMTU = 2156947839
+pkg syscall (netbsd-arm64), const SIOCSIFMTU ideal-int
+pkg syscall (netbsd-arm64), const SIOCSIFNETMASK = 2156947734
+pkg syscall (netbsd-arm64), const SIOCSIFNETMASK ideal-int
+pkg syscall (netbsd-arm64), const SIOCSIFPHYADDR = 2151704902
+pkg syscall (netbsd-arm64), const SIOCSIFPHYADDR ideal-int
+pkg syscall (netbsd-arm64), const SIOCSLIFPHYADDR = 2165860682
+pkg syscall (netbsd-arm64), const SIOCSLIFPHYADDR ideal-int
+pkg syscall (netbsd-arm64), const SIOCSLINKSTR = 2150132104
+pkg syscall (netbsd-arm64), const SIOCSLINKSTR ideal-int
+pkg syscall (netbsd-arm64), const SIOCSLOWAT = 2147775234
+pkg syscall (netbsd-arm64), const SIOCSLOWAT ideal-int
+pkg syscall (netbsd-arm64), const SIOCSPGRP = 2147775240
+pkg syscall (netbsd-arm64), const SIOCSPGRP ideal-int
+pkg syscall (netbsd-arm64), const SIOCSVH = 3230689666
+pkg syscall (netbsd-arm64), const SIOCSVH ideal-int
+pkg syscall (netbsd-arm64), const SIOCZIFDATA = 3231213958
+pkg syscall (netbsd-arm64), const SIOCZIFDATA ideal-int
+pkg syscall (netbsd-arm64), const SOCK_CLOEXEC = 268435456
+pkg syscall (netbsd-arm64), const SOCK_CLOEXEC ideal-int
+pkg syscall (netbsd-arm64), const SOCK_FLAGS_MASK = 4026531840
+pkg syscall (netbsd-arm64), const SOCK_FLAGS_MASK ideal-int
+pkg syscall (netbsd-arm64), const SOCK_NONBLOCK = 536870912
+pkg syscall (netbsd-arm64), const SOCK_NONBLOCK ideal-int
+pkg syscall (netbsd-arm64), const SOCK_NOSIGPIPE = 1073741824
+pkg syscall (netbsd-arm64), const SOCK_NOSIGPIPE ideal-int
+pkg syscall (netbsd-arm64), const SOCK_RDM = 4
+pkg syscall (netbsd-arm64), const SOCK_RDM ideal-int
+pkg syscall (netbsd-arm64), const SOL_SOCKET = 65535
+pkg syscall (netbsd-arm64), const SOMAXCONN = 128
+pkg syscall (netbsd-arm64), const SO_ACCEPTCONN = 2
+pkg syscall (netbsd-arm64), const SO_ACCEPTCONN ideal-int
+pkg syscall (netbsd-arm64), const SO_ACCEPTFILTER = 4096
+pkg syscall (netbsd-arm64), const SO_ACCEPTFILTER ideal-int
+pkg syscall (netbsd-arm64), const SO_BROADCAST = 32
+pkg syscall (netbsd-arm64), const SO_DEBUG = 1
+pkg syscall (netbsd-arm64), const SO_DEBUG ideal-int
+pkg syscall (netbsd-arm64), const SO_DONTROUTE = 16
+pkg syscall (netbsd-arm64), const SO_ERROR = 4103
+pkg syscall (netbsd-arm64), const SO_ERROR ideal-int
+pkg syscall (netbsd-arm64), const SO_KEEPALIVE = 8
+pkg syscall (netbsd-arm64), const SO_LINGER = 128
+pkg syscall (netbsd-arm64), const SO_NOHEADER = 4106
+pkg syscall (netbsd-arm64), const SO_NOHEADER ideal-int
+pkg syscall (netbsd-arm64), const SO_NOSIGPIPE = 2048
+pkg syscall (netbsd-arm64), const SO_NOSIGPIPE ideal-int
+pkg syscall (netbsd-arm64), const SO_OOBINLINE = 256
+pkg syscall (netbsd-arm64), const SO_OOBINLINE ideal-int
+pkg syscall (netbsd-arm64), const SO_OVERFLOWED = 4105
+pkg syscall (netbsd-arm64), const SO_OVERFLOWED ideal-int
+pkg syscall (netbsd-arm64), const SO_RCVBUF = 4098
+pkg syscall (netbsd-arm64), const SO_RCVLOWAT = 4100
+pkg syscall (netbsd-arm64), const SO_RCVLOWAT ideal-int
+pkg syscall (netbsd-arm64), const SO_RCVTIMEO = 4108
+pkg syscall (netbsd-arm64), const SO_RCVTIMEO ideal-int
+pkg syscall (netbsd-arm64), const SO_REUSEADDR = 4
+pkg syscall (netbsd-arm64), const SO_REUSEPORT = 512
+pkg syscall (netbsd-arm64), const SO_REUSEPORT ideal-int
+pkg syscall (netbsd-arm64), const SO_SNDBUF = 4097
+pkg syscall (netbsd-arm64), const SO_SNDLOWAT = 4099
+pkg syscall (netbsd-arm64), const SO_SNDLOWAT ideal-int
+pkg syscall (netbsd-arm64), const SO_SNDTIMEO = 4107
+pkg syscall (netbsd-arm64), const SO_SNDTIMEO ideal-int
+pkg syscall (netbsd-arm64), const SO_TIMESTAMP = 8192
+pkg syscall (netbsd-arm64), const SO_TIMESTAMP ideal-int
+pkg syscall (netbsd-arm64), const SO_TYPE = 4104
+pkg syscall (netbsd-arm64), const SO_TYPE ideal-int
+pkg syscall (netbsd-arm64), const SO_USELOOPBACK = 64
+pkg syscall (netbsd-arm64), const SO_USELOOPBACK ideal-int
+pkg syscall (netbsd-arm64), const SYSCTL_VERSION = 16777216
+pkg syscall (netbsd-arm64), const SYSCTL_VERSION ideal-int
+pkg syscall (netbsd-arm64), const SYSCTL_VERS_0 = 0
+pkg syscall (netbsd-arm64), const SYSCTL_VERS_0 ideal-int
+pkg syscall (netbsd-arm64), const SYSCTL_VERS_1 = 16777216
+pkg syscall (netbsd-arm64), const SYSCTL_VERS_1 ideal-int
+pkg syscall (netbsd-arm64), const SYSCTL_VERS_MASK = 4278190080
+pkg syscall (netbsd-arm64), const SYSCTL_VERS_MASK ideal-int
+pkg syscall (netbsd-arm64), const SYS_ACCEPT = 30
+pkg syscall (netbsd-arm64), const SYS_ACCEPT ideal-int
+pkg syscall (netbsd-arm64), const SYS_ACCESS = 33
+pkg syscall (netbsd-arm64), const SYS_ACCESS ideal-int
+pkg syscall (netbsd-arm64), const SYS_ACCT = 51
+pkg syscall (netbsd-arm64), const SYS_ACCT ideal-int
+pkg syscall (netbsd-arm64), const SYS_ADJTIME = 421
+pkg syscall (netbsd-arm64), const SYS_ADJTIME ideal-int
+pkg syscall (netbsd-arm64), const SYS_BIND = 104
+pkg syscall (netbsd-arm64), const SYS_BIND ideal-int
+pkg syscall (netbsd-arm64), const SYS_BREAK = 17
+pkg syscall (netbsd-arm64), const SYS_BREAK ideal-int
+pkg syscall (netbsd-arm64), const SYS_CHDIR = 12
+pkg syscall (netbsd-arm64), const SYS_CHDIR ideal-int
+pkg syscall (netbsd-arm64), const SYS_CHFLAGS = 34
+pkg syscall (netbsd-arm64), const SYS_CHFLAGS ideal-int
+pkg syscall (netbsd-arm64), const SYS_CHMOD = 15
+pkg syscall (netbsd-arm64), const SYS_CHMOD ideal-int
+pkg syscall (netbsd-arm64), const SYS_CHOWN = 16
+pkg syscall (netbsd-arm64), const SYS_CHOWN ideal-int
+pkg syscall (netbsd-arm64), const SYS_CHROOT = 61
+pkg syscall (netbsd-arm64), const SYS_CHROOT ideal-int
+pkg syscall (netbsd-arm64), const SYS_CLOCK_GETRES = 429
+pkg syscall (netbsd-arm64), const SYS_CLOCK_GETRES ideal-int
+pkg syscall (netbsd-arm64), const SYS_CLOCK_GETTIME = 427
+pkg syscall (netbsd-arm64), const SYS_CLOCK_GETTIME ideal-int
+pkg syscall (netbsd-arm64), const SYS_CLOCK_SETTIME = 428
+pkg syscall (netbsd-arm64), const SYS_CLOCK_SETTIME ideal-int
+pkg syscall (netbsd-arm64), const SYS_CLOSE = 6
+pkg syscall (netbsd-arm64), const SYS_CLOSE ideal-int
+pkg syscall (netbsd-arm64), const SYS_CONNECT = 98
+pkg syscall (netbsd-arm64), const SYS_CONNECT ideal-int
+pkg syscall (netbsd-arm64), const SYS_DUP = 41
+pkg syscall (netbsd-arm64), const SYS_DUP ideal-int
+pkg syscall (netbsd-arm64), const SYS_DUP2 = 90
+pkg syscall (netbsd-arm64), const SYS_DUP2 ideal-int
+pkg syscall (netbsd-arm64), const SYS_DUP3 = 454
+pkg syscall (netbsd-arm64), const SYS_DUP3 ideal-int
+pkg syscall (netbsd-arm64), const SYS_EXECVE = 59
+pkg syscall (netbsd-arm64), const SYS_EXECVE ideal-int
+pkg syscall (netbsd-arm64), const SYS_EXIT = 1
+pkg syscall (netbsd-arm64), const SYS_EXIT ideal-int
+pkg syscall (netbsd-arm64), const SYS_EXTATTRCTL = 360
+pkg syscall (netbsd-arm64), const SYS_EXTATTRCTL ideal-int
+pkg syscall (netbsd-arm64), const SYS_EXTATTR_DELETE_FD = 366
+pkg syscall (netbsd-arm64), const SYS_EXTATTR_DELETE_FD ideal-int
+pkg syscall (netbsd-arm64), const SYS_EXTATTR_DELETE_FILE = 363
+pkg syscall (netbsd-arm64), const SYS_EXTATTR_DELETE_FILE ideal-int
+pkg syscall (netbsd-arm64), const SYS_EXTATTR_DELETE_LINK = 369
+pkg syscall (netbsd-arm64), const SYS_EXTATTR_DELETE_LINK ideal-int
+pkg syscall (netbsd-arm64), const SYS_EXTATTR_GET_FD = 365
+pkg syscall (netbsd-arm64), const SYS_EXTATTR_GET_FD ideal-int
+pkg syscall (netbsd-arm64), const SYS_EXTATTR_GET_FILE = 362
+pkg syscall (netbsd-arm64), const SYS_EXTATTR_GET_FILE ideal-int
+pkg syscall (netbsd-arm64), const SYS_EXTATTR_GET_LINK = 368
+pkg syscall (netbsd-arm64), const SYS_EXTATTR_GET_LINK ideal-int
+pkg syscall (netbsd-arm64), const SYS_EXTATTR_LIST_FD = 370
+pkg syscall (netbsd-arm64), const SYS_EXTATTR_LIST_FD ideal-int
+pkg syscall (netbsd-arm64), const SYS_EXTATTR_LIST_FILE = 371
+pkg syscall (netbsd-arm64), const SYS_EXTATTR_LIST_FILE ideal-int
+pkg syscall (netbsd-arm64), const SYS_EXTATTR_LIST_LINK = 372
+pkg syscall (netbsd-arm64), const SYS_EXTATTR_LIST_LINK ideal-int
+pkg syscall (netbsd-arm64), const SYS_EXTATTR_SET_FD = 364
+pkg syscall (netbsd-arm64), const SYS_EXTATTR_SET_FD ideal-int
+pkg syscall (netbsd-arm64), const SYS_EXTATTR_SET_FILE = 361
+pkg syscall (netbsd-arm64), const SYS_EXTATTR_SET_FILE ideal-int
+pkg syscall (netbsd-arm64), const SYS_EXTATTR_SET_LINK = 367
+pkg syscall (netbsd-arm64), const SYS_EXTATTR_SET_LINK ideal-int
+pkg syscall (netbsd-arm64), const SYS_FACCESSAT = 462
+pkg syscall (netbsd-arm64), const SYS_FACCESSAT ideal-int
+pkg syscall (netbsd-arm64), const SYS_FCHDIR = 13
+pkg syscall (netbsd-arm64), const SYS_FCHDIR ideal-int
+pkg syscall (netbsd-arm64), const SYS_FCHFLAGS = 35
+pkg syscall (netbsd-arm64), const SYS_FCHFLAGS ideal-int
+pkg syscall (netbsd-arm64), const SYS_FCHMOD = 124
+pkg syscall (netbsd-arm64), const SYS_FCHMOD ideal-int
+pkg syscall (netbsd-arm64), const SYS_FCHMODAT = 463
+pkg syscall (netbsd-arm64), const SYS_FCHMODAT ideal-int
+pkg syscall (netbsd-arm64), const SYS_FCHOWN = 123
+pkg syscall (netbsd-arm64), const SYS_FCHOWN ideal-int
+pkg syscall (netbsd-arm64), const SYS_FCHOWNAT = 464
+pkg syscall (netbsd-arm64), const SYS_FCHOWNAT ideal-int
+pkg syscall (netbsd-arm64), const SYS_FCHROOT = 297
+pkg syscall (netbsd-arm64), const SYS_FCHROOT ideal-int
+pkg syscall (netbsd-arm64), const SYS_FCNTL = 92
+pkg syscall (netbsd-arm64), const SYS_FCNTL ideal-int
+pkg syscall (netbsd-arm64), const SYS_FDATASYNC = 241
+pkg syscall (netbsd-arm64), const SYS_FDATASYNC ideal-int
+pkg syscall (netbsd-arm64), const SYS_FEXECVE = 465
+pkg syscall (netbsd-arm64), const SYS_FEXECVE ideal-int
+pkg syscall (netbsd-arm64), const SYS_FGETXATTR = 380
+pkg syscall (netbsd-arm64), const SYS_FGETXATTR ideal-int
+pkg syscall (netbsd-arm64), const SYS_FHSTAT = 451
+pkg syscall (netbsd-arm64), const SYS_FHSTAT ideal-int
+pkg syscall (netbsd-arm64), const SYS_FKTRACE = 288
+pkg syscall (netbsd-arm64), const SYS_FKTRACE ideal-int
+pkg syscall (netbsd-arm64), const SYS_FLISTXATTR = 383
+pkg syscall (netbsd-arm64), const SYS_FLISTXATTR ideal-int
+pkg syscall (netbsd-arm64), const SYS_FLOCK = 131
+pkg syscall (netbsd-arm64), const SYS_FLOCK ideal-int
+pkg syscall (netbsd-arm64), const SYS_FORK = 2
+pkg syscall (netbsd-arm64), const SYS_FORK ideal-int
+pkg syscall (netbsd-arm64), const SYS_FPATHCONF = 192
+pkg syscall (netbsd-arm64), const SYS_FPATHCONF ideal-int
+pkg syscall (netbsd-arm64), const SYS_FREMOVEXATTR = 386
+pkg syscall (netbsd-arm64), const SYS_FREMOVEXATTR ideal-int
+pkg syscall (netbsd-arm64), const SYS_FSETXATTR = 377
+pkg syscall (netbsd-arm64), const SYS_FSETXATTR ideal-int
+pkg syscall (netbsd-arm64), const SYS_FSTAT = 440
+pkg syscall (netbsd-arm64), const SYS_FSTAT ideal-int
+pkg syscall (netbsd-arm64), const SYS_FSTATAT = 466
+pkg syscall (netbsd-arm64), const SYS_FSTATAT ideal-int
+pkg syscall (netbsd-arm64), const SYS_FSTATVFS1 = 358
+pkg syscall (netbsd-arm64), const SYS_FSTATVFS1 ideal-int
+pkg syscall (netbsd-arm64), const SYS_FSYNC = 95
+pkg syscall (netbsd-arm64), const SYS_FSYNC ideal-int
+pkg syscall (netbsd-arm64), const SYS_FSYNC_RANGE = 354
+pkg syscall (netbsd-arm64), const SYS_FSYNC_RANGE ideal-int
+pkg syscall (netbsd-arm64), const SYS_FTRUNCATE = 201
+pkg syscall (netbsd-arm64), const SYS_FTRUNCATE ideal-int
+pkg syscall (netbsd-arm64), const SYS_FUTIMENS = 472
+pkg syscall (netbsd-arm64), const SYS_FUTIMENS ideal-int
+pkg syscall (netbsd-arm64), const SYS_FUTIMES = 423
+pkg syscall (netbsd-arm64), const SYS_FUTIMES ideal-int
+pkg syscall (netbsd-arm64), const SYS_GETCONTEXT = 307
+pkg syscall (netbsd-arm64), const SYS_GETCONTEXT ideal-int
+pkg syscall (netbsd-arm64), const SYS_GETDENTS = 390
+pkg syscall (netbsd-arm64), const SYS_GETDENTS ideal-int
+pkg syscall (netbsd-arm64), const SYS_GETEGID = 43
+pkg syscall (netbsd-arm64), const SYS_GETEGID ideal-int
+pkg syscall (netbsd-arm64), const SYS_GETEUID = 25
+pkg syscall (netbsd-arm64), const SYS_GETEUID ideal-int
+pkg syscall (netbsd-arm64), const SYS_GETFH = 395
+pkg syscall (netbsd-arm64), const SYS_GETFH ideal-int
+pkg syscall (netbsd-arm64), const SYS_GETGID = 47
+pkg syscall (netbsd-arm64), const SYS_GETGID ideal-int
+pkg syscall (netbsd-arm64), const SYS_GETGROUPS = 79
+pkg syscall (netbsd-arm64), const SYS_GETGROUPS ideal-int
+pkg syscall (netbsd-arm64), const SYS_GETITIMER = 426
+pkg syscall (netbsd-arm64), const SYS_GETITIMER ideal-int
+pkg syscall (netbsd-arm64), const SYS_GETPEERNAME = 31
+pkg syscall (netbsd-arm64), const SYS_GETPEERNAME ideal-int
+pkg syscall (netbsd-arm64), const SYS_GETPGID = 207
+pkg syscall (netbsd-arm64), const SYS_GETPGID ideal-int
+pkg syscall (netbsd-arm64), const SYS_GETPGRP = 81
+pkg syscall (netbsd-arm64), const SYS_GETPGRP ideal-int
+pkg syscall (netbsd-arm64), const SYS_GETPID = 20
+pkg syscall (netbsd-arm64), const SYS_GETPID ideal-int
+pkg syscall (netbsd-arm64), const SYS_GETPPID = 39
+pkg syscall (netbsd-arm64), const SYS_GETPPID ideal-int
+pkg syscall (netbsd-arm64), const SYS_GETPRIORITY = 100
+pkg syscall (netbsd-arm64), const SYS_GETPRIORITY ideal-int
+pkg syscall (netbsd-arm64), const SYS_GETRLIMIT = 194
+pkg syscall (netbsd-arm64), const SYS_GETRLIMIT ideal-int
+pkg syscall (netbsd-arm64), const SYS_GETRUSAGE = 445
+pkg syscall (netbsd-arm64), const SYS_GETRUSAGE ideal-int
+pkg syscall (netbsd-arm64), const SYS_GETSID = 286
+pkg syscall (netbsd-arm64), const SYS_GETSID ideal-int
+pkg syscall (netbsd-arm64), const SYS_GETSOCKNAME = 32
+pkg syscall (netbsd-arm64), const SYS_GETSOCKNAME ideal-int
+pkg syscall (netbsd-arm64), const SYS_GETSOCKOPT = 118
+pkg syscall (netbsd-arm64), const SYS_GETSOCKOPT ideal-int
+pkg syscall (netbsd-arm64), const SYS_GETTIMEOFDAY = 418
+pkg syscall (netbsd-arm64), const SYS_GETTIMEOFDAY ideal-int
+pkg syscall (netbsd-arm64), const SYS_GETUID = 24
+pkg syscall (netbsd-arm64), const SYS_GETUID ideal-int
+pkg syscall (netbsd-arm64), const SYS_GETVFSSTAT = 356
+pkg syscall (netbsd-arm64), const SYS_GETVFSSTAT ideal-int
+pkg syscall (netbsd-arm64), const SYS_GETXATTR = 378
+pkg syscall (netbsd-arm64), const SYS_GETXATTR ideal-int
+pkg syscall (netbsd-arm64), const SYS_IOCTL = 54
+pkg syscall (netbsd-arm64), const SYS_IOCTL ideal-int
+pkg syscall (netbsd-arm64), const SYS_ISSETUGID = 305
+pkg syscall (netbsd-arm64), const SYS_ISSETUGID ideal-int
+pkg syscall (netbsd-arm64), const SYS_KEVENT = 435
+pkg syscall (netbsd-arm64), const SYS_KEVENT ideal-int
+pkg syscall (netbsd-arm64), const SYS_KILL = 37
+pkg syscall (netbsd-arm64), const SYS_KILL ideal-int
+pkg syscall (netbsd-arm64), const SYS_KQUEUE = 344
+pkg syscall (netbsd-arm64), const SYS_KQUEUE ideal-int
+pkg syscall (netbsd-arm64), const SYS_KQUEUE1 = 455
+pkg syscall (netbsd-arm64), const SYS_KQUEUE1 ideal-int
+pkg syscall (netbsd-arm64), const SYS_KTRACE = 45
+pkg syscall (netbsd-arm64), const SYS_KTRACE ideal-int
+pkg syscall (netbsd-arm64), const SYS_LCHFLAGS = 304
+pkg syscall (netbsd-arm64), const SYS_LCHFLAGS ideal-int
+pkg syscall (netbsd-arm64), const SYS_LCHMOD = 274
+pkg syscall (netbsd-arm64), const SYS_LCHMOD ideal-int
+pkg syscall (netbsd-arm64), const SYS_LCHOWN = 275
+pkg syscall (netbsd-arm64), const SYS_LCHOWN ideal-int
+pkg syscall (netbsd-arm64), const SYS_LGETXATTR = 379
+pkg syscall (netbsd-arm64), const SYS_LGETXATTR ideal-int
+pkg syscall (netbsd-arm64), const SYS_LINK = 9
+pkg syscall (netbsd-arm64), const SYS_LINK ideal-int
+pkg syscall (netbsd-arm64), const SYS_LINKAT = 457
+pkg syscall (netbsd-arm64), const SYS_LINKAT ideal-int
+pkg syscall (netbsd-arm64), const SYS_LISTEN = 106
+pkg syscall (netbsd-arm64), const SYS_LISTEN ideal-int
+pkg syscall (netbsd-arm64), const SYS_LISTXATTR = 381
+pkg syscall (netbsd-arm64), const SYS_LISTXATTR ideal-int
+pkg syscall (netbsd-arm64), const SYS_LLISTXATTR = 382
+pkg syscall (netbsd-arm64), const SYS_LLISTXATTR ideal-int
+pkg syscall (netbsd-arm64), const SYS_LREMOVEXATTR = 385
+pkg syscall (netbsd-arm64), const SYS_LREMOVEXATTR ideal-int
+pkg syscall (netbsd-arm64), const SYS_LSEEK = 199
+pkg syscall (netbsd-arm64), const SYS_LSEEK ideal-int
+pkg syscall (netbsd-arm64), const SYS_LSETXATTR = 376
+pkg syscall (netbsd-arm64), const SYS_LSETXATTR ideal-int
+pkg syscall (netbsd-arm64), const SYS_LSTAT = 441
+pkg syscall (netbsd-arm64), const SYS_LSTAT ideal-int
+pkg syscall (netbsd-arm64), const SYS_LUTIMES = 424
+pkg syscall (netbsd-arm64), const SYS_LUTIMES ideal-int
+pkg syscall (netbsd-arm64), const SYS_MADVISE = 75
+pkg syscall (netbsd-arm64), const SYS_MADVISE ideal-int
+pkg syscall (netbsd-arm64), const SYS_MINCORE = 78
+pkg syscall (netbsd-arm64), const SYS_MINCORE ideal-int
+pkg syscall (netbsd-arm64), const SYS_MINHERIT = 273
+pkg syscall (netbsd-arm64), const SYS_MINHERIT ideal-int
+pkg syscall (netbsd-arm64), const SYS_MKDIR = 136
+pkg syscall (netbsd-arm64), const SYS_MKDIR ideal-int
+pkg syscall (netbsd-arm64), const SYS_MKDIRAT = 461
+pkg syscall (netbsd-arm64), const SYS_MKDIRAT ideal-int
+pkg syscall (netbsd-arm64), const SYS_MKFIFO = 132
+pkg syscall (netbsd-arm64), const SYS_MKFIFO ideal-int
+pkg syscall (netbsd-arm64), const SYS_MKFIFOAT = 459
+pkg syscall (netbsd-arm64), const SYS_MKFIFOAT ideal-int
+pkg syscall (netbsd-arm64), const SYS_MKNOD = 450
+pkg syscall (netbsd-arm64), const SYS_MKNOD ideal-int
+pkg syscall (netbsd-arm64), const SYS_MKNODAT = 460
+pkg syscall (netbsd-arm64), const SYS_MKNODAT ideal-int
+pkg syscall (netbsd-arm64), const SYS_MLOCK = 203
+pkg syscall (netbsd-arm64), const SYS_MLOCK ideal-int
+pkg syscall (netbsd-arm64), const SYS_MLOCKALL = 242
+pkg syscall (netbsd-arm64), const SYS_MLOCKALL ideal-int
+pkg syscall (netbsd-arm64), const SYS_MMAP = 197
+pkg syscall (netbsd-arm64), const SYS_MMAP ideal-int
+pkg syscall (netbsd-arm64), const SYS_MODCTL = 246
+pkg syscall (netbsd-arm64), const SYS_MODCTL ideal-int
+pkg syscall (netbsd-arm64), const SYS_MOUNT = 410
+pkg syscall (netbsd-arm64), const SYS_MOUNT ideal-int
+pkg syscall (netbsd-arm64), const SYS_MPROTECT = 74
+pkg syscall (netbsd-arm64), const SYS_MPROTECT ideal-int
+pkg syscall (netbsd-arm64), const SYS_MREMAP = 411
+pkg syscall (netbsd-arm64), const SYS_MREMAP ideal-int
+pkg syscall (netbsd-arm64), const SYS_MSGCTL = 444
+pkg syscall (netbsd-arm64), const SYS_MSGCTL ideal-int
+pkg syscall (netbsd-arm64), const SYS_MSGGET = 225
+pkg syscall (netbsd-arm64), const SYS_MSGGET ideal-int
+pkg syscall (netbsd-arm64), const SYS_MSGRCV = 227
+pkg syscall (netbsd-arm64), const SYS_MSGRCV ideal-int
+pkg syscall (netbsd-arm64), const SYS_MSGSND = 226
+pkg syscall (netbsd-arm64), const SYS_MSGSND ideal-int
+pkg syscall (netbsd-arm64), const SYS_MUNLOCK = 204
+pkg syscall (netbsd-arm64), const SYS_MUNLOCK ideal-int
+pkg syscall (netbsd-arm64), const SYS_MUNLOCKALL = 243
+pkg syscall (netbsd-arm64), const SYS_MUNLOCKALL ideal-int
+pkg syscall (netbsd-arm64), const SYS_MUNMAP = 73
+pkg syscall (netbsd-arm64), const SYS_MUNMAP ideal-int
+pkg syscall (netbsd-arm64), const SYS_NANOSLEEP = 430
+pkg syscall (netbsd-arm64), const SYS_NANOSLEEP ideal-int
+pkg syscall (netbsd-arm64), const SYS_NTP_ADJTIME = 176
+pkg syscall (netbsd-arm64), const SYS_NTP_ADJTIME ideal-int
+pkg syscall (netbsd-arm64), const SYS_NTP_GETTIME = 448
+pkg syscall (netbsd-arm64), const SYS_NTP_GETTIME ideal-int
+pkg syscall (netbsd-arm64), const SYS_OPEN = 5
+pkg syscall (netbsd-arm64), const SYS_OPEN ideal-int
+pkg syscall (netbsd-arm64), const SYS_OPENAT = 468
+pkg syscall (netbsd-arm64), const SYS_OPENAT ideal-int
+pkg syscall (netbsd-arm64), const SYS_PACCEPT = 456
+pkg syscall (netbsd-arm64), const SYS_PACCEPT ideal-int
+pkg syscall (netbsd-arm64), const SYS_PATHCONF = 191
+pkg syscall (netbsd-arm64), const SYS_PATHCONF ideal-int
+pkg syscall (netbsd-arm64), const SYS_PIPE = 42
+pkg syscall (netbsd-arm64), const SYS_PIPE ideal-int
+pkg syscall (netbsd-arm64), const SYS_PIPE2 = 453
+pkg syscall (netbsd-arm64), const SYS_PIPE2 ideal-int
+pkg syscall (netbsd-arm64), const SYS_PMC_CONTROL = 342
+pkg syscall (netbsd-arm64), const SYS_PMC_CONTROL ideal-int
+pkg syscall (netbsd-arm64), const SYS_PMC_GET_INFO = 341
+pkg syscall (netbsd-arm64), const SYS_PMC_GET_INFO ideal-int
+pkg syscall (netbsd-arm64), const SYS_POLL = 209
+pkg syscall (netbsd-arm64), const SYS_POLL ideal-int
+pkg syscall (netbsd-arm64), const SYS_POLLTS = 437
+pkg syscall (netbsd-arm64), const SYS_POLLTS ideal-int
+pkg syscall (netbsd-arm64), const SYS_POSIX_FADVISE = 416
+pkg syscall (netbsd-arm64), const SYS_POSIX_FADVISE ideal-int
+pkg syscall (netbsd-arm64), const SYS_POSIX_SPAWN = 474
+pkg syscall (netbsd-arm64), const SYS_POSIX_SPAWN ideal-int
+pkg syscall (netbsd-arm64), const SYS_PREAD = 173
+pkg syscall (netbsd-arm64), const SYS_PREAD ideal-int
+pkg syscall (netbsd-arm64), const SYS_PREADV = 289
+pkg syscall (netbsd-arm64), const SYS_PREADV ideal-int
+pkg syscall (netbsd-arm64), const SYS_PROFIL = 44
+pkg syscall (netbsd-arm64), const SYS_PROFIL ideal-int
+pkg syscall (netbsd-arm64), const SYS_PSELECT = 436
+pkg syscall (netbsd-arm64), const SYS_PSELECT ideal-int
+pkg syscall (netbsd-arm64), const SYS_PSET_ASSIGN = 414
+pkg syscall (netbsd-arm64), const SYS_PSET_ASSIGN ideal-int
+pkg syscall (netbsd-arm64), const SYS_PSET_CREATE = 412
+pkg syscall (netbsd-arm64), const SYS_PSET_CREATE ideal-int
+pkg syscall (netbsd-arm64), const SYS_PSET_DESTROY = 413
+pkg syscall (netbsd-arm64), const SYS_PSET_DESTROY ideal-int
+pkg syscall (netbsd-arm64), const SYS_PTRACE = 26
+pkg syscall (netbsd-arm64), const SYS_PTRACE ideal-int
+pkg syscall (netbsd-arm64), const SYS_PWRITE = 174
+pkg syscall (netbsd-arm64), const SYS_PWRITE ideal-int
+pkg syscall (netbsd-arm64), const SYS_PWRITEV = 290
+pkg syscall (netbsd-arm64), const SYS_PWRITEV ideal-int
+pkg syscall (netbsd-arm64), const SYS_RASCTL = 343
+pkg syscall (netbsd-arm64), const SYS_RASCTL ideal-int
+pkg syscall (netbsd-arm64), const SYS_READ = 3
+pkg syscall (netbsd-arm64), const SYS_READ ideal-int
+pkg syscall (netbsd-arm64), const SYS_READLINK = 58
+pkg syscall (netbsd-arm64), const SYS_READLINK ideal-int
+pkg syscall (netbsd-arm64), const SYS_READLINKAT = 469
+pkg syscall (netbsd-arm64), const SYS_READLINKAT ideal-int
+pkg syscall (netbsd-arm64), const SYS_READV = 120
+pkg syscall (netbsd-arm64), const SYS_READV ideal-int
+pkg syscall (netbsd-arm64), const SYS_REBOOT = 208
+pkg syscall (netbsd-arm64), const SYS_REBOOT ideal-int
+pkg syscall (netbsd-arm64), const SYS_RECVFROM = 29
+pkg syscall (netbsd-arm64), const SYS_RECVFROM ideal-int
+pkg syscall (netbsd-arm64), const SYS_RECVMMSG = 475
+pkg syscall (netbsd-arm64), const SYS_RECVMMSG ideal-int
+pkg syscall (netbsd-arm64), const SYS_RECVMSG = 27
+pkg syscall (netbsd-arm64), const SYS_RECVMSG ideal-int
+pkg syscall (netbsd-arm64), const SYS_REMOVEXATTR = 384
+pkg syscall (netbsd-arm64), const SYS_REMOVEXATTR ideal-int
+pkg syscall (netbsd-arm64), const SYS_RENAME = 128
+pkg syscall (netbsd-arm64), const SYS_RENAME ideal-int
+pkg syscall (netbsd-arm64), const SYS_RENAMEAT = 458
+pkg syscall (netbsd-arm64), const SYS_RENAMEAT ideal-int
+pkg syscall (netbsd-arm64), const SYS_REVOKE = 56
+pkg syscall (netbsd-arm64), const SYS_REVOKE ideal-int
+pkg syscall (netbsd-arm64), const SYS_RMDIR = 137
+pkg syscall (netbsd-arm64), const SYS_RMDIR ideal-int
+pkg syscall (netbsd-arm64), const SYS_SBRK = 69
+pkg syscall (netbsd-arm64), const SYS_SBRK ideal-int
+pkg syscall (netbsd-arm64), const SYS_SCHED_YIELD = 350
+pkg syscall (netbsd-arm64), const SYS_SCHED_YIELD ideal-int
+pkg syscall (netbsd-arm64), const SYS_SELECT = 417
+pkg syscall (netbsd-arm64), const SYS_SELECT ideal-int
+pkg syscall (netbsd-arm64), const SYS_SEMCONFIG = 223
+pkg syscall (netbsd-arm64), const SYS_SEMCONFIG ideal-int
+pkg syscall (netbsd-arm64), const SYS_SEMGET = 221
+pkg syscall (netbsd-arm64), const SYS_SEMGET ideal-int
+pkg syscall (netbsd-arm64), const SYS_SEMOP = 222
+pkg syscall (netbsd-arm64), const SYS_SEMOP ideal-int
+pkg syscall (netbsd-arm64), const SYS_SENDMMSG = 476
+pkg syscall (netbsd-arm64), const SYS_SENDMMSG ideal-int
+pkg syscall (netbsd-arm64), const SYS_SENDMSG = 28
+pkg syscall (netbsd-arm64), const SYS_SENDMSG ideal-int
+pkg syscall (netbsd-arm64), const SYS_SENDTO = 133
+pkg syscall (netbsd-arm64), const SYS_SENDTO ideal-int
+pkg syscall (netbsd-arm64), const SYS_SETCONTEXT = 308
+pkg syscall (netbsd-arm64), const SYS_SETCONTEXT ideal-int
+pkg syscall (netbsd-arm64), const SYS_SETEGID = 182
+pkg syscall (netbsd-arm64), const SYS_SETEGID ideal-int
+pkg syscall (netbsd-arm64), const SYS_SETEUID = 183
+pkg syscall (netbsd-arm64), const SYS_SETEUID ideal-int
+pkg syscall (netbsd-arm64), const SYS_SETGID = 181
+pkg syscall (netbsd-arm64), const SYS_SETGID ideal-int
+pkg syscall (netbsd-arm64), const SYS_SETGROUPS = 80
+pkg syscall (netbsd-arm64), const SYS_SETGROUPS ideal-int
+pkg syscall (netbsd-arm64), const SYS_SETITIMER = 425
+pkg syscall (netbsd-arm64), const SYS_SETITIMER ideal-int
+pkg syscall (netbsd-arm64), const SYS_SETPGID = 82
+pkg syscall (netbsd-arm64), const SYS_SETPGID ideal-int
+pkg syscall (netbsd-arm64), const SYS_SETPRIORITY = 96
+pkg syscall (netbsd-arm64), const SYS_SETPRIORITY ideal-int
+pkg syscall (netbsd-arm64), const SYS_SETREGID = 127
+pkg syscall (netbsd-arm64), const SYS_SETREGID ideal-int
+pkg syscall (netbsd-arm64), const SYS_SETREUID = 126
+pkg syscall (netbsd-arm64), const SYS_SETREUID ideal-int
+pkg syscall (netbsd-arm64), const SYS_SETRLIMIT = 195
+pkg syscall (netbsd-arm64), const SYS_SETRLIMIT ideal-int
+pkg syscall (netbsd-arm64), const SYS_SETSID = 147
+pkg syscall (netbsd-arm64), const SYS_SETSID ideal-int
+pkg syscall (netbsd-arm64), const SYS_SETSOCKOPT = 105
+pkg syscall (netbsd-arm64), const SYS_SETSOCKOPT ideal-int
+pkg syscall (netbsd-arm64), const SYS_SETTIMEOFDAY = 419
+pkg syscall (netbsd-arm64), const SYS_SETTIMEOFDAY ideal-int
+pkg syscall (netbsd-arm64), const SYS_SETUID = 23
+pkg syscall (netbsd-arm64), const SYS_SETUID ideal-int
+pkg syscall (netbsd-arm64), const SYS_SETXATTR = 375
+pkg syscall (netbsd-arm64), const SYS_SETXATTR ideal-int
+pkg syscall (netbsd-arm64), const SYS_SHMAT = 228
+pkg syscall (netbsd-arm64), const SYS_SHMAT ideal-int
+pkg syscall (netbsd-arm64), const SYS_SHMCTL = 443
+pkg syscall (netbsd-arm64), const SYS_SHMCTL ideal-int
+pkg syscall (netbsd-arm64), const SYS_SHMDT = 230
+pkg syscall (netbsd-arm64), const SYS_SHMDT ideal-int
+pkg syscall (netbsd-arm64), const SYS_SHMGET = 231
+pkg syscall (netbsd-arm64), const SYS_SHMGET ideal-int
+pkg syscall (netbsd-arm64), const SYS_SHUTDOWN = 134
+pkg syscall (netbsd-arm64), const SYS_SHUTDOWN ideal-int
+pkg syscall (netbsd-arm64), const SYS_SIGQUEUEINFO = 245
+pkg syscall (netbsd-arm64), const SYS_SIGQUEUEINFO ideal-int
+pkg syscall (netbsd-arm64), const SYS_SOCKET = 394
+pkg syscall (netbsd-arm64), const SYS_SOCKET ideal-int
+pkg syscall (netbsd-arm64), const SYS_SOCKETPAIR = 135
+pkg syscall (netbsd-arm64), const SYS_SOCKETPAIR ideal-int
+pkg syscall (netbsd-arm64), const SYS_SSTK = 70
+pkg syscall (netbsd-arm64), const SYS_SSTK ideal-int
+pkg syscall (netbsd-arm64), const SYS_STAT = 439
+pkg syscall (netbsd-arm64), const SYS_STAT ideal-int
+pkg syscall (netbsd-arm64), const SYS_STATVFS1 = 357
+pkg syscall (netbsd-arm64), const SYS_STATVFS1 ideal-int
+pkg syscall (netbsd-arm64), const SYS_SWAPCTL = 271
+pkg syscall (netbsd-arm64), const SYS_SWAPCTL ideal-int
+pkg syscall (netbsd-arm64), const SYS_SYMLINK = 57
+pkg syscall (netbsd-arm64), const SYS_SYMLINK ideal-int
+pkg syscall (netbsd-arm64), const SYS_SYMLINKAT = 470
+pkg syscall (netbsd-arm64), const SYS_SYMLINKAT ideal-int
+pkg syscall (netbsd-arm64), const SYS_SYNC = 36
+pkg syscall (netbsd-arm64), const SYS_SYNC ideal-int
+pkg syscall (netbsd-arm64), const SYS_SYSARCH = 165
+pkg syscall (netbsd-arm64), const SYS_SYSARCH ideal-int
+pkg syscall (netbsd-arm64), const SYS_TIMER_CREATE = 235
+pkg syscall (netbsd-arm64), const SYS_TIMER_CREATE ideal-int
+pkg syscall (netbsd-arm64), const SYS_TIMER_DELETE = 236
+pkg syscall (netbsd-arm64), const SYS_TIMER_DELETE ideal-int
+pkg syscall (netbsd-arm64), const SYS_TIMER_GETOVERRUN = 239
+pkg syscall (netbsd-arm64), const SYS_TIMER_GETOVERRUN ideal-int
+pkg syscall (netbsd-arm64), const SYS_TIMER_GETTIME = 447
+pkg syscall (netbsd-arm64), const SYS_TIMER_GETTIME ideal-int
+pkg syscall (netbsd-arm64), const SYS_TIMER_SETTIME = 446
+pkg syscall (netbsd-arm64), const SYS_TIMER_SETTIME ideal-int
+pkg syscall (netbsd-arm64), const SYS_TRUNCATE = 200
+pkg syscall (netbsd-arm64), const SYS_TRUNCATE ideal-int
+pkg syscall (netbsd-arm64), const SYS_UMASK = 60
+pkg syscall (netbsd-arm64), const SYS_UMASK ideal-int
+pkg syscall (netbsd-arm64), const SYS_UNDELETE = 205
+pkg syscall (netbsd-arm64), const SYS_UNDELETE ideal-int
+pkg syscall (netbsd-arm64), const SYS_UNLINK = 10
+pkg syscall (netbsd-arm64), const SYS_UNLINK ideal-int
+pkg syscall (netbsd-arm64), const SYS_UNLINKAT = 471
+pkg syscall (netbsd-arm64), const SYS_UNLINKAT ideal-int
+pkg syscall (netbsd-arm64), const SYS_UNMOUNT = 22
+pkg syscall (netbsd-arm64), const SYS_UNMOUNT ideal-int
+pkg syscall (netbsd-arm64), const SYS_UTIMENSAT = 467
+pkg syscall (netbsd-arm64), const SYS_UTIMENSAT ideal-int
+pkg syscall (netbsd-arm64), const SYS_UTIMES = 420
+pkg syscall (netbsd-arm64), const SYS_UTIMES ideal-int
+pkg syscall (netbsd-arm64), const SYS_UTRACE = 306
+pkg syscall (netbsd-arm64), const SYS_UTRACE ideal-int
+pkg syscall (netbsd-arm64), const SYS_UUIDGEN = 355
+pkg syscall (netbsd-arm64), const SYS_UUIDGEN ideal-int
+pkg syscall (netbsd-arm64), const SYS_VADVISE = 72
+pkg syscall (netbsd-arm64), const SYS_VADVISE ideal-int
+pkg syscall (netbsd-arm64), const SYS_VFORK = 66
+pkg syscall (netbsd-arm64), const SYS_VFORK ideal-int
+pkg syscall (netbsd-arm64), const SYS_WAIT4 = 449
+pkg syscall (netbsd-arm64), const SYS_WAIT4 ideal-int
+pkg syscall (netbsd-arm64), const SYS_WRITE = 4
+pkg syscall (netbsd-arm64), const SYS_WRITE ideal-int
+pkg syscall (netbsd-arm64), const SYS_WRITEV = 121
+pkg syscall (netbsd-arm64), const SYS_WRITEV ideal-int
+pkg syscall (netbsd-arm64), const SYS__LWP_CONTINUE = 314
+pkg syscall (netbsd-arm64), const SYS__LWP_CONTINUE ideal-int
+pkg syscall (netbsd-arm64), const SYS__LWP_CREATE = 309
+pkg syscall (netbsd-arm64), const SYS__LWP_CREATE ideal-int
+pkg syscall (netbsd-arm64), const SYS__LWP_CTL = 325
+pkg syscall (netbsd-arm64), const SYS__LWP_CTL ideal-int
+pkg syscall (netbsd-arm64), const SYS__LWP_DETACH = 319
+pkg syscall (netbsd-arm64), const SYS__LWP_DETACH ideal-int
+pkg syscall (netbsd-arm64), const SYS__LWP_EXIT = 310
+pkg syscall (netbsd-arm64), const SYS__LWP_EXIT ideal-int
+pkg syscall (netbsd-arm64), const SYS__LWP_GETNAME = 324
+pkg syscall (netbsd-arm64), const SYS__LWP_GETNAME ideal-int
+pkg syscall (netbsd-arm64), const SYS__LWP_GETPRIVATE = 316
+pkg syscall (netbsd-arm64), const SYS__LWP_GETPRIVATE ideal-int
+pkg syscall (netbsd-arm64), const SYS__LWP_KILL = 318
+pkg syscall (netbsd-arm64), const SYS__LWP_KILL ideal-int
+pkg syscall (netbsd-arm64), const SYS__LWP_PARK = 434
+pkg syscall (netbsd-arm64), const SYS__LWP_PARK ideal-int
+pkg syscall (netbsd-arm64), const SYS__LWP_SELF = 311
+pkg syscall (netbsd-arm64), const SYS__LWP_SELF ideal-int
+pkg syscall (netbsd-arm64), const SYS__LWP_SETNAME = 323
+pkg syscall (netbsd-arm64), const SYS__LWP_SETNAME ideal-int
+pkg syscall (netbsd-arm64), const SYS__LWP_SETPRIVATE = 317
+pkg syscall (netbsd-arm64), const SYS__LWP_SETPRIVATE ideal-int
+pkg syscall (netbsd-arm64), const SYS__LWP_SUSPEND = 313
+pkg syscall (netbsd-arm64), const SYS__LWP_SUSPEND ideal-int
+pkg syscall (netbsd-arm64), const SYS__LWP_UNPARK = 321
+pkg syscall (netbsd-arm64), const SYS__LWP_UNPARK ideal-int
+pkg syscall (netbsd-arm64), const SYS__LWP_UNPARK_ALL = 322
+pkg syscall (netbsd-arm64), const SYS__LWP_UNPARK_ALL ideal-int
+pkg syscall (netbsd-arm64), const SYS__LWP_WAIT = 312
+pkg syscall (netbsd-arm64), const SYS__LWP_WAIT ideal-int
+pkg syscall (netbsd-arm64), const SYS__LWP_WAKEUP = 315
+pkg syscall (netbsd-arm64), const SYS__LWP_WAKEUP ideal-int
+pkg syscall (netbsd-arm64), const SYS__PSET_BIND = 415
+pkg syscall (netbsd-arm64), const SYS__PSET_BIND ideal-int
+pkg syscall (netbsd-arm64), const SYS__SCHED_GETAFFINITY = 349
+pkg syscall (netbsd-arm64), const SYS__SCHED_GETAFFINITY ideal-int
+pkg syscall (netbsd-arm64), const SYS__SCHED_GETPARAM = 347
+pkg syscall (netbsd-arm64), const SYS__SCHED_GETPARAM ideal-int
+pkg syscall (netbsd-arm64), const SYS__SCHED_SETAFFINITY = 348
+pkg syscall (netbsd-arm64), const SYS__SCHED_SETAFFINITY ideal-int
+pkg syscall (netbsd-arm64), const SYS__SCHED_SETPARAM = 346
+pkg syscall (netbsd-arm64), const SYS__SCHED_SETPARAM ideal-int
+pkg syscall (netbsd-arm64), const SYS___CLONE = 287
+pkg syscall (netbsd-arm64), const SYS___CLONE ideal-int
+pkg syscall (netbsd-arm64), const SYS___GETCWD = 296
+pkg syscall (netbsd-arm64), const SYS___GETCWD ideal-int
+pkg syscall (netbsd-arm64), const SYS___GETLOGIN = 49
+pkg syscall (netbsd-arm64), const SYS___GETLOGIN ideal-int
+pkg syscall (netbsd-arm64), const SYS___POSIX_CHOWN = 283
+pkg syscall (netbsd-arm64), const SYS___POSIX_CHOWN ideal-int
+pkg syscall (netbsd-arm64), const SYS___POSIX_FCHOWN = 284
+pkg syscall (netbsd-arm64), const SYS___POSIX_FCHOWN ideal-int
+pkg syscall (netbsd-arm64), const SYS___POSIX_LCHOWN = 285
+pkg syscall (netbsd-arm64), const SYS___POSIX_LCHOWN ideal-int
+pkg syscall (netbsd-arm64), const SYS___POSIX_RENAME = 270
+pkg syscall (netbsd-arm64), const SYS___POSIX_RENAME ideal-int
+pkg syscall (netbsd-arm64), const SYS___QUOTACTL = 473
+pkg syscall (netbsd-arm64), const SYS___QUOTACTL ideal-int
+pkg syscall (netbsd-arm64), const SYS___SEMCTL = 442
+pkg syscall (netbsd-arm64), const SYS___SEMCTL ideal-int
+pkg syscall (netbsd-arm64), const SYS___SETLOGIN = 50
+pkg syscall (netbsd-arm64), const SYS___SETLOGIN ideal-int
+pkg syscall (netbsd-arm64), const SYS___SIGACTION_SIGTRAMP = 340
+pkg syscall (netbsd-arm64), const SYS___SIGACTION_SIGTRAMP ideal-int
+pkg syscall (netbsd-arm64), const SYS___SIGTIMEDWAIT = 431
+pkg syscall (netbsd-arm64), const SYS___SIGTIMEDWAIT ideal-int
+pkg syscall (netbsd-arm64), const SYS___SYSCTL = 202
+pkg syscall (netbsd-arm64), const SYS___SYSCTL ideal-int
+pkg syscall (netbsd-arm64), const S_ARCH1 = 65536
+pkg syscall (netbsd-arm64), const S_ARCH1 ideal-int
+pkg syscall (netbsd-arm64), const S_ARCH2 = 131072
+pkg syscall (netbsd-arm64), const S_ARCH2 ideal-int
+pkg syscall (netbsd-arm64), const S_BLKSIZE = 512
+pkg syscall (netbsd-arm64), const S_BLKSIZE ideal-int
+pkg syscall (netbsd-arm64), const S_IEXEC = 64
+pkg syscall (netbsd-arm64), const S_IEXEC ideal-int
+pkg syscall (netbsd-arm64), const S_IFMT = 61440
+pkg syscall (netbsd-arm64), const S_IFWHT = 57344
+pkg syscall (netbsd-arm64), const S_IFWHT ideal-int
+pkg syscall (netbsd-arm64), const S_IREAD = 256
+pkg syscall (netbsd-arm64), const S_IREAD ideal-int
+pkg syscall (netbsd-arm64), const S_IRGRP = 32
+pkg syscall (netbsd-arm64), const S_IRGRP ideal-int
+pkg syscall (netbsd-arm64), const S_IROTH = 4
+pkg syscall (netbsd-arm64), const S_IROTH ideal-int
+pkg syscall (netbsd-arm64), const S_IRWXG = 56
+pkg syscall (netbsd-arm64), const S_IRWXG ideal-int
+pkg syscall (netbsd-arm64), const S_IRWXO = 7
+pkg syscall (netbsd-arm64), const S_IRWXO ideal-int
+pkg syscall (netbsd-arm64), const S_IRWXU = 448
+pkg syscall (netbsd-arm64), const S_IRWXU ideal-int
+pkg syscall (netbsd-arm64), const S_ISTXT = 512
+pkg syscall (netbsd-arm64), const S_ISTXT ideal-int
+pkg syscall (netbsd-arm64), const S_IWGRP = 16
+pkg syscall (netbsd-arm64), const S_IWGRP ideal-int
+pkg syscall (netbsd-arm64), const S_IWOTH = 2
+pkg syscall (netbsd-arm64), const S_IWOTH ideal-int
+pkg syscall (netbsd-arm64), const S_IWRITE = 128
+pkg syscall (netbsd-arm64), const S_IWRITE ideal-int
+pkg syscall (netbsd-arm64), const S_IXGRP = 8
+pkg syscall (netbsd-arm64), const S_IXGRP ideal-int
+pkg syscall (netbsd-arm64), const S_IXOTH = 1
+pkg syscall (netbsd-arm64), const S_IXOTH ideal-int
+pkg syscall (netbsd-arm64), const S_LOGIN_SET = 1
+pkg syscall (netbsd-arm64), const S_LOGIN_SET ideal-int
+pkg syscall (netbsd-arm64), const SizeofBpfHdr = 32
+pkg syscall (netbsd-arm64), const SizeofBpfHdr ideal-int
+pkg syscall (netbsd-arm64), const SizeofBpfInsn = 8
+pkg syscall (netbsd-arm64), const SizeofBpfInsn ideal-int
+pkg syscall (netbsd-arm64), const SizeofBpfProgram = 16
+pkg syscall (netbsd-arm64), const SizeofBpfProgram ideal-int
+pkg syscall (netbsd-arm64), const SizeofBpfStat = 128
+pkg syscall (netbsd-arm64), const SizeofBpfStat ideal-int
+pkg syscall (netbsd-arm64), const SizeofBpfVersion = 4
+pkg syscall (netbsd-arm64), const SizeofBpfVersion ideal-int
+pkg syscall (netbsd-arm64), const SizeofCmsghdr = 12
+pkg syscall (netbsd-arm64), const SizeofCmsghdr ideal-int
+pkg syscall (netbsd-arm64), const SizeofICMPv6Filter = 32
+pkg syscall (netbsd-arm64), const SizeofICMPv6Filter ideal-int
+pkg syscall (netbsd-arm64), const SizeofIPMreq = 8
+pkg syscall (netbsd-arm64), const SizeofIPMreq ideal-int
+pkg syscall (netbsd-arm64), const SizeofIPv6MTUInfo = 32
+pkg syscall (netbsd-arm64), const SizeofIPv6MTUInfo ideal-int
+pkg syscall (netbsd-arm64), const SizeofIPv6Mreq = 20
+pkg syscall (netbsd-arm64), const SizeofIPv6Mreq ideal-int
+pkg syscall (netbsd-arm64), const SizeofIfAnnounceMsghdr = 24
+pkg syscall (netbsd-arm64), const SizeofIfAnnounceMsghdr ideal-int
+pkg syscall (netbsd-arm64), const SizeofIfData = 136
+pkg syscall (netbsd-arm64), const SizeofIfData ideal-int
+pkg syscall (netbsd-arm64), const SizeofIfMsghdr = 152
+pkg syscall (netbsd-arm64), const SizeofIfMsghdr ideal-int
+pkg syscall (netbsd-arm64), const SizeofIfaMsghdr = 24
+pkg syscall (netbsd-arm64), const SizeofIfaMsghdr ideal-int
+pkg syscall (netbsd-arm64), const SizeofInet6Pktinfo = 20
+pkg syscall (netbsd-arm64), const SizeofInet6Pktinfo ideal-int
+pkg syscall (netbsd-arm64), const SizeofLinger = 8
+pkg syscall (netbsd-arm64), const SizeofLinger ideal-int
+pkg syscall (netbsd-arm64), const SizeofMsghdr = 48
+pkg syscall (netbsd-arm64), const SizeofMsghdr ideal-int
+pkg syscall (netbsd-arm64), const SizeofRtMetrics = 80
+pkg syscall (netbsd-arm64), const SizeofRtMetrics ideal-int
+pkg syscall (netbsd-arm64), const SizeofRtMsghdr = 120
+pkg syscall (netbsd-arm64), const SizeofRtMsghdr ideal-int
+pkg syscall (netbsd-arm64), const SizeofSockaddrAny = 108
+pkg syscall (netbsd-arm64), const SizeofSockaddrAny ideal-int
+pkg syscall (netbsd-arm64), const SizeofSockaddrDatalink = 20
+pkg syscall (netbsd-arm64), const SizeofSockaddrDatalink ideal-int
+pkg syscall (netbsd-arm64), const SizeofSockaddrInet4 = 16
+pkg syscall (netbsd-arm64), const SizeofSockaddrInet4 ideal-int
+pkg syscall (netbsd-arm64), const SizeofSockaddrInet6 = 28
+pkg syscall (netbsd-arm64), const SizeofSockaddrInet6 ideal-int
+pkg syscall (netbsd-arm64), const SizeofSockaddrUnix = 106
+pkg syscall (netbsd-arm64), const SizeofSockaddrUnix ideal-int
+pkg syscall (netbsd-arm64), const TCIFLUSH = 1
+pkg syscall (netbsd-arm64), const TCIFLUSH ideal-int
+pkg syscall (netbsd-arm64), const TCIOFLUSH = 3
+pkg syscall (netbsd-arm64), const TCIOFLUSH ideal-int
+pkg syscall (netbsd-arm64), const TCOFLUSH = 2
+pkg syscall (netbsd-arm64), const TCOFLUSH ideal-int
+pkg syscall (netbsd-arm64), const TCP_CONGCTL = 32
+pkg syscall (netbsd-arm64), const TCP_CONGCTL ideal-int
+pkg syscall (netbsd-arm64), const TCP_KEEPCNT = 6
+pkg syscall (netbsd-arm64), const TCP_KEEPCNT ideal-int
+pkg syscall (netbsd-arm64), const TCP_KEEPIDLE = 3
+pkg syscall (netbsd-arm64), const TCP_KEEPIDLE ideal-int
+pkg syscall (netbsd-arm64), const TCP_KEEPINIT = 7
+pkg syscall (netbsd-arm64), const TCP_KEEPINIT ideal-int
+pkg syscall (netbsd-arm64), const TCP_KEEPINTVL = 5
+pkg syscall (netbsd-arm64), const TCP_KEEPINTVL ideal-int
+pkg syscall (netbsd-arm64), const TCP_MAXBURST = 4
+pkg syscall (netbsd-arm64), const TCP_MAXBURST ideal-int
+pkg syscall (netbsd-arm64), const TCP_MAXSEG = 2
+pkg syscall (netbsd-arm64), const TCP_MAXSEG ideal-int
+pkg syscall (netbsd-arm64), const TCP_MAXWIN = 65535
+pkg syscall (netbsd-arm64), const TCP_MAXWIN ideal-int
+pkg syscall (netbsd-arm64), const TCP_MAX_WINSHIFT = 14
+pkg syscall (netbsd-arm64), const TCP_MAX_WINSHIFT ideal-int
+pkg syscall (netbsd-arm64), const TCP_MD5SIG = 16
+pkg syscall (netbsd-arm64), const TCP_MD5SIG ideal-int
+pkg syscall (netbsd-arm64), const TCP_MINMSS = 216
+pkg syscall (netbsd-arm64), const TCP_MINMSS ideal-int
+pkg syscall (netbsd-arm64), const TCP_MSS = 536
+pkg syscall (netbsd-arm64), const TCP_MSS ideal-int
+pkg syscall (netbsd-arm64), const TCSAFLUSH = 2
+pkg syscall (netbsd-arm64), const TCSAFLUSH ideal-int
+pkg syscall (netbsd-arm64), const TIOCCBRK = 536900730
+pkg syscall (netbsd-arm64), const TIOCCBRK ideal-int
+pkg syscall (netbsd-arm64), const TIOCCDTR = 536900728
+pkg syscall (netbsd-arm64), const TIOCCDTR ideal-int
+pkg syscall (netbsd-arm64), const TIOCCONS = 2147775586
+pkg syscall (netbsd-arm64), const TIOCCONS ideal-int
+pkg syscall (netbsd-arm64), const TIOCDCDTIMESTAMP = 1074820184
+pkg syscall (netbsd-arm64), const TIOCDCDTIMESTAMP ideal-int
+pkg syscall (netbsd-arm64), const TIOCDRAIN = 536900702
+pkg syscall (netbsd-arm64), const TIOCDRAIN ideal-int
+pkg syscall (netbsd-arm64), const TIOCEXCL = 536900621
+pkg syscall (netbsd-arm64), const TIOCEXCL ideal-int
+pkg syscall (netbsd-arm64), const TIOCEXT = 2147775584
+pkg syscall (netbsd-arm64), const TIOCEXT ideal-int
+pkg syscall (netbsd-arm64), const TIOCFLAG_CDTRCTS = 16
+pkg syscall (netbsd-arm64), const TIOCFLAG_CDTRCTS ideal-int
+pkg syscall (netbsd-arm64), const TIOCFLAG_CLOCAL = 2
+pkg syscall (netbsd-arm64), const TIOCFLAG_CLOCAL ideal-int
+pkg syscall (netbsd-arm64), const TIOCFLAG_CRTSCTS = 4
+pkg syscall (netbsd-arm64), const TIOCFLAG_CRTSCTS ideal-int
+pkg syscall (netbsd-arm64), const TIOCFLAG_MDMBUF = 8
+pkg syscall (netbsd-arm64), const TIOCFLAG_MDMBUF ideal-int
+pkg syscall (netbsd-arm64), const TIOCFLAG_SOFTCAR = 1
+pkg syscall (netbsd-arm64), const TIOCFLAG_SOFTCAR ideal-int
+pkg syscall (netbsd-arm64), const TIOCFLUSH = 2147775504
+pkg syscall (netbsd-arm64), const TIOCFLUSH ideal-int
+pkg syscall (netbsd-arm64), const TIOCGETA = 1076655123
+pkg syscall (netbsd-arm64), const TIOCGETA ideal-int
+pkg syscall (netbsd-arm64), const TIOCGETD = 1074033690
+pkg syscall (netbsd-arm64), const TIOCGETD ideal-int
+pkg syscall (netbsd-arm64), const TIOCGFLAGS = 1074033757
+pkg syscall (netbsd-arm64), const TIOCGFLAGS ideal-int
+pkg syscall (netbsd-arm64), const TIOCGLINED = 1075868738
+pkg syscall (netbsd-arm64), const TIOCGLINED ideal-int
+pkg syscall (netbsd-arm64), const TIOCGPGRP = 1074033783
+pkg syscall (netbsd-arm64), const TIOCGPGRP ideal-int
+pkg syscall (netbsd-arm64), const TIOCGQSIZE = 1074033793
+pkg syscall (netbsd-arm64), const TIOCGQSIZE ideal-int
+pkg syscall (netbsd-arm64), const TIOCGRANTPT = 536900679
+pkg syscall (netbsd-arm64), const TIOCGRANTPT ideal-int
+pkg syscall (netbsd-arm64), const TIOCGSID = 1074033763
+pkg syscall (netbsd-arm64), const TIOCGSID ideal-int
+pkg syscall (netbsd-arm64), const TIOCGSIZE = 1074295912
+pkg syscall (netbsd-arm64), const TIOCGSIZE ideal-int
+pkg syscall (netbsd-arm64), const TIOCGWINSZ = 1074295912
+pkg syscall (netbsd-arm64), const TIOCGWINSZ ideal-int
+pkg syscall (netbsd-arm64), const TIOCMBIC = 2147775595
+pkg syscall (netbsd-arm64), const TIOCMBIC ideal-int
+pkg syscall (netbsd-arm64), const TIOCMBIS = 2147775596
+pkg syscall (netbsd-arm64), const TIOCMBIS ideal-int
+pkg syscall (netbsd-arm64), const TIOCMGET = 1074033770
+pkg syscall (netbsd-arm64), const TIOCMGET ideal-int
+pkg syscall (netbsd-arm64), const TIOCMSET = 2147775597
+pkg syscall (netbsd-arm64), const TIOCMSET ideal-int
+pkg syscall (netbsd-arm64), const TIOCM_CAR = 64
+pkg syscall (netbsd-arm64), const TIOCM_CAR ideal-int
+pkg syscall (netbsd-arm64), const TIOCM_CD = 64
+pkg syscall (netbsd-arm64), const TIOCM_CD ideal-int
+pkg syscall (netbsd-arm64), const TIOCM_CTS = 32
+pkg syscall (netbsd-arm64), const TIOCM_CTS ideal-int
+pkg syscall (netbsd-arm64), const TIOCM_DSR = 256
+pkg syscall (netbsd-arm64), const TIOCM_DSR ideal-int
+pkg syscall (netbsd-arm64), const TIOCM_DTR = 2
+pkg syscall (netbsd-arm64), const TIOCM_DTR ideal-int
+pkg syscall (netbsd-arm64), const TIOCM_LE = 1
+pkg syscall (netbsd-arm64), const TIOCM_LE ideal-int
+pkg syscall (netbsd-arm64), const TIOCM_RI = 128
+pkg syscall (netbsd-arm64), const TIOCM_RI ideal-int
+pkg syscall (netbsd-arm64), const TIOCM_RNG = 128
+pkg syscall (netbsd-arm64), const TIOCM_RNG ideal-int
+pkg syscall (netbsd-arm64), const TIOCM_RTS = 4
+pkg syscall (netbsd-arm64), const TIOCM_RTS ideal-int
+pkg syscall (netbsd-arm64), const TIOCM_SR = 16
+pkg syscall (netbsd-arm64), const TIOCM_SR ideal-int
+pkg syscall (netbsd-arm64), const TIOCM_ST = 8
+pkg syscall (netbsd-arm64), const TIOCM_ST ideal-int
+pkg syscall (netbsd-arm64), const TIOCNOTTY = 536900721
+pkg syscall (netbsd-arm64), const TIOCNOTTY ideal-int
+pkg syscall (netbsd-arm64), const TIOCNXCL = 536900622
+pkg syscall (netbsd-arm64), const TIOCNXCL ideal-int
+pkg syscall (netbsd-arm64), const TIOCOUTQ = 1074033779
+pkg syscall (netbsd-arm64), const TIOCOUTQ ideal-int
+pkg syscall (netbsd-arm64), const TIOCPKT = 2147775600
+pkg syscall (netbsd-arm64), const TIOCPKT ideal-int
+pkg syscall (netbsd-arm64), const TIOCPKT_DATA = 0
+pkg syscall (netbsd-arm64), const TIOCPKT_DATA ideal-int
+pkg syscall (netbsd-arm64), const TIOCPKT_DOSTOP = 32
+pkg syscall (netbsd-arm64), const TIOCPKT_DOSTOP ideal-int
+pkg syscall (netbsd-arm64), const TIOCPKT_FLUSHREAD = 1
+pkg syscall (netbsd-arm64), const TIOCPKT_FLUSHREAD ideal-int
+pkg syscall (netbsd-arm64), const TIOCPKT_FLUSHWRITE = 2
+pkg syscall (netbsd-arm64), const TIOCPKT_FLUSHWRITE ideal-int
+pkg syscall (netbsd-arm64), const TIOCPKT_IOCTL = 64
+pkg syscall (netbsd-arm64), const TIOCPKT_IOCTL ideal-int
+pkg syscall (netbsd-arm64), const TIOCPKT_NOSTOP = 16
+pkg syscall (netbsd-arm64), const TIOCPKT_NOSTOP ideal-int
+pkg syscall (netbsd-arm64), const TIOCPKT_START = 8
+pkg syscall (netbsd-arm64), const TIOCPKT_START ideal-int
+pkg syscall (netbsd-arm64), const TIOCPKT_STOP = 4
+pkg syscall (netbsd-arm64), const TIOCPKT_STOP ideal-int
+pkg syscall (netbsd-arm64), const TIOCPTMGET = 1076393030
+pkg syscall (netbsd-arm64), const TIOCPTMGET ideal-int
+pkg syscall (netbsd-arm64), const TIOCPTSNAME = 1076393032
+pkg syscall (netbsd-arm64), const TIOCPTSNAME ideal-int
+pkg syscall (netbsd-arm64), const TIOCRCVFRAME = 2148037701
+pkg syscall (netbsd-arm64), const TIOCRCVFRAME ideal-int
+pkg syscall (netbsd-arm64), const TIOCREMOTE = 2147775593
+pkg syscall (netbsd-arm64), const TIOCREMOTE ideal-int
+pkg syscall (netbsd-arm64), const TIOCSBRK = 536900731
+pkg syscall (netbsd-arm64), const TIOCSBRK ideal-int
+pkg syscall (netbsd-arm64), const TIOCSCTTY = 536900705
+pkg syscall (netbsd-arm64), const TIOCSCTTY ideal-int
+pkg syscall (netbsd-arm64), const TIOCSDTR = 536900729
+pkg syscall (netbsd-arm64), const TIOCSDTR ideal-int
+pkg syscall (netbsd-arm64), const TIOCSETA = 2150396948
+pkg syscall (netbsd-arm64), const TIOCSETA ideal-int
+pkg syscall (netbsd-arm64), const TIOCSETAF = 2150396950
+pkg syscall (netbsd-arm64), const TIOCSETAF ideal-int
+pkg syscall (netbsd-arm64), const TIOCSETAW = 2150396949
+pkg syscall (netbsd-arm64), const TIOCSETAW ideal-int
+pkg syscall (netbsd-arm64), const TIOCSETD = 2147775515
+pkg syscall (netbsd-arm64), const TIOCSETD ideal-int
+pkg syscall (netbsd-arm64), const TIOCSFLAGS = 2147775580
+pkg syscall (netbsd-arm64), const TIOCSFLAGS ideal-int
+pkg syscall (netbsd-arm64), const TIOCSIG = 536900703
+pkg syscall (netbsd-arm64), const TIOCSIG ideal-int
+pkg syscall (netbsd-arm64), const TIOCSLINED = 2149610563
+pkg syscall (netbsd-arm64), const TIOCSLINED ideal-int
+pkg syscall (netbsd-arm64), const TIOCSPGRP = 2147775606
+pkg syscall (netbsd-arm64), const TIOCSPGRP ideal-int
+pkg syscall (netbsd-arm64), const TIOCSQSIZE = 2147775616
+pkg syscall (netbsd-arm64), const TIOCSQSIZE ideal-int
+pkg syscall (netbsd-arm64), const TIOCSSIZE = 2148037735
+pkg syscall (netbsd-arm64), const TIOCSSIZE ideal-int
+pkg syscall (netbsd-arm64), const TIOCSTART = 536900718
+pkg syscall (netbsd-arm64), const TIOCSTART ideal-int
+pkg syscall (netbsd-arm64), const TIOCSTAT = 2147775589
+pkg syscall (netbsd-arm64), const TIOCSTAT ideal-int
+pkg syscall (netbsd-arm64), const TIOCSTI = 2147578994
+pkg syscall (netbsd-arm64), const TIOCSTI ideal-int
+pkg syscall (netbsd-arm64), const TIOCSTOP = 536900719
+pkg syscall (netbsd-arm64), const TIOCSTOP ideal-int
+pkg syscall (netbsd-arm64), const TIOCSWINSZ = 2148037735
+pkg syscall (netbsd-arm64), const TIOCSWINSZ ideal-int
+pkg syscall (netbsd-arm64), const TIOCUCNTL = 2147775590
+pkg syscall (netbsd-arm64), const TIOCUCNTL ideal-int
+pkg syscall (netbsd-arm64), const TIOCXMTFRAME = 2148037700
+pkg syscall (netbsd-arm64), const TIOCXMTFRAME ideal-int
+pkg syscall (netbsd-arm64), const TOSTOP = 4194304
+pkg syscall (netbsd-arm64), const TOSTOP ideal-int
+pkg syscall (netbsd-arm64), const VDISCARD = 15
+pkg syscall (netbsd-arm64), const VDISCARD ideal-int
+pkg syscall (netbsd-arm64), const VDSUSP = 11
+pkg syscall (netbsd-arm64), const VDSUSP ideal-int
+pkg syscall (netbsd-arm64), const VEOF = 0
+pkg syscall (netbsd-arm64), const VEOF ideal-int
+pkg syscall (netbsd-arm64), const VEOL = 1
+pkg syscall (netbsd-arm64), const VEOL ideal-int
+pkg syscall (netbsd-arm64), const VEOL2 = 2
+pkg syscall (netbsd-arm64), const VEOL2 ideal-int
+pkg syscall (netbsd-arm64), const VERASE = 3
+pkg syscall (netbsd-arm64), const VERASE ideal-int
+pkg syscall (netbsd-arm64), const VINTR = 8
+pkg syscall (netbsd-arm64), const VINTR ideal-int
+pkg syscall (netbsd-arm64), const VKILL = 5
+pkg syscall (netbsd-arm64), const VKILL ideal-int
+pkg syscall (netbsd-arm64), const VLNEXT = 14
+pkg syscall (netbsd-arm64), const VLNEXT ideal-int
+pkg syscall (netbsd-arm64), const VMIN = 16
+pkg syscall (netbsd-arm64), const VMIN ideal-int
+pkg syscall (netbsd-arm64), const VQUIT = 9
+pkg syscall (netbsd-arm64), const VQUIT ideal-int
+pkg syscall (netbsd-arm64), const VREPRINT = 6
+pkg syscall (netbsd-arm64), const VREPRINT ideal-int
+pkg syscall (netbsd-arm64), const VSTART = 12
+pkg syscall (netbsd-arm64), const VSTART ideal-int
+pkg syscall (netbsd-arm64), const VSTATUS = 18
+pkg syscall (netbsd-arm64), const VSTATUS ideal-int
+pkg syscall (netbsd-arm64), const VSTOP = 13
+pkg syscall (netbsd-arm64), const VSTOP ideal-int
+pkg syscall (netbsd-arm64), const VSUSP = 10
+pkg syscall (netbsd-arm64), const VSUSP ideal-int
+pkg syscall (netbsd-arm64), const VTIME = 17
+pkg syscall (netbsd-arm64), const VTIME ideal-int
+pkg syscall (netbsd-arm64), const VWERASE = 4
+pkg syscall (netbsd-arm64), const VWERASE ideal-int
+pkg syscall (netbsd-arm64), const WALL = 8
+pkg syscall (netbsd-arm64), const WALL ideal-int
+pkg syscall (netbsd-arm64), const WALLSIG = 8
+pkg syscall (netbsd-arm64), const WALLSIG ideal-int
+pkg syscall (netbsd-arm64), const WALTSIG = 4
+pkg syscall (netbsd-arm64), const WALTSIG ideal-int
+pkg syscall (netbsd-arm64), const WCLONE = 4
+pkg syscall (netbsd-arm64), const WCLONE ideal-int
+pkg syscall (netbsd-arm64), const WCOREFLAG = 128
+pkg syscall (netbsd-arm64), const WCOREFLAG ideal-int
+pkg syscall (netbsd-arm64), const WNOHANG = 1
+pkg syscall (netbsd-arm64), const WNOHANG ideal-int
+pkg syscall (netbsd-arm64), const WNOWAIT = 65536
+pkg syscall (netbsd-arm64), const WNOWAIT ideal-int
+pkg syscall (netbsd-arm64), const WNOZOMBIE = 131072
+pkg syscall (netbsd-arm64), const WNOZOMBIE ideal-int
+pkg syscall (netbsd-arm64), const WOPTSCHECKED = 262144
+pkg syscall (netbsd-arm64), const WOPTSCHECKED ideal-int
+pkg syscall (netbsd-arm64), const WSTOPPED = 127
+pkg syscall (netbsd-arm64), const WSTOPPED ideal-int
+pkg syscall (netbsd-arm64), const WUNTRACED = 2
+pkg syscall (netbsd-arm64), const WUNTRACED ideal-int
+pkg syscall (netbsd-arm64), func Accept(int) (int, Sockaddr, error)
+pkg syscall (netbsd-arm64), func Accept4(int, int) (int, Sockaddr, error)
+pkg syscall (netbsd-arm64), func Access(string, uint32) error
+pkg syscall (netbsd-arm64), func Adjtime(*Timeval, *Timeval) error
+pkg syscall (netbsd-arm64), func Bind(int, Sockaddr) error
+pkg syscall (netbsd-arm64), func BpfBuflen(int) (int, error)
+pkg syscall (netbsd-arm64), func BpfDatalink(int) (int, error)
+pkg syscall (netbsd-arm64), func BpfHeadercmpl(int) (int, error)
+pkg syscall (netbsd-arm64), func BpfInterface(int, string) (string, error)
+pkg syscall (netbsd-arm64), func BpfJump(int, int, int, int) *BpfInsn
+pkg syscall (netbsd-arm64), func BpfStats(int) (*BpfStat, error)
+pkg syscall (netbsd-arm64), func BpfStmt(int, int) *BpfInsn
+pkg syscall (netbsd-arm64), func BpfTimeout(int) (*Timeval, error)
+pkg syscall (netbsd-arm64), func CheckBpfVersion(int) error
+pkg syscall (netbsd-arm64), func Chflags(string, int) error
+pkg syscall (netbsd-arm64), func Chroot(string) error
+pkg syscall (netbsd-arm64), func Close(int) error
+pkg syscall (netbsd-arm64), func CloseOnExec(int)
+pkg syscall (netbsd-arm64), func CmsgLen(int) int
+pkg syscall (netbsd-arm64), func CmsgSpace(int) int
+pkg syscall (netbsd-arm64), func Connect(int, Sockaddr) error
+pkg syscall (netbsd-arm64), func Dup(int) (int, error)
+pkg syscall (netbsd-arm64), func Dup2(int, int) error
+pkg syscall (netbsd-arm64), func Fchdir(int) error
+pkg syscall (netbsd-arm64), func Fchflags(int, int) error
+pkg syscall (netbsd-arm64), func Fchmod(int, uint32) error
+pkg syscall (netbsd-arm64), func Fchown(int, int, int) error
+pkg syscall (netbsd-arm64), func FcntlFlock(uintptr, int, *Flock_t) error
+pkg syscall (netbsd-arm64), func Flock(int, int) error
+pkg syscall (netbsd-arm64), func FlushBpf(int) error
+pkg syscall (netbsd-arm64), func ForkExec(string, []string, *ProcAttr) (int, error)
+pkg syscall (netbsd-arm64), func Fpathconf(int, int) (int, error)
+pkg syscall (netbsd-arm64), func Fstat(int, *Stat_t) error
+pkg syscall (netbsd-arm64), func Fsync(int) error
+pkg syscall (netbsd-arm64), func Ftruncate(int, int64) error
+pkg syscall (netbsd-arm64), func Futimes(int, []Timeval) error
+pkg syscall (netbsd-arm64), func Getdirentries(int, []uint8, *uintptr) (int, error)
+pkg syscall (netbsd-arm64), func Getpeername(int) (Sockaddr, error)
+pkg syscall (netbsd-arm64), func Getpgid(int) (int, error)
+pkg syscall (netbsd-arm64), func Getpgrp() int
+pkg syscall (netbsd-arm64), func Getpriority(int, int) (int, error)
+pkg syscall (netbsd-arm64), func Getrlimit(int, *Rlimit) error
+pkg syscall (netbsd-arm64), func Getrusage(int, *Rusage) error
+pkg syscall (netbsd-arm64), func Getsid(int) (int, error)
+pkg syscall (netbsd-arm64), func Getsockname(int) (Sockaddr, error)
+pkg syscall (netbsd-arm64), func GetsockoptByte(int, int, int) (uint8, error)
+pkg syscall (netbsd-arm64), func GetsockoptICMPv6Filter(int, int, int) (*ICMPv6Filter, error)
+pkg syscall (netbsd-arm64), func GetsockoptIPMreq(int, int, int) (*IPMreq, error)
+pkg syscall (netbsd-arm64), func GetsockoptIPv6MTUInfo(int, int, int) (*IPv6MTUInfo, error)
+pkg syscall (netbsd-arm64), func GetsockoptIPv6Mreq(int, int, int) (*IPv6Mreq, error)
+pkg syscall (netbsd-arm64), func GetsockoptInet4Addr(int, int, int) ([4]uint8, error)
+pkg syscall (netbsd-arm64), func GetsockoptInt(int, int, int) (int, error)
+pkg syscall (netbsd-arm64), func Issetugid() bool
+pkg syscall (netbsd-arm64), func Kevent(int, []Kevent_t, []Kevent_t, *Timespec) (int, error)
+pkg syscall (netbsd-arm64), func Kill(int, Signal) error
+pkg syscall (netbsd-arm64), func Kqueue() (int, error)
+pkg syscall (netbsd-arm64), func Listen(int, int) error
+pkg syscall (netbsd-arm64), func Lstat(string, *Stat_t) error
+pkg syscall (netbsd-arm64), func Mkfifo(string, uint32) error
+pkg syscall (netbsd-arm64), func Mknod(string, uint32, int) error
+pkg syscall (netbsd-arm64), func Mmap(int, int64, int, int, int) ([]uint8, error)
+pkg syscall (netbsd-arm64), func Munmap([]uint8) error
+pkg syscall (netbsd-arm64), func Nanosleep(*Timespec, *Timespec) error
+pkg syscall (netbsd-arm64), func Open(string, int, uint32) (int, error)
+pkg syscall (netbsd-arm64), func ParseDirent([]uint8, int, []string) (int, int, []string)
+pkg syscall (netbsd-arm64), func ParseRoutingMessage([]uint8) ([]RoutingMessage, error)
+pkg syscall (netbsd-arm64), func ParseRoutingSockaddr(RoutingMessage) ([]Sockaddr, error)
+pkg syscall (netbsd-arm64), func ParseSocketControlMessage([]uint8) ([]SocketControlMessage, error)
+pkg syscall (netbsd-arm64), func ParseUnixRights(*SocketControlMessage) ([]int, error)
+pkg syscall (netbsd-arm64), func Pathconf(string, int) (int, error)
+pkg syscall (netbsd-arm64), func Pipe([]int) error
+pkg syscall (netbsd-arm64), func Pipe2([]int, int) error
+pkg syscall (netbsd-arm64), func Pread(int, []uint8, int64) (int, error)
+pkg syscall (netbsd-arm64), func Pwrite(int, []uint8, int64) (int, error)
+pkg syscall (netbsd-arm64), func RawSyscall(uintptr, uintptr, uintptr, uintptr) (uintptr, uintptr, Errno)
+pkg syscall (netbsd-arm64), func RawSyscall6(uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) (uintptr, uintptr, Errno)
+pkg syscall (netbsd-arm64), func Read(int, []uint8) (int, error)
+pkg syscall (netbsd-arm64), func ReadDirent(int, []uint8) (int, error)
+pkg syscall (netbsd-arm64), func Recvfrom(int, []uint8, int) (int, Sockaddr, error)
+pkg syscall (netbsd-arm64), func Recvmsg(int, []uint8, []uint8, int) (int, int, int, Sockaddr, error)
+pkg syscall (netbsd-arm64), func Revoke(string) error
+pkg syscall (netbsd-arm64), func RouteRIB(int, int) ([]uint8, error)
+pkg syscall (netbsd-arm64), func Seek(int, int64, int) (int64, error)
+pkg syscall (netbsd-arm64), func Select(int, *FdSet, *FdSet, *FdSet, *Timeval) error
+pkg syscall (netbsd-arm64), func Sendfile(int, int, *int64, int) (int, error)
+pkg syscall (netbsd-arm64), func Sendmsg(int, []uint8, []uint8, Sockaddr, int) error
+pkg syscall (netbsd-arm64), func SendmsgN(int, []uint8, []uint8, Sockaddr, int) (int, error)
+pkg syscall (netbsd-arm64), func Sendto(int, []uint8, int, Sockaddr) error
+pkg syscall (netbsd-arm64), func SetBpf(int, []BpfInsn) error
+pkg syscall (netbsd-arm64), func SetBpfBuflen(int, int) (int, error)
+pkg syscall (netbsd-arm64), func SetBpfDatalink(int, int) (int, error)
+pkg syscall (netbsd-arm64), func SetBpfHeadercmpl(int, int) error
+pkg syscall (netbsd-arm64), func SetBpfImmediate(int, int) error
+pkg syscall (netbsd-arm64), func SetBpfInterface(int, string) error
+pkg syscall (netbsd-arm64), func SetBpfPromisc(int, int) error
+pkg syscall (netbsd-arm64), func SetBpfTimeout(int, *Timeval) error
+pkg syscall (netbsd-arm64), func SetKevent(*Kevent_t, int, int, int)
+pkg syscall (netbsd-arm64), func SetNonblock(int, bool) error
+pkg syscall (netbsd-arm64), func Setegid(int) error
+pkg syscall (netbsd-arm64), func Seteuid(int) error
+pkg syscall (netbsd-arm64), func Setgid(int) error
+pkg syscall (netbsd-arm64), func Setgroups([]int) error
+pkg syscall (netbsd-arm64), func Setpgid(int, int) error
+pkg syscall (netbsd-arm64), func Setpriority(int, int, int) error
+pkg syscall (netbsd-arm64), func Setregid(int, int) error
+pkg syscall (netbsd-arm64), func Setreuid(int, int) error
+pkg syscall (netbsd-arm64), func Setrlimit(int, *Rlimit) error
+pkg syscall (netbsd-arm64), func Setsid() (int, error)
+pkg syscall (netbsd-arm64), func SetsockoptByte(int, int, int, uint8) error
+pkg syscall (netbsd-arm64), func SetsockoptICMPv6Filter(int, int, int, *ICMPv6Filter) error
+pkg syscall (netbsd-arm64), func SetsockoptIPMreq(int, int, int, *IPMreq) error
+pkg syscall (netbsd-arm64), func SetsockoptIPv6Mreq(int, int, int, *IPv6Mreq) error
+pkg syscall (netbsd-arm64), func SetsockoptInet4Addr(int, int, int, [4]uint8) error
+pkg syscall (netbsd-arm64), func SetsockoptInt(int, int, int, int) error
+pkg syscall (netbsd-arm64), func SetsockoptLinger(int, int, int, *Linger) error
+pkg syscall (netbsd-arm64), func SetsockoptString(int, int, int, string) error
+pkg syscall (netbsd-arm64), func SetsockoptTimeval(int, int, int, *Timeval) error
+pkg syscall (netbsd-arm64), func Settimeofday(*Timeval) error
+pkg syscall (netbsd-arm64), func Setuid(int) error
+pkg syscall (netbsd-arm64), func Shutdown(int, int) error
+pkg syscall (netbsd-arm64), func SlicePtrFromStrings([]string) ([]*uint8, error)
+pkg syscall (netbsd-arm64), func Socket(int, int, int) (int, error)
+pkg syscall (netbsd-arm64), func Socketpair(int, int, int) ([2]int, error)
+pkg syscall (netbsd-arm64), func Stat(string, *Stat_t) error
+pkg syscall (netbsd-arm64), func StringSlicePtr([]string) []*uint8
+pkg syscall (netbsd-arm64), func Sync() error
+pkg syscall (netbsd-arm64), func Syscall(uintptr, uintptr, uintptr, uintptr) (uintptr, uintptr, Errno)
+pkg syscall (netbsd-arm64), func Syscall6(uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) (uintptr, uintptr, Errno)
+pkg syscall (netbsd-arm64), func Syscall9(uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) (uintptr, uintptr, Errno)
+pkg syscall (netbsd-arm64), func Sysctl(string) (string, error)
+pkg syscall (netbsd-arm64), func SysctlUint32(string) (uint32, error)
+pkg syscall (netbsd-arm64), func TimevalToNsec(Timeval) int64
+pkg syscall (netbsd-arm64), func Truncate(string, int64) error
+pkg syscall (netbsd-arm64), func Umask(int) int
+pkg syscall (netbsd-arm64), func UnixRights(...int) []uint8
+pkg syscall (netbsd-arm64), func Unmount(string, int) error
+pkg syscall (netbsd-arm64), func Wait4(int, *WaitStatus, int, *Rusage) (int, error)
+pkg syscall (netbsd-arm64), func Write(int, []uint8) (int, error)
+pkg syscall (netbsd-arm64), method (*Cmsghdr) SetLen(int)
+pkg syscall (netbsd-arm64), method (*Iovec) SetLen(int)
+pkg syscall (netbsd-arm64), method (*Msghdr) SetControllen(int)
+pkg syscall (netbsd-arm64), type BpfHdr struct
+pkg syscall (netbsd-arm64), type BpfHdr struct, Caplen uint32
+pkg syscall (netbsd-arm64), type BpfHdr struct, Datalen uint32
+pkg syscall (netbsd-arm64), type BpfHdr struct, Hdrlen uint16
+pkg syscall (netbsd-arm64), type BpfHdr struct, Pad_cgo_0 [6]uint8
+pkg syscall (netbsd-arm64), type BpfHdr struct, Tstamp BpfTimeval
+pkg syscall (netbsd-arm64), type BpfInsn struct
+pkg syscall (netbsd-arm64), type BpfInsn struct, Code uint16
+pkg syscall (netbsd-arm64), type BpfInsn struct, Jf uint8
+pkg syscall (netbsd-arm64), type BpfInsn struct, Jt uint8
+pkg syscall (netbsd-arm64), type BpfInsn struct, K uint32
+pkg syscall (netbsd-arm64), type BpfProgram struct
+pkg syscall (netbsd-arm64), type BpfProgram struct, Insns *BpfInsn
+pkg syscall (netbsd-arm64), type BpfProgram struct, Len uint32
+pkg syscall (netbsd-arm64), type BpfProgram struct, Pad_cgo_0 [4]uint8
+pkg syscall (netbsd-arm64), type BpfStat struct
+pkg syscall (netbsd-arm64), type BpfStat struct, Capt uint64
+pkg syscall (netbsd-arm64), type BpfStat struct, Drop uint64
+pkg syscall (netbsd-arm64), type BpfStat struct, Padding [13]uint64
+pkg syscall (netbsd-arm64), type BpfStat struct, Recv uint64
+pkg syscall (netbsd-arm64), type BpfTimeval struct
+pkg syscall (netbsd-arm64), type BpfTimeval struct, Sec int64
+pkg syscall (netbsd-arm64), type BpfTimeval struct, Usec int64
+pkg syscall (netbsd-arm64), type BpfVersion struct
+pkg syscall (netbsd-arm64), type BpfVersion struct, Major uint16
+pkg syscall (netbsd-arm64), type BpfVersion struct, Minor uint16
+pkg syscall (netbsd-arm64), type Cmsghdr struct
+pkg syscall (netbsd-arm64), type Cmsghdr struct, Len uint32
+pkg syscall (netbsd-arm64), type Cmsghdr struct, Level int32
+pkg syscall (netbsd-arm64), type Cmsghdr struct, Type int32
+pkg syscall (netbsd-arm64), type Credential struct
+pkg syscall (netbsd-arm64), type Credential struct, Gid uint32
+pkg syscall (netbsd-arm64), type Credential struct, Groups []uint32
+pkg syscall (netbsd-arm64), type Credential struct, NoSetGroups bool
+pkg syscall (netbsd-arm64), type Credential struct, Uid uint32
+pkg syscall (netbsd-arm64), type Dirent struct
+pkg syscall (netbsd-arm64), type Dirent struct, Fileno uint64
+pkg syscall (netbsd-arm64), type Dirent struct, Name [512]int8
+pkg syscall (netbsd-arm64), type Dirent struct, Namlen uint16
+pkg syscall (netbsd-arm64), type Dirent struct, Pad_cgo_0 [3]uint8
+pkg syscall (netbsd-arm64), type Dirent struct, Reclen uint16
+pkg syscall (netbsd-arm64), type Dirent struct, Type uint8
+pkg syscall (netbsd-arm64), type FdSet struct
+pkg syscall (netbsd-arm64), type FdSet struct, Bits [8]uint32
+pkg syscall (netbsd-arm64), type Flock_t struct
+pkg syscall (netbsd-arm64), type Flock_t struct, Len int64
+pkg syscall (netbsd-arm64), type Flock_t struct, Pid int32
+pkg syscall (netbsd-arm64), type Flock_t struct, Start int64
+pkg syscall (netbsd-arm64), type Flock_t struct, Type int16
+pkg syscall (netbsd-arm64), type Flock_t struct, Whence int16
+pkg syscall (netbsd-arm64), type Fsid struct
+pkg syscall (netbsd-arm64), type Fsid struct, X__fsid_val [2]int32
+pkg syscall (netbsd-arm64), type ICMPv6Filter struct
+pkg syscall (netbsd-arm64), type ICMPv6Filter struct, Filt [8]uint32
+pkg syscall (netbsd-arm64), type IPv6MTUInfo struct
+pkg syscall (netbsd-arm64), type IPv6MTUInfo struct, Addr RawSockaddrInet6
+pkg syscall (netbsd-arm64), type IPv6MTUInfo struct, Mtu uint32
+pkg syscall (netbsd-arm64), type IfAnnounceMsghdr struct
+pkg syscall (netbsd-arm64), type IfAnnounceMsghdr struct, Index uint16
+pkg syscall (netbsd-arm64), type IfAnnounceMsghdr struct, Msglen uint16
+pkg syscall (netbsd-arm64), type IfAnnounceMsghdr struct, Name [16]int8
+pkg syscall (netbsd-arm64), type IfAnnounceMsghdr struct, Type uint8
+pkg syscall (netbsd-arm64), type IfAnnounceMsghdr struct, Version uint8
+pkg syscall (netbsd-arm64), type IfAnnounceMsghdr struct, What uint16
+pkg syscall (netbsd-arm64), type IfData struct
+pkg syscall (netbsd-arm64), type IfData struct, Addrlen uint8
+pkg syscall (netbsd-arm64), type IfData struct, Baudrate uint64
+pkg syscall (netbsd-arm64), type IfData struct, Collisions uint64
+pkg syscall (netbsd-arm64), type IfData struct, Hdrlen uint8
+pkg syscall (netbsd-arm64), type IfData struct, Ibytes uint64
+pkg syscall (netbsd-arm64), type IfData struct, Ierrors uint64
+pkg syscall (netbsd-arm64), type IfData struct, Imcasts uint64
+pkg syscall (netbsd-arm64), type IfData struct, Ipackets uint64
+pkg syscall (netbsd-arm64), type IfData struct, Iqdrops uint64
+pkg syscall (netbsd-arm64), type IfData struct, Lastchange Timespec
+pkg syscall (netbsd-arm64), type IfData struct, Link_state int32
+pkg syscall (netbsd-arm64), type IfData struct, Metric uint64
+pkg syscall (netbsd-arm64), type IfData struct, Mtu uint64
+pkg syscall (netbsd-arm64), type IfData struct, Noproto uint64
+pkg syscall (netbsd-arm64), type IfData struct, Obytes uint64
+pkg syscall (netbsd-arm64), type IfData struct, Oerrors uint64
+pkg syscall (netbsd-arm64), type IfData struct, Omcasts uint64
+pkg syscall (netbsd-arm64), type IfData struct, Opackets uint64
+pkg syscall (netbsd-arm64), type IfData struct, Pad_cgo_0 [1]uint8
+pkg syscall (netbsd-arm64), type IfData struct, Type uint8
+pkg syscall (netbsd-arm64), type IfMsghdr struct
+pkg syscall (netbsd-arm64), type IfMsghdr struct, Addrs int32
+pkg syscall (netbsd-arm64), type IfMsghdr struct, Data IfData
+pkg syscall (netbsd-arm64), type IfMsghdr struct, Flags int32
+pkg syscall (netbsd-arm64), type IfMsghdr struct, Index uint16
+pkg syscall (netbsd-arm64), type IfMsghdr struct, Msglen uint16
+pkg syscall (netbsd-arm64), type IfMsghdr struct, Pad_cgo_0 [2]uint8
+pkg syscall (netbsd-arm64), type IfMsghdr struct, Type uint8
+pkg syscall (netbsd-arm64), type IfMsghdr struct, Version uint8
+pkg syscall (netbsd-arm64), type IfaMsghdr struct
+pkg syscall (netbsd-arm64), type IfaMsghdr struct, Addrs int32
+pkg syscall (netbsd-arm64), type IfaMsghdr struct, Flags int32
+pkg syscall (netbsd-arm64), type IfaMsghdr struct, Index uint16
+pkg syscall (netbsd-arm64), type IfaMsghdr struct, Metric int32
+pkg syscall (netbsd-arm64), type IfaMsghdr struct, Msglen uint16
+pkg syscall (netbsd-arm64), type IfaMsghdr struct, Pad_cgo_0 [6]uint8
+pkg syscall (netbsd-arm64), type IfaMsghdr struct, Type uint8
+pkg syscall (netbsd-arm64), type IfaMsghdr struct, Version uint8
+pkg syscall (netbsd-arm64), type Inet6Pktinfo struct
+pkg syscall (netbsd-arm64), type Inet6Pktinfo struct, Addr [16]uint8
+pkg syscall (netbsd-arm64), type Inet6Pktinfo struct, Ifindex uint32
+pkg syscall (netbsd-arm64), type InterfaceAddrMessage struct
+pkg syscall (netbsd-arm64), type InterfaceAddrMessage struct, Data []uint8
+pkg syscall (netbsd-arm64), type InterfaceAddrMessage struct, Header IfaMsghdr
+pkg syscall (netbsd-arm64), type InterfaceAnnounceMessage struct
+pkg syscall (netbsd-arm64), type InterfaceAnnounceMessage struct, Header IfAnnounceMsghdr
+pkg syscall (netbsd-arm64), type InterfaceMessage struct
+pkg syscall (netbsd-arm64), type InterfaceMessage struct, Data []uint8
+pkg syscall (netbsd-arm64), type InterfaceMessage struct, Header IfMsghdr
+pkg syscall (netbsd-arm64), type Iovec struct
+pkg syscall (netbsd-arm64), type Iovec struct, Base *uint8
+pkg syscall (netbsd-arm64), type Iovec struct, Len uint64
+pkg syscall (netbsd-arm64), type Kevent_t struct
+pkg syscall (netbsd-arm64), type Kevent_t struct, Data int64
+pkg syscall (netbsd-arm64), type Kevent_t struct, Fflags uint32
+pkg syscall (netbsd-arm64), type Kevent_t struct, Filter uint32
+pkg syscall (netbsd-arm64), type Kevent_t struct, Flags uint32
+pkg syscall (netbsd-arm64), type Kevent_t struct, Ident uint64
+pkg syscall (netbsd-arm64), type Kevent_t struct, Pad_cgo_0 [4]uint8
+pkg syscall (netbsd-arm64), type Kevent_t struct, Udata int64
+pkg syscall (netbsd-arm64), type Mclpool [0]uint8
+pkg syscall (netbsd-arm64), type Msghdr struct
+pkg syscall (netbsd-arm64), type Msghdr struct, Control *uint8
+pkg syscall (netbsd-arm64), type Msghdr struct, Controllen uint32
+pkg syscall (netbsd-arm64), type Msghdr struct, Flags int32
+pkg syscall (netbsd-arm64), type Msghdr struct, Iov *Iovec
+pkg syscall (netbsd-arm64), type Msghdr struct, Iovlen int32
+pkg syscall (netbsd-arm64), type Msghdr struct, Name *uint8
+pkg syscall (netbsd-arm64), type Msghdr struct, Namelen uint32
+pkg syscall (netbsd-arm64), type Msghdr struct, Pad_cgo_0 [4]uint8
+pkg syscall (netbsd-arm64), type Msghdr struct, Pad_cgo_1 [4]uint8
+pkg syscall (netbsd-arm64), type RawSockaddr struct, Data [14]int8
+pkg syscall (netbsd-arm64), type RawSockaddr struct, Family uint8
+pkg syscall (netbsd-arm64), type RawSockaddr struct, Len uint8
+pkg syscall (netbsd-arm64), type RawSockaddrAny struct, Pad [92]int8
+pkg syscall (netbsd-arm64), type RawSockaddrDatalink struct
+pkg syscall (netbsd-arm64), type RawSockaddrDatalink struct, Alen uint8
+pkg syscall (netbsd-arm64), type RawSockaddrDatalink struct, Data [12]int8
+pkg syscall (netbsd-arm64), type RawSockaddrDatalink struct, Family uint8
+pkg syscall (netbsd-arm64), type RawSockaddrDatalink struct, Index uint16
+pkg syscall (netbsd-arm64), type RawSockaddrDatalink struct, Len uint8
+pkg syscall (netbsd-arm64), type RawSockaddrDatalink struct, Nlen uint8
+pkg syscall (netbsd-arm64), type RawSockaddrDatalink struct, Slen uint8
+pkg syscall (netbsd-arm64), type RawSockaddrDatalink struct, Type uint8
+pkg syscall (netbsd-arm64), type RawSockaddrInet4 struct, Family uint8
+pkg syscall (netbsd-arm64), type RawSockaddrInet4 struct, Len uint8
+pkg syscall (netbsd-arm64), type RawSockaddrInet4 struct, Zero [8]int8
+pkg syscall (netbsd-arm64), type RawSockaddrInet6 struct, Family uint8
+pkg syscall (netbsd-arm64), type RawSockaddrInet6 struct, Len uint8
+pkg syscall (netbsd-arm64), type RawSockaddrUnix struct, Family uint8
+pkg syscall (netbsd-arm64), type RawSockaddrUnix struct, Len uint8
+pkg syscall (netbsd-arm64), type RawSockaddrUnix struct, Path [104]int8
+pkg syscall (netbsd-arm64), type Rlimit struct
+pkg syscall (netbsd-arm64), type Rlimit struct, Cur uint64
+pkg syscall (netbsd-arm64), type Rlimit struct, Max uint64
+pkg syscall (netbsd-arm64), type RouteMessage struct
+pkg syscall (netbsd-arm64), type RouteMessage struct, Data []uint8
+pkg syscall (netbsd-arm64), type RouteMessage struct, Header RtMsghdr
+pkg syscall (netbsd-arm64), type RoutingMessage interface, unexported methods
+pkg syscall (netbsd-arm64), type RtMetrics struct
+pkg syscall (netbsd-arm64), type RtMetrics struct, Expire int64
+pkg syscall (netbsd-arm64), type RtMetrics struct, Hopcount uint64
+pkg syscall (netbsd-arm64), type RtMetrics struct, Locks uint64
+pkg syscall (netbsd-arm64), type RtMetrics struct, Mtu uint64
+pkg syscall (netbsd-arm64), type RtMetrics struct, Pksent int64
+pkg syscall (netbsd-arm64), type RtMetrics struct, Recvpipe uint64
+pkg syscall (netbsd-arm64), type RtMetrics struct, Rtt uint64
+pkg syscall (netbsd-arm64), type RtMetrics struct, Rttvar uint64
+pkg syscall (netbsd-arm64), type RtMetrics struct, Sendpipe uint64
+pkg syscall (netbsd-arm64), type RtMetrics struct, Ssthresh uint64
+pkg syscall (netbsd-arm64), type RtMsghdr struct
+pkg syscall (netbsd-arm64), type RtMsghdr struct, Addrs int32
+pkg syscall (netbsd-arm64), type RtMsghdr struct, Errno int32
+pkg syscall (netbsd-arm64), type RtMsghdr struct, Flags int32
+pkg syscall (netbsd-arm64), type RtMsghdr struct, Index uint16
+pkg syscall (netbsd-arm64), type RtMsghdr struct, Inits int32
+pkg syscall (netbsd-arm64), type RtMsghdr struct, Msglen uint16
+pkg syscall (netbsd-arm64), type RtMsghdr struct, Pad_cgo_0 [2]uint8
+pkg syscall (netbsd-arm64), type RtMsghdr struct, Pad_cgo_1 [4]uint8
+pkg syscall (netbsd-arm64), type RtMsghdr struct, Pid int32
+pkg syscall (netbsd-arm64), type RtMsghdr struct, Rmx RtMetrics
+pkg syscall (netbsd-arm64), type RtMsghdr struct, Seq int32
+pkg syscall (netbsd-arm64), type RtMsghdr struct, Type uint8
+pkg syscall (netbsd-arm64), type RtMsghdr struct, Use int32
+pkg syscall (netbsd-arm64), type RtMsghdr struct, Version uint8
+pkg syscall (netbsd-arm64), type Rusage struct, Idrss int64
+pkg syscall (netbsd-arm64), type Rusage struct, Inblock int64
+pkg syscall (netbsd-arm64), type Rusage struct, Isrss int64
+pkg syscall (netbsd-arm64), type Rusage struct, Ixrss int64
+pkg syscall (netbsd-arm64), type Rusage struct, Majflt int64
+pkg syscall (netbsd-arm64), type Rusage struct, Maxrss int64
+pkg syscall (netbsd-arm64), type Rusage struct, Minflt int64
+pkg syscall (netbsd-arm64), type Rusage struct, Msgrcv int64
+pkg syscall (netbsd-arm64), type Rusage struct, Msgsnd int64
+pkg syscall (netbsd-arm64), type Rusage struct, Nivcsw int64
+pkg syscall (netbsd-arm64), type Rusage struct, Nsignals int64
+pkg syscall (netbsd-arm64), type Rusage struct, Nswap int64
+pkg syscall (netbsd-arm64), type Rusage struct, Nvcsw int64
+pkg syscall (netbsd-arm64), type Rusage struct, Oublock int64
+pkg syscall (netbsd-arm64), type Rusage struct, Stime Timeval
+pkg syscall (netbsd-arm64), type Rusage struct, Utime Timeval
+pkg syscall (netbsd-arm64), type SockaddrDatalink struct
+pkg syscall (netbsd-arm64), type SockaddrDatalink struct, Alen uint8
+pkg syscall (netbsd-arm64), type SockaddrDatalink struct, Data [12]int8
+pkg syscall (netbsd-arm64), type SockaddrDatalink struct, Family uint8
+pkg syscall (netbsd-arm64), type SockaddrDatalink struct, Index uint16
+pkg syscall (netbsd-arm64), type SockaddrDatalink struct, Len uint8
+pkg syscall (netbsd-arm64), type SockaddrDatalink struct, Nlen uint8
+pkg syscall (netbsd-arm64), type SockaddrDatalink struct, Slen uint8
+pkg syscall (netbsd-arm64), type SockaddrDatalink struct, Type uint8
+pkg syscall (netbsd-arm64), type SocketControlMessage struct
+pkg syscall (netbsd-arm64), type SocketControlMessage struct, Data []uint8
+pkg syscall (netbsd-arm64), type SocketControlMessage struct, Header Cmsghdr
+pkg syscall (netbsd-arm64), type Stat_t struct
+pkg syscall (netbsd-arm64), type Stat_t struct, Atimespec Timespec
+pkg syscall (netbsd-arm64), type Stat_t struct, Birthtimespec Timespec
+pkg syscall (netbsd-arm64), type Stat_t struct, Blksize uint32
+pkg syscall (netbsd-arm64), type Stat_t struct, Blocks int64
+pkg syscall (netbsd-arm64), type Stat_t struct, Ctimespec Timespec
+pkg syscall (netbsd-arm64), type Stat_t struct, Dev uint64
+pkg syscall (netbsd-arm64), type Stat_t struct, Flags uint32
+pkg syscall (netbsd-arm64), type Stat_t struct, Gen uint32
+pkg syscall (netbsd-arm64), type Stat_t struct, Gid uint32
+pkg syscall (netbsd-arm64), type Stat_t struct, Ino uint64
+pkg syscall (netbsd-arm64), type Stat_t struct, Mode uint32
+pkg syscall (netbsd-arm64), type Stat_t struct, Mtimespec Timespec
+pkg syscall (netbsd-arm64), type Stat_t struct, Nlink uint32
+pkg syscall (netbsd-arm64), type Stat_t struct, Pad_cgo_0 [4]uint8
+pkg syscall (netbsd-arm64), type Stat_t struct, Pad_cgo_1 [4]uint8
+pkg syscall (netbsd-arm64), type Stat_t struct, Pad_cgo_2 [4]uint8
+pkg syscall (netbsd-arm64), type Stat_t struct, Rdev uint64
+pkg syscall (netbsd-arm64), type Stat_t struct, Size int64
+pkg syscall (netbsd-arm64), type Stat_t struct, Spare [2]uint32
+pkg syscall (netbsd-arm64), type Stat_t struct, Uid uint32
+pkg syscall (netbsd-arm64), type Statfs_t [0]uint8
+pkg syscall (netbsd-arm64), type SysProcAttr struct, Chroot string
+pkg syscall (netbsd-arm64), type SysProcAttr struct, Credential *Credential
+pkg syscall (netbsd-arm64), type SysProcAttr struct, Ctty int
+pkg syscall (netbsd-arm64), type SysProcAttr struct, Foreground bool
+pkg syscall (netbsd-arm64), type SysProcAttr struct, Noctty bool
+pkg syscall (netbsd-arm64), type SysProcAttr struct, Pgid int
+pkg syscall (netbsd-arm64), type SysProcAttr struct, Ptrace bool
+pkg syscall (netbsd-arm64), type SysProcAttr struct, Setctty bool
+pkg syscall (netbsd-arm64), type SysProcAttr struct, Setpgid bool
+pkg syscall (netbsd-arm64), type SysProcAttr struct, Setsid bool
+pkg syscall (netbsd-arm64), type Sysctlnode struct
+pkg syscall (netbsd-arm64), type Sysctlnode struct, Flags uint32
+pkg syscall (netbsd-arm64), type Sysctlnode struct, Name [32]int8
+pkg syscall (netbsd-arm64), type Sysctlnode struct, Num int32
+pkg syscall (netbsd-arm64), type Sysctlnode struct, Un [16]uint8
+pkg syscall (netbsd-arm64), type Sysctlnode struct, Ver uint32
+pkg syscall (netbsd-arm64), type Sysctlnode struct, X__rsvd uint32
+pkg syscall (netbsd-arm64), type Sysctlnode struct, X_sysctl_desc [8]uint8
+pkg syscall (netbsd-arm64), type Sysctlnode struct, X_sysctl_func [8]uint8
+pkg syscall (netbsd-arm64), type Sysctlnode struct, X_sysctl_parent [8]uint8
+pkg syscall (netbsd-arm64), type Sysctlnode struct, X_sysctl_size [8]uint8
+pkg syscall (netbsd-arm64), type Termios struct
+pkg syscall (netbsd-arm64), type Termios struct, Cc [20]uint8
+pkg syscall (netbsd-arm64), type Termios struct, Cflag uint32
+pkg syscall (netbsd-arm64), type Termios struct, Iflag uint32
+pkg syscall (netbsd-arm64), type Termios struct, Ispeed int32
+pkg syscall (netbsd-arm64), type Termios struct, Lflag uint32
+pkg syscall (netbsd-arm64), type Termios struct, Oflag uint32
+pkg syscall (netbsd-arm64), type Termios struct, Ospeed int32
+pkg syscall (netbsd-arm64), type Timespec struct, Nsec int64
+pkg syscall (netbsd-arm64), type Timespec struct, Sec int64
+pkg syscall (netbsd-arm64), type Timeval struct, Pad_cgo_0 [4]uint8
+pkg syscall (netbsd-arm64), type Timeval struct, Sec int64
+pkg syscall (netbsd-arm64), type Timeval struct, Usec int32
+pkg syscall (netbsd-arm64), type WaitStatus uint32
+pkg syscall (netbsd-arm64), var Stderr int
+pkg syscall (netbsd-arm64), var Stdin int
+pkg syscall (netbsd-arm64), var Stdout int
+pkg syscall (netbsd-arm64-cgo), const AF_APPLETALK = 16
+pkg syscall (netbsd-arm64-cgo), const AF_APPLETALK ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_ARP = 28
+pkg syscall (netbsd-arm64-cgo), const AF_ARP ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_BLUETOOTH = 31
+pkg syscall (netbsd-arm64-cgo), const AF_BLUETOOTH ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_CCITT = 10
+pkg syscall (netbsd-arm64-cgo), const AF_CCITT ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_CHAOS = 5
+pkg syscall (netbsd-arm64-cgo), const AF_CHAOS ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_CNT = 21
+pkg syscall (netbsd-arm64-cgo), const AF_CNT ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_COIP = 20
+pkg syscall (netbsd-arm64-cgo), const AF_COIP ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_DATAKIT = 9
+pkg syscall (netbsd-arm64-cgo), const AF_DATAKIT ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_DECnet = 12
+pkg syscall (netbsd-arm64-cgo), const AF_DECnet ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_DLI = 13
+pkg syscall (netbsd-arm64-cgo), const AF_DLI ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_E164 = 26
+pkg syscall (netbsd-arm64-cgo), const AF_E164 ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_ECMA = 8
+pkg syscall (netbsd-arm64-cgo), const AF_ECMA ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_HYLINK = 15
+pkg syscall (netbsd-arm64-cgo), const AF_HYLINK ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_IEEE80211 = 32
+pkg syscall (netbsd-arm64-cgo), const AF_IEEE80211 ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_IMPLINK = 3
+pkg syscall (netbsd-arm64-cgo), const AF_IMPLINK ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_INET6 = 24
+pkg syscall (netbsd-arm64-cgo), const AF_IPX = 23
+pkg syscall (netbsd-arm64-cgo), const AF_IPX ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_ISDN = 26
+pkg syscall (netbsd-arm64-cgo), const AF_ISDN ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_ISO = 7
+pkg syscall (netbsd-arm64-cgo), const AF_ISO ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_LAT = 14
+pkg syscall (netbsd-arm64-cgo), const AF_LAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_LINK = 18
+pkg syscall (netbsd-arm64-cgo), const AF_LINK ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_LOCAL = 1
+pkg syscall (netbsd-arm64-cgo), const AF_LOCAL ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_MAX = 35
+pkg syscall (netbsd-arm64-cgo), const AF_MAX ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_MPLS = 33
+pkg syscall (netbsd-arm64-cgo), const AF_MPLS ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_NATM = 27
+pkg syscall (netbsd-arm64-cgo), const AF_NATM ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_NS = 6
+pkg syscall (netbsd-arm64-cgo), const AF_NS ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_OROUTE = 17
+pkg syscall (netbsd-arm64-cgo), const AF_OROUTE ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_OSI = 7
+pkg syscall (netbsd-arm64-cgo), const AF_OSI ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_PUP = 4
+pkg syscall (netbsd-arm64-cgo), const AF_PUP ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_ROUTE = 34
+pkg syscall (netbsd-arm64-cgo), const AF_ROUTE ideal-int
+pkg syscall (netbsd-arm64-cgo), const AF_SNA = 11
+pkg syscall (netbsd-arm64-cgo), const AF_SNA ideal-int
+pkg syscall (netbsd-arm64-cgo), const ARPHRD_ARCNET = 7
+pkg syscall (netbsd-arm64-cgo), const ARPHRD_ARCNET ideal-int
+pkg syscall (netbsd-arm64-cgo), const ARPHRD_ETHER = 1
+pkg syscall (netbsd-arm64-cgo), const ARPHRD_ETHER ideal-int
+pkg syscall (netbsd-arm64-cgo), const ARPHRD_FRELAY = 15
+pkg syscall (netbsd-arm64-cgo), const ARPHRD_FRELAY ideal-int
+pkg syscall (netbsd-arm64-cgo), const ARPHRD_IEEE1394 = 24
+pkg syscall (netbsd-arm64-cgo), const ARPHRD_IEEE1394 ideal-int
+pkg syscall (netbsd-arm64-cgo), const ARPHRD_IEEE802 = 6
+pkg syscall (netbsd-arm64-cgo), const ARPHRD_IEEE802 ideal-int
+pkg syscall (netbsd-arm64-cgo), const ARPHRD_STRIP = 23
+pkg syscall (netbsd-arm64-cgo), const ARPHRD_STRIP ideal-int
+pkg syscall (netbsd-arm64-cgo), const B0 = 0
+pkg syscall (netbsd-arm64-cgo), const B0 ideal-int
+pkg syscall (netbsd-arm64-cgo), const B110 = 110
+pkg syscall (netbsd-arm64-cgo), const B110 ideal-int
+pkg syscall (netbsd-arm64-cgo), const B115200 = 115200
+pkg syscall (netbsd-arm64-cgo), const B115200 ideal-int
+pkg syscall (netbsd-arm64-cgo), const B1200 = 1200
+pkg syscall (netbsd-arm64-cgo), const B1200 ideal-int
+pkg syscall (netbsd-arm64-cgo), const B134 = 134
+pkg syscall (netbsd-arm64-cgo), const B134 ideal-int
+pkg syscall (netbsd-arm64-cgo), const B14400 = 14400
+pkg syscall (netbsd-arm64-cgo), const B14400 ideal-int
+pkg syscall (netbsd-arm64-cgo), const B150 = 150
+pkg syscall (netbsd-arm64-cgo), const B150 ideal-int
+pkg syscall (netbsd-arm64-cgo), const B1800 = 1800
+pkg syscall (netbsd-arm64-cgo), const B1800 ideal-int
+pkg syscall (netbsd-arm64-cgo), const B19200 = 19200
+pkg syscall (netbsd-arm64-cgo), const B19200 ideal-int
+pkg syscall (netbsd-arm64-cgo), const B200 = 200
+pkg syscall (netbsd-arm64-cgo), const B200 ideal-int
+pkg syscall (netbsd-arm64-cgo), const B230400 = 230400
+pkg syscall (netbsd-arm64-cgo), const B230400 ideal-int
+pkg syscall (netbsd-arm64-cgo), const B2400 = 2400
+pkg syscall (netbsd-arm64-cgo), const B2400 ideal-int
+pkg syscall (netbsd-arm64-cgo), const B28800 = 28800
+pkg syscall (netbsd-arm64-cgo), const B28800 ideal-int
+pkg syscall (netbsd-arm64-cgo), const B300 = 300
+pkg syscall (netbsd-arm64-cgo), const B300 ideal-int
+pkg syscall (netbsd-arm64-cgo), const B38400 = 38400
+pkg syscall (netbsd-arm64-cgo), const B38400 ideal-int
+pkg syscall (netbsd-arm64-cgo), const B460800 = 460800
+pkg syscall (netbsd-arm64-cgo), const B460800 ideal-int
+pkg syscall (netbsd-arm64-cgo), const B4800 = 4800
+pkg syscall (netbsd-arm64-cgo), const B4800 ideal-int
+pkg syscall (netbsd-arm64-cgo), const B50 = 50
+pkg syscall (netbsd-arm64-cgo), const B50 ideal-int
+pkg syscall (netbsd-arm64-cgo), const B57600 = 57600
+pkg syscall (netbsd-arm64-cgo), const B57600 ideal-int
+pkg syscall (netbsd-arm64-cgo), const B600 = 600
+pkg syscall (netbsd-arm64-cgo), const B600 ideal-int
+pkg syscall (netbsd-arm64-cgo), const B7200 = 7200
+pkg syscall (netbsd-arm64-cgo), const B7200 ideal-int
+pkg syscall (netbsd-arm64-cgo), const B75 = 75
+pkg syscall (netbsd-arm64-cgo), const B75 ideal-int
+pkg syscall (netbsd-arm64-cgo), const B76800 = 76800
+pkg syscall (netbsd-arm64-cgo), const B76800 ideal-int
+pkg syscall (netbsd-arm64-cgo), const B921600 = 921600
+pkg syscall (netbsd-arm64-cgo), const B921600 ideal-int
+pkg syscall (netbsd-arm64-cgo), const B9600 = 9600
+pkg syscall (netbsd-arm64-cgo), const B9600 ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCFEEDBACK = 2147762813
+pkg syscall (netbsd-arm64-cgo), const BIOCFEEDBACK ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCFLUSH = 536887912
+pkg syscall (netbsd-arm64-cgo), const BIOCFLUSH ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCGBLEN = 1074020966
+pkg syscall (netbsd-arm64-cgo), const BIOCGBLEN ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCGDLT = 1074020970
+pkg syscall (netbsd-arm64-cgo), const BIOCGDLT ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCGDLTLIST = 3222291063
+pkg syscall (netbsd-arm64-cgo), const BIOCGDLTLIST ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCGETIF = 1083196011
+pkg syscall (netbsd-arm64-cgo), const BIOCGETIF ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCGFEEDBACK = 1074020988
+pkg syscall (netbsd-arm64-cgo), const BIOCGFEEDBACK ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCGHDRCMPLT = 1074020980
+pkg syscall (netbsd-arm64-cgo), const BIOCGHDRCMPLT ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCGRTIMEOUT = 1074807419
+pkg syscall (netbsd-arm64-cgo), const BIOCGRTIMEOUT ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCGSEESENT = 1074020984
+pkg syscall (netbsd-arm64-cgo), const BIOCGSEESENT ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCGSTATS = 1082147439
+pkg syscall (netbsd-arm64-cgo), const BIOCGSTATS ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCGSTATSOLD = 1074283119
+pkg syscall (netbsd-arm64-cgo), const BIOCGSTATSOLD ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCIMMEDIATE = 2147762800
+pkg syscall (netbsd-arm64-cgo), const BIOCIMMEDIATE ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCPROMISC = 536887913
+pkg syscall (netbsd-arm64-cgo), const BIOCPROMISC ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCSBLEN = 3221504614
+pkg syscall (netbsd-arm64-cgo), const BIOCSBLEN ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCSDLT = 2147762806
+pkg syscall (netbsd-arm64-cgo), const BIOCSDLT ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCSETF = 2148549223
+pkg syscall (netbsd-arm64-cgo), const BIOCSETF ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCSETIF = 2156937836
+pkg syscall (netbsd-arm64-cgo), const BIOCSETIF ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCSFEEDBACK = 2147762813
+pkg syscall (netbsd-arm64-cgo), const BIOCSFEEDBACK ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCSHDRCMPLT = 2147762805
+pkg syscall (netbsd-arm64-cgo), const BIOCSHDRCMPLT ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCSRTIMEOUT = 2148549242
+pkg syscall (netbsd-arm64-cgo), const BIOCSRTIMEOUT ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCSSEESENT = 2147762809
+pkg syscall (netbsd-arm64-cgo), const BIOCSSEESENT ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCSTCPF = 2148549234
+pkg syscall (netbsd-arm64-cgo), const BIOCSTCPF ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCSUDPF = 2148549235
+pkg syscall (netbsd-arm64-cgo), const BIOCSUDPF ideal-int
+pkg syscall (netbsd-arm64-cgo), const BIOCVERSION = 1074020977
+pkg syscall (netbsd-arm64-cgo), const BIOCVERSION ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_A = 16
+pkg syscall (netbsd-arm64-cgo), const BPF_A ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_ABS = 32
+pkg syscall (netbsd-arm64-cgo), const BPF_ABS ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_ADD = 0
+pkg syscall (netbsd-arm64-cgo), const BPF_ADD ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_ALIGNMENT = 8
+pkg syscall (netbsd-arm64-cgo), const BPF_ALIGNMENT ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_ALIGNMENT32 = 4
+pkg syscall (netbsd-arm64-cgo), const BPF_ALIGNMENT32 ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_ALU = 4
+pkg syscall (netbsd-arm64-cgo), const BPF_ALU ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_AND = 80
+pkg syscall (netbsd-arm64-cgo), const BPF_AND ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_B = 16
+pkg syscall (netbsd-arm64-cgo), const BPF_B ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_DFLTBUFSIZE = 1048576
+pkg syscall (netbsd-arm64-cgo), const BPF_DFLTBUFSIZE ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_DIV = 48
+pkg syscall (netbsd-arm64-cgo), const BPF_DIV ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_H = 8
+pkg syscall (netbsd-arm64-cgo), const BPF_H ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_IMM = 0
+pkg syscall (netbsd-arm64-cgo), const BPF_IMM ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_IND = 64
+pkg syscall (netbsd-arm64-cgo), const BPF_IND ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_JA = 0
+pkg syscall (netbsd-arm64-cgo), const BPF_JA ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_JEQ = 16
+pkg syscall (netbsd-arm64-cgo), const BPF_JEQ ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_JGE = 48
+pkg syscall (netbsd-arm64-cgo), const BPF_JGE ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_JGT = 32
+pkg syscall (netbsd-arm64-cgo), const BPF_JGT ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_JMP = 5
+pkg syscall (netbsd-arm64-cgo), const BPF_JMP ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_JSET = 64
+pkg syscall (netbsd-arm64-cgo), const BPF_JSET ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_K = 0
+pkg syscall (netbsd-arm64-cgo), const BPF_K ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_LD = 0
+pkg syscall (netbsd-arm64-cgo), const BPF_LD ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_LDX = 1
+pkg syscall (netbsd-arm64-cgo), const BPF_LDX ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_LEN = 128
+pkg syscall (netbsd-arm64-cgo), const BPF_LEN ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_LSH = 96
+pkg syscall (netbsd-arm64-cgo), const BPF_LSH ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_MAJOR_VERSION = 1
+pkg syscall (netbsd-arm64-cgo), const BPF_MAJOR_VERSION ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_MAXBUFSIZE = 16777216
+pkg syscall (netbsd-arm64-cgo), const BPF_MAXBUFSIZE ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_MAXINSNS = 512
+pkg syscall (netbsd-arm64-cgo), const BPF_MAXINSNS ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_MEM = 96
+pkg syscall (netbsd-arm64-cgo), const BPF_MEM ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_MEMWORDS = 16
+pkg syscall (netbsd-arm64-cgo), const BPF_MEMWORDS ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_MINBUFSIZE = 32
+pkg syscall (netbsd-arm64-cgo), const BPF_MINBUFSIZE ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_MINOR_VERSION = 1
+pkg syscall (netbsd-arm64-cgo), const BPF_MINOR_VERSION ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_MISC = 7
+pkg syscall (netbsd-arm64-cgo), const BPF_MISC ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_MSH = 160
+pkg syscall (netbsd-arm64-cgo), const BPF_MSH ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_MUL = 32
+pkg syscall (netbsd-arm64-cgo), const BPF_MUL ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_NEG = 128
+pkg syscall (netbsd-arm64-cgo), const BPF_NEG ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_OR = 64
+pkg syscall (netbsd-arm64-cgo), const BPF_OR ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_RELEASE = 199606
+pkg syscall (netbsd-arm64-cgo), const BPF_RELEASE ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_RET = 6
+pkg syscall (netbsd-arm64-cgo), const BPF_RET ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_RSH = 112
+pkg syscall (netbsd-arm64-cgo), const BPF_RSH ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_ST = 2
+pkg syscall (netbsd-arm64-cgo), const BPF_ST ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_STX = 3
+pkg syscall (netbsd-arm64-cgo), const BPF_STX ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_SUB = 16
+pkg syscall (netbsd-arm64-cgo), const BPF_SUB ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_TAX = 0
+pkg syscall (netbsd-arm64-cgo), const BPF_TAX ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_TXA = 128
+pkg syscall (netbsd-arm64-cgo), const BPF_TXA ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_W = 0
+pkg syscall (netbsd-arm64-cgo), const BPF_W ideal-int
+pkg syscall (netbsd-arm64-cgo), const BPF_X = 8
+pkg syscall (netbsd-arm64-cgo), const BPF_X ideal-int
+pkg syscall (netbsd-arm64-cgo), const BRKINT = 2
+pkg syscall (netbsd-arm64-cgo), const BRKINT ideal-int
+pkg syscall (netbsd-arm64-cgo), const CFLUSH = 15
+pkg syscall (netbsd-arm64-cgo), const CFLUSH ideal-int
+pkg syscall (netbsd-arm64-cgo), const CLOCAL = 32768
+pkg syscall (netbsd-arm64-cgo), const CLOCAL ideal-int
+pkg syscall (netbsd-arm64-cgo), const CLONE_CSIGNAL = 255
+pkg syscall (netbsd-arm64-cgo), const CLONE_CSIGNAL ideal-int
+pkg syscall (netbsd-arm64-cgo), const CLONE_FILES = 1024
+pkg syscall (netbsd-arm64-cgo), const CLONE_FILES ideal-int
+pkg syscall (netbsd-arm64-cgo), const CLONE_FS = 512
+pkg syscall (netbsd-arm64-cgo), const CLONE_FS ideal-int
+pkg syscall (netbsd-arm64-cgo), const CLONE_PID = 4096
+pkg syscall (netbsd-arm64-cgo), const CLONE_PID ideal-int
+pkg syscall (netbsd-arm64-cgo), const CLONE_PTRACE = 8192
+pkg syscall (netbsd-arm64-cgo), const CLONE_PTRACE ideal-int
+pkg syscall (netbsd-arm64-cgo), const CLONE_SIGHAND = 2048
+pkg syscall (netbsd-arm64-cgo), const CLONE_SIGHAND ideal-int
+pkg syscall (netbsd-arm64-cgo), const CLONE_VFORK = 16384
+pkg syscall (netbsd-arm64-cgo), const CLONE_VFORK ideal-int
+pkg syscall (netbsd-arm64-cgo), const CLONE_VM = 256
+pkg syscall (netbsd-arm64-cgo), const CLONE_VM ideal-int
+pkg syscall (netbsd-arm64-cgo), const CREAD = 2048
+pkg syscall (netbsd-arm64-cgo), const CREAD ideal-int
+pkg syscall (netbsd-arm64-cgo), const CS5 = 0
+pkg syscall (netbsd-arm64-cgo), const CS5 ideal-int
+pkg syscall (netbsd-arm64-cgo), const CS6 = 256
+pkg syscall (netbsd-arm64-cgo), const CS6 ideal-int
+pkg syscall (netbsd-arm64-cgo), const CS7 = 512
+pkg syscall (netbsd-arm64-cgo), const CS7 ideal-int
+pkg syscall (netbsd-arm64-cgo), const CS8 = 768
+pkg syscall (netbsd-arm64-cgo), const CS8 ideal-int
+pkg syscall (netbsd-arm64-cgo), const CSIZE = 768
+pkg syscall (netbsd-arm64-cgo), const CSIZE ideal-int
+pkg syscall (netbsd-arm64-cgo), const CSTART = 17
+pkg syscall (netbsd-arm64-cgo), const CSTART ideal-int
+pkg syscall (netbsd-arm64-cgo), const CSTATUS = 20
+pkg syscall (netbsd-arm64-cgo), const CSTATUS ideal-int
+pkg syscall (netbsd-arm64-cgo), const CSTOP = 19
+pkg syscall (netbsd-arm64-cgo), const CSTOP ideal-int
+pkg syscall (netbsd-arm64-cgo), const CSTOPB = 1024
+pkg syscall (netbsd-arm64-cgo), const CSTOPB ideal-int
+pkg syscall (netbsd-arm64-cgo), const CSUSP = 26
+pkg syscall (netbsd-arm64-cgo), const CSUSP ideal-int
+pkg syscall (netbsd-arm64-cgo), const CTL_MAXNAME = 12
+pkg syscall (netbsd-arm64-cgo), const CTL_MAXNAME ideal-int
+pkg syscall (netbsd-arm64-cgo), const CTL_NET = 4
+pkg syscall (netbsd-arm64-cgo), const CTL_NET ideal-int
+pkg syscall (netbsd-arm64-cgo), const CTL_QUERY = -2
+pkg syscall (netbsd-arm64-cgo), const CTL_QUERY ideal-int
+pkg syscall (netbsd-arm64-cgo), const DIOCBSFLUSH = 536896632
+pkg syscall (netbsd-arm64-cgo), const DIOCBSFLUSH ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_A429 = 184
+pkg syscall (netbsd-arm64-cgo), const DLT_A429 ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_A653_ICM = 185
+pkg syscall (netbsd-arm64-cgo), const DLT_A653_ICM ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_AIRONET_HEADER = 120
+pkg syscall (netbsd-arm64-cgo), const DLT_AIRONET_HEADER ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_AOS = 222
+pkg syscall (netbsd-arm64-cgo), const DLT_AOS ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_APPLE_IP_OVER_IEEE1394 = 138
+pkg syscall (netbsd-arm64-cgo), const DLT_APPLE_IP_OVER_IEEE1394 ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_ARCNET = 7
+pkg syscall (netbsd-arm64-cgo), const DLT_ARCNET ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_ARCNET_LINUX = 129
+pkg syscall (netbsd-arm64-cgo), const DLT_ARCNET_LINUX ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_ATM_CLIP = 19
+pkg syscall (netbsd-arm64-cgo), const DLT_ATM_CLIP ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_ATM_RFC1483 = 11
+pkg syscall (netbsd-arm64-cgo), const DLT_ATM_RFC1483 ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_AURORA = 126
+pkg syscall (netbsd-arm64-cgo), const DLT_AURORA ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_AX25 = 3
+pkg syscall (netbsd-arm64-cgo), const DLT_AX25 ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_AX25_KISS = 202
+pkg syscall (netbsd-arm64-cgo), const DLT_AX25_KISS ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_BACNET_MS_TP = 165
+pkg syscall (netbsd-arm64-cgo), const DLT_BACNET_MS_TP ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_BLUETOOTH_HCI_H4 = 187
+pkg syscall (netbsd-arm64-cgo), const DLT_BLUETOOTH_HCI_H4 ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 201
+pkg syscall (netbsd-arm64-cgo), const DLT_BLUETOOTH_HCI_H4_WITH_PHDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_CAN20B = 190
+pkg syscall (netbsd-arm64-cgo), const DLT_CAN20B ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_CAN_SOCKETCAN = 227
+pkg syscall (netbsd-arm64-cgo), const DLT_CAN_SOCKETCAN ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_CHAOS = 5
+pkg syscall (netbsd-arm64-cgo), const DLT_CHAOS ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_CISCO_IOS = 118
+pkg syscall (netbsd-arm64-cgo), const DLT_CISCO_IOS ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_C_HDLC = 104
+pkg syscall (netbsd-arm64-cgo), const DLT_C_HDLC ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_C_HDLC_WITH_DIR = 205
+pkg syscall (netbsd-arm64-cgo), const DLT_C_HDLC_WITH_DIR ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_DECT = 221
+pkg syscall (netbsd-arm64-cgo), const DLT_DECT ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_DOCSIS = 143
+pkg syscall (netbsd-arm64-cgo), const DLT_DOCSIS ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_ECONET = 115
+pkg syscall (netbsd-arm64-cgo), const DLT_ECONET ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_EN10MB = 1
+pkg syscall (netbsd-arm64-cgo), const DLT_EN10MB ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_EN3MB = 2
+pkg syscall (netbsd-arm64-cgo), const DLT_EN3MB ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_ENC = 109
+pkg syscall (netbsd-arm64-cgo), const DLT_ENC ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_ERF = 197
+pkg syscall (netbsd-arm64-cgo), const DLT_ERF ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_ERF_ETH = 175
+pkg syscall (netbsd-arm64-cgo), const DLT_ERF_ETH ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_ERF_POS = 176
+pkg syscall (netbsd-arm64-cgo), const DLT_ERF_POS ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_FC_2 = 224
+pkg syscall (netbsd-arm64-cgo), const DLT_FC_2 ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_FC_2_WITH_FRAME_DELIMS = 225
+pkg syscall (netbsd-arm64-cgo), const DLT_FC_2_WITH_FRAME_DELIMS ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_FDDI = 10
+pkg syscall (netbsd-arm64-cgo), const DLT_FDDI ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_FLEXRAY = 210
+pkg syscall (netbsd-arm64-cgo), const DLT_FLEXRAY ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_FRELAY = 107
+pkg syscall (netbsd-arm64-cgo), const DLT_FRELAY ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_FRELAY_WITH_DIR = 206
+pkg syscall (netbsd-arm64-cgo), const DLT_FRELAY_WITH_DIR ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_GCOM_SERIAL = 173
+pkg syscall (netbsd-arm64-cgo), const DLT_GCOM_SERIAL ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_GCOM_T1E1 = 172
+pkg syscall (netbsd-arm64-cgo), const DLT_GCOM_T1E1 ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_GPF_F = 171
+pkg syscall (netbsd-arm64-cgo), const DLT_GPF_F ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_GPF_T = 170
+pkg syscall (netbsd-arm64-cgo), const DLT_GPF_T ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_GPRS_LLC = 169
+pkg syscall (netbsd-arm64-cgo), const DLT_GPRS_LLC ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_GSMTAP_ABIS = 218
+pkg syscall (netbsd-arm64-cgo), const DLT_GSMTAP_ABIS ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_GSMTAP_UM = 217
+pkg syscall (netbsd-arm64-cgo), const DLT_GSMTAP_UM ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_HDLC = 16
+pkg syscall (netbsd-arm64-cgo), const DLT_HDLC ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_HHDLC = 121
+pkg syscall (netbsd-arm64-cgo), const DLT_HHDLC ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_HIPPI = 15
+pkg syscall (netbsd-arm64-cgo), const DLT_HIPPI ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_IBM_SN = 146
+pkg syscall (netbsd-arm64-cgo), const DLT_IBM_SN ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_IBM_SP = 145
+pkg syscall (netbsd-arm64-cgo), const DLT_IBM_SP ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_IEEE802 = 6
+pkg syscall (netbsd-arm64-cgo), const DLT_IEEE802 ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_IEEE802_11 = 105
+pkg syscall (netbsd-arm64-cgo), const DLT_IEEE802_11 ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_IEEE802_11_RADIO = 127
+pkg syscall (netbsd-arm64-cgo), const DLT_IEEE802_11_RADIO ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_IEEE802_11_RADIO_AVS = 163
+pkg syscall (netbsd-arm64-cgo), const DLT_IEEE802_11_RADIO_AVS ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_IEEE802_15_4 = 195
+pkg syscall (netbsd-arm64-cgo), const DLT_IEEE802_15_4 ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_IEEE802_15_4_LINUX = 191
+pkg syscall (netbsd-arm64-cgo), const DLT_IEEE802_15_4_LINUX ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_IEEE802_15_4_NONASK_PHY = 215
+pkg syscall (netbsd-arm64-cgo), const DLT_IEEE802_15_4_NONASK_PHY ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_IEEE802_16_MAC_CPS = 188
+pkg syscall (netbsd-arm64-cgo), const DLT_IEEE802_16_MAC_CPS ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_IEEE802_16_MAC_CPS_RADIO = 193
+pkg syscall (netbsd-arm64-cgo), const DLT_IEEE802_16_MAC_CPS_RADIO ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_IPMB = 199
+pkg syscall (netbsd-arm64-cgo), const DLT_IPMB ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_IPMB_LINUX = 209
+pkg syscall (netbsd-arm64-cgo), const DLT_IPMB_LINUX ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_IPNET = 226
+pkg syscall (netbsd-arm64-cgo), const DLT_IPNET ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_IPV4 = 228
+pkg syscall (netbsd-arm64-cgo), const DLT_IPV4 ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_IPV6 = 229
+pkg syscall (netbsd-arm64-cgo), const DLT_IPV6 ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_IP_OVER_FC = 122
+pkg syscall (netbsd-arm64-cgo), const DLT_IP_OVER_FC ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_ATM1 = 137
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_ATM1 ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_ATM2 = 135
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_ATM2 ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_CHDLC = 181
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_CHDLC ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_ES = 132
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_ES ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_ETHER = 178
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_ETHER ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_FRELAY = 180
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_FRELAY ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_GGSN = 133
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_GGSN ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_ISM = 194
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_ISM ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_MFR = 134
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_MFR ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_MLFR = 131
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_MLFR ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_MLPPP = 130
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_MLPPP ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_MONITOR = 164
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_MONITOR ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_PIC_PEER = 174
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_PIC_PEER ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_PPP = 179
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_PPP ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_PPPOE = 167
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_PPPOE ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_PPPOE_ATM = 168
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_PPPOE_ATM ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_SERVICES = 136
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_SERVICES ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_ST = 200
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_ST ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_VP = 183
+pkg syscall (netbsd-arm64-cgo), const DLT_JUNIPER_VP ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_LAPB_WITH_DIR = 207
+pkg syscall (netbsd-arm64-cgo), const DLT_LAPB_WITH_DIR ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_LAPD = 203
+pkg syscall (netbsd-arm64-cgo), const DLT_LAPD ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_LIN = 212
+pkg syscall (netbsd-arm64-cgo), const DLT_LIN ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_LINUX_EVDEV = 216
+pkg syscall (netbsd-arm64-cgo), const DLT_LINUX_EVDEV ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_LINUX_IRDA = 144
+pkg syscall (netbsd-arm64-cgo), const DLT_LINUX_IRDA ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_LINUX_LAPD = 177
+pkg syscall (netbsd-arm64-cgo), const DLT_LINUX_LAPD ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_LINUX_SLL = 113
+pkg syscall (netbsd-arm64-cgo), const DLT_LINUX_SLL ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_LOOP = 108
+pkg syscall (netbsd-arm64-cgo), const DLT_LOOP ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_LTALK = 114
+pkg syscall (netbsd-arm64-cgo), const DLT_LTALK ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_MFR = 182
+pkg syscall (netbsd-arm64-cgo), const DLT_MFR ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_MOST = 211
+pkg syscall (netbsd-arm64-cgo), const DLT_MOST ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_MPLS = 219
+pkg syscall (netbsd-arm64-cgo), const DLT_MPLS ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_MTP2 = 140
+pkg syscall (netbsd-arm64-cgo), const DLT_MTP2 ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_MTP2_WITH_PHDR = 139
+pkg syscall (netbsd-arm64-cgo), const DLT_MTP2_WITH_PHDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_MTP3 = 141
+pkg syscall (netbsd-arm64-cgo), const DLT_MTP3 ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_NULL = 0
+pkg syscall (netbsd-arm64-cgo), const DLT_NULL ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_PCI_EXP = 125
+pkg syscall (netbsd-arm64-cgo), const DLT_PCI_EXP ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_PFLOG = 117
+pkg syscall (netbsd-arm64-cgo), const DLT_PFLOG ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_PFSYNC = 18
+pkg syscall (netbsd-arm64-cgo), const DLT_PFSYNC ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_PPI = 192
+pkg syscall (netbsd-arm64-cgo), const DLT_PPI ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_PPP = 9
+pkg syscall (netbsd-arm64-cgo), const DLT_PPP ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_PPP_BSDOS = 14
+pkg syscall (netbsd-arm64-cgo), const DLT_PPP_BSDOS ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_PPP_ETHER = 51
+pkg syscall (netbsd-arm64-cgo), const DLT_PPP_ETHER ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_PPP_PPPD = 166
+pkg syscall (netbsd-arm64-cgo), const DLT_PPP_PPPD ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_PPP_SERIAL = 50
+pkg syscall (netbsd-arm64-cgo), const DLT_PPP_SERIAL ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_PPP_WITH_DIR = 204
+pkg syscall (netbsd-arm64-cgo), const DLT_PPP_WITH_DIR ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_PRISM_HEADER = 119
+pkg syscall (netbsd-arm64-cgo), const DLT_PRISM_HEADER ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_PRONET = 4
+pkg syscall (netbsd-arm64-cgo), const DLT_PRONET ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_RAIF1 = 198
+pkg syscall (netbsd-arm64-cgo), const DLT_RAIF1 ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_RAW = 12
+pkg syscall (netbsd-arm64-cgo), const DLT_RAW ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_RAWAF_MASK = 35913728
+pkg syscall (netbsd-arm64-cgo), const DLT_RAWAF_MASK ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_RIO = 124
+pkg syscall (netbsd-arm64-cgo), const DLT_RIO ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_SCCP = 142
+pkg syscall (netbsd-arm64-cgo), const DLT_SCCP ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_SITA = 196
+pkg syscall (netbsd-arm64-cgo), const DLT_SITA ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_SLIP = 8
+pkg syscall (netbsd-arm64-cgo), const DLT_SLIP ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_SLIP_BSDOS = 13
+pkg syscall (netbsd-arm64-cgo), const DLT_SLIP_BSDOS ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_SUNATM = 123
+pkg syscall (netbsd-arm64-cgo), const DLT_SUNATM ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_SYMANTEC_FIREWALL = 99
+pkg syscall (netbsd-arm64-cgo), const DLT_SYMANTEC_FIREWALL ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_TZSP = 128
+pkg syscall (netbsd-arm64-cgo), const DLT_TZSP ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_USB = 186
+pkg syscall (netbsd-arm64-cgo), const DLT_USB ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_USB_LINUX = 189
+pkg syscall (netbsd-arm64-cgo), const DLT_USB_LINUX ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_USB_LINUX_MMAPPED = 220
+pkg syscall (netbsd-arm64-cgo), const DLT_USB_LINUX_MMAPPED ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_WIHART = 223
+pkg syscall (netbsd-arm64-cgo), const DLT_WIHART ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_X2E_SERIAL = 213
+pkg syscall (netbsd-arm64-cgo), const DLT_X2E_SERIAL ideal-int
+pkg syscall (netbsd-arm64-cgo), const DLT_X2E_XORAYA = 214
+pkg syscall (netbsd-arm64-cgo), const DLT_X2E_XORAYA ideal-int
+pkg syscall (netbsd-arm64-cgo), const DT_BLK = 6
+pkg syscall (netbsd-arm64-cgo), const DT_BLK ideal-int
+pkg syscall (netbsd-arm64-cgo), const DT_CHR = 2
+pkg syscall (netbsd-arm64-cgo), const DT_CHR ideal-int
+pkg syscall (netbsd-arm64-cgo), const DT_DIR = 4
+pkg syscall (netbsd-arm64-cgo), const DT_DIR ideal-int
+pkg syscall (netbsd-arm64-cgo), const DT_FIFO = 1
+pkg syscall (netbsd-arm64-cgo), const DT_FIFO ideal-int
+pkg syscall (netbsd-arm64-cgo), const DT_LNK = 10
+pkg syscall (netbsd-arm64-cgo), const DT_LNK ideal-int
+pkg syscall (netbsd-arm64-cgo), const DT_REG = 8
+pkg syscall (netbsd-arm64-cgo), const DT_REG ideal-int
+pkg syscall (netbsd-arm64-cgo), const DT_SOCK = 12
+pkg syscall (netbsd-arm64-cgo), const DT_SOCK ideal-int
+pkg syscall (netbsd-arm64-cgo), const DT_UNKNOWN = 0
+pkg syscall (netbsd-arm64-cgo), const DT_UNKNOWN ideal-int
+pkg syscall (netbsd-arm64-cgo), const DT_WHT = 14
+pkg syscall (netbsd-arm64-cgo), const DT_WHT ideal-int
+pkg syscall (netbsd-arm64-cgo), const E2BIG = 7
+pkg syscall (netbsd-arm64-cgo), const EACCES = 13
+pkg syscall (netbsd-arm64-cgo), const EADDRINUSE = 48
+pkg syscall (netbsd-arm64-cgo), const EADDRNOTAVAIL = 49
+pkg syscall (netbsd-arm64-cgo), const EAFNOSUPPORT = 47
+pkg syscall (netbsd-arm64-cgo), const EAGAIN = 35
+pkg syscall (netbsd-arm64-cgo), const EALREADY = 37
+pkg syscall (netbsd-arm64-cgo), const EAUTH = 80
+pkg syscall (netbsd-arm64-cgo), const EAUTH Errno
+pkg syscall (netbsd-arm64-cgo), const EBADF = 9
+pkg syscall (netbsd-arm64-cgo), const EBADMSG = 88
+pkg syscall (netbsd-arm64-cgo), const EBADMSG Errno
+pkg syscall (netbsd-arm64-cgo), const EBADRPC = 72
+pkg syscall (netbsd-arm64-cgo), const EBADRPC Errno
+pkg syscall (netbsd-arm64-cgo), const EBUSY = 16
+pkg syscall (netbsd-arm64-cgo), const ECANCELED = 87
+pkg syscall (netbsd-arm64-cgo), const ECHILD = 10
+pkg syscall (netbsd-arm64-cgo), const ECHO = 8
+pkg syscall (netbsd-arm64-cgo), const ECHO ideal-int
+pkg syscall (netbsd-arm64-cgo), const ECHOCTL = 64
+pkg syscall (netbsd-arm64-cgo), const ECHOCTL ideal-int
+pkg syscall (netbsd-arm64-cgo), const ECHOE = 2
+pkg syscall (netbsd-arm64-cgo), const ECHOE ideal-int
+pkg syscall (netbsd-arm64-cgo), const ECHOK = 4
+pkg syscall (netbsd-arm64-cgo), const ECHOK ideal-int
+pkg syscall (netbsd-arm64-cgo), const ECHOKE = 1
+pkg syscall (netbsd-arm64-cgo), const ECHOKE ideal-int
+pkg syscall (netbsd-arm64-cgo), const ECHONL = 16
+pkg syscall (netbsd-arm64-cgo), const ECHONL ideal-int
+pkg syscall (netbsd-arm64-cgo), const ECHOPRT = 32
+pkg syscall (netbsd-arm64-cgo), const ECHOPRT ideal-int
+pkg syscall (netbsd-arm64-cgo), const ECONNABORTED = 53
+pkg syscall (netbsd-arm64-cgo), const ECONNREFUSED = 61
+pkg syscall (netbsd-arm64-cgo), const ECONNRESET = 54
+pkg syscall (netbsd-arm64-cgo), const EDEADLK = 11
+pkg syscall (netbsd-arm64-cgo), const EDESTADDRREQ = 39
+pkg syscall (netbsd-arm64-cgo), const EDOM = 33
+pkg syscall (netbsd-arm64-cgo), const EDQUOT = 69
+pkg syscall (netbsd-arm64-cgo), const EEXIST = 17
+pkg syscall (netbsd-arm64-cgo), const EFAULT = 14
+pkg syscall (netbsd-arm64-cgo), const EFBIG = 27
+pkg syscall (netbsd-arm64-cgo), const EFTYPE = 79
+pkg syscall (netbsd-arm64-cgo), const EFTYPE Errno
+pkg syscall (netbsd-arm64-cgo), const EHOSTDOWN = 64
+pkg syscall (netbsd-arm64-cgo), const EHOSTUNREACH = 65
+pkg syscall (netbsd-arm64-cgo), const EIDRM = 82
+pkg syscall (netbsd-arm64-cgo), const EILSEQ = 85
+pkg syscall (netbsd-arm64-cgo), const EINPROGRESS = 36
+pkg syscall (netbsd-arm64-cgo), const EINTR = 4
+pkg syscall (netbsd-arm64-cgo), const EINVAL = 22
+pkg syscall (netbsd-arm64-cgo), const EIO = 5
+pkg syscall (netbsd-arm64-cgo), const EISCONN = 56
+pkg syscall (netbsd-arm64-cgo), const EISDIR = 21
+pkg syscall (netbsd-arm64-cgo), const ELAST = 96
+pkg syscall (netbsd-arm64-cgo), const ELAST Errno
+pkg syscall (netbsd-arm64-cgo), const ELOOP = 62
+pkg syscall (netbsd-arm64-cgo), const EMFILE = 24
+pkg syscall (netbsd-arm64-cgo), const EMLINK = 31
+pkg syscall (netbsd-arm64-cgo), const EMSGSIZE = 40
+pkg syscall (netbsd-arm64-cgo), const EMULTIHOP = 94
+pkg syscall (netbsd-arm64-cgo), const EMULTIHOP Errno
+pkg syscall (netbsd-arm64-cgo), const EMUL_LINUX = 1
+pkg syscall (netbsd-arm64-cgo), const EMUL_LINUX ideal-int
+pkg syscall (netbsd-arm64-cgo), const EMUL_LINUX32 = 5
+pkg syscall (netbsd-arm64-cgo), const EMUL_LINUX32 ideal-int
+pkg syscall (netbsd-arm64-cgo), const EMUL_MAXID = 6
+pkg syscall (netbsd-arm64-cgo), const EMUL_MAXID ideal-int
+pkg syscall (netbsd-arm64-cgo), const ENAMETOOLONG = 63
+pkg syscall (netbsd-arm64-cgo), const ENEEDAUTH = 81
+pkg syscall (netbsd-arm64-cgo), const ENEEDAUTH Errno
+pkg syscall (netbsd-arm64-cgo), const ENETDOWN = 50
+pkg syscall (netbsd-arm64-cgo), const ENETRESET = 52
+pkg syscall (netbsd-arm64-cgo), const ENETUNREACH = 51
+pkg syscall (netbsd-arm64-cgo), const ENFILE = 23
+pkg syscall (netbsd-arm64-cgo), const ENOATTR = 93
+pkg syscall (netbsd-arm64-cgo), const ENOATTR Errno
+pkg syscall (netbsd-arm64-cgo), const ENOBUFS = 55
+pkg syscall (netbsd-arm64-cgo), const ENODATA = 89
+pkg syscall (netbsd-arm64-cgo), const ENODATA Errno
+pkg syscall (netbsd-arm64-cgo), const ENODEV = 19
+pkg syscall (netbsd-arm64-cgo), const ENOEXEC = 8
+pkg syscall (netbsd-arm64-cgo), const ENOLCK = 77
+pkg syscall (netbsd-arm64-cgo), const ENOLINK = 95
+pkg syscall (netbsd-arm64-cgo), const ENOLINK Errno
+pkg syscall (netbsd-arm64-cgo), const ENOMEM = 12
+pkg syscall (netbsd-arm64-cgo), const ENOMSG = 83
+pkg syscall (netbsd-arm64-cgo), const ENOPROTOOPT = 42
+pkg syscall (netbsd-arm64-cgo), const ENOSPC = 28
+pkg syscall (netbsd-arm64-cgo), const ENOSR = 90
+pkg syscall (netbsd-arm64-cgo), const ENOSR Errno
+pkg syscall (netbsd-arm64-cgo), const ENOSTR = 91
+pkg syscall (netbsd-arm64-cgo), const ENOSTR Errno
+pkg syscall (netbsd-arm64-cgo), const ENOSYS = 78
+pkg syscall (netbsd-arm64-cgo), const ENOTBLK = 15
+pkg syscall (netbsd-arm64-cgo), const ENOTCONN = 57
+pkg syscall (netbsd-arm64-cgo), const ENOTDIR = 20
+pkg syscall (netbsd-arm64-cgo), const ENOTEMPTY = 66
+pkg syscall (netbsd-arm64-cgo), const ENOTSOCK = 38
+pkg syscall (netbsd-arm64-cgo), const ENOTSUP = 86
+pkg syscall (netbsd-arm64-cgo), const ENOTTY = 25
+pkg syscall (netbsd-arm64-cgo), const ENXIO = 6
+pkg syscall (netbsd-arm64-cgo), const EOPNOTSUPP = 45
+pkg syscall (netbsd-arm64-cgo), const EOVERFLOW = 84
+pkg syscall (netbsd-arm64-cgo), const EPERM = 1
+pkg syscall (netbsd-arm64-cgo), const EPFNOSUPPORT = 46
+pkg syscall (netbsd-arm64-cgo), const EPIPE = 32
+pkg syscall (netbsd-arm64-cgo), const EPROCLIM = 67
+pkg syscall (netbsd-arm64-cgo), const EPROCLIM Errno
+pkg syscall (netbsd-arm64-cgo), const EPROCUNAVAIL = 76
+pkg syscall (netbsd-arm64-cgo), const EPROCUNAVAIL Errno
+pkg syscall (netbsd-arm64-cgo), const EPROGMISMATCH = 75
+pkg syscall (netbsd-arm64-cgo), const EPROGMISMATCH Errno
+pkg syscall (netbsd-arm64-cgo), const EPROGUNAVAIL = 74
+pkg syscall (netbsd-arm64-cgo), const EPROGUNAVAIL Errno
+pkg syscall (netbsd-arm64-cgo), const EPROTO = 96
+pkg syscall (netbsd-arm64-cgo), const EPROTO Errno
+pkg syscall (netbsd-arm64-cgo), const EPROTONOSUPPORT = 43
+pkg syscall (netbsd-arm64-cgo), const EPROTOTYPE = 41
+pkg syscall (netbsd-arm64-cgo), const ERANGE = 34
+pkg syscall (netbsd-arm64-cgo), const EREMOTE = 71
+pkg syscall (netbsd-arm64-cgo), const EROFS = 30
+pkg syscall (netbsd-arm64-cgo), const ERPCMISMATCH = 73
+pkg syscall (netbsd-arm64-cgo), const ERPCMISMATCH Errno
+pkg syscall (netbsd-arm64-cgo), const ESHUTDOWN = 58
+pkg syscall (netbsd-arm64-cgo), const ESOCKTNOSUPPORT = 44
+pkg syscall (netbsd-arm64-cgo), const ESPIPE = 29
+pkg syscall (netbsd-arm64-cgo), const ESRCH = 3
+pkg syscall (netbsd-arm64-cgo), const ESTALE = 70
+pkg syscall (netbsd-arm64-cgo), const ETHERCAP_JUMBO_MTU = 4
+pkg syscall (netbsd-arm64-cgo), const ETHERCAP_JUMBO_MTU ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERCAP_VLAN_HWTAGGING = 2
+pkg syscall (netbsd-arm64-cgo), const ETHERCAP_VLAN_HWTAGGING ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERCAP_VLAN_MTU = 1
+pkg syscall (netbsd-arm64-cgo), const ETHERCAP_VLAN_MTU ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERMIN = 46
+pkg syscall (netbsd-arm64-cgo), const ETHERMIN ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERMTU = 1500
+pkg syscall (netbsd-arm64-cgo), const ETHERMTU ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERMTU_JUMBO = 9000
+pkg syscall (netbsd-arm64-cgo), const ETHERMTU_JUMBO ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_8023 = 4
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_8023 ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_AARP = 33011
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_AARP ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_ACCTON = 33680
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_ACCTON ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_AEONIC = 32822
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_AEONIC ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_ALPHA = 33098
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_ALPHA ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_AMBER = 24584
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_AMBER ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_AMOEBA = 33093
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_AMOEBA ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_APOLLO = 33015
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_APOLLO ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_APOLLODOMAIN = 32793
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_APOLLODOMAIN ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_APPLETALK = 32923
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_APPLETALK ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_APPLITEK = 32967
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_APPLITEK ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_ARGONAUT = 32826
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_ARGONAUT ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_ARP = 2054
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_ARP ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_AT = 32923
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_AT ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_ATALK = 32923
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_ATALK ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_ATOMIC = 34527
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_ATOMIC ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_ATT = 32873
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_ATT ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_ATTSTANFORD = 32776
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_ATTSTANFORD ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_AUTOPHON = 32874
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_AUTOPHON ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_AXIS = 34902
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_AXIS ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_BCLOOP = 36867
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_BCLOOP ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_BOFL = 33026
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_BOFL ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_CABLETRON = 28724
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_CABLETRON ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_CHAOS = 2052
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_CHAOS ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_COMDESIGN = 32876
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_COMDESIGN ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_COMPUGRAPHIC = 32877
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_COMPUGRAPHIC ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_COUNTERPOINT = 32866
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_COUNTERPOINT ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_CRONUS = 32772
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_CRONUS ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_CRONUSVLN = 32771
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_CRONUSVLN ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DCA = 4660
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DCA ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DDE = 32891
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DDE ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DEBNI = 43690
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DEBNI ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DECAM = 32840
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DECAM ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DECCUST = 24582
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DECCUST ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DECDIAG = 24581
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DECDIAG ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DECDNS = 32828
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DECDNS ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DECDTS = 32830
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DECDTS ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DECEXPER = 24576
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DECEXPER ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DECLAST = 32833
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DECLAST ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DECLTM = 32831
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DECLTM ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DECMUMPS = 24585
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DECMUMPS ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DECNETBIOS = 32832
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DECNETBIOS ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DELTACON = 34526
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DELTACON ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DIDDLE = 17185
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DIDDLE ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DLOG1 = 1632
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DLOG1 ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DLOG2 = 1633
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DLOG2 ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DN = 24579
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DN ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DOGFIGHT = 6537
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DOGFIGHT ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DSMD = 32825
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_DSMD ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_ECMA = 2051
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_ECMA ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_ENCRYPT = 32829
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_ENCRYPT ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_ES = 32861
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_ES ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_EXCELAN = 32784
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_EXCELAN ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_EXPERDATA = 32841
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_EXPERDATA ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_FLIP = 33094
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_FLIP ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_FLOWCONTROL = 34824
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_FLOWCONTROL ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_FRARP = 2056
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_FRARP ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_GENDYN = 32872
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_GENDYN ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_HAYES = 33072
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_HAYES ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_HIPPI_FP = 33152
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_HIPPI_FP ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_HITACHI = 34848
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_HITACHI ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_HP = 32773
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_HP ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_IEEEPUP = 2560
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_IEEEPUP ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_IEEEPUPAT = 2561
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_IEEEPUPAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_IMLBL = 19522
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_IMLBL ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_IMLBLDIAG = 16972
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_IMLBLDIAG ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_IP = 2048
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_IP ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_IPAS = 34668
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_IPAS ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_IPV6 = 34525
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_IPV6 ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_IPX = 33079
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_IPX ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_IPXNEW = 32823
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_IPXNEW ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_KALPANA = 34178
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_KALPANA ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_LANBRIDGE = 32824
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_LANBRIDGE ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_LANPROBE = 34952
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_LANPROBE ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_LAT = 24580
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_LAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_LBACK = 36864
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_LBACK ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_LITTLE = 32864
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_LITTLE ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_LOGICRAFT = 33096
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_LOGICRAFT ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_LOOPBACK = 36864
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_LOOPBACK ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_MATRA = 32890
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_MATRA ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_MAX = 65535
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_MAX ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_MERIT = 32892
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_MERIT ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_MICP = 34618
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_MICP ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_MOPDL = 24577
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_MOPDL ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_MOPRC = 24578
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_MOPRC ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_MOTOROLA = 33165
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_MOTOROLA ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_MPLS = 34887
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_MPLS ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_MPLS_MCAST = 34888
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_MPLS_MCAST ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_MUMPS = 33087
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_MUMPS ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPCC = 15364
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPCC ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPCLAIM = 15369
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPCLAIM ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPCLREQ = 15365
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPCLREQ ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPCLRSP = 15366
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPCLRSP ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPCREQ = 15362
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPCREQ ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPCRSP = 15363
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPCRSP ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPDG = 15367
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPDG ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPDGB = 15368
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPDGB ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPDLTE = 15370
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPDLTE ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPRAR = 15372
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPRAR ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPRAS = 15371
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPRAS ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPRST = 15373
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPRST ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPSCD = 15361
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPSCD ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPVCD = 15360
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBPVCD ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBS = 2050
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NBS ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NCD = 33097
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NCD ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NESTAR = 32774
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NESTAR ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NETBEUI = 33169
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NETBEUI ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NOVELL = 33080
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NOVELL ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NS = 1536
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NS ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NSAT = 1537
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NSAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NSCOMPAT = 2055
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NSCOMPAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NTRAILER = 16
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_NTRAILER ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_OS9 = 28679
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_OS9 ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_OS9NET = 28681
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_OS9NET ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_PACER = 32966
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_PACER ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_PAE = 34958
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_PAE ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_PCS = 16962
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_PCS ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_PLANNING = 32836
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_PLANNING ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_PPP = 34827
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_PPP ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_PPPOE = 34916
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_PPPOE ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_PPPOEDISC = 34915
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_PPPOEDISC ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_PRIMENTS = 28721
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_PRIMENTS ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_PUP = 512
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_PUP ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_PUPAT = 512
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_PUPAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_RACAL = 28720
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_RACAL ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_RATIONAL = 33104
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_RATIONAL ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_RAWFR = 25945
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_RAWFR ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_RCL = 6549
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_RCL ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_RDP = 34617
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_RDP ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_RETIX = 33010
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_RETIX ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_REVARP = 32821
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_REVARP ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SCA = 24583
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SCA ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SECTRA = 34523
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SECTRA ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SECUREDATA = 34669
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SECUREDATA ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SGITW = 33150
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SGITW ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SG_BOUNCE = 32790
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SG_BOUNCE ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SG_DIAG = 32787
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SG_DIAG ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SG_NETGAMES = 32788
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SG_NETGAMES ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SG_RESV = 32789
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SG_RESV ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SIMNET = 21000
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SIMNET ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SLOWPROTOCOLS = 34825
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SLOWPROTOCOLS ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SNA = 32981
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SNA ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SNMP = 33100
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SNMP ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SONIX = 64245
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SONIX ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SPIDER = 32927
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SPIDER ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SPRITE = 1280
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_SPRITE ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_STP = 33153
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_STP ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_TALARIS = 33067
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_TALARIS ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_TALARISMC = 34091
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_TALARISMC ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_TCPCOMP = 34667
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_TCPCOMP ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_TCPSM = 36866
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_TCPSM ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_TEC = 33103
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_TEC ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_TIGAN = 32815
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_TIGAN ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_TRAIL = 4096
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_TRAIL ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_TRANSETHER = 25944
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_TRANSETHER ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_TYMSHARE = 32814
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_TYMSHARE ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_UBBST = 28677
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_UBBST ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_UBDEBUG = 2304
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_UBDEBUG ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_UBDIAGLOOP = 28674
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_UBDIAGLOOP ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_UBDL = 28672
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_UBDL ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_UBNIU = 28673
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_UBNIU ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_UBNMC = 28675
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_UBNMC ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VALID = 5632
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VALID ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VARIAN = 32989
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VARIAN ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VAXELN = 32827
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VAXELN ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VEECO = 32871
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VEECO ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VEXP = 32859
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VEXP ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VGLAB = 33073
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VGLAB ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VINES = 2989
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VINES ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VINESECHO = 2991
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VINESECHO ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VINESLOOP = 2990
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VINESLOOP ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VITAL = 65280
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VITAL ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VLAN = 33024
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VLAN ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VLTLMAN = 32896
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VLTLMAN ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VPROD = 32860
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VPROD ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VURESERVED = 33095
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_VURESERVED ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_WATERLOO = 33072
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_WATERLOO ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_WELLFLEET = 33027
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_WELLFLEET ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_X25 = 2053
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_X25 ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_X75 = 2049
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_X75 ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_XNSSM = 36865
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_XNSSM ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_XTP = 33149
+pkg syscall (netbsd-arm64-cgo), const ETHERTYPE_XTP ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHER_ADDR_LEN = 6
+pkg syscall (netbsd-arm64-cgo), const ETHER_ADDR_LEN ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHER_CRC_LEN = 4
+pkg syscall (netbsd-arm64-cgo), const ETHER_CRC_LEN ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHER_CRC_POLY_BE = 79764918
+pkg syscall (netbsd-arm64-cgo), const ETHER_CRC_POLY_BE ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHER_CRC_POLY_LE = 3988292384
+pkg syscall (netbsd-arm64-cgo), const ETHER_CRC_POLY_LE ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHER_HDR_LEN = 14
+pkg syscall (netbsd-arm64-cgo), const ETHER_HDR_LEN ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHER_MAX_LEN = 1518
+pkg syscall (netbsd-arm64-cgo), const ETHER_MAX_LEN ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHER_MAX_LEN_JUMBO = 9018
+pkg syscall (netbsd-arm64-cgo), const ETHER_MAX_LEN_JUMBO ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHER_MIN_LEN = 64
+pkg syscall (netbsd-arm64-cgo), const ETHER_MIN_LEN ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHER_PPPOE_ENCAP_LEN = 8
+pkg syscall (netbsd-arm64-cgo), const ETHER_PPPOE_ENCAP_LEN ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHER_TYPE_LEN = 2
+pkg syscall (netbsd-arm64-cgo), const ETHER_TYPE_LEN ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETHER_VLAN_ENCAP_LEN = 4
+pkg syscall (netbsd-arm64-cgo), const ETHER_VLAN_ENCAP_LEN ideal-int
+pkg syscall (netbsd-arm64-cgo), const ETIME = 92
+pkg syscall (netbsd-arm64-cgo), const ETIME Errno
+pkg syscall (netbsd-arm64-cgo), const ETIMEDOUT = 60
+pkg syscall (netbsd-arm64-cgo), const ETOOMANYREFS = 59
+pkg syscall (netbsd-arm64-cgo), const ETXTBSY = 26
+pkg syscall (netbsd-arm64-cgo), const EUSERS = 68
+pkg syscall (netbsd-arm64-cgo), const EVFILT_AIO = 2
+pkg syscall (netbsd-arm64-cgo), const EVFILT_AIO ideal-int
+pkg syscall (netbsd-arm64-cgo), const EVFILT_PROC = 4
+pkg syscall (netbsd-arm64-cgo), const EVFILT_PROC ideal-int
+pkg syscall (netbsd-arm64-cgo), const EVFILT_READ = 0
+pkg syscall (netbsd-arm64-cgo), const EVFILT_READ ideal-int
+pkg syscall (netbsd-arm64-cgo), const EVFILT_SIGNAL = 5
+pkg syscall (netbsd-arm64-cgo), const EVFILT_SIGNAL ideal-int
+pkg syscall (netbsd-arm64-cgo), const EVFILT_SYSCOUNT = 7
+pkg syscall (netbsd-arm64-cgo), const EVFILT_SYSCOUNT ideal-int
+pkg syscall (netbsd-arm64-cgo), const EVFILT_TIMER = 6
+pkg syscall (netbsd-arm64-cgo), const EVFILT_TIMER ideal-int
+pkg syscall (netbsd-arm64-cgo), const EVFILT_VNODE = 3
+pkg syscall (netbsd-arm64-cgo), const EVFILT_VNODE ideal-int
+pkg syscall (netbsd-arm64-cgo), const EVFILT_WRITE = 1
+pkg syscall (netbsd-arm64-cgo), const EVFILT_WRITE ideal-int
+pkg syscall (netbsd-arm64-cgo), const EV_ADD = 1
+pkg syscall (netbsd-arm64-cgo), const EV_ADD ideal-int
+pkg syscall (netbsd-arm64-cgo), const EV_CLEAR = 32
+pkg syscall (netbsd-arm64-cgo), const EV_CLEAR ideal-int
+pkg syscall (netbsd-arm64-cgo), const EV_DELETE = 2
+pkg syscall (netbsd-arm64-cgo), const EV_DELETE ideal-int
+pkg syscall (netbsd-arm64-cgo), const EV_DISABLE = 8
+pkg syscall (netbsd-arm64-cgo), const EV_DISABLE ideal-int
+pkg syscall (netbsd-arm64-cgo), const EV_ENABLE = 4
+pkg syscall (netbsd-arm64-cgo), const EV_ENABLE ideal-int
+pkg syscall (netbsd-arm64-cgo), const EV_EOF = 32768
+pkg syscall (netbsd-arm64-cgo), const EV_EOF ideal-int
+pkg syscall (netbsd-arm64-cgo), const EV_ERROR = 16384
+pkg syscall (netbsd-arm64-cgo), const EV_ERROR ideal-int
+pkg syscall (netbsd-arm64-cgo), const EV_FLAG1 = 8192
+pkg syscall (netbsd-arm64-cgo), const EV_FLAG1 ideal-int
+pkg syscall (netbsd-arm64-cgo), const EV_ONESHOT = 16
+pkg syscall (netbsd-arm64-cgo), const EV_ONESHOT ideal-int
+pkg syscall (netbsd-arm64-cgo), const EV_SYSFLAGS = 61440
+pkg syscall (netbsd-arm64-cgo), const EV_SYSFLAGS ideal-int
+pkg syscall (netbsd-arm64-cgo), const EWOULDBLOCK = 35
+pkg syscall (netbsd-arm64-cgo), const EXDEV = 18
+pkg syscall (netbsd-arm64-cgo), const EXTA = 19200
+pkg syscall (netbsd-arm64-cgo), const EXTA ideal-int
+pkg syscall (netbsd-arm64-cgo), const EXTB = 38400
+pkg syscall (netbsd-arm64-cgo), const EXTB ideal-int
+pkg syscall (netbsd-arm64-cgo), const EXTPROC = 2048
+pkg syscall (netbsd-arm64-cgo), const EXTPROC ideal-int
+pkg syscall (netbsd-arm64-cgo), const FD_CLOEXEC = 1
+pkg syscall (netbsd-arm64-cgo), const FD_CLOEXEC ideal-int
+pkg syscall (netbsd-arm64-cgo), const FD_SETSIZE = 256
+pkg syscall (netbsd-arm64-cgo), const FD_SETSIZE ideal-int
+pkg syscall (netbsd-arm64-cgo), const FLUSHO = 8388608
+pkg syscall (netbsd-arm64-cgo), const FLUSHO ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_CLOSEM = 10
+pkg syscall (netbsd-arm64-cgo), const F_CLOSEM ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_DUPFD = 0
+pkg syscall (netbsd-arm64-cgo), const F_DUPFD ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_DUPFD_CLOEXEC = 12
+pkg syscall (netbsd-arm64-cgo), const F_DUPFD_CLOEXEC ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_FSCTL = -2147483648
+pkg syscall (netbsd-arm64-cgo), const F_FSCTL ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_FSDIRMASK = 1879048192
+pkg syscall (netbsd-arm64-cgo), const F_FSDIRMASK ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_FSIN = 268435456
+pkg syscall (netbsd-arm64-cgo), const F_FSIN ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_FSINOUT = 805306368
+pkg syscall (netbsd-arm64-cgo), const F_FSINOUT ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_FSOUT = 536870912
+pkg syscall (netbsd-arm64-cgo), const F_FSOUT ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_FSPRIV = 32768
+pkg syscall (netbsd-arm64-cgo), const F_FSPRIV ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_FSVOID = 1073741824
+pkg syscall (netbsd-arm64-cgo), const F_FSVOID ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_GETFD = 1
+pkg syscall (netbsd-arm64-cgo), const F_GETFD ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_GETFL = 3
+pkg syscall (netbsd-arm64-cgo), const F_GETFL ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_GETLK = 7
+pkg syscall (netbsd-arm64-cgo), const F_GETLK ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_GETNOSIGPIPE = 13
+pkg syscall (netbsd-arm64-cgo), const F_GETNOSIGPIPE ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_GETOWN = 5
+pkg syscall (netbsd-arm64-cgo), const F_GETOWN ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_MAXFD = 11
+pkg syscall (netbsd-arm64-cgo), const F_MAXFD ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_OK = 0
+pkg syscall (netbsd-arm64-cgo), const F_OK ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_PARAM_MASK = 4095
+pkg syscall (netbsd-arm64-cgo), const F_PARAM_MASK ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_PARAM_MAX = 4095
+pkg syscall (netbsd-arm64-cgo), const F_PARAM_MAX ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_RDLCK = 1
+pkg syscall (netbsd-arm64-cgo), const F_RDLCK ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_SETFD = 2
+pkg syscall (netbsd-arm64-cgo), const F_SETFD ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_SETFL = 4
+pkg syscall (netbsd-arm64-cgo), const F_SETFL ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_SETLK = 8
+pkg syscall (netbsd-arm64-cgo), const F_SETLK ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_SETLKW = 9
+pkg syscall (netbsd-arm64-cgo), const F_SETLKW ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_SETNOSIGPIPE = 14
+pkg syscall (netbsd-arm64-cgo), const F_SETNOSIGPIPE ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_SETOWN = 6
+pkg syscall (netbsd-arm64-cgo), const F_SETOWN ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_UNLCK = 2
+pkg syscall (netbsd-arm64-cgo), const F_UNLCK ideal-int
+pkg syscall (netbsd-arm64-cgo), const F_WRLCK = 3
+pkg syscall (netbsd-arm64-cgo), const F_WRLCK ideal-int
+pkg syscall (netbsd-arm64-cgo), const HUPCL = 16384
+pkg syscall (netbsd-arm64-cgo), const HUPCL ideal-int
+pkg syscall (netbsd-arm64-cgo), const ICANON = 256
+pkg syscall (netbsd-arm64-cgo), const ICANON ideal-int
+pkg syscall (netbsd-arm64-cgo), const ICMP6_FILTER = 18
+pkg syscall (netbsd-arm64-cgo), const ICMP6_FILTER ideal-int
+pkg syscall (netbsd-arm64-cgo), const ICRNL = 256
+pkg syscall (netbsd-arm64-cgo), const ICRNL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IEXTEN = 1024
+pkg syscall (netbsd-arm64-cgo), const IEXTEN ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFAN_ARRIVAL = 0
+pkg syscall (netbsd-arm64-cgo), const IFAN_ARRIVAL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFAN_DEPARTURE = 1
+pkg syscall (netbsd-arm64-cgo), const IFAN_DEPARTURE ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFA_ROUTE = 1
+pkg syscall (netbsd-arm64-cgo), const IFA_ROUTE ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFF_ALLMULTI = 512
+pkg syscall (netbsd-arm64-cgo), const IFF_ALLMULTI ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFF_CANTCHANGE = 36690
+pkg syscall (netbsd-arm64-cgo), const IFF_CANTCHANGE ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFF_DEBUG = 4
+pkg syscall (netbsd-arm64-cgo), const IFF_DEBUG ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFF_LINK0 = 4096
+pkg syscall (netbsd-arm64-cgo), const IFF_LINK0 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFF_LINK1 = 8192
+pkg syscall (netbsd-arm64-cgo), const IFF_LINK1 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFF_LINK2 = 16384
+pkg syscall (netbsd-arm64-cgo), const IFF_LINK2 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFF_LOOPBACK = 8
+pkg syscall (netbsd-arm64-cgo), const IFF_MULTICAST = 32768
+pkg syscall (netbsd-arm64-cgo), const IFF_NOARP = 128
+pkg syscall (netbsd-arm64-cgo), const IFF_NOARP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFF_NOTRAILERS = 32
+pkg syscall (netbsd-arm64-cgo), const IFF_NOTRAILERS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFF_OACTIVE = 1024
+pkg syscall (netbsd-arm64-cgo), const IFF_OACTIVE ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFF_POINTOPOINT = 16
+pkg syscall (netbsd-arm64-cgo), const IFF_POINTOPOINT ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFF_PROMISC = 256
+pkg syscall (netbsd-arm64-cgo), const IFF_PROMISC ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFF_RUNNING = 64
+pkg syscall (netbsd-arm64-cgo), const IFF_RUNNING ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFF_SIMPLEX = 2048
+pkg syscall (netbsd-arm64-cgo), const IFF_SIMPLEX ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFNAMSIZ = 16
+pkg syscall (netbsd-arm64-cgo), const IFNAMSIZ ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_1822 = 2
+pkg syscall (netbsd-arm64-cgo), const IFT_1822 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_A12MPPSWITCH = 130
+pkg syscall (netbsd-arm64-cgo), const IFT_A12MPPSWITCH ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_AAL2 = 187
+pkg syscall (netbsd-arm64-cgo), const IFT_AAL2 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_AAL5 = 49
+pkg syscall (netbsd-arm64-cgo), const IFT_AAL5 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ADSL = 94
+pkg syscall (netbsd-arm64-cgo), const IFT_ADSL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_AFLANE8023 = 59
+pkg syscall (netbsd-arm64-cgo), const IFT_AFLANE8023 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_AFLANE8025 = 60
+pkg syscall (netbsd-arm64-cgo), const IFT_AFLANE8025 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ARAP = 88
+pkg syscall (netbsd-arm64-cgo), const IFT_ARAP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ARCNET = 35
+pkg syscall (netbsd-arm64-cgo), const IFT_ARCNET ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ARCNETPLUS = 36
+pkg syscall (netbsd-arm64-cgo), const IFT_ARCNETPLUS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ASYNC = 84
+pkg syscall (netbsd-arm64-cgo), const IFT_ASYNC ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ATM = 37
+pkg syscall (netbsd-arm64-cgo), const IFT_ATM ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ATMDXI = 105
+pkg syscall (netbsd-arm64-cgo), const IFT_ATMDXI ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ATMFUNI = 106
+pkg syscall (netbsd-arm64-cgo), const IFT_ATMFUNI ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ATMIMA = 107
+pkg syscall (netbsd-arm64-cgo), const IFT_ATMIMA ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ATMLOGICAL = 80
+pkg syscall (netbsd-arm64-cgo), const IFT_ATMLOGICAL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ATMRADIO = 189
+pkg syscall (netbsd-arm64-cgo), const IFT_ATMRADIO ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ATMSUBINTERFACE = 134
+pkg syscall (netbsd-arm64-cgo), const IFT_ATMSUBINTERFACE ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ATMVCIENDPT = 194
+pkg syscall (netbsd-arm64-cgo), const IFT_ATMVCIENDPT ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ATMVIRTUAL = 149
+pkg syscall (netbsd-arm64-cgo), const IFT_ATMVIRTUAL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_BGPPOLICYACCOUNTING = 162
+pkg syscall (netbsd-arm64-cgo), const IFT_BGPPOLICYACCOUNTING ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_BRIDGE = 209
+pkg syscall (netbsd-arm64-cgo), const IFT_BRIDGE ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_BSC = 83
+pkg syscall (netbsd-arm64-cgo), const IFT_BSC ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_CARP = 248
+pkg syscall (netbsd-arm64-cgo), const IFT_CARP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_CCTEMUL = 61
+pkg syscall (netbsd-arm64-cgo), const IFT_CCTEMUL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_CEPT = 19
+pkg syscall (netbsd-arm64-cgo), const IFT_CEPT ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_CES = 133
+pkg syscall (netbsd-arm64-cgo), const IFT_CES ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_CHANNEL = 70
+pkg syscall (netbsd-arm64-cgo), const IFT_CHANNEL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_CNR = 85
+pkg syscall (netbsd-arm64-cgo), const IFT_CNR ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_COFFEE = 132
+pkg syscall (netbsd-arm64-cgo), const IFT_COFFEE ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_COMPOSITELINK = 155
+pkg syscall (netbsd-arm64-cgo), const IFT_COMPOSITELINK ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_DCN = 141
+pkg syscall (netbsd-arm64-cgo), const IFT_DCN ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_DIGITALPOWERLINE = 138
+pkg syscall (netbsd-arm64-cgo), const IFT_DIGITALPOWERLINE ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_DIGITALWRAPPEROVERHEADCHANNEL = 186
+pkg syscall (netbsd-arm64-cgo), const IFT_DIGITALWRAPPEROVERHEADCHANNEL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_DLSW = 74
+pkg syscall (netbsd-arm64-cgo), const IFT_DLSW ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_DOCSCABLEDOWNSTREAM = 128
+pkg syscall (netbsd-arm64-cgo), const IFT_DOCSCABLEDOWNSTREAM ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_DOCSCABLEMACLAYER = 127
+pkg syscall (netbsd-arm64-cgo), const IFT_DOCSCABLEMACLAYER ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_DOCSCABLEUPSTREAM = 129
+pkg syscall (netbsd-arm64-cgo), const IFT_DOCSCABLEUPSTREAM ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_DOCSCABLEUPSTREAMCHANNEL = 205
+pkg syscall (netbsd-arm64-cgo), const IFT_DOCSCABLEUPSTREAMCHANNEL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_DS0 = 81
+pkg syscall (netbsd-arm64-cgo), const IFT_DS0 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_DS0BUNDLE = 82
+pkg syscall (netbsd-arm64-cgo), const IFT_DS0BUNDLE ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_DS1FDL = 170
+pkg syscall (netbsd-arm64-cgo), const IFT_DS1FDL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_DS3 = 30
+pkg syscall (netbsd-arm64-cgo), const IFT_DS3 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_DTM = 140
+pkg syscall (netbsd-arm64-cgo), const IFT_DTM ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_DVBASILN = 172
+pkg syscall (netbsd-arm64-cgo), const IFT_DVBASILN ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_DVBASIOUT = 173
+pkg syscall (netbsd-arm64-cgo), const IFT_DVBASIOUT ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_DVBRCCDOWNSTREAM = 147
+pkg syscall (netbsd-arm64-cgo), const IFT_DVBRCCDOWNSTREAM ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_DVBRCCMACLAYER = 146
+pkg syscall (netbsd-arm64-cgo), const IFT_DVBRCCMACLAYER ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_DVBRCCUPSTREAM = 148
+pkg syscall (netbsd-arm64-cgo), const IFT_DVBRCCUPSTREAM ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ECONET = 206
+pkg syscall (netbsd-arm64-cgo), const IFT_ECONET ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_EON = 25
+pkg syscall (netbsd-arm64-cgo), const IFT_EON ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_EPLRS = 87
+pkg syscall (netbsd-arm64-cgo), const IFT_EPLRS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ESCON = 73
+pkg syscall (netbsd-arm64-cgo), const IFT_ESCON ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ETHER = 6
+pkg syscall (netbsd-arm64-cgo), const IFT_ETHER ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_FAITH = 242
+pkg syscall (netbsd-arm64-cgo), const IFT_FAITH ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_FAST = 125
+pkg syscall (netbsd-arm64-cgo), const IFT_FAST ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_FASTETHER = 62
+pkg syscall (netbsd-arm64-cgo), const IFT_FASTETHER ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_FASTETHERFX = 69
+pkg syscall (netbsd-arm64-cgo), const IFT_FASTETHERFX ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_FDDI = 15
+pkg syscall (netbsd-arm64-cgo), const IFT_FDDI ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_FIBRECHANNEL = 56
+pkg syscall (netbsd-arm64-cgo), const IFT_FIBRECHANNEL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_FRAMERELAYINTERCONNECT = 58
+pkg syscall (netbsd-arm64-cgo), const IFT_FRAMERELAYINTERCONNECT ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_FRAMERELAYMPI = 92
+pkg syscall (netbsd-arm64-cgo), const IFT_FRAMERELAYMPI ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_FRDLCIENDPT = 193
+pkg syscall (netbsd-arm64-cgo), const IFT_FRDLCIENDPT ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_FRELAY = 32
+pkg syscall (netbsd-arm64-cgo), const IFT_FRELAY ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_FRELAYDCE = 44
+pkg syscall (netbsd-arm64-cgo), const IFT_FRELAYDCE ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_FRF16MFRBUNDLE = 163
+pkg syscall (netbsd-arm64-cgo), const IFT_FRF16MFRBUNDLE ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_FRFORWARD = 158
+pkg syscall (netbsd-arm64-cgo), const IFT_FRFORWARD ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_G703AT2MB = 67
+pkg syscall (netbsd-arm64-cgo), const IFT_G703AT2MB ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_G703AT64K = 66
+pkg syscall (netbsd-arm64-cgo), const IFT_G703AT64K ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_GIF = 240
+pkg syscall (netbsd-arm64-cgo), const IFT_GIF ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_GIGABITETHERNET = 117
+pkg syscall (netbsd-arm64-cgo), const IFT_GIGABITETHERNET ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_GR303IDT = 178
+pkg syscall (netbsd-arm64-cgo), const IFT_GR303IDT ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_GR303RDT = 177
+pkg syscall (netbsd-arm64-cgo), const IFT_GR303RDT ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_H323GATEKEEPER = 164
+pkg syscall (netbsd-arm64-cgo), const IFT_H323GATEKEEPER ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_H323PROXY = 165
+pkg syscall (netbsd-arm64-cgo), const IFT_H323PROXY ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_HDH1822 = 3
+pkg syscall (netbsd-arm64-cgo), const IFT_HDH1822 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_HDLC = 118
+pkg syscall (netbsd-arm64-cgo), const IFT_HDLC ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_HDSL2 = 168
+pkg syscall (netbsd-arm64-cgo), const IFT_HDSL2 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_HIPERLAN2 = 183
+pkg syscall (netbsd-arm64-cgo), const IFT_HIPERLAN2 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_HIPPI = 47
+pkg syscall (netbsd-arm64-cgo), const IFT_HIPPI ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_HIPPIINTERFACE = 57
+pkg syscall (netbsd-arm64-cgo), const IFT_HIPPIINTERFACE ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_HOSTPAD = 90
+pkg syscall (netbsd-arm64-cgo), const IFT_HOSTPAD ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_HSSI = 46
+pkg syscall (netbsd-arm64-cgo), const IFT_HSSI ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_HY = 14
+pkg syscall (netbsd-arm64-cgo), const IFT_HY ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_IBM370PARCHAN = 72
+pkg syscall (netbsd-arm64-cgo), const IFT_IBM370PARCHAN ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_IDSL = 154
+pkg syscall (netbsd-arm64-cgo), const IFT_IDSL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_IEEE1394 = 144
+pkg syscall (netbsd-arm64-cgo), const IFT_IEEE1394 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_IEEE80211 = 71
+pkg syscall (netbsd-arm64-cgo), const IFT_IEEE80211 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_IEEE80212 = 55
+pkg syscall (netbsd-arm64-cgo), const IFT_IEEE80212 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_IEEE8023ADLAG = 161
+pkg syscall (netbsd-arm64-cgo), const IFT_IEEE8023ADLAG ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_IFGSN = 145
+pkg syscall (netbsd-arm64-cgo), const IFT_IFGSN ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_IMT = 190
+pkg syscall (netbsd-arm64-cgo), const IFT_IMT ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_INFINIBAND = 199
+pkg syscall (netbsd-arm64-cgo), const IFT_INFINIBAND ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_INTERLEAVE = 124
+pkg syscall (netbsd-arm64-cgo), const IFT_INTERLEAVE ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_IP = 126
+pkg syscall (netbsd-arm64-cgo), const IFT_IP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_IPFORWARD = 142
+pkg syscall (netbsd-arm64-cgo), const IFT_IPFORWARD ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_IPOVERATM = 114
+pkg syscall (netbsd-arm64-cgo), const IFT_IPOVERATM ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_IPOVERCDLC = 109
+pkg syscall (netbsd-arm64-cgo), const IFT_IPOVERCDLC ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_IPOVERCLAW = 110
+pkg syscall (netbsd-arm64-cgo), const IFT_IPOVERCLAW ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_IPSWITCH = 78
+pkg syscall (netbsd-arm64-cgo), const IFT_IPSWITCH ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ISDN = 63
+pkg syscall (netbsd-arm64-cgo), const IFT_ISDN ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ISDNBASIC = 20
+pkg syscall (netbsd-arm64-cgo), const IFT_ISDNBASIC ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ISDNPRIMARY = 21
+pkg syscall (netbsd-arm64-cgo), const IFT_ISDNPRIMARY ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ISDNS = 75
+pkg syscall (netbsd-arm64-cgo), const IFT_ISDNS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ISDNU = 76
+pkg syscall (netbsd-arm64-cgo), const IFT_ISDNU ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ISO88022LLC = 41
+pkg syscall (netbsd-arm64-cgo), const IFT_ISO88022LLC ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ISO88023 = 7
+pkg syscall (netbsd-arm64-cgo), const IFT_ISO88023 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ISO88024 = 8
+pkg syscall (netbsd-arm64-cgo), const IFT_ISO88024 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ISO88025 = 9
+pkg syscall (netbsd-arm64-cgo), const IFT_ISO88025 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ISO88025CRFPINT = 98
+pkg syscall (netbsd-arm64-cgo), const IFT_ISO88025CRFPINT ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ISO88025DTR = 86
+pkg syscall (netbsd-arm64-cgo), const IFT_ISO88025DTR ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ISO88025FIBER = 115
+pkg syscall (netbsd-arm64-cgo), const IFT_ISO88025FIBER ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ISO88026 = 10
+pkg syscall (netbsd-arm64-cgo), const IFT_ISO88026 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ISUP = 179
+pkg syscall (netbsd-arm64-cgo), const IFT_ISUP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_L2VLAN = 135
+pkg syscall (netbsd-arm64-cgo), const IFT_L2VLAN ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_L3IPVLAN = 136
+pkg syscall (netbsd-arm64-cgo), const IFT_L3IPVLAN ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_L3IPXVLAN = 137
+pkg syscall (netbsd-arm64-cgo), const IFT_L3IPXVLAN ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_LAPB = 16
+pkg syscall (netbsd-arm64-cgo), const IFT_LAPB ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_LAPD = 77
+pkg syscall (netbsd-arm64-cgo), const IFT_LAPD ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_LAPF = 119
+pkg syscall (netbsd-arm64-cgo), const IFT_LAPF ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_LINEGROUP = 210
+pkg syscall (netbsd-arm64-cgo), const IFT_LINEGROUP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_LOCALTALK = 42
+pkg syscall (netbsd-arm64-cgo), const IFT_LOCALTALK ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_LOOP = 24
+pkg syscall (netbsd-arm64-cgo), const IFT_LOOP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_MEDIAMAILOVERIP = 139
+pkg syscall (netbsd-arm64-cgo), const IFT_MEDIAMAILOVERIP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_MFSIGLINK = 167
+pkg syscall (netbsd-arm64-cgo), const IFT_MFSIGLINK ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_MIOX25 = 38
+pkg syscall (netbsd-arm64-cgo), const IFT_MIOX25 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_MODEM = 48
+pkg syscall (netbsd-arm64-cgo), const IFT_MODEM ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_MPC = 113
+pkg syscall (netbsd-arm64-cgo), const IFT_MPC ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_MPLS = 166
+pkg syscall (netbsd-arm64-cgo), const IFT_MPLS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_MPLSTUNNEL = 150
+pkg syscall (netbsd-arm64-cgo), const IFT_MPLSTUNNEL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_MSDSL = 143
+pkg syscall (netbsd-arm64-cgo), const IFT_MSDSL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_MVL = 191
+pkg syscall (netbsd-arm64-cgo), const IFT_MVL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_MYRINET = 99
+pkg syscall (netbsd-arm64-cgo), const IFT_MYRINET ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_NFAS = 175
+pkg syscall (netbsd-arm64-cgo), const IFT_NFAS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_NSIP = 27
+pkg syscall (netbsd-arm64-cgo), const IFT_NSIP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_OPTICALCHANNEL = 195
+pkg syscall (netbsd-arm64-cgo), const IFT_OPTICALCHANNEL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_OPTICALTRANSPORT = 196
+pkg syscall (netbsd-arm64-cgo), const IFT_OPTICALTRANSPORT ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_OTHER = 1
+pkg syscall (netbsd-arm64-cgo), const IFT_OTHER ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_P10 = 12
+pkg syscall (netbsd-arm64-cgo), const IFT_P10 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_P80 = 13
+pkg syscall (netbsd-arm64-cgo), const IFT_P80 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_PARA = 34
+pkg syscall (netbsd-arm64-cgo), const IFT_PARA ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_PFLOG = 245
+pkg syscall (netbsd-arm64-cgo), const IFT_PFLOG ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_PFSYNC = 246
+pkg syscall (netbsd-arm64-cgo), const IFT_PFSYNC ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_PLC = 174
+pkg syscall (netbsd-arm64-cgo), const IFT_PLC ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_PON155 = 207
+pkg syscall (netbsd-arm64-cgo), const IFT_PON155 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_PON622 = 208
+pkg syscall (netbsd-arm64-cgo), const IFT_PON622 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_POS = 171
+pkg syscall (netbsd-arm64-cgo), const IFT_POS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_PPP = 23
+pkg syscall (netbsd-arm64-cgo), const IFT_PPP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_PPPMULTILINKBUNDLE = 108
+pkg syscall (netbsd-arm64-cgo), const IFT_PPPMULTILINKBUNDLE ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_PROPATM = 197
+pkg syscall (netbsd-arm64-cgo), const IFT_PROPATM ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_PROPBWAP2MP = 184
+pkg syscall (netbsd-arm64-cgo), const IFT_PROPBWAP2MP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_PROPCNLS = 89
+pkg syscall (netbsd-arm64-cgo), const IFT_PROPCNLS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_PROPDOCSWIRELESSDOWNSTREAM = 181
+pkg syscall (netbsd-arm64-cgo), const IFT_PROPDOCSWIRELESSDOWNSTREAM ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_PROPDOCSWIRELESSMACLAYER = 180
+pkg syscall (netbsd-arm64-cgo), const IFT_PROPDOCSWIRELESSMACLAYER ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_PROPDOCSWIRELESSUPSTREAM = 182
+pkg syscall (netbsd-arm64-cgo), const IFT_PROPDOCSWIRELESSUPSTREAM ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_PROPMUX = 54
+pkg syscall (netbsd-arm64-cgo), const IFT_PROPMUX ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_PROPVIRTUAL = 53
+pkg syscall (netbsd-arm64-cgo), const IFT_PROPVIRTUAL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_PROPWIRELESSP2P = 157
+pkg syscall (netbsd-arm64-cgo), const IFT_PROPWIRELESSP2P ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_PTPSERIAL = 22
+pkg syscall (netbsd-arm64-cgo), const IFT_PTPSERIAL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_PVC = 241
+pkg syscall (netbsd-arm64-cgo), const IFT_PVC ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_Q2931 = 201
+pkg syscall (netbsd-arm64-cgo), const IFT_Q2931 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_QLLC = 68
+pkg syscall (netbsd-arm64-cgo), const IFT_QLLC ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_RADIOMAC = 188
+pkg syscall (netbsd-arm64-cgo), const IFT_RADIOMAC ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_RADSL = 95
+pkg syscall (netbsd-arm64-cgo), const IFT_RADSL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_REACHDSL = 192
+pkg syscall (netbsd-arm64-cgo), const IFT_REACHDSL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_RFC1483 = 159
+pkg syscall (netbsd-arm64-cgo), const IFT_RFC1483 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_RS232 = 33
+pkg syscall (netbsd-arm64-cgo), const IFT_RS232 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_RSRB = 79
+pkg syscall (netbsd-arm64-cgo), const IFT_RSRB ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_SDLC = 17
+pkg syscall (netbsd-arm64-cgo), const IFT_SDLC ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_SDSL = 96
+pkg syscall (netbsd-arm64-cgo), const IFT_SDSL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_SHDSL = 169
+pkg syscall (netbsd-arm64-cgo), const IFT_SHDSL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_SIP = 31
+pkg syscall (netbsd-arm64-cgo), const IFT_SIP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_SIPSIG = 204
+pkg syscall (netbsd-arm64-cgo), const IFT_SIPSIG ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_SIPTG = 203
+pkg syscall (netbsd-arm64-cgo), const IFT_SIPTG ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_SLIP = 28
+pkg syscall (netbsd-arm64-cgo), const IFT_SLIP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_SMDSDXI = 43
+pkg syscall (netbsd-arm64-cgo), const IFT_SMDSDXI ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_SMDSICIP = 52
+pkg syscall (netbsd-arm64-cgo), const IFT_SMDSICIP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_SONET = 39
+pkg syscall (netbsd-arm64-cgo), const IFT_SONET ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_SONETOVERHEADCHANNEL = 185
+pkg syscall (netbsd-arm64-cgo), const IFT_SONETOVERHEADCHANNEL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_SONETPATH = 50
+pkg syscall (netbsd-arm64-cgo), const IFT_SONETPATH ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_SONETVT = 51
+pkg syscall (netbsd-arm64-cgo), const IFT_SONETVT ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_SRP = 151
+pkg syscall (netbsd-arm64-cgo), const IFT_SRP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_SS7SIGLINK = 156
+pkg syscall (netbsd-arm64-cgo), const IFT_SS7SIGLINK ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_STACKTOSTACK = 111
+pkg syscall (netbsd-arm64-cgo), const IFT_STACKTOSTACK ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_STARLAN = 11
+pkg syscall (netbsd-arm64-cgo), const IFT_STARLAN ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_STF = 215
+pkg syscall (netbsd-arm64-cgo), const IFT_STF ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_T1 = 18
+pkg syscall (netbsd-arm64-cgo), const IFT_T1 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_TDLC = 116
+pkg syscall (netbsd-arm64-cgo), const IFT_TDLC ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_TELINK = 200
+pkg syscall (netbsd-arm64-cgo), const IFT_TELINK ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_TERMPAD = 91
+pkg syscall (netbsd-arm64-cgo), const IFT_TERMPAD ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_TR008 = 176
+pkg syscall (netbsd-arm64-cgo), const IFT_TR008 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_TRANSPHDLC = 123
+pkg syscall (netbsd-arm64-cgo), const IFT_TRANSPHDLC ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_TUNNEL = 131
+pkg syscall (netbsd-arm64-cgo), const IFT_TUNNEL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_ULTRA = 29
+pkg syscall (netbsd-arm64-cgo), const IFT_ULTRA ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_USB = 160
+pkg syscall (netbsd-arm64-cgo), const IFT_USB ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_V11 = 64
+pkg syscall (netbsd-arm64-cgo), const IFT_V11 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_V35 = 45
+pkg syscall (netbsd-arm64-cgo), const IFT_V35 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_V36 = 65
+pkg syscall (netbsd-arm64-cgo), const IFT_V36 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_V37 = 120
+pkg syscall (netbsd-arm64-cgo), const IFT_V37 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_VDSL = 97
+pkg syscall (netbsd-arm64-cgo), const IFT_VDSL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_VIRTUALIPADDRESS = 112
+pkg syscall (netbsd-arm64-cgo), const IFT_VIRTUALIPADDRESS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_VIRTUALTG = 202
+pkg syscall (netbsd-arm64-cgo), const IFT_VIRTUALTG ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_VOICEDID = 213
+pkg syscall (netbsd-arm64-cgo), const IFT_VOICEDID ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_VOICEEM = 100
+pkg syscall (netbsd-arm64-cgo), const IFT_VOICEEM ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_VOICEEMFGD = 211
+pkg syscall (netbsd-arm64-cgo), const IFT_VOICEEMFGD ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_VOICEENCAP = 103
+pkg syscall (netbsd-arm64-cgo), const IFT_VOICEENCAP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_VOICEFGDEANA = 212
+pkg syscall (netbsd-arm64-cgo), const IFT_VOICEFGDEANA ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_VOICEFXO = 101
+pkg syscall (netbsd-arm64-cgo), const IFT_VOICEFXO ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_VOICEFXS = 102
+pkg syscall (netbsd-arm64-cgo), const IFT_VOICEFXS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_VOICEOVERATM = 152
+pkg syscall (netbsd-arm64-cgo), const IFT_VOICEOVERATM ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_VOICEOVERCABLE = 198
+pkg syscall (netbsd-arm64-cgo), const IFT_VOICEOVERCABLE ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_VOICEOVERFRAMERELAY = 153
+pkg syscall (netbsd-arm64-cgo), const IFT_VOICEOVERFRAMERELAY ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_VOICEOVERIP = 104
+pkg syscall (netbsd-arm64-cgo), const IFT_VOICEOVERIP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_X213 = 93
+pkg syscall (netbsd-arm64-cgo), const IFT_X213 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_X25 = 5
+pkg syscall (netbsd-arm64-cgo), const IFT_X25 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_X25DDN = 4
+pkg syscall (netbsd-arm64-cgo), const IFT_X25DDN ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_X25HUNTGROUP = 122
+pkg syscall (netbsd-arm64-cgo), const IFT_X25HUNTGROUP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_X25MLP = 121
+pkg syscall (netbsd-arm64-cgo), const IFT_X25MLP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_X25PLE = 40
+pkg syscall (netbsd-arm64-cgo), const IFT_X25PLE ideal-int
+pkg syscall (netbsd-arm64-cgo), const IFT_XETHER = 26
+pkg syscall (netbsd-arm64-cgo), const IFT_XETHER ideal-int
+pkg syscall (netbsd-arm64-cgo), const IGNBRK = 1
+pkg syscall (netbsd-arm64-cgo), const IGNBRK ideal-int
+pkg syscall (netbsd-arm64-cgo), const IGNCR = 128
+pkg syscall (netbsd-arm64-cgo), const IGNCR ideal-int
+pkg syscall (netbsd-arm64-cgo), const IGNPAR = 4
+pkg syscall (netbsd-arm64-cgo), const IGNPAR ideal-int
+pkg syscall (netbsd-arm64-cgo), const IMAXBEL = 8192
+pkg syscall (netbsd-arm64-cgo), const IMAXBEL ideal-int
+pkg syscall (netbsd-arm64-cgo), const INLCR = 64
+pkg syscall (netbsd-arm64-cgo), const INLCR ideal-int
+pkg syscall (netbsd-arm64-cgo), const INPCK = 16
+pkg syscall (netbsd-arm64-cgo), const INPCK ideal-int
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSA_HOST = 16777215
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSA_HOST ideal-int
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSA_MAX = 128
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSA_MAX ideal-int
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSA_NET = 4278190080
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSA_NET ideal-int
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSA_NSHIFT = 24
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSA_NSHIFT ideal-int
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSB_HOST = 65535
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSB_HOST ideal-int
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSB_MAX = 65536
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSB_MAX ideal-int
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSB_NET = 4294901760
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSB_NET ideal-int
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSB_NSHIFT = 16
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSB_NSHIFT ideal-int
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSC_HOST = 255
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSC_HOST ideal-int
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSC_NET = 4294967040
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSC_NET ideal-int
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSC_NSHIFT = 8
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSC_NSHIFT ideal-int
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSD_HOST = 268435455
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSD_HOST ideal-int
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSD_NET = 4026531840
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSD_NET ideal-int
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSD_NSHIFT = 28
+pkg syscall (netbsd-arm64-cgo), const IN_CLASSD_NSHIFT ideal-int
+pkg syscall (netbsd-arm64-cgo), const IN_LOOPBACKNET = 127
+pkg syscall (netbsd-arm64-cgo), const IN_LOOPBACKNET ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_AH = 51
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_AH ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_CARP = 112
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_CARP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_DONE = 257
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_DONE ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_DSTOPTS = 60
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_DSTOPTS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_EGP = 8
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_EGP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_ENCAP = 98
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_ENCAP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_EON = 80
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_EON ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_ESP = 50
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_ESP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_ETHERIP = 97
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_ETHERIP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_FRAGMENT = 44
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_FRAGMENT ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_GGP = 3
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_GGP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_GRE = 47
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_GRE ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_HOPOPTS = 0
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_HOPOPTS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_ICMP = 1
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_ICMP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_ICMPV6 = 58
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_ICMPV6 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_IDP = 22
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_IDP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_IGMP = 2
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_IGMP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_IPCOMP = 108
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_IPCOMP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_IPIP = 4
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_IPIP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_IPV4 = 4
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_IPV4 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_IPV6_ICMP = 58
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_IPV6_ICMP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_MAX = 256
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_MAX ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_MAXID = 52
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_MAXID ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_MOBILE = 55
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_MOBILE ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_NONE = 59
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_NONE ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_PFSYNC = 240
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_PFSYNC ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_PIM = 103
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_PIM ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_PUP = 12
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_PUP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_RAW = 255
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_RAW ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_ROUTING = 43
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_ROUTING ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_RSVP = 46
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_RSVP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_TP = 29
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_TP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_VRRP = 112
+pkg syscall (netbsd-arm64-cgo), const IPPROTO_VRRP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_CHECKSUM = 26
+pkg syscall (netbsd-arm64-cgo), const IPV6_CHECKSUM ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_DEFAULT_MULTICAST_HOPS = 1
+pkg syscall (netbsd-arm64-cgo), const IPV6_DEFAULT_MULTICAST_HOPS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_DEFAULT_MULTICAST_LOOP = 1
+pkg syscall (netbsd-arm64-cgo), const IPV6_DEFAULT_MULTICAST_LOOP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_DEFHLIM = 64
+pkg syscall (netbsd-arm64-cgo), const IPV6_DEFHLIM ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_DONTFRAG = 62
+pkg syscall (netbsd-arm64-cgo), const IPV6_DONTFRAG ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_DSTOPTS = 50
+pkg syscall (netbsd-arm64-cgo), const IPV6_DSTOPTS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_FAITH = 29
+pkg syscall (netbsd-arm64-cgo), const IPV6_FAITH ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_FLOWINFO_MASK = 4294967055
+pkg syscall (netbsd-arm64-cgo), const IPV6_FLOWINFO_MASK ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_FLOWLABEL_MASK = 4294905600
+pkg syscall (netbsd-arm64-cgo), const IPV6_FLOWLABEL_MASK ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_FRAGTTL = 120
+pkg syscall (netbsd-arm64-cgo), const IPV6_FRAGTTL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_HLIMDEC = 1
+pkg syscall (netbsd-arm64-cgo), const IPV6_HLIMDEC ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_HOPLIMIT = 47
+pkg syscall (netbsd-arm64-cgo), const IPV6_HOPLIMIT ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_HOPOPTS = 49
+pkg syscall (netbsd-arm64-cgo), const IPV6_HOPOPTS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_IPSEC_POLICY = 28
+pkg syscall (netbsd-arm64-cgo), const IPV6_IPSEC_POLICY ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_JOIN_GROUP = 12
+pkg syscall (netbsd-arm64-cgo), const IPV6_LEAVE_GROUP = 13
+pkg syscall (netbsd-arm64-cgo), const IPV6_MAXHLIM = 255
+pkg syscall (netbsd-arm64-cgo), const IPV6_MAXHLIM ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_MAXPACKET = 65535
+pkg syscall (netbsd-arm64-cgo), const IPV6_MAXPACKET ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_MMTU = 1280
+pkg syscall (netbsd-arm64-cgo), const IPV6_MMTU ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_MULTICAST_HOPS = 10
+pkg syscall (netbsd-arm64-cgo), const IPV6_MULTICAST_IF = 9
+pkg syscall (netbsd-arm64-cgo), const IPV6_MULTICAST_LOOP = 11
+pkg syscall (netbsd-arm64-cgo), const IPV6_NEXTHOP = 48
+pkg syscall (netbsd-arm64-cgo), const IPV6_NEXTHOP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_PATHMTU = 44
+pkg syscall (netbsd-arm64-cgo), const IPV6_PATHMTU ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_PKTINFO = 46
+pkg syscall (netbsd-arm64-cgo), const IPV6_PKTINFO ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_PORTRANGE = 14
+pkg syscall (netbsd-arm64-cgo), const IPV6_PORTRANGE ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_PORTRANGE_DEFAULT = 0
+pkg syscall (netbsd-arm64-cgo), const IPV6_PORTRANGE_DEFAULT ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_PORTRANGE_HIGH = 1
+pkg syscall (netbsd-arm64-cgo), const IPV6_PORTRANGE_HIGH ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_PORTRANGE_LOW = 2
+pkg syscall (netbsd-arm64-cgo), const IPV6_PORTRANGE_LOW ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_RECVDSTOPTS = 40
+pkg syscall (netbsd-arm64-cgo), const IPV6_RECVDSTOPTS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_RECVHOPLIMIT = 37
+pkg syscall (netbsd-arm64-cgo), const IPV6_RECVHOPLIMIT ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_RECVHOPOPTS = 39
+pkg syscall (netbsd-arm64-cgo), const IPV6_RECVHOPOPTS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_RECVPATHMTU = 43
+pkg syscall (netbsd-arm64-cgo), const IPV6_RECVPATHMTU ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_RECVPKTINFO = 36
+pkg syscall (netbsd-arm64-cgo), const IPV6_RECVPKTINFO ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_RECVRTHDR = 38
+pkg syscall (netbsd-arm64-cgo), const IPV6_RECVRTHDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_RECVTCLASS = 57
+pkg syscall (netbsd-arm64-cgo), const IPV6_RECVTCLASS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_RTHDR = 51
+pkg syscall (netbsd-arm64-cgo), const IPV6_RTHDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_RTHDRDSTOPTS = 35
+pkg syscall (netbsd-arm64-cgo), const IPV6_RTHDRDSTOPTS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_RTHDR_LOOSE = 0
+pkg syscall (netbsd-arm64-cgo), const IPV6_RTHDR_LOOSE ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_RTHDR_STRICT = 1
+pkg syscall (netbsd-arm64-cgo), const IPV6_RTHDR_STRICT ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_RTHDR_TYPE_0 = 0
+pkg syscall (netbsd-arm64-cgo), const IPV6_RTHDR_TYPE_0 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_SOCKOPT_RESERVED1 = 3
+pkg syscall (netbsd-arm64-cgo), const IPV6_SOCKOPT_RESERVED1 ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_TCLASS = 61
+pkg syscall (netbsd-arm64-cgo), const IPV6_TCLASS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_UNICAST_HOPS = 4
+pkg syscall (netbsd-arm64-cgo), const IPV6_USE_MIN_MTU = 42
+pkg syscall (netbsd-arm64-cgo), const IPV6_USE_MIN_MTU ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_V6ONLY = 27
+pkg syscall (netbsd-arm64-cgo), const IPV6_VERSION = 96
+pkg syscall (netbsd-arm64-cgo), const IPV6_VERSION ideal-int
+pkg syscall (netbsd-arm64-cgo), const IPV6_VERSION_MASK = 240
+pkg syscall (netbsd-arm64-cgo), const IPV6_VERSION_MASK ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_ADD_MEMBERSHIP = 12
+pkg syscall (netbsd-arm64-cgo), const IP_DEFAULT_MULTICAST_LOOP = 1
+pkg syscall (netbsd-arm64-cgo), const IP_DEFAULT_MULTICAST_LOOP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_DEFAULT_MULTICAST_TTL = 1
+pkg syscall (netbsd-arm64-cgo), const IP_DEFAULT_MULTICAST_TTL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_DF = 16384
+pkg syscall (netbsd-arm64-cgo), const IP_DF ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_DROP_MEMBERSHIP = 13
+pkg syscall (netbsd-arm64-cgo), const IP_EF = 32768
+pkg syscall (netbsd-arm64-cgo), const IP_EF ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_ERRORMTU = 21
+pkg syscall (netbsd-arm64-cgo), const IP_ERRORMTU ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_HDRINCL = 2
+pkg syscall (netbsd-arm64-cgo), const IP_HDRINCL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_IPSEC_POLICY = 22
+pkg syscall (netbsd-arm64-cgo), const IP_IPSEC_POLICY ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_MAXPACKET = 65535
+pkg syscall (netbsd-arm64-cgo), const IP_MAXPACKET ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_MAX_MEMBERSHIPS = 20
+pkg syscall (netbsd-arm64-cgo), const IP_MAX_MEMBERSHIPS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_MF = 8192
+pkg syscall (netbsd-arm64-cgo), const IP_MF ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_MINFRAGSIZE = 69
+pkg syscall (netbsd-arm64-cgo), const IP_MINFRAGSIZE ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_MINTTL = 24
+pkg syscall (netbsd-arm64-cgo), const IP_MINTTL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_MSS = 576
+pkg syscall (netbsd-arm64-cgo), const IP_MSS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_MULTICAST_IF = 9
+pkg syscall (netbsd-arm64-cgo), const IP_MULTICAST_LOOP = 11
+pkg syscall (netbsd-arm64-cgo), const IP_MULTICAST_TTL = 10
+pkg syscall (netbsd-arm64-cgo), const IP_OFFMASK = 8191
+pkg syscall (netbsd-arm64-cgo), const IP_OFFMASK ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_OPTIONS = 1
+pkg syscall (netbsd-arm64-cgo), const IP_OPTIONS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_PORTRANGE = 19
+pkg syscall (netbsd-arm64-cgo), const IP_PORTRANGE ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_PORTRANGE_DEFAULT = 0
+pkg syscall (netbsd-arm64-cgo), const IP_PORTRANGE_DEFAULT ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_PORTRANGE_HIGH = 1
+pkg syscall (netbsd-arm64-cgo), const IP_PORTRANGE_HIGH ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_PORTRANGE_LOW = 2
+pkg syscall (netbsd-arm64-cgo), const IP_PORTRANGE_LOW ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_RECVDSTADDR = 7
+pkg syscall (netbsd-arm64-cgo), const IP_RECVDSTADDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_RECVIF = 20
+pkg syscall (netbsd-arm64-cgo), const IP_RECVIF ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_RECVOPTS = 5
+pkg syscall (netbsd-arm64-cgo), const IP_RECVOPTS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_RECVRETOPTS = 6
+pkg syscall (netbsd-arm64-cgo), const IP_RECVRETOPTS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_RECVTTL = 23
+pkg syscall (netbsd-arm64-cgo), const IP_RECVTTL ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_RETOPTS = 8
+pkg syscall (netbsd-arm64-cgo), const IP_RETOPTS ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_RF = 32768
+pkg syscall (netbsd-arm64-cgo), const IP_RF ideal-int
+pkg syscall (netbsd-arm64-cgo), const IP_TOS = 3
+pkg syscall (netbsd-arm64-cgo), const IP_TTL = 4
+pkg syscall (netbsd-arm64-cgo), const ISIG = 128
+pkg syscall (netbsd-arm64-cgo), const ISIG ideal-int
+pkg syscall (netbsd-arm64-cgo), const ISTRIP = 32
+pkg syscall (netbsd-arm64-cgo), const ISTRIP ideal-int
+pkg syscall (netbsd-arm64-cgo), const IXANY = 2048
+pkg syscall (netbsd-arm64-cgo), const IXANY ideal-int
+pkg syscall (netbsd-arm64-cgo), const IXOFF = 1024
+pkg syscall (netbsd-arm64-cgo), const IXOFF ideal-int
+pkg syscall (netbsd-arm64-cgo), const IXON = 512
+pkg syscall (netbsd-arm64-cgo), const IXON ideal-int
+pkg syscall (netbsd-arm64-cgo), const LOCK_EX = 2
+pkg syscall (netbsd-arm64-cgo), const LOCK_EX ideal-int
+pkg syscall (netbsd-arm64-cgo), const LOCK_NB = 4
+pkg syscall (netbsd-arm64-cgo), const LOCK_NB ideal-int
+pkg syscall (netbsd-arm64-cgo), const LOCK_SH = 1
+pkg syscall (netbsd-arm64-cgo), const LOCK_SH ideal-int
+pkg syscall (netbsd-arm64-cgo), const LOCK_UN = 8
+pkg syscall (netbsd-arm64-cgo), const LOCK_UN ideal-int
+pkg syscall (netbsd-arm64-cgo), const MADV_DONTNEED = 4
+pkg syscall (netbsd-arm64-cgo), const MADV_DONTNEED ideal-int
+pkg syscall (netbsd-arm64-cgo), const MADV_FREE = 6
+pkg syscall (netbsd-arm64-cgo), const MADV_FREE ideal-int
+pkg syscall (netbsd-arm64-cgo), const MADV_NORMAL = 0
+pkg syscall (netbsd-arm64-cgo), const MADV_NORMAL ideal-int
+pkg syscall (netbsd-arm64-cgo), const MADV_RANDOM = 1
+pkg syscall (netbsd-arm64-cgo), const MADV_RANDOM ideal-int
+pkg syscall (netbsd-arm64-cgo), const MADV_SEQUENTIAL = 2
+pkg syscall (netbsd-arm64-cgo), const MADV_SEQUENTIAL ideal-int
+pkg syscall (netbsd-arm64-cgo), const MADV_SPACEAVAIL = 5
+pkg syscall (netbsd-arm64-cgo), const MADV_SPACEAVAIL ideal-int
+pkg syscall (netbsd-arm64-cgo), const MADV_WILLNEED = 3
+pkg syscall (netbsd-arm64-cgo), const MADV_WILLNEED ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_ALIGNMENT_16MB = 402653184
+pkg syscall (netbsd-arm64-cgo), const MAP_ALIGNMENT_16MB ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_ALIGNMENT_1TB = 671088640
+pkg syscall (netbsd-arm64-cgo), const MAP_ALIGNMENT_1TB ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_ALIGNMENT_256TB = 805306368
+pkg syscall (netbsd-arm64-cgo), const MAP_ALIGNMENT_256TB ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_ALIGNMENT_4GB = 536870912
+pkg syscall (netbsd-arm64-cgo), const MAP_ALIGNMENT_4GB ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_ALIGNMENT_64KB = 268435456
+pkg syscall (netbsd-arm64-cgo), const MAP_ALIGNMENT_64KB ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_ALIGNMENT_64PB = 939524096
+pkg syscall (netbsd-arm64-cgo), const MAP_ALIGNMENT_64PB ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_ALIGNMENT_MASK = -16777216
+pkg syscall (netbsd-arm64-cgo), const MAP_ALIGNMENT_MASK ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_ALIGNMENT_SHIFT = 24
+pkg syscall (netbsd-arm64-cgo), const MAP_ALIGNMENT_SHIFT ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_ANON = 4096
+pkg syscall (netbsd-arm64-cgo), const MAP_ANON ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_FILE = 0
+pkg syscall (netbsd-arm64-cgo), const MAP_FILE ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_FIXED = 16
+pkg syscall (netbsd-arm64-cgo), const MAP_FIXED ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_HASSEMAPHORE = 512
+pkg syscall (netbsd-arm64-cgo), const MAP_HASSEMAPHORE ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_INHERIT = 128
+pkg syscall (netbsd-arm64-cgo), const MAP_INHERIT ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_INHERIT_COPY = 1
+pkg syscall (netbsd-arm64-cgo), const MAP_INHERIT_COPY ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_INHERIT_DEFAULT = 1
+pkg syscall (netbsd-arm64-cgo), const MAP_INHERIT_DEFAULT ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_INHERIT_DONATE_COPY = 3
+pkg syscall (netbsd-arm64-cgo), const MAP_INHERIT_DONATE_COPY ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_INHERIT_NONE = 2
+pkg syscall (netbsd-arm64-cgo), const MAP_INHERIT_NONE ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_INHERIT_SHARE = 0
+pkg syscall (netbsd-arm64-cgo), const MAP_INHERIT_SHARE ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_NORESERVE = 64
+pkg syscall (netbsd-arm64-cgo), const MAP_NORESERVE ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_PRIVATE = 2
+pkg syscall (netbsd-arm64-cgo), const MAP_PRIVATE ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_RENAME = 32
+pkg syscall (netbsd-arm64-cgo), const MAP_RENAME ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_SHARED = 1
+pkg syscall (netbsd-arm64-cgo), const MAP_SHARED ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_STACK = 8192
+pkg syscall (netbsd-arm64-cgo), const MAP_STACK ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_TRYFIXED = 1024
+pkg syscall (netbsd-arm64-cgo), const MAP_TRYFIXED ideal-int
+pkg syscall (netbsd-arm64-cgo), const MAP_WIRED = 2048
+pkg syscall (netbsd-arm64-cgo), const MAP_WIRED ideal-int
+pkg syscall (netbsd-arm64-cgo), const MCL_CURRENT = 1
+pkg syscall (netbsd-arm64-cgo), const MCL_CURRENT ideal-int
+pkg syscall (netbsd-arm64-cgo), const MCL_FUTURE = 2
+pkg syscall (netbsd-arm64-cgo), const MCL_FUTURE ideal-int
+pkg syscall (netbsd-arm64-cgo), const MSG_BCAST = 256
+pkg syscall (netbsd-arm64-cgo), const MSG_BCAST ideal-int
+pkg syscall (netbsd-arm64-cgo), const MSG_CMSG_CLOEXEC = 2048
+pkg syscall (netbsd-arm64-cgo), const MSG_CMSG_CLOEXEC ideal-int
+pkg syscall (netbsd-arm64-cgo), const MSG_CONTROLMBUF = 33554432
+pkg syscall (netbsd-arm64-cgo), const MSG_CONTROLMBUF ideal-int
+pkg syscall (netbsd-arm64-cgo), const MSG_CTRUNC = 32
+pkg syscall (netbsd-arm64-cgo), const MSG_CTRUNC ideal-int
+pkg syscall (netbsd-arm64-cgo), const MSG_DONTROUTE = 4
+pkg syscall (netbsd-arm64-cgo), const MSG_DONTROUTE ideal-int
+pkg syscall (netbsd-arm64-cgo), const MSG_DONTWAIT = 128
+pkg syscall (netbsd-arm64-cgo), const MSG_DONTWAIT ideal-int
+pkg syscall (netbsd-arm64-cgo), const MSG_EOR = 8
+pkg syscall (netbsd-arm64-cgo), const MSG_EOR ideal-int
+pkg syscall (netbsd-arm64-cgo), const MSG_IOVUSRSPACE = 67108864
+pkg syscall (netbsd-arm64-cgo), const MSG_IOVUSRSPACE ideal-int
+pkg syscall (netbsd-arm64-cgo), const MSG_LENUSRSPACE = 134217728
+pkg syscall (netbsd-arm64-cgo), const MSG_LENUSRSPACE ideal-int
+pkg syscall (netbsd-arm64-cgo), const MSG_MCAST = 512
+pkg syscall (netbsd-arm64-cgo), const MSG_MCAST ideal-int
+pkg syscall (netbsd-arm64-cgo), const MSG_NAMEMBUF = 16777216
+pkg syscall (netbsd-arm64-cgo), const MSG_NAMEMBUF ideal-int
+pkg syscall (netbsd-arm64-cgo), const MSG_NBIO = 4096
+pkg syscall (netbsd-arm64-cgo), const MSG_NBIO ideal-int
+pkg syscall (netbsd-arm64-cgo), const MSG_NOSIGNAL = 1024
+pkg syscall (netbsd-arm64-cgo), const MSG_NOSIGNAL ideal-int
+pkg syscall (netbsd-arm64-cgo), const MSG_OOB = 1
+pkg syscall (netbsd-arm64-cgo), const MSG_OOB ideal-int
+pkg syscall (netbsd-arm64-cgo), const MSG_PEEK = 2
+pkg syscall (netbsd-arm64-cgo), const MSG_PEEK ideal-int
+pkg syscall (netbsd-arm64-cgo), const MSG_TRUNC = 16
+pkg syscall (netbsd-arm64-cgo), const MSG_TRUNC ideal-int
+pkg syscall (netbsd-arm64-cgo), const MSG_USERFLAGS = 16777215
+pkg syscall (netbsd-arm64-cgo), const MSG_USERFLAGS ideal-int
+pkg syscall (netbsd-arm64-cgo), const MSG_WAITALL = 64
+pkg syscall (netbsd-arm64-cgo), const MSG_WAITALL ideal-int
+pkg syscall (netbsd-arm64-cgo), const MS_ASYNC = 1
+pkg syscall (netbsd-arm64-cgo), const MS_ASYNC ideal-int
+pkg syscall (netbsd-arm64-cgo), const MS_INVALIDATE = 2
+pkg syscall (netbsd-arm64-cgo), const MS_INVALIDATE ideal-int
+pkg syscall (netbsd-arm64-cgo), const MS_SYNC = 4
+pkg syscall (netbsd-arm64-cgo), const MS_SYNC ideal-int
+pkg syscall (netbsd-arm64-cgo), const NAME_MAX = 511
+pkg syscall (netbsd-arm64-cgo), const NAME_MAX ideal-int
+pkg syscall (netbsd-arm64-cgo), const NET_RT_DUMP = 1
+pkg syscall (netbsd-arm64-cgo), const NET_RT_DUMP ideal-int
+pkg syscall (netbsd-arm64-cgo), const NET_RT_FLAGS = 2
+pkg syscall (netbsd-arm64-cgo), const NET_RT_FLAGS ideal-int
+pkg syscall (netbsd-arm64-cgo), const NET_RT_IFLIST = 5
+pkg syscall (netbsd-arm64-cgo), const NET_RT_IFLIST ideal-int
+pkg syscall (netbsd-arm64-cgo), const NET_RT_MAXID = 6
+pkg syscall (netbsd-arm64-cgo), const NET_RT_MAXID ideal-int
+pkg syscall (netbsd-arm64-cgo), const NET_RT_OIFLIST = 4
+pkg syscall (netbsd-arm64-cgo), const NET_RT_OIFLIST ideal-int
+pkg syscall (netbsd-arm64-cgo), const NET_RT_OOIFLIST = 3
+pkg syscall (netbsd-arm64-cgo), const NET_RT_OOIFLIST ideal-int
+pkg syscall (netbsd-arm64-cgo), const NOFLSH = 2147483648
+pkg syscall (netbsd-arm64-cgo), const NOFLSH ideal-int
+pkg syscall (netbsd-arm64-cgo), const NOTE_ATTRIB = 8
+pkg syscall (netbsd-arm64-cgo), const NOTE_ATTRIB ideal-int
+pkg syscall (netbsd-arm64-cgo), const NOTE_CHILD = 4
+pkg syscall (netbsd-arm64-cgo), const NOTE_CHILD ideal-int
+pkg syscall (netbsd-arm64-cgo), const NOTE_DELETE = 1
+pkg syscall (netbsd-arm64-cgo), const NOTE_DELETE ideal-int
+pkg syscall (netbsd-arm64-cgo), const NOTE_EXEC = 536870912
+pkg syscall (netbsd-arm64-cgo), const NOTE_EXEC ideal-int
+pkg syscall (netbsd-arm64-cgo), const NOTE_EXIT = 2147483648
+pkg syscall (netbsd-arm64-cgo), const NOTE_EXIT ideal-int
+pkg syscall (netbsd-arm64-cgo), const NOTE_EXTEND = 4
+pkg syscall (netbsd-arm64-cgo), const NOTE_EXTEND ideal-int
+pkg syscall (netbsd-arm64-cgo), const NOTE_FORK = 1073741824
+pkg syscall (netbsd-arm64-cgo), const NOTE_FORK ideal-int
+pkg syscall (netbsd-arm64-cgo), const NOTE_LINK = 16
+pkg syscall (netbsd-arm64-cgo), const NOTE_LINK ideal-int
+pkg syscall (netbsd-arm64-cgo), const NOTE_LOWAT = 1
+pkg syscall (netbsd-arm64-cgo), const NOTE_LOWAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const NOTE_PCTRLMASK = 4026531840
+pkg syscall (netbsd-arm64-cgo), const NOTE_PCTRLMASK ideal-int
+pkg syscall (netbsd-arm64-cgo), const NOTE_PDATAMASK = 1048575
+pkg syscall (netbsd-arm64-cgo), const NOTE_PDATAMASK ideal-int
+pkg syscall (netbsd-arm64-cgo), const NOTE_RENAME = 32
+pkg syscall (netbsd-arm64-cgo), const NOTE_RENAME ideal-int
+pkg syscall (netbsd-arm64-cgo), const NOTE_REVOKE = 64
+pkg syscall (netbsd-arm64-cgo), const NOTE_REVOKE ideal-int
+pkg syscall (netbsd-arm64-cgo), const NOTE_TRACK = 1
+pkg syscall (netbsd-arm64-cgo), const NOTE_TRACK ideal-int
+pkg syscall (netbsd-arm64-cgo), const NOTE_TRACKERR = 2
+pkg syscall (netbsd-arm64-cgo), const NOTE_TRACKERR ideal-int
+pkg syscall (netbsd-arm64-cgo), const NOTE_WRITE = 2
+pkg syscall (netbsd-arm64-cgo), const NOTE_WRITE ideal-int
+pkg syscall (netbsd-arm64-cgo), const OCRNL = 16
+pkg syscall (netbsd-arm64-cgo), const OCRNL ideal-int
+pkg syscall (netbsd-arm64-cgo), const OFIOGETBMAP = 3221513850
+pkg syscall (netbsd-arm64-cgo), const OFIOGETBMAP ideal-int
+pkg syscall (netbsd-arm64-cgo), const ONLCR = 2
+pkg syscall (netbsd-arm64-cgo), const ONLCR ideal-int
+pkg syscall (netbsd-arm64-cgo), const ONLRET = 64
+pkg syscall (netbsd-arm64-cgo), const ONLRET ideal-int
+pkg syscall (netbsd-arm64-cgo), const ONOCR = 32
+pkg syscall (netbsd-arm64-cgo), const ONOCR ideal-int
+pkg syscall (netbsd-arm64-cgo), const ONOEOT = 8
+pkg syscall (netbsd-arm64-cgo), const ONOEOT ideal-int
+pkg syscall (netbsd-arm64-cgo), const OPOST = 1
+pkg syscall (netbsd-arm64-cgo), const OPOST ideal-int
+pkg syscall (netbsd-arm64-cgo), const O_ACCMODE = 3
+pkg syscall (netbsd-arm64-cgo), const O_ACCMODE ideal-int
+pkg syscall (netbsd-arm64-cgo), const O_ALT_IO = 262144
+pkg syscall (netbsd-arm64-cgo), const O_ALT_IO ideal-int
+pkg syscall (netbsd-arm64-cgo), const O_APPEND = 8
+pkg syscall (netbsd-arm64-cgo), const O_ASYNC = 64
+pkg syscall (netbsd-arm64-cgo), const O_CLOEXEC = 4194304
+pkg syscall (netbsd-arm64-cgo), const O_CREAT = 512
+pkg syscall (netbsd-arm64-cgo), const O_DIRECT = 524288
+pkg syscall (netbsd-arm64-cgo), const O_DIRECT ideal-int
+pkg syscall (netbsd-arm64-cgo), const O_DIRECTORY = 2097152
+pkg syscall (netbsd-arm64-cgo), const O_DIRECTORY ideal-int
+pkg syscall (netbsd-arm64-cgo), const O_DSYNC = 65536
+pkg syscall (netbsd-arm64-cgo), const O_DSYNC ideal-int
+pkg syscall (netbsd-arm64-cgo), const O_EXCL = 2048
+pkg syscall (netbsd-arm64-cgo), const O_EXLOCK = 32
+pkg syscall (netbsd-arm64-cgo), const O_EXLOCK ideal-int
+pkg syscall (netbsd-arm64-cgo), const O_FSYNC = 128
+pkg syscall (netbsd-arm64-cgo), const O_FSYNC ideal-int
+pkg syscall (netbsd-arm64-cgo), const O_NDELAY = 4
+pkg syscall (netbsd-arm64-cgo), const O_NDELAY ideal-int
+pkg syscall (netbsd-arm64-cgo), const O_NOCTTY = 32768
+pkg syscall (netbsd-arm64-cgo), const O_NOFOLLOW = 256
+pkg syscall (netbsd-arm64-cgo), const O_NOFOLLOW ideal-int
+pkg syscall (netbsd-arm64-cgo), const O_NONBLOCK = 4
+pkg syscall (netbsd-arm64-cgo), const O_NOSIGPIPE = 16777216
+pkg syscall (netbsd-arm64-cgo), const O_NOSIGPIPE ideal-int
+pkg syscall (netbsd-arm64-cgo), const O_RSYNC = 131072
+pkg syscall (netbsd-arm64-cgo), const O_RSYNC ideal-int
+pkg syscall (netbsd-arm64-cgo), const O_SHLOCK = 16
+pkg syscall (netbsd-arm64-cgo), const O_SHLOCK ideal-int
+pkg syscall (netbsd-arm64-cgo), const O_SYNC = 128
+pkg syscall (netbsd-arm64-cgo), const O_TRUNC = 1024
+pkg syscall (netbsd-arm64-cgo), const PARENB = 4096
+pkg syscall (netbsd-arm64-cgo), const PARENB ideal-int
+pkg syscall (netbsd-arm64-cgo), const PARMRK = 8
+pkg syscall (netbsd-arm64-cgo), const PARMRK ideal-int
+pkg syscall (netbsd-arm64-cgo), const PARODD = 8192
+pkg syscall (netbsd-arm64-cgo), const PARODD ideal-int
+pkg syscall (netbsd-arm64-cgo), const PENDIN = 536870912
+pkg syscall (netbsd-arm64-cgo), const PENDIN ideal-int
+pkg syscall (netbsd-arm64-cgo), const PRIO_PGRP = 1
+pkg syscall (netbsd-arm64-cgo), const PRIO_PGRP ideal-int
+pkg syscall (netbsd-arm64-cgo), const PRIO_PROCESS = 0
+pkg syscall (netbsd-arm64-cgo), const PRIO_PROCESS ideal-int
+pkg syscall (netbsd-arm64-cgo), const PRIO_USER = 2
+pkg syscall (netbsd-arm64-cgo), const PRIO_USER ideal-int
+pkg syscall (netbsd-arm64-cgo), const PRI_IOFLUSH = 124
+pkg syscall (netbsd-arm64-cgo), const PRI_IOFLUSH ideal-int
+pkg syscall (netbsd-arm64-cgo), const PROT_EXEC = 4
+pkg syscall (netbsd-arm64-cgo), const PROT_EXEC ideal-int
+pkg syscall (netbsd-arm64-cgo), const PROT_NONE = 0
+pkg syscall (netbsd-arm64-cgo), const PROT_NONE ideal-int
+pkg syscall (netbsd-arm64-cgo), const PROT_READ = 1
+pkg syscall (netbsd-arm64-cgo), const PROT_READ ideal-int
+pkg syscall (netbsd-arm64-cgo), const PROT_WRITE = 2
+pkg syscall (netbsd-arm64-cgo), const PROT_WRITE ideal-int
+pkg syscall (netbsd-arm64-cgo), const PTRACE_CONT = 7
+pkg syscall (netbsd-arm64-cgo), const PTRACE_CONT ideal-int
+pkg syscall (netbsd-arm64-cgo), const PTRACE_KILL = 8
+pkg syscall (netbsd-arm64-cgo), const PTRACE_KILL ideal-int
+pkg syscall (netbsd-arm64-cgo), const PTRACE_TRACEME = 0
+pkg syscall (netbsd-arm64-cgo), const PTRACE_TRACEME ideal-int
+pkg syscall (netbsd-arm64-cgo), const RLIMIT_AS = 10
+pkg syscall (netbsd-arm64-cgo), const RLIMIT_AS ideal-int
+pkg syscall (netbsd-arm64-cgo), const RLIMIT_CORE = 4
+pkg syscall (netbsd-arm64-cgo), const RLIMIT_CORE ideal-int
+pkg syscall (netbsd-arm64-cgo), const RLIMIT_CPU = 0
+pkg syscall (netbsd-arm64-cgo), const RLIMIT_CPU ideal-int
+pkg syscall (netbsd-arm64-cgo), const RLIMIT_DATA = 2
+pkg syscall (netbsd-arm64-cgo), const RLIMIT_DATA ideal-int
+pkg syscall (netbsd-arm64-cgo), const RLIMIT_FSIZE = 1
+pkg syscall (netbsd-arm64-cgo), const RLIMIT_FSIZE ideal-int
+pkg syscall (netbsd-arm64-cgo), const RLIMIT_NOFILE = 8
+pkg syscall (netbsd-arm64-cgo), const RLIMIT_NOFILE ideal-int
+pkg syscall (netbsd-arm64-cgo), const RLIMIT_STACK = 3
+pkg syscall (netbsd-arm64-cgo), const RLIMIT_STACK ideal-int
+pkg syscall (netbsd-arm64-cgo), const RLIM_INFINITY = 9223372036854775807
+pkg syscall (netbsd-arm64-cgo), const RLIM_INFINITY ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTAX_AUTHOR = 6
+pkg syscall (netbsd-arm64-cgo), const RTAX_AUTHOR ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTAX_BRD = 7
+pkg syscall (netbsd-arm64-cgo), const RTAX_BRD ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTAX_DST = 0
+pkg syscall (netbsd-arm64-cgo), const RTAX_DST ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTAX_GATEWAY = 1
+pkg syscall (netbsd-arm64-cgo), const RTAX_GATEWAY ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTAX_GENMASK = 3
+pkg syscall (netbsd-arm64-cgo), const RTAX_GENMASK ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTAX_IFA = 5
+pkg syscall (netbsd-arm64-cgo), const RTAX_IFA ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTAX_IFP = 4
+pkg syscall (netbsd-arm64-cgo), const RTAX_IFP ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTAX_MAX = 9
+pkg syscall (netbsd-arm64-cgo), const RTAX_MAX ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTAX_NETMASK = 2
+pkg syscall (netbsd-arm64-cgo), const RTAX_NETMASK ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTAX_TAG = 8
+pkg syscall (netbsd-arm64-cgo), const RTAX_TAG ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTA_AUTHOR = 64
+pkg syscall (netbsd-arm64-cgo), const RTA_AUTHOR ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTA_BRD = 128
+pkg syscall (netbsd-arm64-cgo), const RTA_BRD ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTA_DST = 1
+pkg syscall (netbsd-arm64-cgo), const RTA_DST ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTA_GATEWAY = 2
+pkg syscall (netbsd-arm64-cgo), const RTA_GATEWAY ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTA_GENMASK = 8
+pkg syscall (netbsd-arm64-cgo), const RTA_GENMASK ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTA_IFA = 32
+pkg syscall (netbsd-arm64-cgo), const RTA_IFA ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTA_IFP = 16
+pkg syscall (netbsd-arm64-cgo), const RTA_IFP ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTA_NETMASK = 4
+pkg syscall (netbsd-arm64-cgo), const RTA_NETMASK ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTA_TAG = 256
+pkg syscall (netbsd-arm64-cgo), const RTA_TAG ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTF_ANNOUNCE = 131072
+pkg syscall (netbsd-arm64-cgo), const RTF_ANNOUNCE ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTF_BLACKHOLE = 4096
+pkg syscall (netbsd-arm64-cgo), const RTF_BLACKHOLE ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTF_CLONED = 8192
+pkg syscall (netbsd-arm64-cgo), const RTF_CLONED ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTF_CLONING = 256
+pkg syscall (netbsd-arm64-cgo), const RTF_CLONING ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTF_DONE = 64
+pkg syscall (netbsd-arm64-cgo), const RTF_DONE ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTF_DYNAMIC = 16
+pkg syscall (netbsd-arm64-cgo), const RTF_DYNAMIC ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTF_GATEWAY = 2
+pkg syscall (netbsd-arm64-cgo), const RTF_GATEWAY ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTF_HOST = 4
+pkg syscall (netbsd-arm64-cgo), const RTF_HOST ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTF_LLINFO = 1024
+pkg syscall (netbsd-arm64-cgo), const RTF_LLINFO ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTF_MASK = 128
+pkg syscall (netbsd-arm64-cgo), const RTF_MASK ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTF_MODIFIED = 32
+pkg syscall (netbsd-arm64-cgo), const RTF_MODIFIED ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTF_PROTO1 = 32768
+pkg syscall (netbsd-arm64-cgo), const RTF_PROTO1 ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTF_PROTO2 = 16384
+pkg syscall (netbsd-arm64-cgo), const RTF_PROTO2 ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTF_REJECT = 8
+pkg syscall (netbsd-arm64-cgo), const RTF_REJECT ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTF_SRC = 65536
+pkg syscall (netbsd-arm64-cgo), const RTF_SRC ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTF_STATIC = 2048
+pkg syscall (netbsd-arm64-cgo), const RTF_STATIC ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTF_UP = 1
+pkg syscall (netbsd-arm64-cgo), const RTF_UP ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTF_XRESOLVE = 512
+pkg syscall (netbsd-arm64-cgo), const RTF_XRESOLVE ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTM_ADD = 1
+pkg syscall (netbsd-arm64-cgo), const RTM_ADD ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTM_CHANGE = 3
+pkg syscall (netbsd-arm64-cgo), const RTM_CHANGE ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTM_CHGADDR = 21
+pkg syscall (netbsd-arm64-cgo), const RTM_CHGADDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTM_DELADDR = 13
+pkg syscall (netbsd-arm64-cgo), const RTM_DELADDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTM_DELETE = 2
+pkg syscall (netbsd-arm64-cgo), const RTM_DELETE ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTM_GET = 4
+pkg syscall (netbsd-arm64-cgo), const RTM_GET ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTM_IEEE80211 = 17
+pkg syscall (netbsd-arm64-cgo), const RTM_IEEE80211 ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTM_IFANNOUNCE = 16
+pkg syscall (netbsd-arm64-cgo), const RTM_IFANNOUNCE ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTM_IFINFO = 20
+pkg syscall (netbsd-arm64-cgo), const RTM_IFINFO ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTM_LLINFO_UPD = 19
+pkg syscall (netbsd-arm64-cgo), const RTM_LLINFO_UPD ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTM_LOCK = 8
+pkg syscall (netbsd-arm64-cgo), const RTM_LOCK ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTM_LOSING = 5
+pkg syscall (netbsd-arm64-cgo), const RTM_LOSING ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTM_MISS = 7
+pkg syscall (netbsd-arm64-cgo), const RTM_MISS ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTM_NEWADDR = 12
+pkg syscall (netbsd-arm64-cgo), const RTM_NEWADDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTM_OIFINFO = 15
+pkg syscall (netbsd-arm64-cgo), const RTM_OIFINFO ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTM_OLDADD = 9
+pkg syscall (netbsd-arm64-cgo), const RTM_OLDADD ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTM_OLDDEL = 10
+pkg syscall (netbsd-arm64-cgo), const RTM_OLDDEL ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTM_OOIFINFO = 14
+pkg syscall (netbsd-arm64-cgo), const RTM_OOIFINFO ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTM_REDIRECT = 6
+pkg syscall (netbsd-arm64-cgo), const RTM_REDIRECT ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTM_RESOLVE = 11
+pkg syscall (netbsd-arm64-cgo), const RTM_RESOLVE ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTM_RTTUNIT = 1000000
+pkg syscall (netbsd-arm64-cgo), const RTM_RTTUNIT ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTM_SETGATE = 18
+pkg syscall (netbsd-arm64-cgo), const RTM_SETGATE ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTM_VERSION = 4
+pkg syscall (netbsd-arm64-cgo), const RTM_VERSION ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTV_EXPIRE = 4
+pkg syscall (netbsd-arm64-cgo), const RTV_EXPIRE ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTV_HOPCOUNT = 2
+pkg syscall (netbsd-arm64-cgo), const RTV_HOPCOUNT ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTV_MTU = 1
+pkg syscall (netbsd-arm64-cgo), const RTV_MTU ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTV_RPIPE = 8
+pkg syscall (netbsd-arm64-cgo), const RTV_RPIPE ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTV_RTT = 64
+pkg syscall (netbsd-arm64-cgo), const RTV_RTT ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTV_RTTVAR = 128
+pkg syscall (netbsd-arm64-cgo), const RTV_RTTVAR ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTV_SPIPE = 16
+pkg syscall (netbsd-arm64-cgo), const RTV_SPIPE ideal-int
+pkg syscall (netbsd-arm64-cgo), const RTV_SSTHRESH = 32
+pkg syscall (netbsd-arm64-cgo), const RTV_SSTHRESH ideal-int
+pkg syscall (netbsd-arm64-cgo), const RUSAGE_CHILDREN = -1
+pkg syscall (netbsd-arm64-cgo), const RUSAGE_CHILDREN ideal-int
+pkg syscall (netbsd-arm64-cgo), const RUSAGE_SELF = 0
+pkg syscall (netbsd-arm64-cgo), const RUSAGE_SELF ideal-int
+pkg syscall (netbsd-arm64-cgo), const SCM_CREDS = 4
+pkg syscall (netbsd-arm64-cgo), const SCM_CREDS ideal-int
+pkg syscall (netbsd-arm64-cgo), const SCM_RIGHTS = 1
+pkg syscall (netbsd-arm64-cgo), const SCM_RIGHTS ideal-int
+pkg syscall (netbsd-arm64-cgo), const SCM_TIMESTAMP = 8
+pkg syscall (netbsd-arm64-cgo), const SCM_TIMESTAMP ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIGBUS = 10
+pkg syscall (netbsd-arm64-cgo), const SIGCHLD = 20
+pkg syscall (netbsd-arm64-cgo), const SIGCHLD Signal
+pkg syscall (netbsd-arm64-cgo), const SIGCONT = 19
+pkg syscall (netbsd-arm64-cgo), const SIGCONT Signal
+pkg syscall (netbsd-arm64-cgo), const SIGEMT = 7
+pkg syscall (netbsd-arm64-cgo), const SIGEMT Signal
+pkg syscall (netbsd-arm64-cgo), const SIGINFO = 29
+pkg syscall (netbsd-arm64-cgo), const SIGINFO Signal
+pkg syscall (netbsd-arm64-cgo), const SIGIO = 23
+pkg syscall (netbsd-arm64-cgo), const SIGIO Signal
+pkg syscall (netbsd-arm64-cgo), const SIGIOT = 6
+pkg syscall (netbsd-arm64-cgo), const SIGIOT Signal
+pkg syscall (netbsd-arm64-cgo), const SIGPROF = 27
+pkg syscall (netbsd-arm64-cgo), const SIGPROF Signal
+pkg syscall (netbsd-arm64-cgo), const SIGPWR = 32
+pkg syscall (netbsd-arm64-cgo), const SIGPWR Signal
+pkg syscall (netbsd-arm64-cgo), const SIGSTOP = 17
+pkg syscall (netbsd-arm64-cgo), const SIGSTOP Signal
+pkg syscall (netbsd-arm64-cgo), const SIGSYS = 12
+pkg syscall (netbsd-arm64-cgo), const SIGSYS Signal
+pkg syscall (netbsd-arm64-cgo), const SIGTSTP = 18
+pkg syscall (netbsd-arm64-cgo), const SIGTSTP Signal
+pkg syscall (netbsd-arm64-cgo), const SIGTTIN = 21
+pkg syscall (netbsd-arm64-cgo), const SIGTTIN Signal
+pkg syscall (netbsd-arm64-cgo), const SIGTTOU = 22
+pkg syscall (netbsd-arm64-cgo), const SIGTTOU Signal
+pkg syscall (netbsd-arm64-cgo), const SIGURG = 16
+pkg syscall (netbsd-arm64-cgo), const SIGURG Signal
+pkg syscall (netbsd-arm64-cgo), const SIGUSR1 = 30
+pkg syscall (netbsd-arm64-cgo), const SIGUSR1 Signal
+pkg syscall (netbsd-arm64-cgo), const SIGUSR2 = 31
+pkg syscall (netbsd-arm64-cgo), const SIGUSR2 Signal
+pkg syscall (netbsd-arm64-cgo), const SIGVTALRM = 26
+pkg syscall (netbsd-arm64-cgo), const SIGVTALRM Signal
+pkg syscall (netbsd-arm64-cgo), const SIGWINCH = 28
+pkg syscall (netbsd-arm64-cgo), const SIGWINCH Signal
+pkg syscall (netbsd-arm64-cgo), const SIGXCPU = 24
+pkg syscall (netbsd-arm64-cgo), const SIGXCPU Signal
+pkg syscall (netbsd-arm64-cgo), const SIGXFSZ = 25
+pkg syscall (netbsd-arm64-cgo), const SIGXFSZ Signal
+pkg syscall (netbsd-arm64-cgo), const SIOCADDMULTI = 2156947761
+pkg syscall (netbsd-arm64-cgo), const SIOCADDMULTI ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCADDRT = 2151182858
+pkg syscall (netbsd-arm64-cgo), const SIOCADDRT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCAIFADDR = 2151704858
+pkg syscall (netbsd-arm64-cgo), const SIOCAIFADDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCALIFADDR = 2165860636
+pkg syscall (netbsd-arm64-cgo), const SIOCALIFADDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCATMARK = 1074033415
+pkg syscall (netbsd-arm64-cgo), const SIOCATMARK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCDELMULTI = 2156947762
+pkg syscall (netbsd-arm64-cgo), const SIOCDELMULTI ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCDELRT = 2151182859
+pkg syscall (netbsd-arm64-cgo), const SIOCDELRT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCDIFADDR = 2156947737
+pkg syscall (netbsd-arm64-cgo), const SIOCDIFADDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCDIFPHYADDR = 2156947785
+pkg syscall (netbsd-arm64-cgo), const SIOCDIFPHYADDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCDLIFADDR = 2165860638
+pkg syscall (netbsd-arm64-cgo), const SIOCDLIFADDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGDRVSPEC = 3223873915
+pkg syscall (netbsd-arm64-cgo), const SIOCGDRVSPEC ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGETPFSYNC = 3230689784
+pkg syscall (netbsd-arm64-cgo), const SIOCGETPFSYNC ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGETSGCNT = 3223352628
+pkg syscall (netbsd-arm64-cgo), const SIOCGETSGCNT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGETVIFCNT = 3223876915
+pkg syscall (netbsd-arm64-cgo), const SIOCGETVIFCNT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGHIWAT = 1074033409
+pkg syscall (netbsd-arm64-cgo), const SIOCGHIWAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFADDR = 3230689569
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFADDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFADDRPREF = 3231213856
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFADDRPREF ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFALIAS = 3225446683
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFALIAS ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFBRDADDR = 3230689571
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFBRDADDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFCAP = 3223349622
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFCAP ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFCONF = 3222300966
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFCONF ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFDATA = 3231213957
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFDATA ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFDLT = 3230689655
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFDLT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFDSTADDR = 3230689570
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFDSTADDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFFLAGS = 3230689553
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFFLAGS ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFGENERIC = 3230689594
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFGENERIC ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFMEDIA = 3224398134
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFMEDIA ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFMETRIC = 3230689559
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFMETRIC ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFMTU = 3230689662
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFMTU ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFNETMASK = 3230689573
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFNETMASK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFPDSTADDR = 3230689608
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFPDSTADDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFPSRCADDR = 3230689607
+pkg syscall (netbsd-arm64-cgo), const SIOCGIFPSRCADDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGLIFADDR = 3239602461
+pkg syscall (netbsd-arm64-cgo), const SIOCGLIFADDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGLIFPHYADDR = 3239602507
+pkg syscall (netbsd-arm64-cgo), const SIOCGLIFPHYADDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGLINKSTR = 3223873927
+pkg syscall (netbsd-arm64-cgo), const SIOCGLINKSTR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGLOWAT = 1074033411
+pkg syscall (netbsd-arm64-cgo), const SIOCGLOWAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGPGRP = 1074033417
+pkg syscall (netbsd-arm64-cgo), const SIOCGPGRP ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCGVH = 3230689667
+pkg syscall (netbsd-arm64-cgo), const SIOCGVH ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCIFCREATE = 2156947834
+pkg syscall (netbsd-arm64-cgo), const SIOCIFCREATE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCIFDESTROY = 2156947833
+pkg syscall (netbsd-arm64-cgo), const SIOCIFDESTROY ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCIFGCLONERS = 3222301048
+pkg syscall (netbsd-arm64-cgo), const SIOCIFGCLONERS ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCINITIFADDR = 3228592516
+pkg syscall (netbsd-arm64-cgo), const SIOCINITIFADDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCSDRVSPEC = 2150132091
+pkg syscall (netbsd-arm64-cgo), const SIOCSDRVSPEC ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCSETPFSYNC = 2156947959
+pkg syscall (netbsd-arm64-cgo), const SIOCSETPFSYNC ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCSHIWAT = 2147775232
+pkg syscall (netbsd-arm64-cgo), const SIOCSHIWAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCSIFADDR = 2156947724
+pkg syscall (netbsd-arm64-cgo), const SIOCSIFADDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCSIFADDRPREF = 2157472031
+pkg syscall (netbsd-arm64-cgo), const SIOCSIFADDRPREF ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCSIFBRDADDR = 2156947731
+pkg syscall (netbsd-arm64-cgo), const SIOCSIFBRDADDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCSIFCAP = 2149607797
+pkg syscall (netbsd-arm64-cgo), const SIOCSIFCAP ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCSIFDSTADDR = 2156947726
+pkg syscall (netbsd-arm64-cgo), const SIOCSIFDSTADDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCSIFFLAGS = 2156947728
+pkg syscall (netbsd-arm64-cgo), const SIOCSIFFLAGS ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCSIFGENERIC = 2156947769
+pkg syscall (netbsd-arm64-cgo), const SIOCSIFGENERIC ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCSIFMEDIA = 3230689589
+pkg syscall (netbsd-arm64-cgo), const SIOCSIFMEDIA ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCSIFMETRIC = 2156947736
+pkg syscall (netbsd-arm64-cgo), const SIOCSIFMETRIC ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCSIFMTU = 2156947839
+pkg syscall (netbsd-arm64-cgo), const SIOCSIFMTU ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCSIFNETMASK = 2156947734
+pkg syscall (netbsd-arm64-cgo), const SIOCSIFNETMASK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCSIFPHYADDR = 2151704902
+pkg syscall (netbsd-arm64-cgo), const SIOCSIFPHYADDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCSLIFPHYADDR = 2165860682
+pkg syscall (netbsd-arm64-cgo), const SIOCSLIFPHYADDR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCSLINKSTR = 2150132104
+pkg syscall (netbsd-arm64-cgo), const SIOCSLINKSTR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCSLOWAT = 2147775234
+pkg syscall (netbsd-arm64-cgo), const SIOCSLOWAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCSPGRP = 2147775240
+pkg syscall (netbsd-arm64-cgo), const SIOCSPGRP ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCSVH = 3230689666
+pkg syscall (netbsd-arm64-cgo), const SIOCSVH ideal-int
+pkg syscall (netbsd-arm64-cgo), const SIOCZIFDATA = 3231213958
+pkg syscall (netbsd-arm64-cgo), const SIOCZIFDATA ideal-int
+pkg syscall (netbsd-arm64-cgo), const SOCK_CLOEXEC = 268435456
+pkg syscall (netbsd-arm64-cgo), const SOCK_CLOEXEC ideal-int
+pkg syscall (netbsd-arm64-cgo), const SOCK_FLAGS_MASK = 4026531840
+pkg syscall (netbsd-arm64-cgo), const SOCK_FLAGS_MASK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SOCK_NONBLOCK = 536870912
+pkg syscall (netbsd-arm64-cgo), const SOCK_NONBLOCK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SOCK_NOSIGPIPE = 1073741824
+pkg syscall (netbsd-arm64-cgo), const SOCK_NOSIGPIPE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SOCK_RDM = 4
+pkg syscall (netbsd-arm64-cgo), const SOCK_RDM ideal-int
+pkg syscall (netbsd-arm64-cgo), const SOL_SOCKET = 65535
+pkg syscall (netbsd-arm64-cgo), const SOMAXCONN = 128
+pkg syscall (netbsd-arm64-cgo), const SO_ACCEPTCONN = 2
+pkg syscall (netbsd-arm64-cgo), const SO_ACCEPTCONN ideal-int
+pkg syscall (netbsd-arm64-cgo), const SO_ACCEPTFILTER = 4096
+pkg syscall (netbsd-arm64-cgo), const SO_ACCEPTFILTER ideal-int
+pkg syscall (netbsd-arm64-cgo), const SO_BROADCAST = 32
+pkg syscall (netbsd-arm64-cgo), const SO_DEBUG = 1
+pkg syscall (netbsd-arm64-cgo), const SO_DEBUG ideal-int
+pkg syscall (netbsd-arm64-cgo), const SO_DONTROUTE = 16
+pkg syscall (netbsd-arm64-cgo), const SO_ERROR = 4103
+pkg syscall (netbsd-arm64-cgo), const SO_ERROR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SO_KEEPALIVE = 8
+pkg syscall (netbsd-arm64-cgo), const SO_LINGER = 128
+pkg syscall (netbsd-arm64-cgo), const SO_NOHEADER = 4106
+pkg syscall (netbsd-arm64-cgo), const SO_NOHEADER ideal-int
+pkg syscall (netbsd-arm64-cgo), const SO_NOSIGPIPE = 2048
+pkg syscall (netbsd-arm64-cgo), const SO_NOSIGPIPE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SO_OOBINLINE = 256
+pkg syscall (netbsd-arm64-cgo), const SO_OOBINLINE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SO_OVERFLOWED = 4105
+pkg syscall (netbsd-arm64-cgo), const SO_OVERFLOWED ideal-int
+pkg syscall (netbsd-arm64-cgo), const SO_RCVBUF = 4098
+pkg syscall (netbsd-arm64-cgo), const SO_RCVLOWAT = 4100
+pkg syscall (netbsd-arm64-cgo), const SO_RCVLOWAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SO_RCVTIMEO = 4108
+pkg syscall (netbsd-arm64-cgo), const SO_RCVTIMEO ideal-int
+pkg syscall (netbsd-arm64-cgo), const SO_REUSEADDR = 4
+pkg syscall (netbsd-arm64-cgo), const SO_REUSEPORT = 512
+pkg syscall (netbsd-arm64-cgo), const SO_REUSEPORT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SO_SNDBUF = 4097
+pkg syscall (netbsd-arm64-cgo), const SO_SNDLOWAT = 4099
+pkg syscall (netbsd-arm64-cgo), const SO_SNDLOWAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SO_SNDTIMEO = 4107
+pkg syscall (netbsd-arm64-cgo), const SO_SNDTIMEO ideal-int
+pkg syscall (netbsd-arm64-cgo), const SO_TIMESTAMP = 8192
+pkg syscall (netbsd-arm64-cgo), const SO_TIMESTAMP ideal-int
+pkg syscall (netbsd-arm64-cgo), const SO_TYPE = 4104
+pkg syscall (netbsd-arm64-cgo), const SO_TYPE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SO_USELOOPBACK = 64
+pkg syscall (netbsd-arm64-cgo), const SO_USELOOPBACK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYSCTL_VERSION = 16777216
+pkg syscall (netbsd-arm64-cgo), const SYSCTL_VERSION ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYSCTL_VERS_0 = 0
+pkg syscall (netbsd-arm64-cgo), const SYSCTL_VERS_0 ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYSCTL_VERS_1 = 16777216
+pkg syscall (netbsd-arm64-cgo), const SYSCTL_VERS_1 ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYSCTL_VERS_MASK = 4278190080
+pkg syscall (netbsd-arm64-cgo), const SYSCTL_VERS_MASK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_ACCEPT = 30
+pkg syscall (netbsd-arm64-cgo), const SYS_ACCEPT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_ACCESS = 33
+pkg syscall (netbsd-arm64-cgo), const SYS_ACCESS ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_ACCT = 51
+pkg syscall (netbsd-arm64-cgo), const SYS_ACCT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_ADJTIME = 421
+pkg syscall (netbsd-arm64-cgo), const SYS_ADJTIME ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_BIND = 104
+pkg syscall (netbsd-arm64-cgo), const SYS_BIND ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_BREAK = 17
+pkg syscall (netbsd-arm64-cgo), const SYS_BREAK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_CHDIR = 12
+pkg syscall (netbsd-arm64-cgo), const SYS_CHDIR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_CHFLAGS = 34
+pkg syscall (netbsd-arm64-cgo), const SYS_CHFLAGS ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_CHMOD = 15
+pkg syscall (netbsd-arm64-cgo), const SYS_CHMOD ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_CHOWN = 16
+pkg syscall (netbsd-arm64-cgo), const SYS_CHOWN ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_CHROOT = 61
+pkg syscall (netbsd-arm64-cgo), const SYS_CHROOT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_CLOCK_GETRES = 429
+pkg syscall (netbsd-arm64-cgo), const SYS_CLOCK_GETRES ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_CLOCK_GETTIME = 427
+pkg syscall (netbsd-arm64-cgo), const SYS_CLOCK_GETTIME ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_CLOCK_SETTIME = 428
+pkg syscall (netbsd-arm64-cgo), const SYS_CLOCK_SETTIME ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_CLOSE = 6
+pkg syscall (netbsd-arm64-cgo), const SYS_CLOSE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_CONNECT = 98
+pkg syscall (netbsd-arm64-cgo), const SYS_CONNECT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_DUP = 41
+pkg syscall (netbsd-arm64-cgo), const SYS_DUP ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_DUP2 = 90
+pkg syscall (netbsd-arm64-cgo), const SYS_DUP2 ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_DUP3 = 454
+pkg syscall (netbsd-arm64-cgo), const SYS_DUP3 ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_EXECVE = 59
+pkg syscall (netbsd-arm64-cgo), const SYS_EXECVE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_EXIT = 1
+pkg syscall (netbsd-arm64-cgo), const SYS_EXIT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTRCTL = 360
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTRCTL ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTR_DELETE_FD = 366
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTR_DELETE_FD ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTR_DELETE_FILE = 363
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTR_DELETE_FILE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTR_DELETE_LINK = 369
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTR_DELETE_LINK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTR_GET_FD = 365
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTR_GET_FD ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTR_GET_FILE = 362
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTR_GET_FILE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTR_GET_LINK = 368
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTR_GET_LINK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTR_LIST_FD = 370
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTR_LIST_FD ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTR_LIST_FILE = 371
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTR_LIST_FILE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTR_LIST_LINK = 372
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTR_LIST_LINK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTR_SET_FD = 364
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTR_SET_FD ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTR_SET_FILE = 361
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTR_SET_FILE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTR_SET_LINK = 367
+pkg syscall (netbsd-arm64-cgo), const SYS_EXTATTR_SET_LINK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FACCESSAT = 462
+pkg syscall (netbsd-arm64-cgo), const SYS_FACCESSAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FCHDIR = 13
+pkg syscall (netbsd-arm64-cgo), const SYS_FCHDIR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FCHFLAGS = 35
+pkg syscall (netbsd-arm64-cgo), const SYS_FCHFLAGS ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FCHMOD = 124
+pkg syscall (netbsd-arm64-cgo), const SYS_FCHMOD ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FCHMODAT = 463
+pkg syscall (netbsd-arm64-cgo), const SYS_FCHMODAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FCHOWN = 123
+pkg syscall (netbsd-arm64-cgo), const SYS_FCHOWN ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FCHOWNAT = 464
+pkg syscall (netbsd-arm64-cgo), const SYS_FCHOWNAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FCHROOT = 297
+pkg syscall (netbsd-arm64-cgo), const SYS_FCHROOT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FCNTL = 92
+pkg syscall (netbsd-arm64-cgo), const SYS_FCNTL ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FDATASYNC = 241
+pkg syscall (netbsd-arm64-cgo), const SYS_FDATASYNC ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FEXECVE = 465
+pkg syscall (netbsd-arm64-cgo), const SYS_FEXECVE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FGETXATTR = 380
+pkg syscall (netbsd-arm64-cgo), const SYS_FGETXATTR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FHSTAT = 451
+pkg syscall (netbsd-arm64-cgo), const SYS_FHSTAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FKTRACE = 288
+pkg syscall (netbsd-arm64-cgo), const SYS_FKTRACE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FLISTXATTR = 383
+pkg syscall (netbsd-arm64-cgo), const SYS_FLISTXATTR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FLOCK = 131
+pkg syscall (netbsd-arm64-cgo), const SYS_FLOCK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FORK = 2
+pkg syscall (netbsd-arm64-cgo), const SYS_FORK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FPATHCONF = 192
+pkg syscall (netbsd-arm64-cgo), const SYS_FPATHCONF ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FREMOVEXATTR = 386
+pkg syscall (netbsd-arm64-cgo), const SYS_FREMOVEXATTR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FSETXATTR = 377
+pkg syscall (netbsd-arm64-cgo), const SYS_FSETXATTR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FSTAT = 440
+pkg syscall (netbsd-arm64-cgo), const SYS_FSTAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FSTATAT = 466
+pkg syscall (netbsd-arm64-cgo), const SYS_FSTATAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FSTATVFS1 = 358
+pkg syscall (netbsd-arm64-cgo), const SYS_FSTATVFS1 ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FSYNC = 95
+pkg syscall (netbsd-arm64-cgo), const SYS_FSYNC ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FSYNC_RANGE = 354
+pkg syscall (netbsd-arm64-cgo), const SYS_FSYNC_RANGE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FTRUNCATE = 201
+pkg syscall (netbsd-arm64-cgo), const SYS_FTRUNCATE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FUTIMENS = 472
+pkg syscall (netbsd-arm64-cgo), const SYS_FUTIMENS ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_FUTIMES = 423
+pkg syscall (netbsd-arm64-cgo), const SYS_FUTIMES ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_GETCONTEXT = 307
+pkg syscall (netbsd-arm64-cgo), const SYS_GETCONTEXT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_GETDENTS = 390
+pkg syscall (netbsd-arm64-cgo), const SYS_GETDENTS ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_GETEGID = 43
+pkg syscall (netbsd-arm64-cgo), const SYS_GETEGID ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_GETEUID = 25
+pkg syscall (netbsd-arm64-cgo), const SYS_GETEUID ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_GETFH = 395
+pkg syscall (netbsd-arm64-cgo), const SYS_GETFH ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_GETGID = 47
+pkg syscall (netbsd-arm64-cgo), const SYS_GETGID ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_GETGROUPS = 79
+pkg syscall (netbsd-arm64-cgo), const SYS_GETGROUPS ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_GETITIMER = 426
+pkg syscall (netbsd-arm64-cgo), const SYS_GETITIMER ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_GETPEERNAME = 31
+pkg syscall (netbsd-arm64-cgo), const SYS_GETPEERNAME ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_GETPGID = 207
+pkg syscall (netbsd-arm64-cgo), const SYS_GETPGID ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_GETPGRP = 81
+pkg syscall (netbsd-arm64-cgo), const SYS_GETPGRP ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_GETPID = 20
+pkg syscall (netbsd-arm64-cgo), const SYS_GETPID ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_GETPPID = 39
+pkg syscall (netbsd-arm64-cgo), const SYS_GETPPID ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_GETPRIORITY = 100
+pkg syscall (netbsd-arm64-cgo), const SYS_GETPRIORITY ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_GETRLIMIT = 194
+pkg syscall (netbsd-arm64-cgo), const SYS_GETRLIMIT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_GETRUSAGE = 445
+pkg syscall (netbsd-arm64-cgo), const SYS_GETRUSAGE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_GETSID = 286
+pkg syscall (netbsd-arm64-cgo), const SYS_GETSID ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_GETSOCKNAME = 32
+pkg syscall (netbsd-arm64-cgo), const SYS_GETSOCKNAME ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_GETSOCKOPT = 118
+pkg syscall (netbsd-arm64-cgo), const SYS_GETSOCKOPT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_GETTIMEOFDAY = 418
+pkg syscall (netbsd-arm64-cgo), const SYS_GETTIMEOFDAY ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_GETUID = 24
+pkg syscall (netbsd-arm64-cgo), const SYS_GETUID ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_GETVFSSTAT = 356
+pkg syscall (netbsd-arm64-cgo), const SYS_GETVFSSTAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_GETXATTR = 378
+pkg syscall (netbsd-arm64-cgo), const SYS_GETXATTR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_IOCTL = 54
+pkg syscall (netbsd-arm64-cgo), const SYS_IOCTL ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_ISSETUGID = 305
+pkg syscall (netbsd-arm64-cgo), const SYS_ISSETUGID ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_KEVENT = 435
+pkg syscall (netbsd-arm64-cgo), const SYS_KEVENT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_KILL = 37
+pkg syscall (netbsd-arm64-cgo), const SYS_KILL ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_KQUEUE = 344
+pkg syscall (netbsd-arm64-cgo), const SYS_KQUEUE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_KQUEUE1 = 455
+pkg syscall (netbsd-arm64-cgo), const SYS_KQUEUE1 ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_KTRACE = 45
+pkg syscall (netbsd-arm64-cgo), const SYS_KTRACE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_LCHFLAGS = 304
+pkg syscall (netbsd-arm64-cgo), const SYS_LCHFLAGS ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_LCHMOD = 274
+pkg syscall (netbsd-arm64-cgo), const SYS_LCHMOD ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_LCHOWN = 275
+pkg syscall (netbsd-arm64-cgo), const SYS_LCHOWN ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_LGETXATTR = 379
+pkg syscall (netbsd-arm64-cgo), const SYS_LGETXATTR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_LINK = 9
+pkg syscall (netbsd-arm64-cgo), const SYS_LINK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_LINKAT = 457
+pkg syscall (netbsd-arm64-cgo), const SYS_LINKAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_LISTEN = 106
+pkg syscall (netbsd-arm64-cgo), const SYS_LISTEN ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_LISTXATTR = 381
+pkg syscall (netbsd-arm64-cgo), const SYS_LISTXATTR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_LLISTXATTR = 382
+pkg syscall (netbsd-arm64-cgo), const SYS_LLISTXATTR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_LREMOVEXATTR = 385
+pkg syscall (netbsd-arm64-cgo), const SYS_LREMOVEXATTR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_LSEEK = 199
+pkg syscall (netbsd-arm64-cgo), const SYS_LSEEK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_LSETXATTR = 376
+pkg syscall (netbsd-arm64-cgo), const SYS_LSETXATTR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_LSTAT = 441
+pkg syscall (netbsd-arm64-cgo), const SYS_LSTAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_LUTIMES = 424
+pkg syscall (netbsd-arm64-cgo), const SYS_LUTIMES ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_MADVISE = 75
+pkg syscall (netbsd-arm64-cgo), const SYS_MADVISE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_MINCORE = 78
+pkg syscall (netbsd-arm64-cgo), const SYS_MINCORE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_MINHERIT = 273
+pkg syscall (netbsd-arm64-cgo), const SYS_MINHERIT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_MKDIR = 136
+pkg syscall (netbsd-arm64-cgo), const SYS_MKDIR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_MKDIRAT = 461
+pkg syscall (netbsd-arm64-cgo), const SYS_MKDIRAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_MKFIFO = 132
+pkg syscall (netbsd-arm64-cgo), const SYS_MKFIFO ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_MKFIFOAT = 459
+pkg syscall (netbsd-arm64-cgo), const SYS_MKFIFOAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_MKNOD = 450
+pkg syscall (netbsd-arm64-cgo), const SYS_MKNOD ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_MKNODAT = 460
+pkg syscall (netbsd-arm64-cgo), const SYS_MKNODAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_MLOCK = 203
+pkg syscall (netbsd-arm64-cgo), const SYS_MLOCK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_MLOCKALL = 242
+pkg syscall (netbsd-arm64-cgo), const SYS_MLOCKALL ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_MMAP = 197
+pkg syscall (netbsd-arm64-cgo), const SYS_MMAP ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_MODCTL = 246
+pkg syscall (netbsd-arm64-cgo), const SYS_MODCTL ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_MOUNT = 410
+pkg syscall (netbsd-arm64-cgo), const SYS_MOUNT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_MPROTECT = 74
+pkg syscall (netbsd-arm64-cgo), const SYS_MPROTECT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_MREMAP = 411
+pkg syscall (netbsd-arm64-cgo), const SYS_MREMAP ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_MSGCTL = 444
+pkg syscall (netbsd-arm64-cgo), const SYS_MSGCTL ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_MSGGET = 225
+pkg syscall (netbsd-arm64-cgo), const SYS_MSGGET ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_MSGRCV = 227
+pkg syscall (netbsd-arm64-cgo), const SYS_MSGRCV ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_MSGSND = 226
+pkg syscall (netbsd-arm64-cgo), const SYS_MSGSND ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_MUNLOCK = 204
+pkg syscall (netbsd-arm64-cgo), const SYS_MUNLOCK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_MUNLOCKALL = 243
+pkg syscall (netbsd-arm64-cgo), const SYS_MUNLOCKALL ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_MUNMAP = 73
+pkg syscall (netbsd-arm64-cgo), const SYS_MUNMAP ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_NANOSLEEP = 430
+pkg syscall (netbsd-arm64-cgo), const SYS_NANOSLEEP ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_NTP_ADJTIME = 176
+pkg syscall (netbsd-arm64-cgo), const SYS_NTP_ADJTIME ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_NTP_GETTIME = 448
+pkg syscall (netbsd-arm64-cgo), const SYS_NTP_GETTIME ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_OPEN = 5
+pkg syscall (netbsd-arm64-cgo), const SYS_OPEN ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_OPENAT = 468
+pkg syscall (netbsd-arm64-cgo), const SYS_OPENAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_PACCEPT = 456
+pkg syscall (netbsd-arm64-cgo), const SYS_PACCEPT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_PATHCONF = 191
+pkg syscall (netbsd-arm64-cgo), const SYS_PATHCONF ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_PIPE = 42
+pkg syscall (netbsd-arm64-cgo), const SYS_PIPE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_PIPE2 = 453
+pkg syscall (netbsd-arm64-cgo), const SYS_PIPE2 ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_PMC_CONTROL = 342
+pkg syscall (netbsd-arm64-cgo), const SYS_PMC_CONTROL ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_PMC_GET_INFO = 341
+pkg syscall (netbsd-arm64-cgo), const SYS_PMC_GET_INFO ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_POLL = 209
+pkg syscall (netbsd-arm64-cgo), const SYS_POLL ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_POLLTS = 437
+pkg syscall (netbsd-arm64-cgo), const SYS_POLLTS ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_POSIX_FADVISE = 416
+pkg syscall (netbsd-arm64-cgo), const SYS_POSIX_FADVISE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_POSIX_SPAWN = 474
+pkg syscall (netbsd-arm64-cgo), const SYS_POSIX_SPAWN ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_PREAD = 173
+pkg syscall (netbsd-arm64-cgo), const SYS_PREAD ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_PREADV = 289
+pkg syscall (netbsd-arm64-cgo), const SYS_PREADV ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_PROFIL = 44
+pkg syscall (netbsd-arm64-cgo), const SYS_PROFIL ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_PSELECT = 436
+pkg syscall (netbsd-arm64-cgo), const SYS_PSELECT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_PSET_ASSIGN = 414
+pkg syscall (netbsd-arm64-cgo), const SYS_PSET_ASSIGN ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_PSET_CREATE = 412
+pkg syscall (netbsd-arm64-cgo), const SYS_PSET_CREATE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_PSET_DESTROY = 413
+pkg syscall (netbsd-arm64-cgo), const SYS_PSET_DESTROY ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_PTRACE = 26
+pkg syscall (netbsd-arm64-cgo), const SYS_PTRACE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_PWRITE = 174
+pkg syscall (netbsd-arm64-cgo), const SYS_PWRITE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_PWRITEV = 290
+pkg syscall (netbsd-arm64-cgo), const SYS_PWRITEV ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_RASCTL = 343
+pkg syscall (netbsd-arm64-cgo), const SYS_RASCTL ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_READ = 3
+pkg syscall (netbsd-arm64-cgo), const SYS_READ ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_READLINK = 58
+pkg syscall (netbsd-arm64-cgo), const SYS_READLINK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_READLINKAT = 469
+pkg syscall (netbsd-arm64-cgo), const SYS_READLINKAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_READV = 120
+pkg syscall (netbsd-arm64-cgo), const SYS_READV ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_REBOOT = 208
+pkg syscall (netbsd-arm64-cgo), const SYS_REBOOT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_RECVFROM = 29
+pkg syscall (netbsd-arm64-cgo), const SYS_RECVFROM ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_RECVMMSG = 475
+pkg syscall (netbsd-arm64-cgo), const SYS_RECVMMSG ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_RECVMSG = 27
+pkg syscall (netbsd-arm64-cgo), const SYS_RECVMSG ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_REMOVEXATTR = 384
+pkg syscall (netbsd-arm64-cgo), const SYS_REMOVEXATTR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_RENAME = 128
+pkg syscall (netbsd-arm64-cgo), const SYS_RENAME ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_RENAMEAT = 458
+pkg syscall (netbsd-arm64-cgo), const SYS_RENAMEAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_REVOKE = 56
+pkg syscall (netbsd-arm64-cgo), const SYS_REVOKE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_RMDIR = 137
+pkg syscall (netbsd-arm64-cgo), const SYS_RMDIR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SBRK = 69
+pkg syscall (netbsd-arm64-cgo), const SYS_SBRK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SCHED_YIELD = 350
+pkg syscall (netbsd-arm64-cgo), const SYS_SCHED_YIELD ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SELECT = 417
+pkg syscall (netbsd-arm64-cgo), const SYS_SELECT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SEMCONFIG = 223
+pkg syscall (netbsd-arm64-cgo), const SYS_SEMCONFIG ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SEMGET = 221
+pkg syscall (netbsd-arm64-cgo), const SYS_SEMGET ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SEMOP = 222
+pkg syscall (netbsd-arm64-cgo), const SYS_SEMOP ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SENDMMSG = 476
+pkg syscall (netbsd-arm64-cgo), const SYS_SENDMMSG ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SENDMSG = 28
+pkg syscall (netbsd-arm64-cgo), const SYS_SENDMSG ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SENDTO = 133
+pkg syscall (netbsd-arm64-cgo), const SYS_SENDTO ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SETCONTEXT = 308
+pkg syscall (netbsd-arm64-cgo), const SYS_SETCONTEXT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SETEGID = 182
+pkg syscall (netbsd-arm64-cgo), const SYS_SETEGID ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SETEUID = 183
+pkg syscall (netbsd-arm64-cgo), const SYS_SETEUID ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SETGID = 181
+pkg syscall (netbsd-arm64-cgo), const SYS_SETGID ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SETGROUPS = 80
+pkg syscall (netbsd-arm64-cgo), const SYS_SETGROUPS ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SETITIMER = 425
+pkg syscall (netbsd-arm64-cgo), const SYS_SETITIMER ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SETPGID = 82
+pkg syscall (netbsd-arm64-cgo), const SYS_SETPGID ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SETPRIORITY = 96
+pkg syscall (netbsd-arm64-cgo), const SYS_SETPRIORITY ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SETREGID = 127
+pkg syscall (netbsd-arm64-cgo), const SYS_SETREGID ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SETREUID = 126
+pkg syscall (netbsd-arm64-cgo), const SYS_SETREUID ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SETRLIMIT = 195
+pkg syscall (netbsd-arm64-cgo), const SYS_SETRLIMIT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SETSID = 147
+pkg syscall (netbsd-arm64-cgo), const SYS_SETSID ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SETSOCKOPT = 105
+pkg syscall (netbsd-arm64-cgo), const SYS_SETSOCKOPT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SETTIMEOFDAY = 419
+pkg syscall (netbsd-arm64-cgo), const SYS_SETTIMEOFDAY ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SETUID = 23
+pkg syscall (netbsd-arm64-cgo), const SYS_SETUID ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SETXATTR = 375
+pkg syscall (netbsd-arm64-cgo), const SYS_SETXATTR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SHMAT = 228
+pkg syscall (netbsd-arm64-cgo), const SYS_SHMAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SHMCTL = 443
+pkg syscall (netbsd-arm64-cgo), const SYS_SHMCTL ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SHMDT = 230
+pkg syscall (netbsd-arm64-cgo), const SYS_SHMDT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SHMGET = 231
+pkg syscall (netbsd-arm64-cgo), const SYS_SHMGET ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SHUTDOWN = 134
+pkg syscall (netbsd-arm64-cgo), const SYS_SHUTDOWN ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SIGQUEUEINFO = 245
+pkg syscall (netbsd-arm64-cgo), const SYS_SIGQUEUEINFO ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SOCKET = 394
+pkg syscall (netbsd-arm64-cgo), const SYS_SOCKET ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SOCKETPAIR = 135
+pkg syscall (netbsd-arm64-cgo), const SYS_SOCKETPAIR ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SSTK = 70
+pkg syscall (netbsd-arm64-cgo), const SYS_SSTK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_STAT = 439
+pkg syscall (netbsd-arm64-cgo), const SYS_STAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_STATVFS1 = 357
+pkg syscall (netbsd-arm64-cgo), const SYS_STATVFS1 ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SWAPCTL = 271
+pkg syscall (netbsd-arm64-cgo), const SYS_SWAPCTL ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SYMLINK = 57
+pkg syscall (netbsd-arm64-cgo), const SYS_SYMLINK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SYMLINKAT = 470
+pkg syscall (netbsd-arm64-cgo), const SYS_SYMLINKAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SYNC = 36
+pkg syscall (netbsd-arm64-cgo), const SYS_SYNC ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_SYSARCH = 165
+pkg syscall (netbsd-arm64-cgo), const SYS_SYSARCH ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_TIMER_CREATE = 235
+pkg syscall (netbsd-arm64-cgo), const SYS_TIMER_CREATE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_TIMER_DELETE = 236
+pkg syscall (netbsd-arm64-cgo), const SYS_TIMER_DELETE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_TIMER_GETOVERRUN = 239
+pkg syscall (netbsd-arm64-cgo), const SYS_TIMER_GETOVERRUN ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_TIMER_GETTIME = 447
+pkg syscall (netbsd-arm64-cgo), const SYS_TIMER_GETTIME ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_TIMER_SETTIME = 446
+pkg syscall (netbsd-arm64-cgo), const SYS_TIMER_SETTIME ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_TRUNCATE = 200
+pkg syscall (netbsd-arm64-cgo), const SYS_TRUNCATE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_UMASK = 60
+pkg syscall (netbsd-arm64-cgo), const SYS_UMASK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_UNDELETE = 205
+pkg syscall (netbsd-arm64-cgo), const SYS_UNDELETE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_UNLINK = 10
+pkg syscall (netbsd-arm64-cgo), const SYS_UNLINK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_UNLINKAT = 471
+pkg syscall (netbsd-arm64-cgo), const SYS_UNLINKAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_UNMOUNT = 22
+pkg syscall (netbsd-arm64-cgo), const SYS_UNMOUNT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_UTIMENSAT = 467
+pkg syscall (netbsd-arm64-cgo), const SYS_UTIMENSAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_UTIMES = 420
+pkg syscall (netbsd-arm64-cgo), const SYS_UTIMES ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_UTRACE = 306
+pkg syscall (netbsd-arm64-cgo), const SYS_UTRACE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_UUIDGEN = 355
+pkg syscall (netbsd-arm64-cgo), const SYS_UUIDGEN ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_VADVISE = 72
+pkg syscall (netbsd-arm64-cgo), const SYS_VADVISE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_VFORK = 66
+pkg syscall (netbsd-arm64-cgo), const SYS_VFORK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_WAIT4 = 449
+pkg syscall (netbsd-arm64-cgo), const SYS_WAIT4 ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_WRITE = 4
+pkg syscall (netbsd-arm64-cgo), const SYS_WRITE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS_WRITEV = 121
+pkg syscall (netbsd-arm64-cgo), const SYS_WRITEV ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_CONTINUE = 314
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_CONTINUE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_CREATE = 309
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_CREATE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_CTL = 325
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_CTL ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_DETACH = 319
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_DETACH ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_EXIT = 310
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_EXIT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_GETNAME = 324
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_GETNAME ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_GETPRIVATE = 316
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_GETPRIVATE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_KILL = 318
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_KILL ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_PARK = 434
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_PARK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_SELF = 311
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_SELF ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_SETNAME = 323
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_SETNAME ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_SETPRIVATE = 317
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_SETPRIVATE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_SUSPEND = 313
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_SUSPEND ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_UNPARK = 321
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_UNPARK ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_UNPARK_ALL = 322
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_UNPARK_ALL ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_WAIT = 312
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_WAIT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_WAKEUP = 315
+pkg syscall (netbsd-arm64-cgo), const SYS__LWP_WAKEUP ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS__PSET_BIND = 415
+pkg syscall (netbsd-arm64-cgo), const SYS__PSET_BIND ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS__SCHED_GETAFFINITY = 349
+pkg syscall (netbsd-arm64-cgo), const SYS__SCHED_GETAFFINITY ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS__SCHED_GETPARAM = 347
+pkg syscall (netbsd-arm64-cgo), const SYS__SCHED_GETPARAM ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS__SCHED_SETAFFINITY = 348
+pkg syscall (netbsd-arm64-cgo), const SYS__SCHED_SETAFFINITY ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS__SCHED_SETPARAM = 346
+pkg syscall (netbsd-arm64-cgo), const SYS__SCHED_SETPARAM ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS___CLONE = 287
+pkg syscall (netbsd-arm64-cgo), const SYS___CLONE ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS___GETCWD = 296
+pkg syscall (netbsd-arm64-cgo), const SYS___GETCWD ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS___GETLOGIN = 49
+pkg syscall (netbsd-arm64-cgo), const SYS___GETLOGIN ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS___POSIX_CHOWN = 283
+pkg syscall (netbsd-arm64-cgo), const SYS___POSIX_CHOWN ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS___POSIX_FCHOWN = 284
+pkg syscall (netbsd-arm64-cgo), const SYS___POSIX_FCHOWN ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS___POSIX_LCHOWN = 285
+pkg syscall (netbsd-arm64-cgo), const SYS___POSIX_LCHOWN ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS___POSIX_RENAME = 270
+pkg syscall (netbsd-arm64-cgo), const SYS___POSIX_RENAME ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS___QUOTACTL = 473
+pkg syscall (netbsd-arm64-cgo), const SYS___QUOTACTL ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS___SEMCTL = 442
+pkg syscall (netbsd-arm64-cgo), const SYS___SEMCTL ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS___SETLOGIN = 50
+pkg syscall (netbsd-arm64-cgo), const SYS___SETLOGIN ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS___SIGACTION_SIGTRAMP = 340
+pkg syscall (netbsd-arm64-cgo), const SYS___SIGACTION_SIGTRAMP ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS___SIGTIMEDWAIT = 431
+pkg syscall (netbsd-arm64-cgo), const SYS___SIGTIMEDWAIT ideal-int
+pkg syscall (netbsd-arm64-cgo), const SYS___SYSCTL = 202
+pkg syscall (netbsd-arm64-cgo), const SYS___SYSCTL ideal-int
+pkg syscall (netbsd-arm64-cgo), const S_ARCH1 = 65536
+pkg syscall (netbsd-arm64-cgo), const S_ARCH1 ideal-int
+pkg syscall (netbsd-arm64-cgo), const S_ARCH2 = 131072
+pkg syscall (netbsd-arm64-cgo), const S_ARCH2 ideal-int
+pkg syscall (netbsd-arm64-cgo), const S_BLKSIZE = 512
+pkg syscall (netbsd-arm64-cgo), const S_BLKSIZE ideal-int
+pkg syscall (netbsd-arm64-cgo), const S_IEXEC = 64
+pkg syscall (netbsd-arm64-cgo), const S_IEXEC ideal-int
+pkg syscall (netbsd-arm64-cgo), const S_IFMT = 61440
+pkg syscall (netbsd-arm64-cgo), const S_IFWHT = 57344
+pkg syscall (netbsd-arm64-cgo), const S_IFWHT ideal-int
+pkg syscall (netbsd-arm64-cgo), const S_IREAD = 256
+pkg syscall (netbsd-arm64-cgo), const S_IREAD ideal-int
+pkg syscall (netbsd-arm64-cgo), const S_IRGRP = 32
+pkg syscall (netbsd-arm64-cgo), const S_IRGRP ideal-int
+pkg syscall (netbsd-arm64-cgo), const S_IROTH = 4
+pkg syscall (netbsd-arm64-cgo), const S_IROTH ideal-int
+pkg syscall (netbsd-arm64-cgo), const S_IRWXG = 56
+pkg syscall (netbsd-arm64-cgo), const S_IRWXG ideal-int
+pkg syscall (netbsd-arm64-cgo), const S_IRWXO = 7
+pkg syscall (netbsd-arm64-cgo), const S_IRWXO ideal-int
+pkg syscall (netbsd-arm64-cgo), const S_IRWXU = 448
+pkg syscall (netbsd-arm64-cgo), const S_IRWXU ideal-int
+pkg syscall (netbsd-arm64-cgo), const S_ISTXT = 512
+pkg syscall (netbsd-arm64-cgo), const S_ISTXT ideal-int
+pkg syscall (netbsd-arm64-cgo), const S_IWGRP = 16
+pkg syscall (netbsd-arm64-cgo), const S_IWGRP ideal-int
+pkg syscall (netbsd-arm64-cgo), const S_IWOTH = 2
+pkg syscall (netbsd-arm64-cgo), const S_IWOTH ideal-int
+pkg syscall (netbsd-arm64-cgo), const S_IWRITE = 128
+pkg syscall (netbsd-arm64-cgo), const S_IWRITE ideal-int
+pkg syscall (netbsd-arm64-cgo), const S_IXGRP = 8
+pkg syscall (netbsd-arm64-cgo), const S_IXGRP ideal-int
+pkg syscall (netbsd-arm64-cgo), const S_IXOTH = 1
+pkg syscall (netbsd-arm64-cgo), const S_IXOTH ideal-int
+pkg syscall (netbsd-arm64-cgo), const S_LOGIN_SET = 1
+pkg syscall (netbsd-arm64-cgo), const S_LOGIN_SET ideal-int
+pkg syscall (netbsd-arm64-cgo), const SizeofBpfHdr = 32
+pkg syscall (netbsd-arm64-cgo), const SizeofBpfHdr ideal-int
+pkg syscall (netbsd-arm64-cgo), const SizeofBpfInsn = 8
+pkg syscall (netbsd-arm64-cgo), const SizeofBpfInsn ideal-int
+pkg syscall (netbsd-arm64-cgo), const SizeofBpfProgram = 16
+pkg syscall (netbsd-arm64-cgo), const SizeofBpfProgram ideal-int
+pkg syscall (netbsd-arm64-cgo), const SizeofBpfStat = 128
+pkg syscall (netbsd-arm64-cgo), const SizeofBpfStat ideal-int
+pkg syscall (netbsd-arm64-cgo), const SizeofBpfVersion = 4
+pkg syscall (netbsd-arm64-cgo), const SizeofBpfVersion ideal-int
+pkg syscall (netbsd-arm64-cgo), const SizeofCmsghdr = 12
+pkg syscall (netbsd-arm64-cgo), const SizeofCmsghdr ideal-int
+pkg syscall (netbsd-arm64-cgo), const SizeofICMPv6Filter = 32
+pkg syscall (netbsd-arm64-cgo), const SizeofICMPv6Filter ideal-int
+pkg syscall (netbsd-arm64-cgo), const SizeofIPMreq = 8
+pkg syscall (netbsd-arm64-cgo), const SizeofIPMreq ideal-int
+pkg syscall (netbsd-arm64-cgo), const SizeofIPv6MTUInfo = 32
+pkg syscall (netbsd-arm64-cgo), const SizeofIPv6MTUInfo ideal-int
+pkg syscall (netbsd-arm64-cgo), const SizeofIPv6Mreq = 20
+pkg syscall (netbsd-arm64-cgo), const SizeofIPv6Mreq ideal-int
+pkg syscall (netbsd-arm64-cgo), const SizeofIfAnnounceMsghdr = 24
+pkg syscall (netbsd-arm64-cgo), const SizeofIfAnnounceMsghdr ideal-int
+pkg syscall (netbsd-arm64-cgo), const SizeofIfData = 136
+pkg syscall (netbsd-arm64-cgo), const SizeofIfData ideal-int
+pkg syscall (netbsd-arm64-cgo), const SizeofIfMsghdr = 152
+pkg syscall (netbsd-arm64-cgo), const SizeofIfMsghdr ideal-int
+pkg syscall (netbsd-arm64-cgo), const SizeofIfaMsghdr = 24
+pkg syscall (netbsd-arm64-cgo), const SizeofIfaMsghdr ideal-int
+pkg syscall (netbsd-arm64-cgo), const SizeofInet6Pktinfo = 20
+pkg syscall (netbsd-arm64-cgo), const SizeofInet6Pktinfo ideal-int
+pkg syscall (netbsd-arm64-cgo), const SizeofLinger = 8
+pkg syscall (netbsd-arm64-cgo), const SizeofLinger ideal-int
+pkg syscall (netbsd-arm64-cgo), const SizeofMsghdr = 48
+pkg syscall (netbsd-arm64-cgo), const SizeofMsghdr ideal-int
+pkg syscall (netbsd-arm64-cgo), const SizeofRtMetrics = 80
+pkg syscall (netbsd-arm64-cgo), const SizeofRtMetrics ideal-int
+pkg syscall (netbsd-arm64-cgo), const SizeofRtMsghdr = 120
+pkg syscall (netbsd-arm64-cgo), const SizeofRtMsghdr ideal-int
+pkg syscall (netbsd-arm64-cgo), const SizeofSockaddrAny = 108
+pkg syscall (netbsd-arm64-cgo), const SizeofSockaddrAny ideal-int
+pkg syscall (netbsd-arm64-cgo), const SizeofSockaddrDatalink = 20
+pkg syscall (netbsd-arm64-cgo), const SizeofSockaddrDatalink ideal-int
+pkg syscall (netbsd-arm64-cgo), const SizeofSockaddrInet4 = 16
+pkg syscall (netbsd-arm64-cgo), const SizeofSockaddrInet4 ideal-int
+pkg syscall (netbsd-arm64-cgo), const SizeofSockaddrInet6 = 28
+pkg syscall (netbsd-arm64-cgo), const SizeofSockaddrInet6 ideal-int
+pkg syscall (netbsd-arm64-cgo), const SizeofSockaddrUnix = 106
+pkg syscall (netbsd-arm64-cgo), const SizeofSockaddrUnix ideal-int
+pkg syscall (netbsd-arm64-cgo), const TCIFLUSH = 1
+pkg syscall (netbsd-arm64-cgo), const TCIFLUSH ideal-int
+pkg syscall (netbsd-arm64-cgo), const TCIOFLUSH = 3
+pkg syscall (netbsd-arm64-cgo), const TCIOFLUSH ideal-int
+pkg syscall (netbsd-arm64-cgo), const TCOFLUSH = 2
+pkg syscall (netbsd-arm64-cgo), const TCOFLUSH ideal-int
+pkg syscall (netbsd-arm64-cgo), const TCP_CONGCTL = 32
+pkg syscall (netbsd-arm64-cgo), const TCP_CONGCTL ideal-int
+pkg syscall (netbsd-arm64-cgo), const TCP_KEEPCNT = 6
+pkg syscall (netbsd-arm64-cgo), const TCP_KEEPCNT ideal-int
+pkg syscall (netbsd-arm64-cgo), const TCP_KEEPIDLE = 3
+pkg syscall (netbsd-arm64-cgo), const TCP_KEEPIDLE ideal-int
+pkg syscall (netbsd-arm64-cgo), const TCP_KEEPINIT = 7
+pkg syscall (netbsd-arm64-cgo), const TCP_KEEPINIT ideal-int
+pkg syscall (netbsd-arm64-cgo), const TCP_KEEPINTVL = 5
+pkg syscall (netbsd-arm64-cgo), const TCP_KEEPINTVL ideal-int
+pkg syscall (netbsd-arm64-cgo), const TCP_MAXBURST = 4
+pkg syscall (netbsd-arm64-cgo), const TCP_MAXBURST ideal-int
+pkg syscall (netbsd-arm64-cgo), const TCP_MAXSEG = 2
+pkg syscall (netbsd-arm64-cgo), const TCP_MAXSEG ideal-int
+pkg syscall (netbsd-arm64-cgo), const TCP_MAXWIN = 65535
+pkg syscall (netbsd-arm64-cgo), const TCP_MAXWIN ideal-int
+pkg syscall (netbsd-arm64-cgo), const TCP_MAX_WINSHIFT = 14
+pkg syscall (netbsd-arm64-cgo), const TCP_MAX_WINSHIFT ideal-int
+pkg syscall (netbsd-arm64-cgo), const TCP_MD5SIG = 16
+pkg syscall (netbsd-arm64-cgo), const TCP_MD5SIG ideal-int
+pkg syscall (netbsd-arm64-cgo), const TCP_MINMSS = 216
+pkg syscall (netbsd-arm64-cgo), const TCP_MINMSS ideal-int
+pkg syscall (netbsd-arm64-cgo), const TCP_MSS = 536
+pkg syscall (netbsd-arm64-cgo), const TCP_MSS ideal-int
+pkg syscall (netbsd-arm64-cgo), const TCSAFLUSH = 2
+pkg syscall (netbsd-arm64-cgo), const TCSAFLUSH ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCCBRK = 536900730
+pkg syscall (netbsd-arm64-cgo), const TIOCCBRK ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCCDTR = 536900728
+pkg syscall (netbsd-arm64-cgo), const TIOCCDTR ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCCONS = 2147775586
+pkg syscall (netbsd-arm64-cgo), const TIOCCONS ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCDCDTIMESTAMP = 1074820184
+pkg syscall (netbsd-arm64-cgo), const TIOCDCDTIMESTAMP ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCDRAIN = 536900702
+pkg syscall (netbsd-arm64-cgo), const TIOCDRAIN ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCEXCL = 536900621
+pkg syscall (netbsd-arm64-cgo), const TIOCEXCL ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCEXT = 2147775584
+pkg syscall (netbsd-arm64-cgo), const TIOCEXT ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCFLAG_CDTRCTS = 16
+pkg syscall (netbsd-arm64-cgo), const TIOCFLAG_CDTRCTS ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCFLAG_CLOCAL = 2
+pkg syscall (netbsd-arm64-cgo), const TIOCFLAG_CLOCAL ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCFLAG_CRTSCTS = 4
+pkg syscall (netbsd-arm64-cgo), const TIOCFLAG_CRTSCTS ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCFLAG_MDMBUF = 8
+pkg syscall (netbsd-arm64-cgo), const TIOCFLAG_MDMBUF ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCFLAG_SOFTCAR = 1
+pkg syscall (netbsd-arm64-cgo), const TIOCFLAG_SOFTCAR ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCFLUSH = 2147775504
+pkg syscall (netbsd-arm64-cgo), const TIOCFLUSH ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCGETA = 1076655123
+pkg syscall (netbsd-arm64-cgo), const TIOCGETA ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCGETD = 1074033690
+pkg syscall (netbsd-arm64-cgo), const TIOCGETD ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCGFLAGS = 1074033757
+pkg syscall (netbsd-arm64-cgo), const TIOCGFLAGS ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCGLINED = 1075868738
+pkg syscall (netbsd-arm64-cgo), const TIOCGLINED ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCGPGRP = 1074033783
+pkg syscall (netbsd-arm64-cgo), const TIOCGPGRP ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCGQSIZE = 1074033793
+pkg syscall (netbsd-arm64-cgo), const TIOCGQSIZE ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCGRANTPT = 536900679
+pkg syscall (netbsd-arm64-cgo), const TIOCGRANTPT ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCGSID = 1074033763
+pkg syscall (netbsd-arm64-cgo), const TIOCGSID ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCGSIZE = 1074295912
+pkg syscall (netbsd-arm64-cgo), const TIOCGSIZE ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCGWINSZ = 1074295912
+pkg syscall (netbsd-arm64-cgo), const TIOCGWINSZ ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCMBIC = 2147775595
+pkg syscall (netbsd-arm64-cgo), const TIOCMBIC ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCMBIS = 2147775596
+pkg syscall (netbsd-arm64-cgo), const TIOCMBIS ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCMGET = 1074033770
+pkg syscall (netbsd-arm64-cgo), const TIOCMGET ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCMSET = 2147775597
+pkg syscall (netbsd-arm64-cgo), const TIOCMSET ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCM_CAR = 64
+pkg syscall (netbsd-arm64-cgo), const TIOCM_CAR ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCM_CD = 64
+pkg syscall (netbsd-arm64-cgo), const TIOCM_CD ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCM_CTS = 32
+pkg syscall (netbsd-arm64-cgo), const TIOCM_CTS ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCM_DSR = 256
+pkg syscall (netbsd-arm64-cgo), const TIOCM_DSR ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCM_DTR = 2
+pkg syscall (netbsd-arm64-cgo), const TIOCM_DTR ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCM_LE = 1
+pkg syscall (netbsd-arm64-cgo), const TIOCM_LE ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCM_RI = 128
+pkg syscall (netbsd-arm64-cgo), const TIOCM_RI ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCM_RNG = 128
+pkg syscall (netbsd-arm64-cgo), const TIOCM_RNG ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCM_RTS = 4
+pkg syscall (netbsd-arm64-cgo), const TIOCM_RTS ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCM_SR = 16
+pkg syscall (netbsd-arm64-cgo), const TIOCM_SR ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCM_ST = 8
+pkg syscall (netbsd-arm64-cgo), const TIOCM_ST ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCNOTTY = 536900721
+pkg syscall (netbsd-arm64-cgo), const TIOCNOTTY ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCNXCL = 536900622
+pkg syscall (netbsd-arm64-cgo), const TIOCNXCL ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCOUTQ = 1074033779
+pkg syscall (netbsd-arm64-cgo), const TIOCOUTQ ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCPKT = 2147775600
+pkg syscall (netbsd-arm64-cgo), const TIOCPKT ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCPKT_DATA = 0
+pkg syscall (netbsd-arm64-cgo), const TIOCPKT_DATA ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCPKT_DOSTOP = 32
+pkg syscall (netbsd-arm64-cgo), const TIOCPKT_DOSTOP ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCPKT_FLUSHREAD = 1
+pkg syscall (netbsd-arm64-cgo), const TIOCPKT_FLUSHREAD ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCPKT_FLUSHWRITE = 2
+pkg syscall (netbsd-arm64-cgo), const TIOCPKT_FLUSHWRITE ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCPKT_IOCTL = 64
+pkg syscall (netbsd-arm64-cgo), const TIOCPKT_IOCTL ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCPKT_NOSTOP = 16
+pkg syscall (netbsd-arm64-cgo), const TIOCPKT_NOSTOP ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCPKT_START = 8
+pkg syscall (netbsd-arm64-cgo), const TIOCPKT_START ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCPKT_STOP = 4
+pkg syscall (netbsd-arm64-cgo), const TIOCPKT_STOP ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCPTMGET = 1076393030
+pkg syscall (netbsd-arm64-cgo), const TIOCPTMGET ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCPTSNAME = 1076393032
+pkg syscall (netbsd-arm64-cgo), const TIOCPTSNAME ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCRCVFRAME = 2148037701
+pkg syscall (netbsd-arm64-cgo), const TIOCRCVFRAME ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCREMOTE = 2147775593
+pkg syscall (netbsd-arm64-cgo), const TIOCREMOTE ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCSBRK = 536900731
+pkg syscall (netbsd-arm64-cgo), const TIOCSBRK ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCSCTTY = 536900705
+pkg syscall (netbsd-arm64-cgo), const TIOCSCTTY ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCSDTR = 536900729
+pkg syscall (netbsd-arm64-cgo), const TIOCSDTR ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCSETA = 2150396948
+pkg syscall (netbsd-arm64-cgo), const TIOCSETA ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCSETAF = 2150396950
+pkg syscall (netbsd-arm64-cgo), const TIOCSETAF ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCSETAW = 2150396949
+pkg syscall (netbsd-arm64-cgo), const TIOCSETAW ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCSETD = 2147775515
+pkg syscall (netbsd-arm64-cgo), const TIOCSETD ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCSFLAGS = 2147775580
+pkg syscall (netbsd-arm64-cgo), const TIOCSFLAGS ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCSIG = 536900703
+pkg syscall (netbsd-arm64-cgo), const TIOCSIG ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCSLINED = 2149610563
+pkg syscall (netbsd-arm64-cgo), const TIOCSLINED ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCSPGRP = 2147775606
+pkg syscall (netbsd-arm64-cgo), const TIOCSPGRP ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCSQSIZE = 2147775616
+pkg syscall (netbsd-arm64-cgo), const TIOCSQSIZE ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCSSIZE = 2148037735
+pkg syscall (netbsd-arm64-cgo), const TIOCSSIZE ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCSTART = 536900718
+pkg syscall (netbsd-arm64-cgo), const TIOCSTART ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCSTAT = 2147775589
+pkg syscall (netbsd-arm64-cgo), const TIOCSTAT ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCSTI = 2147578994
+pkg syscall (netbsd-arm64-cgo), const TIOCSTI ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCSTOP = 536900719
+pkg syscall (netbsd-arm64-cgo), const TIOCSTOP ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCSWINSZ = 2148037735
+pkg syscall (netbsd-arm64-cgo), const TIOCSWINSZ ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCUCNTL = 2147775590
+pkg syscall (netbsd-arm64-cgo), const TIOCUCNTL ideal-int
+pkg syscall (netbsd-arm64-cgo), const TIOCXMTFRAME = 2148037700
+pkg syscall (netbsd-arm64-cgo), const TIOCXMTFRAME ideal-int
+pkg syscall (netbsd-arm64-cgo), const TOSTOP = 4194304
+pkg syscall (netbsd-arm64-cgo), const TOSTOP ideal-int
+pkg syscall (netbsd-arm64-cgo), const VDISCARD = 15
+pkg syscall (netbsd-arm64-cgo), const VDISCARD ideal-int
+pkg syscall (netbsd-arm64-cgo), const VDSUSP = 11
+pkg syscall (netbsd-arm64-cgo), const VDSUSP ideal-int
+pkg syscall (netbsd-arm64-cgo), const VEOF = 0
+pkg syscall (netbsd-arm64-cgo), const VEOF ideal-int
+pkg syscall (netbsd-arm64-cgo), const VEOL = 1
+pkg syscall (netbsd-arm64-cgo), const VEOL ideal-int
+pkg syscall (netbsd-arm64-cgo), const VEOL2 = 2
+pkg syscall (netbsd-arm64-cgo), const VEOL2 ideal-int
+pkg syscall (netbsd-arm64-cgo), const VERASE = 3
+pkg syscall (netbsd-arm64-cgo), const VERASE ideal-int
+pkg syscall (netbsd-arm64-cgo), const VINTR = 8
+pkg syscall (netbsd-arm64-cgo), const VINTR ideal-int
+pkg syscall (netbsd-arm64-cgo), const VKILL = 5
+pkg syscall (netbsd-arm64-cgo), const VKILL ideal-int
+pkg syscall (netbsd-arm64-cgo), const VLNEXT = 14
+pkg syscall (netbsd-arm64-cgo), const VLNEXT ideal-int
+pkg syscall (netbsd-arm64-cgo), const VMIN = 16
+pkg syscall (netbsd-arm64-cgo), const VMIN ideal-int
+pkg syscall (netbsd-arm64-cgo), const VQUIT = 9
+pkg syscall (netbsd-arm64-cgo), const VQUIT ideal-int
+pkg syscall (netbsd-arm64-cgo), const VREPRINT = 6
+pkg syscall (netbsd-arm64-cgo), const VREPRINT ideal-int
+pkg syscall (netbsd-arm64-cgo), const VSTART = 12
+pkg syscall (netbsd-arm64-cgo), const VSTART ideal-int
+pkg syscall (netbsd-arm64-cgo), const VSTATUS = 18
+pkg syscall (netbsd-arm64-cgo), const VSTATUS ideal-int
+pkg syscall (netbsd-arm64-cgo), const VSTOP = 13
+pkg syscall (netbsd-arm64-cgo), const VSTOP ideal-int
+pkg syscall (netbsd-arm64-cgo), const VSUSP = 10
+pkg syscall (netbsd-arm64-cgo), const VSUSP ideal-int
+pkg syscall (netbsd-arm64-cgo), const VTIME = 17
+pkg syscall (netbsd-arm64-cgo), const VTIME ideal-int
+pkg syscall (netbsd-arm64-cgo), const VWERASE = 4
+pkg syscall (netbsd-arm64-cgo), const VWERASE ideal-int
+pkg syscall (netbsd-arm64-cgo), const WALL = 8
+pkg syscall (netbsd-arm64-cgo), const WALL ideal-int
+pkg syscall (netbsd-arm64-cgo), const WALLSIG = 8
+pkg syscall (netbsd-arm64-cgo), const WALLSIG ideal-int
+pkg syscall (netbsd-arm64-cgo), const WALTSIG = 4
+pkg syscall (netbsd-arm64-cgo), const WALTSIG ideal-int
+pkg syscall (netbsd-arm64-cgo), const WCLONE = 4
+pkg syscall (netbsd-arm64-cgo), const WCLONE ideal-int
+pkg syscall (netbsd-arm64-cgo), const WCOREFLAG = 128
+pkg syscall (netbsd-arm64-cgo), const WCOREFLAG ideal-int
+pkg syscall (netbsd-arm64-cgo), const WNOHANG = 1
+pkg syscall (netbsd-arm64-cgo), const WNOHANG ideal-int
+pkg syscall (netbsd-arm64-cgo), const WNOWAIT = 65536
+pkg syscall (netbsd-arm64-cgo), const WNOWAIT ideal-int
+pkg syscall (netbsd-arm64-cgo), const WNOZOMBIE = 131072
+pkg syscall (netbsd-arm64-cgo), const WNOZOMBIE ideal-int
+pkg syscall (netbsd-arm64-cgo), const WOPTSCHECKED = 262144
+pkg syscall (netbsd-arm64-cgo), const WOPTSCHECKED ideal-int
+pkg syscall (netbsd-arm64-cgo), const WSTOPPED = 127
+pkg syscall (netbsd-arm64-cgo), const WSTOPPED ideal-int
+pkg syscall (netbsd-arm64-cgo), const WUNTRACED = 2
+pkg syscall (netbsd-arm64-cgo), const WUNTRACED ideal-int
+pkg syscall (netbsd-arm64-cgo), func Accept(int) (int, Sockaddr, error)
+pkg syscall (netbsd-arm64-cgo), func Accept4(int, int) (int, Sockaddr, error)
+pkg syscall (netbsd-arm64-cgo), func Access(string, uint32) error
+pkg syscall (netbsd-arm64-cgo), func Adjtime(*Timeval, *Timeval) error
+pkg syscall (netbsd-arm64-cgo), func Bind(int, Sockaddr) error
+pkg syscall (netbsd-arm64-cgo), func BpfBuflen(int) (int, error)
+pkg syscall (netbsd-arm64-cgo), func BpfDatalink(int) (int, error)
+pkg syscall (netbsd-arm64-cgo), func BpfHeadercmpl(int) (int, error)
+pkg syscall (netbsd-arm64-cgo), func BpfInterface(int, string) (string, error)
+pkg syscall (netbsd-arm64-cgo), func BpfJump(int, int, int, int) *BpfInsn
+pkg syscall (netbsd-arm64-cgo), func BpfStats(int) (*BpfStat, error)
+pkg syscall (netbsd-arm64-cgo), func BpfStmt(int, int) *BpfInsn
+pkg syscall (netbsd-arm64-cgo), func BpfTimeout(int) (*Timeval, error)
+pkg syscall (netbsd-arm64-cgo), func CheckBpfVersion(int) error
+pkg syscall (netbsd-arm64-cgo), func Chflags(string, int) error
+pkg syscall (netbsd-arm64-cgo), func Chroot(string) error
+pkg syscall (netbsd-arm64-cgo), func Close(int) error
+pkg syscall (netbsd-arm64-cgo), func CloseOnExec(int)
+pkg syscall (netbsd-arm64-cgo), func CmsgLen(int) int
+pkg syscall (netbsd-arm64-cgo), func CmsgSpace(int) int
+pkg syscall (netbsd-arm64-cgo), func Connect(int, Sockaddr) error
+pkg syscall (netbsd-arm64-cgo), func Dup(int) (int, error)
+pkg syscall (netbsd-arm64-cgo), func Dup2(int, int) error
+pkg syscall (netbsd-arm64-cgo), func Fchdir(int) error
+pkg syscall (netbsd-arm64-cgo), func Fchflags(int, int) error
+pkg syscall (netbsd-arm64-cgo), func Fchmod(int, uint32) error
+pkg syscall (netbsd-arm64-cgo), func Fchown(int, int, int) error
+pkg syscall (netbsd-arm64-cgo), func FcntlFlock(uintptr, int, *Flock_t) error
+pkg syscall (netbsd-arm64-cgo), func Flock(int, int) error
+pkg syscall (netbsd-arm64-cgo), func FlushBpf(int) error
+pkg syscall (netbsd-arm64-cgo), func ForkExec(string, []string, *ProcAttr) (int, error)
+pkg syscall (netbsd-arm64-cgo), func Fpathconf(int, int) (int, error)
+pkg syscall (netbsd-arm64-cgo), func Fstat(int, *Stat_t) error
+pkg syscall (netbsd-arm64-cgo), func Fsync(int) error
+pkg syscall (netbsd-arm64-cgo), func Ftruncate(int, int64) error
+pkg syscall (netbsd-arm64-cgo), func Futimes(int, []Timeval) error
+pkg syscall (netbsd-arm64-cgo), func Getdirentries(int, []uint8, *uintptr) (int, error)
+pkg syscall (netbsd-arm64-cgo), func Getpeername(int) (Sockaddr, error)
+pkg syscall (netbsd-arm64-cgo), func Getpgid(int) (int, error)
+pkg syscall (netbsd-arm64-cgo), func Getpgrp() int
+pkg syscall (netbsd-arm64-cgo), func Getpriority(int, int) (int, error)
+pkg syscall (netbsd-arm64-cgo), func Getrlimit(int, *Rlimit) error
+pkg syscall (netbsd-arm64-cgo), func Getrusage(int, *Rusage) error
+pkg syscall (netbsd-arm64-cgo), func Getsid(int) (int, error)
+pkg syscall (netbsd-arm64-cgo), func Getsockname(int) (Sockaddr, error)
+pkg syscall (netbsd-arm64-cgo), func GetsockoptByte(int, int, int) (uint8, error)
+pkg syscall (netbsd-arm64-cgo), func GetsockoptICMPv6Filter(int, int, int) (*ICMPv6Filter, error)
+pkg syscall (netbsd-arm64-cgo), func GetsockoptIPMreq(int, int, int) (*IPMreq, error)
+pkg syscall (netbsd-arm64-cgo), func GetsockoptIPv6MTUInfo(int, int, int) (*IPv6MTUInfo, error)
+pkg syscall (netbsd-arm64-cgo), func GetsockoptIPv6Mreq(int, int, int) (*IPv6Mreq, error)
+pkg syscall (netbsd-arm64-cgo), func GetsockoptInet4Addr(int, int, int) ([4]uint8, error)
+pkg syscall (netbsd-arm64-cgo), func GetsockoptInt(int, int, int) (int, error)
+pkg syscall (netbsd-arm64-cgo), func Issetugid() bool
+pkg syscall (netbsd-arm64-cgo), func Kevent(int, []Kevent_t, []Kevent_t, *Timespec) (int, error)
+pkg syscall (netbsd-arm64-cgo), func Kill(int, Signal) error
+pkg syscall (netbsd-arm64-cgo), func Kqueue() (int, error)
+pkg syscall (netbsd-arm64-cgo), func Listen(int, int) error
+pkg syscall (netbsd-arm64-cgo), func Lstat(string, *Stat_t) error
+pkg syscall (netbsd-arm64-cgo), func Mkfifo(string, uint32) error
+pkg syscall (netbsd-arm64-cgo), func Mknod(string, uint32, int) error
+pkg syscall (netbsd-arm64-cgo), func Mmap(int, int64, int, int, int) ([]uint8, error)
+pkg syscall (netbsd-arm64-cgo), func Munmap([]uint8) error
+pkg syscall (netbsd-arm64-cgo), func Nanosleep(*Timespec, *Timespec) error
+pkg syscall (netbsd-arm64-cgo), func Open(string, int, uint32) (int, error)
+pkg syscall (netbsd-arm64-cgo), func ParseDirent([]uint8, int, []string) (int, int, []string)
+pkg syscall (netbsd-arm64-cgo), func ParseRoutingMessage([]uint8) ([]RoutingMessage, error)
+pkg syscall (netbsd-arm64-cgo), func ParseRoutingSockaddr(RoutingMessage) ([]Sockaddr, error)
+pkg syscall (netbsd-arm64-cgo), func ParseSocketControlMessage([]uint8) ([]SocketControlMessage, error)
+pkg syscall (netbsd-arm64-cgo), func ParseUnixRights(*SocketControlMessage) ([]int, error)
+pkg syscall (netbsd-arm64-cgo), func Pathconf(string, int) (int, error)
+pkg syscall (netbsd-arm64-cgo), func Pipe([]int) error
+pkg syscall (netbsd-arm64-cgo), func Pipe2([]int, int) error
+pkg syscall (netbsd-arm64-cgo), func Pread(int, []uint8, int64) (int, error)
+pkg syscall (netbsd-arm64-cgo), func Pwrite(int, []uint8, int64) (int, error)
+pkg syscall (netbsd-arm64-cgo), func RawSyscall(uintptr, uintptr, uintptr, uintptr) (uintptr, uintptr, Errno)
+pkg syscall (netbsd-arm64-cgo), func RawSyscall6(uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) (uintptr, uintptr, Errno)
+pkg syscall (netbsd-arm64-cgo), func Read(int, []uint8) (int, error)
+pkg syscall (netbsd-arm64-cgo), func ReadDirent(int, []uint8) (int, error)
+pkg syscall (netbsd-arm64-cgo), func Recvfrom(int, []uint8, int) (int, Sockaddr, error)
+pkg syscall (netbsd-arm64-cgo), func Recvmsg(int, []uint8, []uint8, int) (int, int, int, Sockaddr, error)
+pkg syscall (netbsd-arm64-cgo), func Revoke(string) error
+pkg syscall (netbsd-arm64-cgo), func RouteRIB(int, int) ([]uint8, error)
+pkg syscall (netbsd-arm64-cgo), func Seek(int, int64, int) (int64, error)
+pkg syscall (netbsd-arm64-cgo), func Select(int, *FdSet, *FdSet, *FdSet, *Timeval) error
+pkg syscall (netbsd-arm64-cgo), func Sendfile(int, int, *int64, int) (int, error)
+pkg syscall (netbsd-arm64-cgo), func Sendmsg(int, []uint8, []uint8, Sockaddr, int) error
+pkg syscall (netbsd-arm64-cgo), func SendmsgN(int, []uint8, []uint8, Sockaddr, int) (int, error)
+pkg syscall (netbsd-arm64-cgo), func Sendto(int, []uint8, int, Sockaddr) error
+pkg syscall (netbsd-arm64-cgo), func SetBpf(int, []BpfInsn) error
+pkg syscall (netbsd-arm64-cgo), func SetBpfBuflen(int, int) (int, error)
+pkg syscall (netbsd-arm64-cgo), func SetBpfDatalink(int, int) (int, error)
+pkg syscall (netbsd-arm64-cgo), func SetBpfHeadercmpl(int, int) error
+pkg syscall (netbsd-arm64-cgo), func SetBpfImmediate(int, int) error
+pkg syscall (netbsd-arm64-cgo), func SetBpfInterface(int, string) error
+pkg syscall (netbsd-arm64-cgo), func SetBpfPromisc(int, int) error
+pkg syscall (netbsd-arm64-cgo), func SetBpfTimeout(int, *Timeval) error
+pkg syscall (netbsd-arm64-cgo), func SetKevent(*Kevent_t, int, int, int)
+pkg syscall (netbsd-arm64-cgo), func SetNonblock(int, bool) error
+pkg syscall (netbsd-arm64-cgo), func Setegid(int) error
+pkg syscall (netbsd-arm64-cgo), func Seteuid(int) error
+pkg syscall (netbsd-arm64-cgo), func Setgid(int) error
+pkg syscall (netbsd-arm64-cgo), func Setgroups([]int) error
+pkg syscall (netbsd-arm64-cgo), func Setpgid(int, int) error
+pkg syscall (netbsd-arm64-cgo), func Setpriority(int, int, int) error
+pkg syscall (netbsd-arm64-cgo), func Setregid(int, int) error
+pkg syscall (netbsd-arm64-cgo), func Setreuid(int, int) error
+pkg syscall (netbsd-arm64-cgo), func Setrlimit(int, *Rlimit) error
+pkg syscall (netbsd-arm64-cgo), func Setsid() (int, error)
+pkg syscall (netbsd-arm64-cgo), func SetsockoptByte(int, int, int, uint8) error
+pkg syscall (netbsd-arm64-cgo), func SetsockoptICMPv6Filter(int, int, int, *ICMPv6Filter) error
+pkg syscall (netbsd-arm64-cgo), func SetsockoptIPMreq(int, int, int, *IPMreq) error
+pkg syscall (netbsd-arm64-cgo), func SetsockoptIPv6Mreq(int, int, int, *IPv6Mreq) error
+pkg syscall (netbsd-arm64-cgo), func SetsockoptInet4Addr(int, int, int, [4]uint8) error
+pkg syscall (netbsd-arm64-cgo), func SetsockoptInt(int, int, int, int) error
+pkg syscall (netbsd-arm64-cgo), func SetsockoptLinger(int, int, int, *Linger) error
+pkg syscall (netbsd-arm64-cgo), func SetsockoptString(int, int, int, string) error
+pkg syscall (netbsd-arm64-cgo), func SetsockoptTimeval(int, int, int, *Timeval) error
+pkg syscall (netbsd-arm64-cgo), func Settimeofday(*Timeval) error
+pkg syscall (netbsd-arm64-cgo), func Setuid(int) error
+pkg syscall (netbsd-arm64-cgo), func Shutdown(int, int) error
+pkg syscall (netbsd-arm64-cgo), func SlicePtrFromStrings([]string) ([]*uint8, error)
+pkg syscall (netbsd-arm64-cgo), func Socket(int, int, int) (int, error)
+pkg syscall (netbsd-arm64-cgo), func Socketpair(int, int, int) ([2]int, error)
+pkg syscall (netbsd-arm64-cgo), func Stat(string, *Stat_t) error
+pkg syscall (netbsd-arm64-cgo), func StringSlicePtr([]string) []*uint8
+pkg syscall (netbsd-arm64-cgo), func Sync() error
+pkg syscall (netbsd-arm64-cgo), func Syscall(uintptr, uintptr, uintptr, uintptr) (uintptr, uintptr, Errno)
+pkg syscall (netbsd-arm64-cgo), func Syscall6(uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) (uintptr, uintptr, Errno)
+pkg syscall (netbsd-arm64-cgo), func Syscall9(uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) (uintptr, uintptr, Errno)
+pkg syscall (netbsd-arm64-cgo), func Sysctl(string) (string, error)
+pkg syscall (netbsd-arm64-cgo), func SysctlUint32(string) (uint32, error)
+pkg syscall (netbsd-arm64-cgo), func TimevalToNsec(Timeval) int64
+pkg syscall (netbsd-arm64-cgo), func Truncate(string, int64) error
+pkg syscall (netbsd-arm64-cgo), func Umask(int) int
+pkg syscall (netbsd-arm64-cgo), func UnixRights(...int) []uint8
+pkg syscall (netbsd-arm64-cgo), func Unmount(string, int) error
+pkg syscall (netbsd-arm64-cgo), func Wait4(int, *WaitStatus, int, *Rusage) (int, error)
+pkg syscall (netbsd-arm64-cgo), func Write(int, []uint8) (int, error)
+pkg syscall (netbsd-arm64-cgo), method (*Cmsghdr) SetLen(int)
+pkg syscall (netbsd-arm64-cgo), method (*Iovec) SetLen(int)
+pkg syscall (netbsd-arm64-cgo), method (*Msghdr) SetControllen(int)
+pkg syscall (netbsd-arm64-cgo), type BpfHdr struct
+pkg syscall (netbsd-arm64-cgo), type BpfHdr struct, Caplen uint32
+pkg syscall (netbsd-arm64-cgo), type BpfHdr struct, Datalen uint32
+pkg syscall (netbsd-arm64-cgo), type BpfHdr struct, Hdrlen uint16
+pkg syscall (netbsd-arm64-cgo), type BpfHdr struct, Pad_cgo_0 [6]uint8
+pkg syscall (netbsd-arm64-cgo), type BpfHdr struct, Tstamp BpfTimeval
+pkg syscall (netbsd-arm64-cgo), type BpfInsn struct
+pkg syscall (netbsd-arm64-cgo), type BpfInsn struct, Code uint16
+pkg syscall (netbsd-arm64-cgo), type BpfInsn struct, Jf uint8
+pkg syscall (netbsd-arm64-cgo), type BpfInsn struct, Jt uint8
+pkg syscall (netbsd-arm64-cgo), type BpfInsn struct, K uint32
+pkg syscall (netbsd-arm64-cgo), type BpfProgram struct
+pkg syscall (netbsd-arm64-cgo), type BpfProgram struct, Insns *BpfInsn
+pkg syscall (netbsd-arm64-cgo), type BpfProgram struct, Len uint32
+pkg syscall (netbsd-arm64-cgo), type BpfProgram struct, Pad_cgo_0 [4]uint8
+pkg syscall (netbsd-arm64-cgo), type BpfStat struct
+pkg syscall (netbsd-arm64-cgo), type BpfStat struct, Capt uint64
+pkg syscall (netbsd-arm64-cgo), type BpfStat struct, Drop uint64
+pkg syscall (netbsd-arm64-cgo), type BpfStat struct, Padding [13]uint64
+pkg syscall (netbsd-arm64-cgo), type BpfStat struct, Recv uint64
+pkg syscall (netbsd-arm64-cgo), type BpfTimeval struct
+pkg syscall (netbsd-arm64-cgo), type BpfTimeval struct, Sec int64
+pkg syscall (netbsd-arm64-cgo), type BpfTimeval struct, Usec int64
+pkg syscall (netbsd-arm64-cgo), type BpfVersion struct
+pkg syscall (netbsd-arm64-cgo), type BpfVersion struct, Major uint16
+pkg syscall (netbsd-arm64-cgo), type BpfVersion struct, Minor uint16
+pkg syscall (netbsd-arm64-cgo), type Cmsghdr struct
+pkg syscall (netbsd-arm64-cgo), type Cmsghdr struct, Len uint32
+pkg syscall (netbsd-arm64-cgo), type Cmsghdr struct, Level int32
+pkg syscall (netbsd-arm64-cgo), type Cmsghdr struct, Type int32
+pkg syscall (netbsd-arm64-cgo), type Credential struct
+pkg syscall (netbsd-arm64-cgo), type Credential struct, Gid uint32
+pkg syscall (netbsd-arm64-cgo), type Credential struct, Groups []uint32
+pkg syscall (netbsd-arm64-cgo), type Credential struct, NoSetGroups bool
+pkg syscall (netbsd-arm64-cgo), type Credential struct, Uid uint32
+pkg syscall (netbsd-arm64-cgo), type Dirent struct
+pkg syscall (netbsd-arm64-cgo), type Dirent struct, Fileno uint64
+pkg syscall (netbsd-arm64-cgo), type Dirent struct, Name [512]int8
+pkg syscall (netbsd-arm64-cgo), type Dirent struct, Namlen uint16
+pkg syscall (netbsd-arm64-cgo), type Dirent struct, Pad_cgo_0 [3]uint8
+pkg syscall (netbsd-arm64-cgo), type Dirent struct, Reclen uint16
+pkg syscall (netbsd-arm64-cgo), type Dirent struct, Type uint8
+pkg syscall (netbsd-arm64-cgo), type FdSet struct
+pkg syscall (netbsd-arm64-cgo), type FdSet struct, Bits [8]uint32
+pkg syscall (netbsd-arm64-cgo), type Flock_t struct
+pkg syscall (netbsd-arm64-cgo), type Flock_t struct, Len int64
+pkg syscall (netbsd-arm64-cgo), type Flock_t struct, Pid int32
+pkg syscall (netbsd-arm64-cgo), type Flock_t struct, Start int64
+pkg syscall (netbsd-arm64-cgo), type Flock_t struct, Type int16
+pkg syscall (netbsd-arm64-cgo), type Flock_t struct, Whence int16
+pkg syscall (netbsd-arm64-cgo), type Fsid struct
+pkg syscall (netbsd-arm64-cgo), type Fsid struct, X__fsid_val [2]int32
+pkg syscall (netbsd-arm64-cgo), type ICMPv6Filter struct
+pkg syscall (netbsd-arm64-cgo), type ICMPv6Filter struct, Filt [8]uint32
+pkg syscall (netbsd-arm64-cgo), type IPv6MTUInfo struct
+pkg syscall (netbsd-arm64-cgo), type IPv6MTUInfo struct, Addr RawSockaddrInet6
+pkg syscall (netbsd-arm64-cgo), type IPv6MTUInfo struct, Mtu uint32
+pkg syscall (netbsd-arm64-cgo), type IfAnnounceMsghdr struct
+pkg syscall (netbsd-arm64-cgo), type IfAnnounceMsghdr struct, Index uint16
+pkg syscall (netbsd-arm64-cgo), type IfAnnounceMsghdr struct, Msglen uint16
+pkg syscall (netbsd-arm64-cgo), type IfAnnounceMsghdr struct, Name [16]int8
+pkg syscall (netbsd-arm64-cgo), type IfAnnounceMsghdr struct, Type uint8
+pkg syscall (netbsd-arm64-cgo), type IfAnnounceMsghdr struct, Version uint8
+pkg syscall (netbsd-arm64-cgo), type IfAnnounceMsghdr struct, What uint16
+pkg syscall (netbsd-arm64-cgo), type IfData struct
+pkg syscall (netbsd-arm64-cgo), type IfData struct, Addrlen uint8
+pkg syscall (netbsd-arm64-cgo), type IfData struct, Baudrate uint64
+pkg syscall (netbsd-arm64-cgo), type IfData struct, Collisions uint64
+pkg syscall (netbsd-arm64-cgo), type IfData struct, Hdrlen uint8
+pkg syscall (netbsd-arm64-cgo), type IfData struct, Ibytes uint64
+pkg syscall (netbsd-arm64-cgo), type IfData struct, Ierrors uint64
+pkg syscall (netbsd-arm64-cgo), type IfData struct, Imcasts uint64
+pkg syscall (netbsd-arm64-cgo), type IfData struct, Ipackets uint64
+pkg syscall (netbsd-arm64-cgo), type IfData struct, Iqdrops uint64
+pkg syscall (netbsd-arm64-cgo), type IfData struct, Lastchange Timespec
+pkg syscall (netbsd-arm64-cgo), type IfData struct, Link_state int32
+pkg syscall (netbsd-arm64-cgo), type IfData struct, Metric uint64
+pkg syscall (netbsd-arm64-cgo), type IfData struct, Mtu uint64
+pkg syscall (netbsd-arm64-cgo), type IfData struct, Noproto uint64
+pkg syscall (netbsd-arm64-cgo), type IfData struct, Obytes uint64
+pkg syscall (netbsd-arm64-cgo), type IfData struct, Oerrors uint64
+pkg syscall (netbsd-arm64-cgo), type IfData struct, Omcasts uint64
+pkg syscall (netbsd-arm64-cgo), type IfData struct, Opackets uint64
+pkg syscall (netbsd-arm64-cgo), type IfData struct, Pad_cgo_0 [1]uint8
+pkg syscall (netbsd-arm64-cgo), type IfData struct, Type uint8
+pkg syscall (netbsd-arm64-cgo), type IfMsghdr struct
+pkg syscall (netbsd-arm64-cgo), type IfMsghdr struct, Addrs int32
+pkg syscall (netbsd-arm64-cgo), type IfMsghdr struct, Data IfData
+pkg syscall (netbsd-arm64-cgo), type IfMsghdr struct, Flags int32
+pkg syscall (netbsd-arm64-cgo), type IfMsghdr struct, Index uint16
+pkg syscall (netbsd-arm64-cgo), type IfMsghdr struct, Msglen uint16
+pkg syscall (netbsd-arm64-cgo), type IfMsghdr struct, Pad_cgo_0 [2]uint8
+pkg syscall (netbsd-arm64-cgo), type IfMsghdr struct, Type uint8
+pkg syscall (netbsd-arm64-cgo), type IfMsghdr struct, Version uint8
+pkg syscall (netbsd-arm64-cgo), type IfaMsghdr struct
+pkg syscall (netbsd-arm64-cgo), type IfaMsghdr struct, Addrs int32
+pkg syscall (netbsd-arm64-cgo), type IfaMsghdr struct, Flags int32
+pkg syscall (netbsd-arm64-cgo), type IfaMsghdr struct, Index uint16
+pkg syscall (netbsd-arm64-cgo), type IfaMsghdr struct, Metric int32
+pkg syscall (netbsd-arm64-cgo), type IfaMsghdr struct, Msglen uint16
+pkg syscall (netbsd-arm64-cgo), type IfaMsghdr struct, Pad_cgo_0 [6]uint8
+pkg syscall (netbsd-arm64-cgo), type IfaMsghdr struct, Type uint8
+pkg syscall (netbsd-arm64-cgo), type IfaMsghdr struct, Version uint8
+pkg syscall (netbsd-arm64-cgo), type Inet6Pktinfo struct
+pkg syscall (netbsd-arm64-cgo), type Inet6Pktinfo struct, Addr [16]uint8
+pkg syscall (netbsd-arm64-cgo), type Inet6Pktinfo struct, Ifindex uint32
+pkg syscall (netbsd-arm64-cgo), type InterfaceAddrMessage struct
+pkg syscall (netbsd-arm64-cgo), type InterfaceAddrMessage struct, Data []uint8
+pkg syscall (netbsd-arm64-cgo), type InterfaceAddrMessage struct, Header IfaMsghdr
+pkg syscall (netbsd-arm64-cgo), type InterfaceAnnounceMessage struct
+pkg syscall (netbsd-arm64-cgo), type InterfaceAnnounceMessage struct, Header IfAnnounceMsghdr
+pkg syscall (netbsd-arm64-cgo), type InterfaceMessage struct
+pkg syscall (netbsd-arm64-cgo), type InterfaceMessage struct, Data []uint8
+pkg syscall (netbsd-arm64-cgo), type InterfaceMessage struct, Header IfMsghdr
+pkg syscall (netbsd-arm64-cgo), type Iovec struct
+pkg syscall (netbsd-arm64-cgo), type Iovec struct, Base *uint8
+pkg syscall (netbsd-arm64-cgo), type Iovec struct, Len uint64
+pkg syscall (netbsd-arm64-cgo), type Kevent_t struct
+pkg syscall (netbsd-arm64-cgo), type Kevent_t struct, Data int64
+pkg syscall (netbsd-arm64-cgo), type Kevent_t struct, Fflags uint32
+pkg syscall (netbsd-arm64-cgo), type Kevent_t struct, Filter uint32
+pkg syscall (netbsd-arm64-cgo), type Kevent_t struct, Flags uint32
+pkg syscall (netbsd-arm64-cgo), type Kevent_t struct, Ident uint64
+pkg syscall (netbsd-arm64-cgo), type Kevent_t struct, Pad_cgo_0 [4]uint8
+pkg syscall (netbsd-arm64-cgo), type Kevent_t struct, Udata int64
+pkg syscall (netbsd-arm64-cgo), type Mclpool [0]uint8
+pkg syscall (netbsd-arm64-cgo), type Msghdr struct
+pkg syscall (netbsd-arm64-cgo), type Msghdr struct, Control *uint8
+pkg syscall (netbsd-arm64-cgo), type Msghdr struct, Controllen uint32
+pkg syscall (netbsd-arm64-cgo), type Msghdr struct, Flags int32
+pkg syscall (netbsd-arm64-cgo), type Msghdr struct, Iov *Iovec
+pkg syscall (netbsd-arm64-cgo), type Msghdr struct, Iovlen int32
+pkg syscall (netbsd-arm64-cgo), type Msghdr struct, Name *uint8
+pkg syscall (netbsd-arm64-cgo), type Msghdr struct, Namelen uint32
+pkg syscall (netbsd-arm64-cgo), type Msghdr struct, Pad_cgo_0 [4]uint8
+pkg syscall (netbsd-arm64-cgo), type Msghdr struct, Pad_cgo_1 [4]uint8
+pkg syscall (netbsd-arm64-cgo), type RawSockaddr struct, Data [14]int8
+pkg syscall (netbsd-arm64-cgo), type RawSockaddr struct, Family uint8
+pkg syscall (netbsd-arm64-cgo), type RawSockaddr struct, Len uint8
+pkg syscall (netbsd-arm64-cgo), type RawSockaddrAny struct, Pad [92]int8
+pkg syscall (netbsd-arm64-cgo), type RawSockaddrDatalink struct
+pkg syscall (netbsd-arm64-cgo), type RawSockaddrDatalink struct, Alen uint8
+pkg syscall (netbsd-arm64-cgo), type RawSockaddrDatalink struct, Data [12]int8
+pkg syscall (netbsd-arm64-cgo), type RawSockaddrDatalink struct, Family uint8
+pkg syscall (netbsd-arm64-cgo), type RawSockaddrDatalink struct, Index uint16
+pkg syscall (netbsd-arm64-cgo), type RawSockaddrDatalink struct, Len uint8
+pkg syscall (netbsd-arm64-cgo), type RawSockaddrDatalink struct, Nlen uint8
+pkg syscall (netbsd-arm64-cgo), type RawSockaddrDatalink struct, Slen uint8
+pkg syscall (netbsd-arm64-cgo), type RawSockaddrDatalink struct, Type uint8
+pkg syscall (netbsd-arm64-cgo), type RawSockaddrInet4 struct, Family uint8
+pkg syscall (netbsd-arm64-cgo), type RawSockaddrInet4 struct, Len uint8
+pkg syscall (netbsd-arm64-cgo), type RawSockaddrInet4 struct, Zero [8]int8
+pkg syscall (netbsd-arm64-cgo), type RawSockaddrInet6 struct, Family uint8
+pkg syscall (netbsd-arm64-cgo), type RawSockaddrInet6 struct, Len uint8
+pkg syscall (netbsd-arm64-cgo), type RawSockaddrUnix struct, Family uint8
+pkg syscall (netbsd-arm64-cgo), type RawSockaddrUnix struct, Len uint8
+pkg syscall (netbsd-arm64-cgo), type RawSockaddrUnix struct, Path [104]int8
+pkg syscall (netbsd-arm64-cgo), type Rlimit struct
+pkg syscall (netbsd-arm64-cgo), type Rlimit struct, Cur uint64
+pkg syscall (netbsd-arm64-cgo), type Rlimit struct, Max uint64
+pkg syscall (netbsd-arm64-cgo), type RouteMessage struct
+pkg syscall (netbsd-arm64-cgo), type RouteMessage struct, Data []uint8
+pkg syscall (netbsd-arm64-cgo), type RouteMessage struct, Header RtMsghdr
+pkg syscall (netbsd-arm64-cgo), type RoutingMessage interface, unexported methods
+pkg syscall (netbsd-arm64-cgo), type RtMetrics struct
+pkg syscall (netbsd-arm64-cgo), type RtMetrics struct, Expire int64
+pkg syscall (netbsd-arm64-cgo), type RtMetrics struct, Hopcount uint64
+pkg syscall (netbsd-arm64-cgo), type RtMetrics struct, Locks uint64
+pkg syscall (netbsd-arm64-cgo), type RtMetrics struct, Mtu uint64
+pkg syscall (netbsd-arm64-cgo), type RtMetrics struct, Pksent int64
+pkg syscall (netbsd-arm64-cgo), type RtMetrics struct, Recvpipe uint64
+pkg syscall (netbsd-arm64-cgo), type RtMetrics struct, Rtt uint64
+pkg syscall (netbsd-arm64-cgo), type RtMetrics struct, Rttvar uint64
+pkg syscall (netbsd-arm64-cgo), type RtMetrics struct, Sendpipe uint64
+pkg syscall (netbsd-arm64-cgo), type RtMetrics struct, Ssthresh uint64
+pkg syscall (netbsd-arm64-cgo), type RtMsghdr struct
+pkg syscall (netbsd-arm64-cgo), type RtMsghdr struct, Addrs int32
+pkg syscall (netbsd-arm64-cgo), type RtMsghdr struct, Errno int32
+pkg syscall (netbsd-arm64-cgo), type RtMsghdr struct, Flags int32
+pkg syscall (netbsd-arm64-cgo), type RtMsghdr struct, Index uint16
+pkg syscall (netbsd-arm64-cgo), type RtMsghdr struct, Inits int32
+pkg syscall (netbsd-arm64-cgo), type RtMsghdr struct, Msglen uint16
+pkg syscall (netbsd-arm64-cgo), type RtMsghdr struct, Pad_cgo_0 [2]uint8
+pkg syscall (netbsd-arm64-cgo), type RtMsghdr struct, Pad_cgo_1 [4]uint8
+pkg syscall (netbsd-arm64-cgo), type RtMsghdr struct, Pid int32
+pkg syscall (netbsd-arm64-cgo), type RtMsghdr struct, Rmx RtMetrics
+pkg syscall (netbsd-arm64-cgo), type RtMsghdr struct, Seq int32
+pkg syscall (netbsd-arm64-cgo), type RtMsghdr struct, Type uint8
+pkg syscall (netbsd-arm64-cgo), type RtMsghdr struct, Use int32
+pkg syscall (netbsd-arm64-cgo), type RtMsghdr struct, Version uint8
+pkg syscall (netbsd-arm64-cgo), type Rusage struct, Idrss int64
+pkg syscall (netbsd-arm64-cgo), type Rusage struct, Inblock int64
+pkg syscall (netbsd-arm64-cgo), type Rusage struct, Isrss int64
+pkg syscall (netbsd-arm64-cgo), type Rusage struct, Ixrss int64
+pkg syscall (netbsd-arm64-cgo), type Rusage struct, Majflt int64
+pkg syscall (netbsd-arm64-cgo), type Rusage struct, Maxrss int64
+pkg syscall (netbsd-arm64-cgo), type Rusage struct, Minflt int64
+pkg syscall (netbsd-arm64-cgo), type Rusage struct, Msgrcv int64
+pkg syscall (netbsd-arm64-cgo), type Rusage struct, Msgsnd int64
+pkg syscall (netbsd-arm64-cgo), type Rusage struct, Nivcsw int64
+pkg syscall (netbsd-arm64-cgo), type Rusage struct, Nsignals int64
+pkg syscall (netbsd-arm64-cgo), type Rusage struct, Nswap int64
+pkg syscall (netbsd-arm64-cgo), type Rusage struct, Nvcsw int64
+pkg syscall (netbsd-arm64-cgo), type Rusage struct, Oublock int64
+pkg syscall (netbsd-arm64-cgo), type Rusage struct, Stime Timeval
+pkg syscall (netbsd-arm64-cgo), type Rusage struct, Utime Timeval
+pkg syscall (netbsd-arm64-cgo), type SockaddrDatalink struct
+pkg syscall (netbsd-arm64-cgo), type SockaddrDatalink struct, Alen uint8
+pkg syscall (netbsd-arm64-cgo), type SockaddrDatalink struct, Data [12]int8
+pkg syscall (netbsd-arm64-cgo), type SockaddrDatalink struct, Family uint8
+pkg syscall (netbsd-arm64-cgo), type SockaddrDatalink struct, Index uint16
+pkg syscall (netbsd-arm64-cgo), type SockaddrDatalink struct, Len uint8
+pkg syscall (netbsd-arm64-cgo), type SockaddrDatalink struct, Nlen uint8
+pkg syscall (netbsd-arm64-cgo), type SockaddrDatalink struct, Slen uint8
+pkg syscall (netbsd-arm64-cgo), type SockaddrDatalink struct, Type uint8
+pkg syscall (netbsd-arm64-cgo), type SocketControlMessage struct
+pkg syscall (netbsd-arm64-cgo), type SocketControlMessage struct, Data []uint8
+pkg syscall (netbsd-arm64-cgo), type SocketControlMessage struct, Header Cmsghdr
+pkg syscall (netbsd-arm64-cgo), type Stat_t struct
+pkg syscall (netbsd-arm64-cgo), type Stat_t struct, Atimespec Timespec
+pkg syscall (netbsd-arm64-cgo), type Stat_t struct, Birthtimespec Timespec
+pkg syscall (netbsd-arm64-cgo), type Stat_t struct, Blksize uint32
+pkg syscall (netbsd-arm64-cgo), type Stat_t struct, Blocks int64
+pkg syscall (netbsd-arm64-cgo), type Stat_t struct, Ctimespec Timespec
+pkg syscall (netbsd-arm64-cgo), type Stat_t struct, Dev uint64
+pkg syscall (netbsd-arm64-cgo), type Stat_t struct, Flags uint32
+pkg syscall (netbsd-arm64-cgo), type Stat_t struct, Gen uint32
+pkg syscall (netbsd-arm64-cgo), type Stat_t struct, Gid uint32
+pkg syscall (netbsd-arm64-cgo), type Stat_t struct, Ino uint64
+pkg syscall (netbsd-arm64-cgo), type Stat_t struct, Mode uint32
+pkg syscall (netbsd-arm64-cgo), type Stat_t struct, Mtimespec Timespec
+pkg syscall (netbsd-arm64-cgo), type Stat_t struct, Nlink uint32
+pkg syscall (netbsd-arm64-cgo), type Stat_t struct, Pad_cgo_0 [4]uint8
+pkg syscall (netbsd-arm64-cgo), type Stat_t struct, Pad_cgo_1 [4]uint8
+pkg syscall (netbsd-arm64-cgo), type Stat_t struct, Pad_cgo_2 [4]uint8
+pkg syscall (netbsd-arm64-cgo), type Stat_t struct, Rdev uint64
+pkg syscall (netbsd-arm64-cgo), type Stat_t struct, Size int64
+pkg syscall (netbsd-arm64-cgo), type Stat_t struct, Spare [2]uint32
+pkg syscall (netbsd-arm64-cgo), type Stat_t struct, Uid uint32
+pkg syscall (netbsd-arm64-cgo), type Statfs_t [0]uint8
+pkg syscall (netbsd-arm64-cgo), type SysProcAttr struct, Chroot string
+pkg syscall (netbsd-arm64-cgo), type SysProcAttr struct, Credential *Credential
+pkg syscall (netbsd-arm64-cgo), type SysProcAttr struct, Ctty int
+pkg syscall (netbsd-arm64-cgo), type SysProcAttr struct, Foreground bool
+pkg syscall (netbsd-arm64-cgo), type SysProcAttr struct, Noctty bool
+pkg syscall (netbsd-arm64-cgo), type SysProcAttr struct, Pgid int
+pkg syscall (netbsd-arm64-cgo), type SysProcAttr struct, Ptrace bool
+pkg syscall (netbsd-arm64-cgo), type SysProcAttr struct, Setctty bool
+pkg syscall (netbsd-arm64-cgo), type SysProcAttr struct, Setpgid bool
+pkg syscall (netbsd-arm64-cgo), type SysProcAttr struct, Setsid bool
+pkg syscall (netbsd-arm64-cgo), type Sysctlnode struct
+pkg syscall (netbsd-arm64-cgo), type Sysctlnode struct, Flags uint32
+pkg syscall (netbsd-arm64-cgo), type Sysctlnode struct, Name [32]int8
+pkg syscall (netbsd-arm64-cgo), type Sysctlnode struct, Num int32
+pkg syscall (netbsd-arm64-cgo), type Sysctlnode struct, Un [16]uint8
+pkg syscall (netbsd-arm64-cgo), type Sysctlnode struct, Ver uint32
+pkg syscall (netbsd-arm64-cgo), type Sysctlnode struct, X__rsvd uint32
+pkg syscall (netbsd-arm64-cgo), type Sysctlnode struct, X_sysctl_desc [8]uint8
+pkg syscall (netbsd-arm64-cgo), type Sysctlnode struct, X_sysctl_func [8]uint8
+pkg syscall (netbsd-arm64-cgo), type Sysctlnode struct, X_sysctl_parent [8]uint8
+pkg syscall (netbsd-arm64-cgo), type Sysctlnode struct, X_sysctl_size [8]uint8
+pkg syscall (netbsd-arm64-cgo), type Termios struct
+pkg syscall (netbsd-arm64-cgo), type Termios struct, Cc [20]uint8
+pkg syscall (netbsd-arm64-cgo), type Termios struct, Cflag uint32
+pkg syscall (netbsd-arm64-cgo), type Termios struct, Iflag uint32
+pkg syscall (netbsd-arm64-cgo), type Termios struct, Ispeed int32
+pkg syscall (netbsd-arm64-cgo), type Termios struct, Lflag uint32
+pkg syscall (netbsd-arm64-cgo), type Termios struct, Oflag uint32
+pkg syscall (netbsd-arm64-cgo), type Termios struct, Ospeed int32
+pkg syscall (netbsd-arm64-cgo), type Timespec struct, Nsec int64
+pkg syscall (netbsd-arm64-cgo), type Timespec struct, Sec int64
+pkg syscall (netbsd-arm64-cgo), type Timeval struct, Pad_cgo_0 [4]uint8
+pkg syscall (netbsd-arm64-cgo), type Timeval struct, Sec int64
+pkg syscall (netbsd-arm64-cgo), type Timeval struct, Usec int32
+pkg syscall (netbsd-arm64-cgo), type WaitStatus uint32
+pkg syscall (netbsd-arm64-cgo), var Stderr int
+pkg syscall (netbsd-arm64-cgo), var Stdin int
+pkg syscall (netbsd-arm64-cgo), var Stdout int
+pkg syscall (windows-386), type SysProcAttr struct, ProcessAttributes *SecurityAttributes
+pkg syscall (windows-386), type SysProcAttr struct, ThreadAttributes *SecurityAttributes
+pkg syscall (windows-amd64), type SysProcAttr struct, ProcessAttributes *SecurityAttributes
+pkg syscall (windows-amd64), type SysProcAttr struct, ThreadAttributes *SecurityAttributes
+pkg syscall, method (Errno) Is(error) bool
+pkg testing, func Init()
+pkg testing, method (*B) ReportMetric(float64, string)
+pkg testing, type BenchmarkResult struct, Extra map[string]float64
pkg text/scanner, const AllowNumberbars = 1024
pkg text/scanner, const AllowNumberbars ideal-int
pkg text/scanner, const GoTokens = 2036
+pkg text/template, method (ExecError) Unwrap() error
+pkg time, method (Duration) Microseconds() int64
+pkg time, method (Duration) Milliseconds() int64
+pkg unicode, const Version = "11.0.0"
+pkg unicode, var Dogra *RangeTable
+pkg unicode, var Gunjala_Gondi *RangeTable
+pkg unicode, var Hanifi_Rohingya *RangeTable
+pkg unicode, var Makasar *RangeTable
+pkg unicode, var Medefaidrin *RangeTable
+pkg unicode, var Old_Sogdian *RangeTable
+pkg unicode, var Sogdian *RangeTable
diff --git a/doc/asm.html b/doc/asm.html
index debb1e2fc6..77defdbd28 100644
--- a/doc/asm.html
+++ b/doc/asm.html
@@ -57,59 +57,66 @@ func main() {
println(3)
}
$ GOOS=linux GOARCH=amd64 go tool compile -S x.go # or: go build -gcflags -S x.go
-
---- prog list "main" ---
-0000 (x.go:3) TEXT main+0(SB),$8-0
-0001 (x.go:3) FUNCDATA $0,gcargs·0+0(SB)
-0002 (x.go:3) FUNCDATA $1,gclocals·0+0(SB)
-0003 (x.go:4) MOVQ $3,(SP)
-0004 (x.go:4) PCDATA $0,$8
-0005 (x.go:4) CALL ,runtime.printint+0(SB)
-0006 (x.go:4) PCDATA $0,$-1
-0007 (x.go:4) PCDATA $0,$0
-0008 (x.go:4) CALL ,runtime.printnl+0(SB)
-0009 (x.go:4) PCDATA $0,$-1
-0010 (x.go:5) RET ,
+"".main STEXT size=74 args=0x0 locals=0x10
+ 0x0000 00000 (x.go:3) TEXT "".main(SB), $16-0
+ 0x0000 00000 (x.go:3) MOVQ (TLS), CX
+ 0x0009 00009 (x.go:3) CMPQ SP, 16(CX)
+ 0x000d 00013 (x.go:3) JLS 67
+ 0x000f 00015 (x.go:3) SUBQ $16, SP
+ 0x0013 00019 (x.go:3) MOVQ BP, 8(SP)
+ 0x0018 00024 (x.go:3) LEAQ 8(SP), BP
+ 0x001d 00029 (x.go:3) FUNCDATA $0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
+ 0x001d 00029 (x.go:3) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
+ 0x001d 00029 (x.go:3) FUNCDATA $2, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
+ 0x001d 00029 (x.go:4) PCDATA $0, $0
+ 0x001d 00029 (x.go:4) PCDATA $1, $0
+ 0x001d 00029 (x.go:4) CALL runtime.printlock(SB)
+ 0x0022 00034 (x.go:4) MOVQ $3, (SP)
+ 0x002a 00042 (x.go:4) CALL runtime.printint(SB)
+ 0x002f 00047 (x.go:4) CALL runtime.printnl(SB)
+ 0x0034 00052 (x.go:4) CALL runtime.printunlock(SB)
+ 0x0039 00057 (x.go:5) MOVQ 8(SP), BP
+ 0x003e 00062 (x.go:5) ADDQ $16, SP
+ 0x0042 00066 (x.go:5) RET
+ 0x0043 00067 (x.go:5) NOP
+ 0x0043 00067 (x.go:3) PCDATA $1, $-1
+ 0x0043 00067 (x.go:3) PCDATA $0, $-1
+ 0x0043 00067 (x.go:3) CALL runtime.morestack_noctxt(SB)
+ 0x0048 00072 (x.go:3) JMP 0
...
The FUNCDATA and PCDATA directives contain information
for use by the garbage collector; they are introduced by the compiler.
-
-
-
-
Constants
@@ -266,7 +273,7 @@ that assembly programming is a fraught endeavor.
-In Go object files and binaries, the full name of a symbol is the
+In Go object files and binaries, the full name of a symbol is the
package path followed by a period and the symbol name:
fmt.Printf or math/rand.Int.
Because the assembler's parser treats period and slash as punctuation,
@@ -485,7 +492,7 @@ even for assembly functions not called directly from Go.
At the start of the function, the arguments are assumed
to be initialized but the results are assumed uninitialized.
If the results will hold live pointers during a call instruction,
-the function should start by zeroing the results and then
+the function should start by zeroing the results and then
executing the pseudo-instruction GO_RESULTS_INITIALIZED.
This instruction records that the results are now initialized
and should be scanned during stack movement and garbage collection.
@@ -503,7 +510,7 @@ on the TEXT instruction.
The pointer information can also be omitted if the
function contains no call instructions.
Otherwise, the local stack frame must not contain pointers,
-and the assembly must confirm this fact by executing the
+and the assembly must confirm this fact by executing the
pseudo-instruction NO_LOCAL_POINTERS.
Because stack resizing is implemented by moving the stack,
the stack pointer may change during any function call:
diff --git a/doc/code.html b/doc/code.html
index b6d41ef68c..1e380001e0 100644
--- a/doc/code.html
+++ b/doc/code.html
@@ -304,12 +304,12 @@ optional: you do not need to use source control to write Go code.
$ cd $GOPATH/src/github.com/user/hello
$ git init
-Initialized empty Git repository in /home/user/work/src/github.com/user/hello/.git/
+Initialized empty Git repository in /home/user/go/src/github.com/user/hello/.git/
$ git add hello.go
$ git commit -m "initial commit"
[master (root-commit) 0b4507d] initial commit
- 1 file changed, 1 insertion(+)
- create mode 100644 hello.go
+ 1 file changed, 7 insertion(+)
+ create mode 100644 hello.go
diff --git a/doc/contribute.html b/doc/contribute.html
index 68b2387d35..6f2287b410 100644
--- a/doc/contribute.html
+++ b/doc/contribute.html
@@ -46,7 +46,8 @@ CLA (Contributor License Agreement).
Step 2: Configure authentication credentials for the Go Git repository.
Visit go.googlesource.com, click
-on "Generate Password" (top right), and follow the instructions.
+on the gear icon (top right), then on "Obtain password", and follow the
+instructions.
Step 3: Register for Gerrit, the code review tool used by the Go team,
diff --git a/doc/debugging_with_gdb.html b/doc/debugging_with_gdb.html
index 3899ac92d5..36ec0bdf37 100644
--- a/doc/debugging_with_gdb.html
+++ b/doc/debugging_with_gdb.html
@@ -149,6 +149,9 @@ Inspecting goroutines:
(gdb) help goroutine
For example:
(gdb) goroutine 12 bt
+You can inspect all goroutines by passing all instead of a specific goroutine's ID.
+For example:
+(gdb) goroutine all bt
diff --git a/doc/devel/release.html b/doc/devel/release.html
index 58f9a585ed..69eec330a8 100644
--- a/doc/devel/release.html
+++ b/doc/devel/release.html
@@ -30,6 +30,45 @@ Go 1.12 is a major release of Go.
Read the Go 1.12 Release Notes for more information.
+Minor revisions
+
+
+go1.12.1 (released 2019/03/14) includes fixes to cgo, the compiler, the go
+command, and the fmt, net/smtp, os,
+path/filepath, sync, and text/template
+packages. See the Go
+1.12.1 milestone on our issue tracker for details.
+
+
+
+go1.12.2 (released 2019/04/05) includes fixes to the compiler, the go
+command, the runtime, and the doc, net,
+net/http/httputil, and os packages. See the
+Go
+1.12.2 milestone on our issue tracker for details.
+
+
+
+go1.12.3 (released 2019/04/08) was accidentally released without its
+intended fix. It is identical to go1.12.2, except for its version
+number. The intended fix is in go1.12.4.
+
+
+
+go1.12.4 (released 2019/04/11) fixes an issue where using the prebuilt binary
+releases on older versions of GNU/Linux
+led to failures
+when linking programs that used cgo.
+Only Linux users who hit this issue need to update.
+
+
+
+go1.12.5 (released 2019/05/06) includes fixes to the compiler, the linker,
+the go command, the runtime, and the os package. See the
+Go
+1.12.5 milestone on our issue tracker for details.
+
+
go1.11 (released 2018/08/24)
@@ -73,6 +112,48 @@ See the Go
+1.11.5 milestone on our issue tracker for details.
+
+
+
+go1.11.6 (released 2019/03/14) includes fixes to cgo, the compiler, linker,
+runtime, go command, and the crypto/x509, encoding/json,
+net, and net/url packages. See the
+Go
+1.11.6 milestone on our issue tracker for details.
+
+
+
+go1.11.7 (released 2019/04/05) includes fixes to the runtime and the
+net packages. See the
+Go
+1.11.7 milestone on our issue tracker for details.
+
+
+
+go1.11.8 (released 2019/04/08) was accidentally released without its
+intended fix. It is identical to go1.11.7, except for its version
+number. The intended fix is in go1.11.9.
+
+
+
+go1.11.9 (released 2019/04/11) fixes an issue where using the prebuilt binary
+releases on older versions of GNU/Linux
+led to failures
+when linking programs that used cgo.
+Only Linux users who hit this issue need to update.
+
+
+
+go1.11.10 (released 2019/05/06) includes fixes to the runtime and the linker.
+See the Go
+1.11.10 milestone on our issue tracker for details.
+
+
go1.10 (released 2018/02/16)
@@ -138,6 +219,13 @@ See the Go
+1.10.8 milestone on our issue tracker for details.
+
+
go1.9 (released 2017/08/24)
diff --git a/doc/effective_go.html b/doc/effective_go.html
index 34131868a4..7bb60a0786 100644
--- a/doc/effective_go.html
+++ b/doc/effective_go.html
@@ -1680,13 +1680,15 @@ maps. Here is a print statement for the time zone map defined in the previous s
fmt.Printf("%v\n", timeZone) // or just fmt.Println(timeZone)
-which gives output
+which gives output:
-map[CST:-21600 PST:-28800 EST:-18000 UTC:0 MST:-25200]
+map[CST:-21600 EST:-18000 MST:-25200 PST:-28800 UTC:0]
-For maps the keys may be output in any order, of course.
+For maps, Printf and friends sort the output lexicographically by key.
+
+
When printing a struct, the modified format %+v annotates the
fields of the structure with their names, and for any value the alternate
format %#v prints the value in full Go syntax.
@@ -1710,7 +1712,7 @@ prints
&{7 -2.35 abc def}
&{a:7 b:-2.35 c:abc def}
&main.T{a:7, b:-2.35, c:"abc\tdef"}
-map[string]int{"CST":-21600, "PST":-28800, "EST":-18000, "UTC":0, "MST":-25200}
+map[string]int{"CST":-21600, "EST":-18000, "MST":-25200, "PST":-28800, "UTC":0}
(Note the ampersands.)
diff --git a/doc/go1.12.html b/doc/go1.12.html
index 30d1960177..cc19c0f31a 100644
--- a/doc/go1.12.html
+++ b/doc/go1.12.html
@@ -185,6 +185,17 @@ tour
that build fails.
+
+ This changed use of the go directive means that if you
+ use Go 1.12 to build a module, thus recording go 1.12
+ in the go.mod file, you will get an error when
+ attempting to build the same module with Go 1.11 through Go 1.11.3.
+ Go 1.11.4 or later will work fine, as will releases older than Go 1.11.
+ If you must use Go 1.11 through 1.11.3, you can avoid the problem by
+ setting the language version to 1.11, using the Go 1.12 go tool,
+ via go mod edit -go=1.11.
+
+
When an import cannot be resolved using the active modules,
the go command will now try to use the modules mentioned in the
@@ -600,17 +611,6 @@ for {
-
- lib/time
- -
-
- The time zone database in $GOROOT/lib/time/zoneinfo.zip
- has been updated to version 2018i. Note that this ZIP file is
- only used if a time zone database is not provided by the operating
- system.
-
-
-
-
- math
-
@@ -791,7 +791,7 @@ for {
A new BuildInfo type
exposes the build information read from the running binary, available only in
binaries built with module support. This includes the main package path, main
- module information, and the module dependencies. This type is given though the
+ module information, and the module dependencies. This type is given through the
ReadBuildInfo function
on BuildInfo.
@@ -924,6 +924,17 @@ for {
+- time
+ -
+
+ The time zone database in $GOROOT/lib/time/zoneinfo.zip
+ has been updated to version 2018i. Note that this ZIP file is
+ only used if a time zone database is not provided by the operating
+ system.
+
+
+
+
- unsafe
-
diff --git a/doc/go1.13.html b/doc/go1.13.html
new file mode 100644
index 0000000000..ef37c92775
--- /dev/null
+++ b/doc/go1.13.html
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
DRAFT RELEASE NOTES - Introduction to Go 1.13
+
+
+
+ Go 1.13 is not yet released. These are work-in-progress
+ release notes. Go 1.13 is expected to be released in August 2019.
+
+
+
+
+TODO
+
+
+Changes to the language
+
+
+TODO
+
+
+Ports
+
+
+TODO
+
+
+Darwin
+
+
+ As announced in the Go 1.12 release notes,
+ Go 1.13 now requires macOS 10.11 El Capitan or later;
+ support for previous versions has been discontinued.
+
+
+FreeBSD
+
+
+ As announced in the Go 1.12 release notes,
+ Go 1.13 now requires FreeBSD 11.2 or later;
+ support for previous versions has been discontinued.
+ FreeBSD 12.0 or later requires a kernel with the COMPAT_FREEBSD11 option set (this is the default).
+
+
+
+
+
+TODO
+
+
+Runtime
+
+
+TODO
+
+
+
+Core library
+
+
+TODO generally
+
+
+TLS 1.3
+
+
+TODO; link to Go 1.12 notes.
+
+
+
+Minor changes to the library
+
+
+ As always, there are various minor changes and updates to the library,
+ made with the Go 1 promise of compatibility
+ in mind.
+
+
+
+TODO
+
+
diff --git a/doc/go_faq.html b/doc/go_faq.html
index 305878f237..dd3ba84cac 100644
--- a/doc/go_faq.html
+++ b/doc/go_faq.html
@@ -2082,8 +2082,8 @@ At the beginning of the project we considered using LLVM for
our performance goals.
More important in retrospect, starting with LLVM would have made it
harder to introduce some of the ABI and related changes, such as
-stack management, that Go requires but not are not part of the
-standard C setup.
+stack management, that Go requires but are not part of the standard
+C setup.
A new LLVM implementation
is starting to come together now, however.
diff --git a/doc/go_spec.html b/doc/go_spec.html
index f3d2320d86..fb4341be1d 100644
--- a/doc/go_spec.html
+++ b/doc/go_spec.html
@@ -1,6 +1,6 @@
@@ -118,6 +118,7 @@ The underscore character _ (U+005F) is considered a letter.
letter = unicode_letter | "_" .
decimal_digit = "0" … "9" .
+binary_digit = "0" | "1" .
octal_digit = "0" … "7" .
hex_digit = "0" … "9" | "A" … "F" | "a" … "f" .
@@ -273,71 +274,156 @@ The following character sequences represent operators
An integer literal is a sequence of digits representing an
integer constant.
-An optional prefix sets a non-decimal base: 0 for octal, 0x or
-0X for hexadecimal. In hexadecimal literals, letters
-a-f and A-F represent values 10 through 15.
+An optional prefix sets a non-decimal base: 0b or 0B
+for binary, 0, 0o, or 0O for octal,
+and 0x or 0X for hexadecimal.
+A single 0 is considered a decimal zero.
+In hexadecimal literals, letters a through f
+and A through F represent values 10 through 15.
+
+
+
+For readability, an underscore character _ may appear after
+a base prefix or between successive digits; such underscores do not change
+the literal's value.
-int_lit = decimal_lit | octal_lit | hex_lit .
-decimal_lit = ( "1" … "9" ) { decimal_digit } .
-octal_lit = "0" { octal_digit } .
-hex_lit = "0" ( "x" | "X" ) hex_digit { hex_digit } .
+int_lit = decimal_lit | binary_lit | octal_lit | hex_lit .
+decimal_lit = "0" | ( "1" … "9" ) [ [ "_" ] decimal_digits ] .
+binary_lit = "0" ( "b" | "B" ) [ "_" ] binary_digits .
+octal_lit = "0" [ "o" | "O" ] [ "_" ] octal_digits .
+hex_lit = "0" ( "x" | "X" ) [ "_" ] hex_digits .
+
+decimal_digits = decimal_digit { [ "_" ] decimal_digit } .
+binary_digits = binary_digit { [ "_" ] binary_digit } .
+octal_digits = octal_digit { [ "_" ] octal_digit } .
+hex_digits = hex_digit { [ "_" ] hex_digit } .
42
+4_2
0600
+0_600
+0o600
+0O600 // second character is capital letter 'O'
0xBadFace
+0xBad_Face
+0x_67_7a_2f_cc_40_c6
170141183460469231731687303715884105727
+170_141183_460469_231731_687303_715884_105727
+
+_42 // an identifier, not an integer literal
+42_ // invalid: _ must separate successive digits
+4__2 // invalid: only one _ at a time
+0_xBadFace // invalid: _ must separate successive digits
+
Floating-point literals
+
-A floating-point literal is a decimal representation of a
+A floating-point literal is a decimal or hexadecimal representation of a
floating-point constant.
-It has an integer part, a decimal point, a fractional part,
-and an exponent part. The integer and fractional part comprise
-decimal digits; the exponent part is an e or E
-followed by an optionally signed decimal exponent. One of the
-integer part or the fractional part may be elided; one of the decimal
-point or the exponent may be elided.
+
+
+A decimal floating-point literal consists of an integer part (decimal digits),
+a decimal point, a fractional part (decimal digits), and an exponent part
+(e or E followed by an optional sign and decimal digits).
+One of the integer part or the fractional part may be elided; one of the decimal point
+or the exponent part may be elided.
+An exponent value exp scales the mantissa (integer and fractional part) by 10exp.
+
+
+
+A hexadecimal floating-point literal consists of a 0x or 0X
+prefix, an integer part (hexadecimal digits), a radix point, a fractional part (hexadecimal digits),
+and an exponent part (p or P followed by an optional sign and decimal digits).
+One of the integer part or the fractional part may be elided; the radix point may be elided as well,
+but the exponent part is required. (This syntax matches the one given in IEEE 754-2008 §5.12.3.)
+An exponent value exp scales the mantissa (integer and fractional part) by 2exp.
+
+
+
+For readability, an underscore character _ may appear after
+a base prefix or between successive digits; such underscores do not change
+the literal value.
+
+
-float_lit = decimals "." [ decimals ] [ exponent ] |
- decimals exponent |
- "." decimals [ exponent ] .
-decimals = decimal_digit { decimal_digit } .
-exponent = ( "e" | "E" ) [ "+" | "-" ] decimals .
+float_lit = decimal_float_lit | hex_float_lit .
+
+decimal_float_lit = decimal_digits "." [ decimal_digits ] [ decimal_exponent ] |
+ decimal_digits decimal_exponent |
+ "." decimal_digits [ decimal_exponent ] .
+decimal_exponent = ( "e" | "E" ) [ "+" | "-" ] decimal_digits .
+
+hex_float_lit = "0" ( "x" | "X" ) hex_mantissa hex_exponent .
+hex_mantissa = [ "_" ] hex_digits "." [ hex_digits ] |
+ [ "_" ] hex_digits |
+ "." hex_digits .
+hex_exponent = ( "p" | "P" ) [ "+" | "-" ] decimal_digits .
0.
72.40
-072.40 // == 72.40
+072.40 // == 72.40
2.71828
1.e+0
6.67428e-11
1E6
.25
.12345E+5
+1_5. // == 15.0
+0.15e+0_2 // == 15.0
+
+0x1p-2 // == 0.25
+0x2.p10 // == 2048.0
+0x1.Fp+0 // == 1.9375
+0X.8p-0 // == 0.5
+0X_1FFFP-16 // == 0.1249847412109375
+0x15e-2 // == 0x15e - 2 (integer subtraction)
+
+0x.p1 // invalid: mantissa has no digits
+1p-2 // invalid: p exponent requires hexadecimal mantissa
+0x1.5e-2 // invalid: hexadecimal mantissa requires p exponent
+1_.5 // invalid: _ must separate successive digits
+1._5 // invalid: _ must separate successive digits
+1.5_e1 // invalid: _ must separate successive digits
+1.5e_1 // invalid: _ must separate successive digits
+1.5e1_ // invalid: _ must separate successive digits
+
Imaginary literals
+
-An imaginary literal is a decimal representation of the imaginary part of a
+An imaginary literal represents the imaginary part of a
complex constant.
-It consists of a
-floating-point literal
-or decimal integer followed
-by the lower-case letter i.
+It consists of an integer or
+floating-point literal
+followed by the lower-case letter i.
+The value of an imaginary literal is the value of the respective
+integer or floating-point literal multiplied by the imaginary unit i.
+
-imaginary_lit = (decimals | float_lit) "i" .
+imaginary_lit = (decimal_digits | int_lit | float_lit) "i" .
+
+For backward compatibility, an imaginary literal's integer part consisting
+entirely of decimal digits (and possibly underscores) is considered a decimal
+integer, even if it starts with a leading 0.
+
+
0i
-011i // == 11i
+0123i // == 123i for backward-compatibility
+0o123i // == 0o123 * 1i == 83i
+0xabci // == 0xabc * 1i == 2748i
0.i
2.71828i
1.e+0i
@@ -345,6 +431,7 @@ imaginary_lit = (decimals | float_lit) "i" .
1E6i
.25i
.12345E+5i
+0x1p-2i // == 0x1p-2 * 1i == 0.25i
@@ -361,6 +448,7 @@ of the character itself,
while multi-character sequences beginning with a backslash encode
values in various formats.
+
The simplest form represents the single character within the quotes;
since Go source text is Unicode characters encoded in UTF-8, multiple
@@ -370,6 +458,7 @@ a literal a, Unicode U+0061, value 0x61, while
'ä' holds two bytes (0xc3 0xa4) representing
a literal a-dieresis, U+00E4, value 0xe4.
+
Several backslash escapes allow arbitrary values to be encoded as
ASCII text. There are four ways to represent the integer value
@@ -380,6 +469,7 @@ plain backslash \ followed by exactly three octal digits.
In each case the value of the literal is the value represented by
the digits in the corresponding base.
+
Although these representations all result in an integer, they have
different valid ranges. Octal escapes must represent a value between
@@ -388,9 +478,11 @@ by construction. The escapes \u and \U
represent Unicode code points so within them some values are illegal,
in particular those above 0x10FFFF and surrogate halves.
+
After a backslash, certain single-character escapes represent special values:
+
\a U+0007 alert or bell
\b U+0008 backspace
@@ -403,6 +495,7 @@ After a backslash, certain single-character escapes represent special values:
\' U+0027 single quote (valid escape only within rune literals)
\" U+0022 double quote (valid escape only within string literals)
+
All other sequences starting with a backslash are illegal inside rune literals.
@@ -446,6 +539,7 @@ A string literal represents a string constant
obtained from concatenating a sequence of characters. There are two forms:
raw string literals and interpreted string literals.
+
Raw string literals are character sequences between back quotes, as in
`foo`. Within the quotes, any character may appear except
@@ -457,6 +551,7 @@ contain newlines.
Carriage return characters ('\r') inside raw string literals
are discarded from the raw string value.
+
Interpreted string literals are character sequences between double
quotes, as in "bar".
@@ -596,6 +691,7 @@ precision in the language, a compiler may implement them using an
internal representation with limited precision. That said, every
implementation must:
+
- Represent integer constants with at least 256 bits.
@@ -613,12 +709,14 @@ implementation must:
represent a floating-point or complex constant due to limits
on precision.
+
These requirements apply both to literal constants and to the result
of evaluating constant
expressions.
+
Variables
@@ -2415,10 +2513,24 @@ For array and slice literals the following rules apply:
generates a pointer to a unique variable initialized
with the literal's value.
+
var pointer *Point3D = &Point3D{y: 1000}
+
+Note that the zero value for a slice or map
+type is not the same as an initialized but empty value of the same type.
+Consequently, taking the address of an empty slice or map composite literal
+does not have the same effect as allocating a new slice or map value with
+new.
+
+
+
+p1 := &[]int{} // p1 points to an initialized, empty slice with value []int{} and length 0
+p2 := new([]int) // p2 points to an uninitialized slice with value nil and length 0
+
+
The length of an array literal is the length specified in the literal type.
If fewer elements than the length are provided in the literal, the missing
@@ -3150,6 +3262,14 @@ is a nil slice. Otherwise, if the result is a slice, it shares its
array with the operand.
+
+var a [10]int
+s1 := a[3:7] // underlying array of s1 is array a; &s1[2] == &a[5]
+s2 := s1[1:4] // underlying array of s2 is underlying array of s1 which is array a; &s2[1] == &a[5]
+s2[1] = 42 // s2[1] == s1[2] == a[5] == 42; they all refer to the same underlying array element
+
+
+
Full slice expressions
@@ -3386,7 +3506,7 @@ within Greeting, who will have the value
-If the final argument is assignable to a slice type []T, it may be
+If the final argument is assignable to a slice type []T, it is
passed unchanged as the value for a ...T parameter if the argument
is followed by .... In this case no new slice is created.
@@ -6264,16 +6384,16 @@ var t T
Package initialization
-Within a package, package-level variables are initialized in
-declaration order but after any of the variables
-they depend on.
+Within a package, package-level variable initialization proceeds stepwise,
+with each step selecting the variable earliest in declaration order
+which has no dependencies on uninitialized variables.
More precisely, a package-level variable is considered ready for
initialization if it is not yet initialized and either has
no initialization expression or
-its initialization expression has no dependencies on uninitialized variables.
+its initialization expression has no dependencies on uninitialized variables.
Initialization proceeds by repeatedly initializing the next package-level
variable that is earliest in declaration order and ready for initialization,
until there are no variables ready for initialization.
@@ -6285,6 +6405,23 @@ process ends, those variables are part of one or more initialization cycles,
and the program is not valid.
+
+Multiple variables on the left-hand side of a variable declaration initialized
+by single (multi-valued) expression on the right-hand side are initialized
+together: If any of the variables on the left-hand side is initialized, all
+those variables are initialized in the same step.
+
+
+
+var x = a
+var a, b = f() // a and b are initialized together, before x is initialized
+
+
+
+For the purpose of package initialization, blank
+variables are treated like any other variables in declarations.
+
+
The declaration order of variables declared in multiple files is determined
by the order in which the files are presented to the compiler: Variables
@@ -6326,22 +6463,16 @@ or to a function or method that depends on y.
-
-Dependency analysis is performed per package; only references referring
-to variables, functions, and methods declared in the current package
-are considered.
-
-
For example, given the declarations
var (
- a = c + b
- b = f()
- c = f()
- d = 3
+ a = c + b // == 9
+ b = f() // == 4
+ c = f() // == 5
+ d = 3 // == 5 after initialization has finished
)
func f() int {
@@ -6352,6 +6483,39 @@ func f() int {
the initialization order is d, b, c, a.
+Note that the order of subexpressions in initialization expressions is irrelevant:
+a = c + b and a = b + c result in the same initialization
+order in this example.
+
+
+
+Dependency analysis is performed per package; only references referring
+to variables, functions, and (non-interface) methods declared in the current
+package are considered. If other, hidden, data dependencies exists between
+variables, the initialization order between those variables is unspecified.
+
+
+
+For instance, given the declarations
+
+
+
+var x = I(T{}).ab() // x has an undetected, hidden dependency on a and b
+var _ = sideEffect() // unrelated to x, a, or b
+var a = b
+var b = 42
+
+type I interface { ab() []int }
+type T struct{}
+func (T) ab() []int { return []int{a, b} }
+
+
+
+the variable a will be initialized after b but
+whether x is initialized before b, between
+b and a, or after a, and
+thus also the moment at which sideEffect() is called (before
+or after x is initialized) is not specified.
diff --git a/doc/install-source.html b/doc/install-source.html
index bbe7cdfd00..6a0c3844ae 100644
--- a/doc/install-source.html
+++ b/doc/install-source.html
@@ -627,6 +627,29 @@ contains further details regarding Go's ARM support.
+$GOPPC64 (for ppc64 and ppc64le only)
+
+This variable sets the processor level (i.e. Instruction Set Architecture version)
+for which the compiler will target. The default is power8.
+
+
+ GOPPC64=power8: generate ISA v2.07 instructions
+ GOPPC64=power9: generate ISA v3.00 instructions
+
+
+
+
+$GOWASM (for wasm only)
+
+ This variable is a comma separated list of experimental WebAssembly features that the compiled WebAssembly binary is allowed to use.
+ The default is to use no experimental features.
+
+
+
+
diff --git a/doc/install.html b/doc/install.html
index a41c60ba6c..05b6d0538c 100644
--- a/doc/install.html
+++ b/doc/install.html
@@ -50,7 +50,7 @@ If your OS or architecture is not on the list, you may be able to
| FreeBSD 10.3 or later | amd64, 386 | Debian GNU/kFreeBSD not supported |
| Linux 2.6.23 or later with glibc | amd64, 386, arm, arm64, s390x, ppc64le | CentOS/RHEL 5.x not supported. Install from source for other libc. |
| macOS 10.10 or later | amd64 | use the clang or gcc† that comes with Xcode‡ for cgo support |
-| Windows 7, Server 2008R2 or later | amd64, 386 | use MinGW gcc†. No need for cygwin or msys. |
+| Windows 7, Server 2008R2 or later | amd64, 386 | use MinGW (386) or MinGW-W64 (amd64) gcc†. No need for cygwin or msys. |
@@ -204,7 +204,7 @@ you will need to set the G
-Next, make the directory src/hello inside your workspace,
+Next, make the directory src/hellosrc\hello inside your workspace,
and in that directory create a file named hello.go that looks like:
diff --git a/misc/android/README b/misc/android/README
index 38e7cf41e3..13b59d92f4 100644
--- a/misc/android/README
+++ b/misc/android/README
@@ -12,7 +12,7 @@ C compiler from the Android NDK. For example,
CGO_ENABLED=1 \
GOOS=android \
GOARCH=arm64 \
- CC=$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang \
+ CC_FOR_TARGET=$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang \
./all.bash
To run tests on the Android device, add the bin directory to PATH so the
diff --git a/misc/android/go_android_exec.go b/misc/android/go_android_exec.go
index fa84f00f67..7aa7fe56fc 100644
--- a/misc/android/go_android_exec.go
+++ b/misc/android/go_android_exec.go
@@ -10,6 +10,7 @@ package main
import (
"bytes"
+ "errors"
"fmt"
"go/build"
"io"
@@ -25,12 +26,9 @@ import (
"syscall"
)
-func run(args ...string) string {
- if flags := os.Getenv("GOANDROID_ADB_FLAGS"); flags != "" {
- args = append(strings.Split(flags, " "), args...)
- }
+func run(args ...string) (string, error) {
+ cmd := adbCmd(args...)
buf := new(bytes.Buffer)
- cmd := exec.Command("adb", args...)
cmd.Stdout = io.MultiWriter(os.Stdout, buf)
// If the adb subprocess somehow hangs, go test will kill this wrapper
// and wait for our os.Stderr (and os.Stdout) to close as a result.
@@ -42,69 +40,113 @@ func run(args ...string) string {
// forcing cmd.Run to use another pipe and goroutine to pass
// along stderr from adb.
cmd.Stderr = struct{ io.Writer }{os.Stderr}
- log.Printf("adb %s", strings.Join(args, " "))
err := cmd.Run()
if err != nil {
- log.Fatalf("adb %s: %v", strings.Join(args, " "), err)
+ return "", fmt.Errorf("adb %s: %v", strings.Join(args, " "), err)
}
- return buf.String()
+ return buf.String(), nil
+}
+
+func adb(args ...string) error {
+ if out, err := adbCmd(args...).CombinedOutput(); err != nil {
+ fmt.Fprintf(os.Stderr, "adb %s\n%s", strings.Join(args, " "), out)
+ return err
+ }
+ return nil
+}
+
+func adbCmd(args ...string) *exec.Cmd {
+ if flags := os.Getenv("GOANDROID_ADB_FLAGS"); flags != "" {
+ args = append(strings.Split(flags, " "), args...)
+ }
+ return exec.Command("adb", args...)
}
const (
- // Directory structure on the target device androidtest.bash assumes.
- deviceGoroot = "/data/local/tmp/goroot"
- deviceGopath = "/data/local/tmp/gopath"
+ deviceRoot = "/data/local/tmp/go_android_exec"
+ deviceGoroot = deviceRoot + "/goroot"
)
func main() {
log.SetFlags(0)
log.SetPrefix("go_android_exec: ")
+ exitCode, err := runMain()
+ if err != nil {
+ log.Fatal(err)
+ }
+ os.Exit(exitCode)
+}
+func runMain() (int, error) {
// Concurrent use of adb is flaky, so serialize adb commands.
// See https://github.com/golang/go/issues/23795 or
// https://issuetracker.google.com/issues/73230216.
lockPath := filepath.Join(os.TempDir(), "go_android_exec-adb-lock")
lock, err := os.OpenFile(lockPath, os.O_CREATE|os.O_RDWR, 0666)
if err != nil {
- log.Fatal(err)
+ return 0, err
}
defer lock.Close()
if err := syscall.Flock(int(lock.Fd()), syscall.LOCK_EX); err != nil {
- log.Fatal(err)
+ return 0, err
}
- // In case we're booting a device or emulator alongside androidtest.bash
- // wait for it to be ready. adb wait-for-device is not enough, we have to
+ // In case we're booting a device or emulator alongside all.bash, wait for
+ // it to be ready. adb wait-for-device is not enough, we have to
// wait for sys.boot_completed.
- run("wait-for-device", "shell", "while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;")
+ if err := adb("wait-for-device", "exec-out", "while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;"); err != nil {
+ return 0, err
+ }
+
+ // Done once per make.bash.
+ if err := adbCopyGoroot(); err != nil {
+ return 0, err
+ }
// Prepare a temporary directory that will be cleaned up at the end.
- deviceGotmp := fmt.Sprintf("/data/local/tmp/%s-%d",
- filepath.Base(os.Args[1]), os.Getpid())
- run("shell", "mkdir", "-p", deviceGotmp)
+ // Binary names can conflict.
+ // E.g. template.test from the {html,text}/template packages.
+ binName := filepath.Base(os.Args[1])
+ deviceGotmp := fmt.Sprintf(deviceRoot+"/%s-%d", binName, os.Getpid())
+ deviceGopath := deviceGotmp + "/gopath"
+ defer adb("exec-out", "rm", "-rf", deviceGotmp) // Clean up.
// Determine the package by examining the current working
// directory, which will look something like
// "$GOROOT/src/mime/multipart" or "$GOPATH/src/golang.org/x/mobile".
// We extract everything after the $GOROOT or $GOPATH to run on the
// same relative directory on the target device.
- subdir, inGoRoot := subdir()
- deviceCwd := filepath.Join(deviceGoroot, subdir)
- if !inGoRoot {
- deviceCwd = filepath.Join(deviceGopath, subdir)
- } else {
- adbSyncGoroot()
+ subdir, inGoRoot, err := subdir()
+ if err != nil {
+ return 0, err
+ }
+ deviceCwd := filepath.Join(deviceGopath, subdir)
+ if inGoRoot {
+ deviceCwd = filepath.Join(deviceGoroot, subdir)
+ } else {
+ if err := adb("exec-out", "mkdir", "-p", deviceCwd); err != nil {
+ return 0, err
+ }
+ if err := adbCopyTree(deviceCwd, subdir); err != nil {
+ return 0, err
+ }
+
+ // Copy .go files from the package.
+ goFiles, err := filepath.Glob("*.go")
+ if err != nil {
+ return 0, err
+ }
+ if len(goFiles) > 0 {
+ args := append(append([]string{"push"}, goFiles...), deviceCwd)
+ if err := adb(args...); err != nil {
+ return 0, err
+ }
+ }
}
- run("shell", "mkdir", "-p", deviceCwd)
- // Binary names can conflict.
- // E.g. template.test from the {html,text}/template packages.
- binName := fmt.Sprintf("%s-%d", filepath.Base(os.Args[1]), os.Getpid())
deviceBin := fmt.Sprintf("%s/%s", deviceGotmp, binName)
- run("push", os.Args[1], deviceBin)
-
- if _, err := os.Stat("testdata"); err == nil {
- run("push", "testdata", deviceCwd)
+ if err := adb("push", os.Args[1], deviceBin); err != nil {
+ return 0, err
}
// Forward SIGQUIT from the go command to show backtraces from
@@ -115,108 +157,185 @@ func main() {
for range quit {
// We don't have the PID of the running process; use the
// binary name instead.
- run("shell", "killall -QUIT "+binName)
+ adb("exec-out", "killall -QUIT "+binName)
}
}()
- // The adb shell command will return an exit code of 0 regardless
- // of the command run. E.g.
- // $ adb shell false
- // $ echo $?
- // 0
+ // In light of
// https://code.google.com/p/android/issues/detail?id=3254
- // So we append the exitcode to the output and parse it from there.
+ // dont trust the exitcode of adb. Instead, append the exitcode to
+ // the output and parse it from there.
const exitstr = "exitcode="
cmd := `export TMPDIR="` + deviceGotmp + `"` +
`; export GOROOT="` + deviceGoroot + `"` +
`; export GOPATH="` + deviceGopath + `"` +
+ `; export CGO_ENABLED=0` +
+ `; export GOPROXY=` + os.Getenv("GOPROXY") +
+ `; export GOCACHE="` + deviceRoot + `/gocache"` +
+ `; export PATH=$PATH:"` + deviceGoroot + `/bin"` +
`; cd "` + deviceCwd + `"` +
"; '" + deviceBin + "' " + strings.Join(os.Args[2:], " ") +
"; echo -n " + exitstr + "$?"
- output := run("shell", cmd)
+ output, err := run("exec-out", cmd)
signal.Reset(syscall.SIGQUIT)
close(quit)
-
- run("shell", "rm", "-rf", deviceGotmp) // Clean up.
+ if err != nil {
+ return 0, err
+ }
exitIdx := strings.LastIndex(output, exitstr)
if exitIdx == -1 {
- log.Fatalf("no exit code: %q", output)
+ return 0, fmt.Errorf("no exit code: %q", output)
}
code, err := strconv.Atoi(output[exitIdx+len(exitstr):])
if err != nil {
- log.Fatalf("bad exit code: %v", err)
+ return 0, fmt.Errorf("bad exit code: %v", err)
}
- os.Exit(code)
+ return code, nil
}
// subdir determines the package based on the current working directory,
// and returns the path to the package source relative to $GOROOT (or $GOPATH).
-func subdir() (pkgpath string, underGoRoot bool) {
+func subdir() (pkgpath string, underGoRoot bool, err error) {
cwd, err := os.Getwd()
if err != nil {
- log.Fatal(err)
+ return "", false, err
}
- if root := runtime.GOROOT(); strings.HasPrefix(cwd, root) {
- subdir, err := filepath.Rel(root, cwd)
- if err != nil {
- log.Fatal(err)
+ cwd, err = filepath.EvalSymlinks(cwd)
+ if err != nil {
+ return "", false, err
+ }
+ goroot, err := filepath.EvalSymlinks(runtime.GOROOT())
+ if err != nil {
+ return "", false, err
+ }
+ if subdir, err := filepath.Rel(goroot, cwd); err == nil {
+ if !strings.Contains(subdir, "..") {
+ return subdir, true, nil
}
- return subdir, true
}
for _, p := range filepath.SplitList(build.Default.GOPATH) {
- if !strings.HasPrefix(cwd, p) {
- continue
+ pabs, err := filepath.EvalSymlinks(p)
+ if err != nil {
+ return "", false, err
}
- subdir, err := filepath.Rel(p, cwd)
- if err == nil {
- return subdir, false
+ if subdir, err := filepath.Rel(pabs, cwd); err == nil {
+ if !strings.Contains(subdir, "..") {
+ return subdir, false, nil
+ }
}
}
- log.Fatalf("the current path %q is not in either GOROOT(%q) or GOPATH(%q)",
+ return "", false, fmt.Errorf("the current path %q is not in either GOROOT(%q) or GOPATH(%q)",
cwd, runtime.GOROOT(), build.Default.GOPATH)
- return "", false
}
-// adbSyncGoroot ensures that files necessary for testing the Go standard
-// packages are present on the attached device.
-func adbSyncGoroot() {
+// adbCopyTree copies testdata, go.mod, go.sum files from subdir
+// and from parent directories all the way up to the root of subdir.
+// go.mod and go.sum files are needed for the go tool modules queries,
+// and the testdata directories for tests. It is common for tests to
+// reach out into testdata from parent packages.
+func adbCopyTree(deviceCwd, subdir string) error {
+ dir := ""
+ for {
+ for _, path := range []string{"testdata", "go.mod", "go.sum"} {
+ path := filepath.Join(dir, path)
+ if _, err := os.Stat(path); err != nil {
+ continue
+ }
+ devicePath := filepath.Join(deviceCwd, dir)
+ if err := adb("exec-out", "mkdir", "-p", devicePath); err != nil {
+ return err
+ }
+ if err := adb("push", path, devicePath); err != nil {
+ return err
+ }
+ }
+ if subdir == "." {
+ break
+ }
+ subdir = filepath.Dir(subdir)
+ dir = filepath.Join(dir, "..")
+ }
+ return nil
+}
+
+// adbCopyGoroot clears deviceRoot for previous versions of GOROOT, GOPATH
+// and temporary data. Then, it copies relevant parts of GOROOT to the device,
+// including the go tool built for android.
+// A lock file ensures this only happens once, even with concurrent exec
+// wrappers.
+func adbCopyGoroot() error {
// Also known by cmd/dist. The bootstrap command deletes the file.
statPath := filepath.Join(os.TempDir(), "go_android_exec-adb-sync-status")
stat, err := os.OpenFile(statPath, os.O_CREATE|os.O_RDWR, 0666)
if err != nil {
- log.Fatal(err)
+ return err
}
defer stat.Close()
- // Serialize check and syncing.
+ // Serialize check and copying.
if err := syscall.Flock(int(stat.Fd()), syscall.LOCK_EX); err != nil {
- log.Fatal(err)
+ return err
}
s, err := ioutil.ReadAll(stat)
if err != nil {
- log.Fatal(err)
+ return err
}
if string(s) == "done" {
- return
+ return nil
+ }
+ // Delete GOROOT, GOPATH and any leftover test data.
+ if err := adb("exec-out", "rm", "-rf", deviceRoot); err != nil {
+ return err
+ }
+ deviceBin := filepath.Join(deviceGoroot, "bin")
+ if err := adb("exec-out", "mkdir", "-p", deviceBin); err != nil {
+ return err
}
- devRoot := "/data/local/tmp/goroot"
- run("shell", "rm", "-rf", devRoot)
- run("shell", "mkdir", "-p", devRoot+"/pkg")
goroot := runtime.GOROOT()
+ // Build go for android.
goCmd := filepath.Join(goroot, "bin", "go")
- runtimea, err := exec.Command(goCmd, "list", "-f", "{{.Target}}", "runtime").Output()
+ tmpGo, err := ioutil.TempFile("", "go_android_exec-cmd-go-*")
if err != nil {
- log.Fatal(err)
+ return err
}
+ tmpGo.Close()
+ defer os.Remove(tmpGo.Name())
+
+ if out, err := exec.Command(goCmd, "build", "-o", tmpGo.Name(), "cmd/go").CombinedOutput(); err != nil {
+ return fmt.Errorf("failed to build go tool for device: %s\n%v", out, err)
+ }
+ deviceGo := filepath.Join(deviceBin, "go")
+ if err := adb("push", tmpGo.Name(), deviceGo); err != nil {
+ return err
+ }
+ for _, dir := range []string{"src", "test", "lib", "api"} {
+ if err := adb("push", filepath.Join(goroot, dir), filepath.Join(deviceGoroot)); err != nil {
+ return err
+ }
+ }
+
+ // Copy only the relevant from pkg.
+ if err := adb("exec-out", "mkdir", "-p", filepath.Join(deviceGoroot, "pkg", "tool")); err != nil {
+ return err
+ }
+ if err := adb("push", filepath.Join(goroot, "pkg", "include"), filepath.Join(deviceGoroot, "pkg")); err != nil {
+ return err
+ }
+ runtimea, err := exec.Command(goCmd, "list", "-f", "{{.Target}}", "runtime").Output()
pkgdir := filepath.Dir(string(runtimea))
if pkgdir == "" {
- log.Fatal("could not find android pkg dir")
+ return errors.New("could not find android pkg dir")
}
- for _, dir := range []string{"src", "test", "lib"} {
- run("push", filepath.Join(goroot, dir), filepath.Join(devRoot))
+ if err := adb("push", pkgdir, filepath.Join(deviceGoroot, "pkg")); err != nil {
+ return err
}
- run("push", filepath.Join(pkgdir), filepath.Join(devRoot, "pkg/"))
+ tooldir := filepath.Join(goroot, "pkg", "tool", filepath.Base(pkgdir))
+ if err := adb("push", tooldir, filepath.Join(deviceGoroot, "pkg", "tool")); err != nil {
+ return err
+ }
+
if _, err := stat.Write([]byte("done")); err != nil {
- log.Fatal(err)
+ return err
}
+ return nil
}
diff --git a/misc/cgo/fortran/test.bash b/misc/cgo/fortran/test.bash
index 1e0d59ea1c..9498da0208 100755
--- a/misc/cgo/fortran/test.bash
+++ b/misc/cgo/fortran/test.bash
@@ -14,12 +14,17 @@ goos=$(go env GOOS)
libext="so"
if [ "$goos" = "darwin" ]; then
libext="dylib"
+elif [ "$goos" = "aix" ]; then
+ libtext="a"
fi
case "$FC" in
*gfortran*)
libpath=$(dirname $($FC -print-file-name=libgfortran.$libext))
- export CGO_LDFLAGS="$CGO_LDFLAGS -Wl,-rpath,$libpath -L $libpath"
+ if [ "$goos" != "aix" ]; then
+ RPATH_FLAG="-Wl,-rpath,$libpath"
+ fi
+ export CGO_LDFLAGS="$CGO_LDFLAGS $RPATH_FLAG -L $libpath"
;;
esac
diff --git a/misc/cgo/life/life_test.go b/misc/cgo/life/life_test.go
index 0f024c9d1d..3c95d87d8a 100644
--- a/misc/cgo/life/life_test.go
+++ b/misc/cgo/life/life_test.go
@@ -46,6 +46,9 @@ func testMain(m *testing.M) int {
}
func TestTestRun(t *testing.T) {
+ if os.Getenv("GOOS") == "android" {
+ t.Skip("the go tool runs with CGO_ENABLED=0 on the android device")
+ }
out, err := exec.Command("go", "env", "GOROOT").Output()
if err != nil {
t.Fatal(err)
diff --git a/misc/cgo/stdio/stdio_test.go b/misc/cgo/stdio/stdio_test.go
index 85ab6ae3e5..ab5d328f67 100644
--- a/misc/cgo/stdio/stdio_test.go
+++ b/misc/cgo/stdio/stdio_test.go
@@ -46,6 +46,9 @@ func testMain(m *testing.M) int {
}
func TestTestRun(t *testing.T) {
+ if os.Getenv("GOOS") == "android" {
+ t.Skip("subpackage stdio is not available on android")
+ }
out, err := exec.Command("go", "env", "GOROOT").Output()
if err != nil {
t.Fatal(err)
diff --git a/misc/cgo/test/callback.go b/misc/cgo/test/callback.go
index d48aeaabd9..e749650293 100644
--- a/misc/cgo/test/callback.go
+++ b/misc/cgo/test/callback.go
@@ -199,7 +199,7 @@ func testCallbackCallers(t *testing.T) {
t.Errorf("expected %d frames, got %d", len(name), n)
}
for i := 0; i < n; i++ {
- f := runtime.FuncForPC(pc[i])
+ f := runtime.FuncForPC(pc[i] - 1) // TODO: use runtime.CallersFrames
if f == nil {
t.Fatalf("expected non-nil Func for pc %d", pc[i])
}
diff --git a/misc/cgo/test/cgo_linux_test.go b/misc/cgo/test/cgo_linux_test.go
index c2e96b5387..7b56e11a27 100644
--- a/misc/cgo/test/cgo_linux_test.go
+++ b/misc/cgo/test/cgo_linux_test.go
@@ -4,8 +4,16 @@
package cgotest
-import "testing"
+import (
+ "runtime"
+ "testing"
+)
-func TestSetgid(t *testing.T) { testSetgid(t) }
+func TestSetgid(t *testing.T) {
+ if runtime.GOOS == "android" {
+ t.Skip("unsupported on Android")
+ }
+ testSetgid(t)
+}
func Test6997(t *testing.T) { test6997(t) }
func TestBuildID(t *testing.T) { testBuildID(t) }
diff --git a/misc/cgo/test/cgo_test.go b/misc/cgo/test/cgo_test.go
index 2d6d269608..7f886bad68 100644
--- a/misc/cgo/test/cgo_test.go
+++ b/misc/cgo/test/cgo_test.go
@@ -56,6 +56,7 @@ func Test25143(t *testing.T) { test25143(t) }
func Test26066(t *testing.T) { test26066(t) }
func Test27660(t *testing.T) { test27660(t) }
func Test28896(t *testing.T) { test28896(t) }
+func Test29878(t *testing.T) { test29878(t) }
func Test30065(t *testing.T) { test30065(t) }
func TestAlign(t *testing.T) { testAlign(t) }
func TestAtol(t *testing.T) { testAtol(t) }
diff --git a/misc/cgo/test/cthread_unix.c b/misc/cgo/test/cthread_unix.c
index 6323e4980e..247d636d06 100644
--- a/misc/cgo/test/cthread_unix.c
+++ b/misc/cgo/test/cthread_unix.c
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
#include
#include "_cgo_export.h"
diff --git a/misc/cgo/test/env.go b/misc/cgo/test/env.go
index b2081b7283..e0703e1452 100644
--- a/misc/cgo/test/env.go
+++ b/misc/cgo/test/env.go
@@ -18,8 +18,8 @@ import (
// This is really an os package test but here for convenience.
func testSetEnv(t *testing.T) {
if runtime.GOOS == "windows" {
- // Go uses SetEnvironmentVariable on windows. Howerver,
- // C runtime takes a *copy* at process startup of thei
+ // Go uses SetEnvironmentVariable on windows. However,
+ // C runtime takes a *copy* at process startup of the
// OS environment, and stores it in environ/envp.
// It is this copy that getenv/putenv manipulate.
t.Logf("skipping test")
diff --git a/misc/cgo/test/issue18146.go b/misc/cgo/test/issue18146.go
index 6483903fed..0605a24ee9 100644
--- a/misc/cgo/test/issue18146.go
+++ b/misc/cgo/test/issue18146.go
@@ -46,6 +46,8 @@ func test18146(t *testing.T) {
switch runtime.GOOS {
default:
setNproc = false
+ case "aix":
+ nproc = 9
case "linux":
nproc = 6
case "darwin", "dragonfly", "freebsd", "netbsd", "openbsd":
diff --git a/misc/cgo/test/issue29781.go b/misc/cgo/test/issue29781.go
index 0fd8c08b8e..c80919dc17 100644
--- a/misc/cgo/test/issue29781.go
+++ b/misc/cgo/test/issue29781.go
@@ -11,7 +11,18 @@ package cgotest
// #define ISSUE29781C 0
import "C"
+var issue29781X struct{ X int }
+
+func issue29781F(...int) int { return 0 }
+
func issue29781G() {
var p *C.char
C.issue29781F(&p, C.ISSUE29781C+1)
+ C.issue29781F(nil, (C.int)(
+ 0))
+ C.issue29781F(&p, (C.int)(0))
+ C.issue29781F(&p, (C.int)(
+ 0))
+ C.issue29781F(&p, (C.int)(issue29781X.
+ X))
}
diff --git a/misc/cgo/test/issue29878.go b/misc/cgo/test/issue29878.go
new file mode 100644
index 0000000000..c1aeaf9709
--- /dev/null
+++ b/misc/cgo/test/issue29878.go
@@ -0,0 +1,20 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cgotest
+
+// #include
+// uint64_t issue29878exported(int8_t); // prototype must match
+// int16_t issue29878function(uint32_t arg) { return issue29878exported(arg); }
+import "C"
+
+import "testing"
+
+func test29878(t *testing.T) {
+ const arg uint32 = 123 // fits into all integer types
+ var ret int16 = C.issue29878function(arg) // no conversions needed
+ if int64(ret) != int64(arg) {
+ t.Errorf("return value unexpected: got %d, want %d", ret, arg)
+ }
+}
diff --git a/misc/cgo/test/issue29878export.go b/misc/cgo/test/issue29878export.go
new file mode 100644
index 0000000000..59727c72fc
--- /dev/null
+++ b/misc/cgo/test/issue29878export.go
@@ -0,0 +1,12 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cgotest
+
+import "C"
+
+//export issue29878exported
+func issue29878exported(arg int8) uint64 {
+ return uint64(arg)
+}
diff --git a/misc/cgo/test/pkg_test.go b/misc/cgo/test/pkg_test.go
index 6857609a10..08e075c022 100644
--- a/misc/cgo/test/pkg_test.go
+++ b/misc/cgo/test/pkg_test.go
@@ -27,7 +27,10 @@ import (
// this shim and move the tests currently located in testdata back into the
// parent directory.
func TestCrossPackageTests(t *testing.T) {
- if runtime.GOOS == "darwin" {
+ switch runtime.GOOS {
+ case "android":
+ t.Skip("Can't exec cmd/go subprocess on Android.")
+ case "darwin":
switch runtime.GOARCH {
case "arm", "arm64":
t.Skip("Can't exec cmd/go subprocess on iOS.")
@@ -56,7 +59,7 @@ func TestCrossPackageTests(t *testing.T) {
cmd.Args = append(cmd.Args, "-short")
}
cmd.Dir = modRoot
- cmd.Env = append(os.Environ(), "GOPATH="+GOPATH)
+ cmd.Env = append(os.Environ(), "GOPATH="+GOPATH, "PWD="+cmd.Dir)
out, err := cmd.CombinedOutput()
if err == nil {
t.Logf("%s:\n%s", strings.Join(cmd.Args, " "), out)
diff --git a/misc/cgo/test/sigaltstack.go b/misc/cgo/test/sigaltstack.go
index 2b7a1ec9ad..2c9b81ced7 100644
--- a/misc/cgo/test/sigaltstack.go
+++ b/misc/cgo/test/sigaltstack.go
@@ -55,7 +55,7 @@ import (
func testSigaltstack(t *testing.T) {
switch {
- case runtime.GOOS == "solaris", runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64"):
+ case runtime.GOOS == "solaris", runtime.GOOS == "illumos", runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64"):
t.Skipf("switching signal stack not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
case runtime.GOOS == "darwin" && runtime.GOARCH == "386":
t.Skipf("sigaltstack fails on darwin/386")
diff --git a/misc/cgo/test/testdata/issue29563.go b/misc/cgo/test/testdata/issue29563.go
new file mode 100644
index 0000000000..84def3ca44
--- /dev/null
+++ b/misc/cgo/test/testdata/issue29563.go
@@ -0,0 +1,12 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build !windows
+
+// Issue 29563: internal linker fails on duplicate weak symbols.
+// No runtime test; just make sure it compiles.
+
+package cgotest
+
+import _ "cgotest/issue29563"
diff --git a/misc/cgo/test/testdata/issue29563/weak.go b/misc/cgo/test/testdata/issue29563/weak.go
new file mode 100644
index 0000000000..21cf635cca
--- /dev/null
+++ b/misc/cgo/test/testdata/issue29563/weak.go
@@ -0,0 +1,13 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package issue29563
+
+//int foo1();
+//int foo2();
+import "C"
+
+func Bar() int {
+ return int(C.foo1()) + int(C.foo2())
+}
diff --git a/misc/cgo/test/testdata/issue29563/weak1.c b/misc/cgo/test/testdata/issue29563/weak1.c
new file mode 100644
index 0000000000..86a22734ad
--- /dev/null
+++ b/misc/cgo/test/testdata/issue29563/weak1.c
@@ -0,0 +1,11 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+extern int weaksym __attribute__((__weak__));
+int weaksym = 42;
+
+int foo1()
+{
+ return weaksym;
+}
diff --git a/misc/cgo/test/testdata/issue29563/weak2.c b/misc/cgo/test/testdata/issue29563/weak2.c
new file mode 100644
index 0000000000..e01eae8b58
--- /dev/null
+++ b/misc/cgo/test/testdata/issue29563/weak2.c
@@ -0,0 +1,11 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+extern int weaksym __attribute__((__weak__));
+int weaksym = 42;
+
+int foo2()
+{
+ return weaksym;
+}
diff --git a/misc/cgo/test/testdata/issue30527.go b/misc/cgo/test/testdata/issue30527.go
new file mode 100644
index 0000000000..4ea7d3177a
--- /dev/null
+++ b/misc/cgo/test/testdata/issue30527.go
@@ -0,0 +1,14 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 30527: function call rewriting casts untyped
+// constants to int because of ":=" usage.
+
+package cgotest
+
+import "cgotest/issue30527"
+
+func issue30527G() {
+ issue30527.G(nil)
+}
diff --git a/misc/cgo/test/testdata/issue30527/a.go b/misc/cgo/test/testdata/issue30527/a.go
new file mode 100644
index 0000000000..eb50147b39
--- /dev/null
+++ b/misc/cgo/test/testdata/issue30527/a.go
@@ -0,0 +1,19 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package issue30527
+
+import "math"
+
+/*
+#include
+
+static void issue30527F(char **p, uint64_t mod, uint32_t unused) {}
+*/
+import "C"
+
+func G(p **C.char) {
+ C.issue30527F(p, math.MaxUint64, 1)
+ C.issue30527F(p, 1<<64-1, Z)
+}
diff --git a/misc/cgo/test/testdata/issue30527/b.go b/misc/cgo/test/testdata/issue30527/b.go
new file mode 100644
index 0000000000..87e8255bd8
--- /dev/null
+++ b/misc/cgo/test/testdata/issue30527/b.go
@@ -0,0 +1,11 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package issue30527
+
+const (
+ X = 1 << iota
+ Y
+ Z
+)
diff --git a/misc/cgo/testcarchive/carchive_test.go b/misc/cgo/testcarchive/carchive_test.go
index 611a770245..381239ab79 100644
--- a/misc/cgo/testcarchive/carchive_test.go
+++ b/misc/cgo/testcarchive/carchive_test.go
@@ -8,6 +8,7 @@ import (
"bufio"
"bytes"
"debug/elf"
+ "flag"
"fmt"
"io/ioutil"
"log"
@@ -36,6 +37,11 @@ var GOOS, GOARCH, GOPATH string
var libgodir string
func TestMain(m *testing.M) {
+ flag.Parse()
+ if testing.Short() && os.Getenv("GO_BUILDER_NAME") == "" {
+ fmt.Printf("SKIP - short mode and $GO_BUILDER_NAME not set\n")
+ os.Exit(0)
+ }
log.SetFlags(log.Lshortfile)
os.Exit(testMain(m))
}
@@ -110,6 +116,11 @@ func testMain(m *testing.M) int {
// TODO(crawshaw): can we do better?
cc = append(cc, []string{"-framework", "CoreFoundation", "-framework", "Foundation"}...)
}
+ if GOOS == "aix" {
+ // -Wl,-bnoobjreorder is mandatory to keep the same layout
+ // in .text section.
+ cc = append(cc, "-Wl,-bnoobjreorder")
+ }
libbase := GOOS + "_" + GOARCH
if runtime.Compiler == "gccgo" {
libbase = "gccgo_" + libgodir + "_fPIC"
@@ -119,7 +130,7 @@ func testMain(m *testing.M) int {
if GOARCH == "arm" || GOARCH == "arm64" {
libbase += "_shared"
}
- case "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "solaris":
+ case "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "solaris", "illumos":
libbase += "_shared"
}
}
@@ -318,8 +329,10 @@ func TestSignalForwarding(t *testing.T) {
}
func TestSignalForwardingExternal(t *testing.T) {
- if GOOS == "freebsd" {
+ if GOOS == "freebsd" || GOOS == "aix" {
t.Skipf("skipping on %s/%s; signal always goes to the Go runtime", GOOS, GOARCH)
+ } else if GOOS == "darwin" && GOARCH == "amd64" {
+ t.Skipf("skipping on %s/%s: runtime does not permit SI_USER SIGSEGV", GOOS, GOARCH)
}
checkSignalForwardingTest(t)
@@ -518,6 +531,9 @@ func TestExtar(t *testing.T) {
if runtime.Compiler == "gccgo" {
t.Skip("skipping -extar test when using gccgo")
}
+ if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") {
+ t.Skip("shell scripts are not executable on iOS hosts")
+ }
defer func() {
os.Remove("libgo4.a")
@@ -594,13 +610,15 @@ func TestPIE(t *testing.T) {
t.Fatal(err)
}
- f, err := elf.Open("testp" + exeSuffix)
- if err != nil {
- t.Fatal("elf.Open failed: ", err)
- }
- defer f.Close()
- if hasDynTag(t, f, elf.DT_TEXTREL) {
- t.Errorf("%s has DT_TEXTREL flag", "testp"+exeSuffix)
+ if GOOS != "aix" {
+ f, err := elf.Open("testp" + exeSuffix)
+ if err != nil {
+ t.Fatal("elf.Open failed: ", err)
+ }
+ defer f.Close()
+ if hasDynTag(t, f, elf.DT_TEXTREL) {
+ t.Errorf("%s has DT_TEXTREL flag", "testp"+exeSuffix)
+ }
}
}
diff --git a/misc/cgo/testcarchive/testdata/main4.c b/misc/cgo/testcarchive/testdata/main4.c
index 4fd55e753d..04f774008f 100644
--- a/misc/cgo/testcarchive/testdata/main4.c
+++ b/misc/cgo/testcarchive/testdata/main4.c
@@ -14,6 +14,13 @@
#include "libgo4.h"
+#ifdef _AIX
+// On AIX, CSIGSTKSZ is too small to handle Go sighandler.
+#define CSIGSTKSZ 0x4000
+#else
+#define CSIGSTKSZ SIGSTKSZ
+#endif
+
static void die(const char* msg) {
perror(msg);
exit(EXIT_FAILURE);
@@ -53,12 +60,12 @@ static void* thread1(void* arg __attribute__ ((unused))) {
// Set up an alternate signal stack for this thread.
memset(&ss, 0, sizeof ss);
- ss.ss_sp = malloc(SIGSTKSZ);
+ ss.ss_sp = malloc(CSIGSTKSZ);
if (ss.ss_sp == NULL) {
die("malloc");
}
ss.ss_flags = 0;
- ss.ss_size = SIGSTKSZ;
+ ss.ss_size = CSIGSTKSZ;
if (sigaltstack(&ss, NULL) < 0) {
die("sigaltstack");
}
@@ -93,7 +100,7 @@ static void* thread1(void* arg __attribute__ ((unused))) {
fprintf(stderr, "sigaltstack disabled on return from Go\n");
ok = 0;
} else if (nss.ss_sp != ss.ss_sp) {
- fprintf(stderr, "sigalstack changed on return from Go\n");
+ fprintf(stderr, "sigaltstack changed on return from Go\n");
ok = 0;
}
@@ -112,12 +119,12 @@ static void* thread2(void* arg __attribute__ ((unused))) {
// Set up an alternate signal stack for this thread.
memset(&ss, 0, sizeof ss);
- ss.ss_sp = malloc(SIGSTKSZ);
+ ss.ss_sp = malloc(CSIGSTKSZ);
if (ss.ss_sp == NULL) {
die("malloc");
}
ss.ss_flags = 0;
- ss.ss_size = SIGSTKSZ;
+ ss.ss_size = CSIGSTKSZ;
if (sigaltstack(&ss, NULL) < 0) {
die("sigaltstack");
}
@@ -150,7 +157,7 @@ static void* thread2(void* arg __attribute__ ((unused))) {
fprintf(stderr, "sigaltstack disabled on return from Go\n");
ok = 0;
} else if (nss.ss_sp != ss.ss_sp) {
- fprintf(stderr, "sigalstack changed on return from Go\n");
+ fprintf(stderr, "sigaltstack changed on return from Go\n");
ok = 0;
}
diff --git a/misc/cgo/testcarchive/testdata/main5.c b/misc/cgo/testcarchive/testdata/main5.c
index 897b70d2fa..d431ce01ce 100644
--- a/misc/cgo/testcarchive/testdata/main5.c
+++ b/misc/cgo/testcarchive/testdata/main5.c
@@ -14,6 +14,8 @@
#include "libgo2.h"
+int *nilp;
+
int main(int argc, char** argv) {
int verbose;
int test;
@@ -39,7 +41,7 @@ int main(int argc, char** argv) {
printf("attempting segfault\n");
}
- volatile int crash = *(int *) 0;
+ *nilp = 0;
break;
}
@@ -85,7 +87,7 @@ int main(int argc, char** argv) {
printf("write(2) unexpectedly succeeded\n");
return 0;
}
- printf("did not receieve SIGPIPE\n");
+ printf("did not receive SIGPIPE\n");
return 0;
}
default:
diff --git a/misc/cgo/testcshared/cshared_test.go b/misc/cgo/testcshared/cshared_test.go
index 833650e5e6..daef3a9e54 100644
--- a/misc/cgo/testcshared/cshared_test.go
+++ b/misc/cgo/testcshared/cshared_test.go
@@ -7,12 +7,14 @@ package cshared_test
import (
"bytes"
"debug/elf"
+ "flag"
"fmt"
"io/ioutil"
"log"
"os"
"os/exec"
"path/filepath"
+ "runtime"
"strings"
"sync"
"testing"
@@ -35,6 +37,11 @@ func TestMain(m *testing.M) {
func testMain(m *testing.M) int {
log.SetFlags(log.Lshortfile)
+ flag.Parse()
+ if testing.Short() && os.Getenv("GO_BUILDER_NAME") == "" {
+ fmt.Printf("SKIP - short mode and $GO_BUILDER_NAME not set\n")
+ os.Exit(0)
+ }
GOOS = goEnv("GOOS")
GOARCH = goEnv("GOARCH")
@@ -45,8 +52,8 @@ func testMain(m *testing.M) int {
}
androiddir = fmt.Sprintf("/data/local/tmp/testcshared-%d", os.Getpid())
- if GOOS == "android" {
- args := append(adbCmd(), "shell", "mkdir", "-p", androiddir)
+ if runtime.GOOS != GOOS && GOOS == "android" {
+ args := append(adbCmd(), "exec-out", "mkdir", "-p", androiddir)
cmd := exec.Command(args[0], args[1:]...)
out, err := cmd.CombinedOutput()
if err != nil {
@@ -104,7 +111,7 @@ func testMain(m *testing.M) int {
if GOARCH == "arm" || GOARCH == "arm64" {
libgodir += "_shared"
}
- case "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "solaris":
+ case "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "solaris", "illumos":
libgodir += "_shared"
}
cc = append(cc, "-I", filepath.Join("pkg", libgodir))
@@ -177,7 +184,7 @@ func adbCmd() []string {
}
func adbPush(t *testing.T, filename string) {
- if GOOS != "android" {
+ if runtime.GOOS == GOOS || GOOS != "android" {
return
}
args := append(adbCmd(), "push", filename, fmt.Sprintf("%s/%s", androiddir, filename))
@@ -191,7 +198,7 @@ func adbRun(t *testing.T, env []string, adbargs ...string) string {
if GOOS != "android" {
t.Fatalf("trying to run adb command when operating system is not android.")
}
- args := append(adbCmd(), "shell")
+ args := append(adbCmd(), "exec-out")
// Propagate LD_LIBRARY_PATH to the adb shell invocation.
for _, e := range env {
if strings.Index(e, "LD_LIBRARY_PATH=") != -1 {
@@ -236,7 +243,7 @@ func run(t *testing.T, extraEnv []string, args ...string) string {
func runExe(t *testing.T, extraEnv []string, args ...string) string {
t.Helper()
- if GOOS == "android" {
+ if runtime.GOOS != GOOS && GOOS == "android" {
return adbRun(t, append(os.Environ(), extraEnv...), args...)
}
return run(t, extraEnv, args...)
@@ -268,7 +275,7 @@ func createHeaders() error {
return fmt.Errorf("command failed: %v\n%v\n%s\n", args, err, out)
}
- if GOOS == "android" {
+ if runtime.GOOS != GOOS && GOOS == "android" {
args = append(adbCmd(), "push", libgoname, fmt.Sprintf("%s/%s", androiddir, libgoname))
cmd = exec.Command(args[0], args[1:]...)
out, err = cmd.CombinedOutput()
@@ -298,7 +305,7 @@ func cleanupAndroid() {
if GOOS != "android" {
return
}
- args := append(adbCmd(), "shell", "rm", "-rf", androiddir)
+ args := append(adbCmd(), "exec-out", "rm", "-rf", androiddir)
cmd := exec.Command(args[0], args[1:]...)
out, err := cmd.CombinedOutput()
if err != nil {
@@ -521,7 +528,7 @@ func TestCachedInstall(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- // defer os.RemoveAll(tmpdir)
+ defer os.RemoveAll(tmpdir)
copyFile(t, filepath.Join(tmpdir, "src", "testcshared", "go.mod"), "go.mod")
copyFile(t, filepath.Join(tmpdir, "src", "testcshared", "libgo", "libgo.go"), filepath.Join("libgo", "libgo.go"))
diff --git a/misc/cgo/testplugin/plugin_test.go b/misc/cgo/testplugin/plugin_test.go
index 2c110494d0..7e2b6eb04c 100644
--- a/misc/cgo/testplugin/plugin_test.go
+++ b/misc/cgo/testplugin/plugin_test.go
@@ -7,6 +7,7 @@ package plugin_test
import (
"bytes"
"context"
+ "flag"
"fmt"
"io/ioutil"
"log"
@@ -22,8 +23,16 @@ import (
var gcflags string = os.Getenv("GO_GCFLAGS")
func TestMain(m *testing.M) {
+ flag.Parse()
+ if testing.Short() && os.Getenv("GO_BUILDER_NAME") == "" {
+ fmt.Printf("SKIP - short mode and $GO_BUILDER_NAME not set\n")
+ os.Exit(0)
+ }
log.SetFlags(log.Lshortfile)
+ os.Exit(testMain(m))
+}
+func testMain(m *testing.M) int {
// Copy testdata into GOPATH/src/testarchive, along with a go.mod file
// declaring the same path.
@@ -77,7 +86,7 @@ func TestMain(m *testing.M) {
goCmd(nil, "build", "-buildmode=plugin", "-o=unnamed2.so", "./unnamed2/main.go")
goCmd(nil, "build", "-o", "host.exe", "./host")
- os.Exit(m.Run())
+ return m.Run()
}
func goCmd(t *testing.T, op string, args ...string) {
diff --git a/misc/cgo/testplugin/testdata/iface/main.go b/misc/cgo/testplugin/testdata/iface/main.go
index 7b4ea97442..c04f28880f 100644
--- a/misc/cgo/testplugin/testdata/iface/main.go
+++ b/misc/cgo/testplugin/testdata/iface/main.go
@@ -5,9 +5,10 @@
package main
import (
- "testplugin/iface_i"
"log"
"plugin"
+
+ "testplugin/iface_i"
)
func main() {
diff --git a/misc/cgo/testplugin/testdata/plugin1/plugin1.go b/misc/cgo/testplugin/testdata/plugin1/plugin1.go
index 136c179b65..d29d674ade 100644
--- a/misc/cgo/testplugin/testdata/plugin1/plugin1.go
+++ b/misc/cgo/testplugin/testdata/plugin1/plugin1.go
@@ -8,8 +8,9 @@ package main
import "C"
import (
- "testplugin/common"
"reflect"
+
+ "testplugin/common"
)
func F() int {
diff --git a/misc/cgo/testplugin/testdata/plugin2/plugin2.go b/misc/cgo/testplugin/testdata/plugin2/plugin2.go
index 37168a13e1..31ed642ca5 100644
--- a/misc/cgo/testplugin/testdata/plugin2/plugin2.go
+++ b/misc/cgo/testplugin/testdata/plugin2/plugin2.go
@@ -12,9 +12,10 @@ import "C"
// void cfunc() {} // uses cgo_topofstack
import (
- "testplugin/common"
"reflect"
"strings"
+
+ "testplugin/common"
)
func init() {
diff --git a/misc/cgo/testshared/testdata/exe/exe.go b/misc/cgo/testshared/testdata/exe/exe.go
index 86582581a6..ee95f97bc9 100644
--- a/misc/cgo/testshared/testdata/exe/exe.go
+++ b/misc/cgo/testshared/testdata/exe/exe.go
@@ -1,10 +1,11 @@
package main
import (
- "testshared/depBase"
"os"
"reflect"
"runtime"
+
+ "testshared/depBase"
)
// Having a function declared in the main package triggered
diff --git a/misc/cgo/testso/so_test.go b/misc/cgo/testso/so_test.go
index 500b08fae8..9c7f272439 100644
--- a/misc/cgo/testso/so_test.go
+++ b/misc/cgo/testso/so_test.go
@@ -25,7 +25,9 @@ func requireTestSOSupported(t *testing.T) {
t.Skip("No exec facility on iOS.")
}
case "ppc64":
- t.Skip("External linking not implemented on ppc64 (issue #8912).")
+ if runtime.GOOS == "linux" {
+ t.Skip("External linking not implemented on aix/ppc64 (issue #8912).")
+ }
case "mips64le", "mips64":
t.Skip("External linking not implemented on mips64.")
}
@@ -80,6 +82,8 @@ func TestSO(t *testing.T) {
case "windows":
ext = "dll"
args = append(args, "-DEXPORT_DLL")
+ case "aix":
+ ext = "so.1"
}
sofname := "libcgosotest." + ext
args = append(args, "-o", sofname, "cgoso_c.c")
@@ -93,6 +97,16 @@ func TestSO(t *testing.T) {
}
t.Logf("%s:\n%s", strings.Join(cmd.Args, " "), out)
+ if runtime.GOOS == "aix" {
+ // Shared object must be wrapped by an archive
+ cmd = exec.Command("ar", "-X64", "-q", "libcgosotest.a", "libcgosotest.so.1")
+ cmd.Dir = modRoot
+ out, err = cmd.CombinedOutput()
+ if err != nil {
+ t.Fatalf("%s: %s\n%s", strings.Join(cmd.Args, " "), err, out)
+ }
+ }
+
cmd = exec.Command("go", "build", "-o", "main.exe", "main.go")
cmd.Dir = modRoot
cmd.Env = append(os.Environ(), "GOPATH="+GOPATH)
diff --git a/misc/cgo/testso/testdata/cgoso.c b/misc/cgo/testso/testdata/cgoso.c
index 917f472d36..612e5d335a 100644
--- a/misc/cgo/testso/testdata/cgoso.c
+++ b/misc/cgo/testso/testdata/cgoso.c
@@ -4,7 +4,7 @@
#include "_cgo_export.h"
-#ifdef WIN32
+#if defined(WIN32) || defined(_AIX)
extern void setCallback(void *);
void init() {
setCallback(goCallback);
diff --git a/misc/cgo/testso/testdata/cgoso.go b/misc/cgo/testso/testdata/cgoso.go
index 29814fa43a..bba5de3312 100644
--- a/misc/cgo/testso/testdata/cgoso.go
+++ b/misc/cgo/testso/testdata/cgoso.go
@@ -15,6 +15,7 @@ package cgosotest
#cgo netbsd LDFLAGS: -L. libcgosotest.so
#cgo darwin LDFLAGS: -L. libcgosotest.dylib
#cgo windows LDFLAGS: -L. libcgosotest.dll
+#cgo aix LDFLAGS: -L. -l cgosotest
void init(void);
void sofunc(void);
diff --git a/misc/cgo/testso/testdata/cgoso_c.c b/misc/cgo/testso/testdata/cgoso_c.c
index 7a38022b54..e5015ed5e8 100644
--- a/misc/cgo/testso/testdata/cgoso_c.c
+++ b/misc/cgo/testso/testdata/cgoso_c.c
@@ -14,6 +14,15 @@ __declspec(dllexport) void setCallback(void *f)
goCallback = (void (*)())f;
}
__declspec(dllexport) void sofunc(void);
+#elif defined(_AIX)
+// AIX doesn't allow the creation of a shared object with an
+// undefined symbol. It's possible to bypass this problem by
+// using -Wl,-G and -Wl,-brtl option which allows run-time linking.
+// However, that's not how most of AIX shared object works.
+// Therefore, it's better to consider goCallback as a pointer and
+// to set up during an init function.
+void (*goCallback)(void);
+void setCallback(void *f) { goCallback = f; }
#else
extern void goCallback(void);
void setCallback(void *f) { (void)f; }
diff --git a/misc/cgo/testso/testdata/cgoso_unix.go b/misc/cgo/testso/testdata/cgoso_unix.go
index 49cdeaa2f5..1860694f1e 100644
--- a/misc/cgo/testso/testdata/cgoso_unix.go
+++ b/misc/cgo/testso/testdata/cgoso_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build dragonfly freebsd linux netbsd solaris
+// +build aix dragonfly freebsd linux netbsd solaris
package cgosotest
diff --git a/misc/cgo/testsovar/so_test.go b/misc/cgo/testsovar/so_test.go
index 500b08fae8..9c7f272439 100644
--- a/misc/cgo/testsovar/so_test.go
+++ b/misc/cgo/testsovar/so_test.go
@@ -25,7 +25,9 @@ func requireTestSOSupported(t *testing.T) {
t.Skip("No exec facility on iOS.")
}
case "ppc64":
- t.Skip("External linking not implemented on ppc64 (issue #8912).")
+ if runtime.GOOS == "linux" {
+ t.Skip("External linking not implemented on aix/ppc64 (issue #8912).")
+ }
case "mips64le", "mips64":
t.Skip("External linking not implemented on mips64.")
}
@@ -80,6 +82,8 @@ func TestSO(t *testing.T) {
case "windows":
ext = "dll"
args = append(args, "-DEXPORT_DLL")
+ case "aix":
+ ext = "so.1"
}
sofname := "libcgosotest." + ext
args = append(args, "-o", sofname, "cgoso_c.c")
@@ -93,6 +97,16 @@ func TestSO(t *testing.T) {
}
t.Logf("%s:\n%s", strings.Join(cmd.Args, " "), out)
+ if runtime.GOOS == "aix" {
+ // Shared object must be wrapped by an archive
+ cmd = exec.Command("ar", "-X64", "-q", "libcgosotest.a", "libcgosotest.so.1")
+ cmd.Dir = modRoot
+ out, err = cmd.CombinedOutput()
+ if err != nil {
+ t.Fatalf("%s: %s\n%s", strings.Join(cmd.Args, " "), err, out)
+ }
+ }
+
cmd = exec.Command("go", "build", "-o", "main.exe", "main.go")
cmd.Dir = modRoot
cmd.Env = append(os.Environ(), "GOPATH="+GOPATH)
diff --git a/misc/cgo/testsovar/testdata/cgoso.go b/misc/cgo/testsovar/testdata/cgoso.go
index 88d44c2c6e..9c7f95e92e 100644
--- a/misc/cgo/testsovar/testdata/cgoso.go
+++ b/misc/cgo/testsovar/testdata/cgoso.go
@@ -19,6 +19,7 @@ package cgosotest
#cgo netbsd LDFLAGS: -L. libcgosotest.so
#cgo darwin LDFLAGS: -L. libcgosotest.dylib
#cgo windows LDFLAGS: -L. libcgosotest.dll
+#cgo aix LDFLAGS: -L. -l cgosotest
#include "cgoso_c.h"
diff --git a/misc/git/pre-commit b/misc/git/pre-commit
deleted file mode 100755
index 242159f04a..0000000000
--- a/misc/git/pre-commit
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-# Copyright 2012 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# git gofmt pre-commit hook
-#
-# To use, store as .git/hooks/pre-commit inside your repository and make sure
-# it has execute permissions.
-#
-# This script does not handle file names that contain spaces.
-
-gofiles=$(git diff --cached --name-only --diff-filter=ACM | grep '\.go$')
-[ -z "$gofiles" ] && exit 0
-
-unformatted=$(gofmt -l $gofiles)
-[ -z "$unformatted" ] && exit 0
-
-# Some files are not gofmt'd. Print message and fail.
-
-echo >&2 "Go files must be formatted with gofmt. Please run:"
-for fn in $unformatted; do
- echo >&2 " gofmt -w $PWD/$fn"
-done
-
-exit 1
diff --git a/misc/go.mod b/misc/go.mod
new file mode 100644
index 0000000000..fc9f1133a4
--- /dev/null
+++ b/misc/go.mod
@@ -0,0 +1,11 @@
+// Module misc contains tests and binaries that pertain to specific build modes
+// (cgo) and platforms (Android and iOS).
+//
+// The 'run' scripts in ../src execute these tests and binaries, which need to
+// be in a module in order to build and run successfully in module mode.
+// (Otherwise, they lack well-defined import paths, and module mode — unlike
+// GOPATH mode — does not synthesize import paths from the absolute working
+// directory.)
+module misc
+
+go 1.12
diff --git a/misc/ios/README b/misc/ios/README
index 83fa2d6fc7..b9952dc11d 100644
--- a/misc/ios/README
+++ b/misc/ios/README
@@ -31,9 +31,10 @@ which will output something similar to
If you have multiple devices connected, specify the device UDID with the GOIOS_DEVICE_ID
variable. Use `idevice_id -l` to list all available UDIDs.
-Finally, to run the standard library tests, run iostest.bash with GOARCH set. For example,
+Finally, to run the standard library tests, run all.bash as usual, but with the compiler
+set to the clang wrapper that invokes clang for iOS. For example,
- GOARCH=arm64 ./iostest.bash
+ GOARCH=arm64 CGO_ENABLED=1 CC_FOR_TARGET=$(pwd)/../misc/ios/clangwrap.sh ./all.bash
To use the go tool directly to run programs and tests, put $GOROOT/bin into PATH to ensure
the go_darwin_$GOARCH_exec wrapper is found. For example, to run the archive/tar tests
diff --git a/misc/ios/go_darwin_arm_exec.go b/misc/ios/go_darwin_arm_exec.go
index d1bf9fd150..cdf4b07d0a 100644
--- a/misc/ios/go_darwin_arm_exec.go
+++ b/misc/ios/go_darwin_arm_exec.go
@@ -467,8 +467,8 @@ func idevCmd(cmd *exec.Cmd) *exec.Cmd {
func run(appdir, bundleID string, args []string) error {
var env []string
for _, e := range os.Environ() {
- // Don't override TMPDIR on the device.
- if strings.HasPrefix(e, "TMPDIR=") {
+ // Don't override TMPDIR, HOME, GOCACHE on the device.
+ if strings.HasPrefix(e, "TMPDIR=") || strings.HasPrefix(e, "HOME=") || strings.HasPrefix(e, "GOCACHE=") {
continue
}
env = append(env, e)
@@ -633,8 +633,16 @@ func subdir() (pkgpath string, underGoRoot bool, err error) {
if err != nil {
return "", false, err
}
- if root := runtime.GOROOT(); strings.HasPrefix(cwd, root) {
- subdir, err := filepath.Rel(root, cwd)
+ cwd, err = filepath.EvalSymlinks(cwd)
+ if err != nil {
+ log.Fatal(err)
+ }
+ goroot, err := filepath.EvalSymlinks(runtime.GOROOT())
+ if err != nil {
+ return "", false, err
+ }
+ if strings.HasPrefix(cwd, goroot) {
+ subdir, err := filepath.Rel(goroot, cwd)
if err != nil {
return "", false, err
}
@@ -642,10 +650,14 @@ func subdir() (pkgpath string, underGoRoot bool, err error) {
}
for _, p := range filepath.SplitList(build.Default.GOPATH) {
- if !strings.HasPrefix(cwd, p) {
+ pabs, err := filepath.EvalSymlinks(p)
+ if err != nil {
+ return "", false, err
+ }
+ if !strings.HasPrefix(cwd, pabs) {
continue
}
- subdir, err := filepath.Rel(p, cwd)
+ subdir, err := filepath.Rel(pabs, cwd)
if err == nil {
return subdir, false, nil
}
diff --git a/misc/nacl/testdata/mime.types b/misc/nacl/testdata/mime.types
index 81a415e9e6..ba678d5a4e 100644
--- a/misc/nacl/testdata/mime.types
+++ b/misc/nacl/testdata/mime.types
@@ -1,6 +1,6 @@
# This file maps Internet media types to unique file extension(s).
# Although created for httpd, this file is used by many software systems
-# and has been placed in the public domain for unlimited redisribution.
+# and has been placed in the public domain for unlimited redistribution.
#
# The table below contains both registered and (common) unregistered types.
# A type that has no unique extension can be ignored -- they are listed
diff --git a/misc/nacl/testzip.proto b/misc/nacl/testzip.proto
index d05219364d..5a9804b36d 100644
--- a/misc/nacl/testzip.proto
+++ b/misc/nacl/testzip.proto
@@ -48,43 +48,33 @@ go src=..
pprof
internal
binutils
- testdata
- +
- driver
- testdata
- +
- graph
- testdata
- +
- report
- testdata
- +
- profile
- testdata
+
+ driver
+ +
+ graph
+ +
+ report
+ +
+ profile
+ +
ianlancetaylor
demangle
- testdata
- +
+ +
golang.org
x
arch
arm
armasm
- testdata
- +
+ +
arm64
arm64asm
- testdata
- +
+ +
x86
x86asm
- testdata
- +
+ +
ppc64
ppc64asm
- testdata
- +
+ +
archive
tar
testdata
@@ -107,6 +97,9 @@ go src=..
+
zlib
crypto
+ ed25519
+ testdata
+ +
rsa
testdata
+
diff --git a/misc/reboot/overlaydir_test.go b/misc/reboot/overlaydir_test.go
new file mode 100644
index 0000000000..b38a8efbb9
--- /dev/null
+++ b/misc/reboot/overlaydir_test.go
@@ -0,0 +1,80 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package reboot_test
+
+import (
+ "io"
+ "os"
+ "path/filepath"
+ "strings"
+)
+
+// overlayDir makes a minimal-overhead copy of srcRoot in which new files may be added.
+//
+// TODO: Once we no longer need to support the misc module in GOPATH mode,
+// factor this function out into a package to reduce duplication.
+func overlayDir(dstRoot, srcRoot string) error {
+ dstRoot = filepath.Clean(dstRoot)
+ if err := os.MkdirAll(dstRoot, 0777); err != nil {
+ return err
+ }
+
+ // If we don't use the absolute path here, exec'ing make.bash fails with
+ // “too many levels of symbolic linksâ€.
+ symBase, err := filepath.Abs(srcRoot)
+ if err != nil {
+ return err
+ }
+
+ return filepath.Walk(srcRoot, func(srcPath string, info os.FileInfo, err error) error {
+ if err != nil || srcPath == srcRoot {
+ return err
+ }
+
+ suffix := strings.TrimPrefix(srcPath, srcRoot)
+ for len(suffix) > 0 && suffix[0] == filepath.Separator {
+ suffix = suffix[1:]
+ }
+ dstPath := filepath.Join(dstRoot, suffix)
+
+ perm := info.Mode() & os.ModePerm
+ if info.Mode()&os.ModeSymlink != 0 {
+ info, err = os.Stat(srcPath)
+ if err != nil {
+ return err
+ }
+ perm = info.Mode() & os.ModePerm
+ }
+
+ // Always copy directories (don't symlink them).
+ // If we add a file in the overlay, we don't want to add it in the original.
+ if info.IsDir() {
+ return os.Mkdir(dstPath, perm)
+ }
+
+ // If the OS supports symlinks, use them instead of copying bytes.
+ if err := os.Symlink(filepath.Join(symBase, suffix), dstPath); err == nil {
+ return nil
+ }
+
+ // Otherwise, copy the bytes.
+ src, err := os.Open(srcPath)
+ if err != nil {
+ return err
+ }
+ defer src.Close()
+
+ dst, err := os.OpenFile(dstPath, os.O_WRONLY|os.O_CREATE|os.O_EXCL, perm)
+ if err != nil {
+ return err
+ }
+
+ _, err = io.Copy(dst, src)
+ if closeErr := dst.Close(); err == nil {
+ err = closeErr
+ }
+ return err
+ })
+}
diff --git a/misc/reboot/reboot_test.go b/misc/reboot/reboot_test.go
new file mode 100644
index 0000000000..717c0fb709
--- /dev/null
+++ b/misc/reboot/reboot_test.go
@@ -0,0 +1,52 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package reboot_test verifies that the current GOROOT can be used to bootstrap
+// itself.
+package reboot_test
+
+import (
+ "io/ioutil"
+ "os"
+ "os/exec"
+ "path/filepath"
+ "runtime"
+ "testing"
+)
+
+func TestRepeatBootstrap(t *testing.T) {
+ goroot, err := ioutil.TempDir("", "reboot-goroot")
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer os.RemoveAll(goroot)
+
+ gorootSrc := filepath.Join(goroot, "src")
+ if err := overlayDir(gorootSrc, filepath.Join(runtime.GOROOT(), "src")); err != nil {
+ t.Fatal(err)
+ }
+
+ if err := ioutil.WriteFile(filepath.Join(goroot, "VERSION"), []byte(runtime.Version()), 0666); err != nil {
+ t.Fatal(err)
+ }
+
+ var makeScript string
+ switch runtime.GOOS {
+ case "windows":
+ makeScript = "make.bat"
+ case "plan9":
+ makeScript = "make.rc"
+ default:
+ makeScript = "make.bash"
+ }
+
+ cmd := exec.Command(filepath.Join(runtime.GOROOT(), "src", makeScript))
+ cmd.Dir = gorootSrc
+ cmd.Env = append(os.Environ(), "GOROOT=", "GOROOT_BOOTSTRAP="+runtime.GOROOT())
+ cmd.Stderr = os.Stderr
+ cmd.Stdout = os.Stdout
+ if err := cmd.Run(); err != nil {
+ t.Fatal(err)
+ }
+}
diff --git a/misc/wasm/wasm_exec.js b/misc/wasm/wasm_exec.js
index 165d567750..a1d88e6eac 100644
--- a/misc/wasm/wasm_exec.js
+++ b/misc/wasm/wasm_exec.js
@@ -3,6 +3,15 @@
// license that can be found in the LICENSE file.
(() => {
+ // Map multiple JavaScript environments to a single common API,
+ // preferring web standards over Node.js API.
+ //
+ // Environments considered:
+ // - Browsers
+ // - Node.js
+ // - Electron
+ // - Parcel
+
if (typeof global !== "undefined") {
// global already exists
} else if (typeof window !== "undefined") {
@@ -13,30 +22,15 @@
throw new Error("cannot export Go (neither global, window nor self is defined)");
}
- // Map web browser API and Node.js API to a single common API (preferring web standards over Node.js API).
- const isNodeJS = global.process && global.process.title === "node";
- if (isNodeJS) {
+ if (!global.require && typeof require !== "undefined") {
global.require = require;
+ }
+
+ if (!global.fs && global.require) {
global.fs = require("fs");
+ }
- const nodeCrypto = require("crypto");
- global.crypto = {
- getRandomValues(b) {
- nodeCrypto.randomFillSync(b);
- },
- };
-
- global.performance = {
- now() {
- const [sec, nsec] = process.hrtime();
- return sec * 1000 + nsec / 1000000;
- },
- };
-
- const util = require("util");
- global.TextEncoder = util.TextEncoder;
- global.TextDecoder = util.TextDecoder;
- } else {
+ if (!global.fs) {
let outputBuf = "";
global.fs = {
constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused
@@ -72,6 +66,34 @@
};
}
+ if (!global.crypto) {
+ const nodeCrypto = require("crypto");
+ global.crypto = {
+ getRandomValues(b) {
+ nodeCrypto.randomFillSync(b);
+ },
+ };
+ }
+
+ if (!global.performance) {
+ global.performance = {
+ now() {
+ const [sec, nsec] = process.hrtime();
+ return sec * 1000 + nsec / 1000000;
+ },
+ };
+ }
+
+ if (!global.TextEncoder) {
+ global.TextEncoder = require("util").TextEncoder;
+ }
+
+ if (!global.TextDecoder) {
+ global.TextDecoder = require("util").TextDecoder;
+ }
+
+ // End of polyfills for common API.
+
const encoder = new TextEncoder("utf-8");
const decoder = new TextDecoder("utf-8");
@@ -243,7 +265,15 @@
const id = this._nextCallbackTimeoutID;
this._nextCallbackTimeoutID++;
this._scheduledTimeouts.set(id, setTimeout(
- () => { this._resume(); },
+ () => {
+ this._resume();
+ while (this._scheduledTimeouts.has(id)) {
+ // for some reason Go failed to register the timeout event, log and try again
+ // (temporary workaround for https://github.com/golang/go/issues/28975)
+ console.warn("scheduleTimeoutEvent: missed timeout event");
+ this._resume();
+ }
+ },
getInt64(sp + 8) + 1, // setTimeout has been seen to fire up to 1 millisecond early
));
mem().setInt32(sp + 16, id, true);
@@ -385,9 +415,13 @@
let offset = 4096;
const strPtr = (str) => {
- let ptr = offset;
- new Uint8Array(mem.buffer, offset, str.length + 1).set(encoder.encode(str + "\0"));
- offset += str.length + (8 - (str.length % 8));
+ const ptr = offset;
+ const bytes = encoder.encode(str + "\0");
+ new Uint8Array(mem.buffer, offset, bytes.length).set(bytes);
+ offset += bytes.length;
+ if (offset % 8 !== 0) {
+ offset += 8 - (offset % 8);
+ }
return ptr;
};
@@ -439,9 +473,15 @@
}
}
- if (isNodeJS) {
+ if (
+ global.require &&
+ global.require.main === module &&
+ global.process &&
+ global.process.versions &&
+ !global.process.versions.electron
+ ) {
if (process.argv.length < 3) {
- process.stderr.write("usage: go_js_wasm_exec [wasm binary] [arguments]\n");
+ console.error("usage: go_js_wasm_exec [wasm binary] [arguments]");
process.exit(1);
}
@@ -459,7 +499,8 @@
});
return go.run(result.instance);
}).catch((err) => {
- throw err;
+ console.error(err);
+ process.exit(1);
});
}
})();
diff --git a/src/README.vendor b/src/README.vendor
new file mode 100644
index 0000000000..c80265344e
--- /dev/null
+++ b/src/README.vendor
@@ -0,0 +1,54 @@
+Vendoring in std and cmd
+========================
+
+The Go command maintains copies of external packages needed by the
+standard library in the src/vendor and src/cmd/vendor directories.
+
+In GOPATH mode, imports of vendored packages are resolved to these
+directories following normal vendor directory logic
+(see golang.org/s/go15vendor).
+
+In module mode, std and cmd are modules (defined in src/go.mod and
+src/cmd/go.mod). When a package outside std or cmd is imported
+by a package inside std or cmd, the import path is interpreted
+as if it had a "vendor/" prefix. For example, within "crypto/tls",
+an import of "golang.org/x/crypto/cryptobyte" resolves to
+"vendor/golang.org/x/crypto/cryptobyte". When a package with the
+same path is imported from a package outside std or cmd, it will
+be resolved normally. Consequently, a binary may be built with two
+copies of a package at different versions if the package is
+imported normally and vendored by the standard library.
+
+Vendored packages are internally renamed with a "vendor/" prefix
+to preserve the invariant that all packages have distinct paths.
+This is necessary to avoid compiler and linker conflicts. Adding
+a "vendor/" prefix also maintains the invariant that standard
+library packages begin with a dotless path element.
+
+The module requirements of std and cmd do not influence version
+selection in other modules. They are only considered when running
+module commands like 'go get' and 'go mod vendor' from a directory
+in GOROOT/src.
+
+Maintaining vendor directories
+==============================
+
+Before updating vendor directories, ensure that module mode is enabled.
+Make sure GO111MODULE=off is not set ('on' or 'auto' should work).
+
+Requirements may be added, updated, and removed with 'go get'.
+The vendor directory may be updated with 'go mod vendor'.
+A typical sequence might be:
+
+ cd src
+ go get -m golang.org/x/net@latest
+ go mod tidy
+ go mod vendor
+
+Use caution when passing '-u' to 'go get'. The '-u' flag updates
+modules providing all transitively imported packages, not just
+the target module.
+
+Note that 'go mod vendor' only copies packages that are transitively
+imported by packages in the current module. If a new package is needed,
+it should be imported before running 'go mod vendor'.
diff --git a/src/androidtest.bash b/src/androidtest.bash
deleted file mode 100755
index ba776d2278..0000000000
--- a/src/androidtest.bash
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2014 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# For testing Android.
-
-set -e
-ulimit -c 0 # no core files
-
-if [ ! -f make.bash ]; then
- echo 'androidtest.bash must be run from $GOROOT/src' 1>&2
- exit 1
-fi
-
-if [ -z $GOOS ]; then
- export GOOS=android
-fi
-if [ "$GOOS" != "android" ]; then
- echo "androidtest.bash requires GOOS=android, got GOOS=$GOOS" 1>&2
- exit 1
-fi
-
-if [ -n "$GOARM" ] && [ "$GOARM" != "7" ]; then
- echo "android only supports GOARM=7, got GOARM=$GOARM" 1>&2
- exit 1
-fi
-
-export CGO_ENABLED=1
-unset GOBIN
-
-export GOROOT=$(dirname $(pwd))
-# Put the exec wrapper into PATH
-export PATH=$GOROOT/bin:$PATH
-
-# Run standard tests.
-bash all.bash
diff --git a/src/archive/tar/stat_actime1.go b/src/archive/tar/stat_actime1.go
index cf9cc79c59..1bdd1c9dcb 100644
--- a/src/archive/tar/stat_actime1.go
+++ b/src/archive/tar/stat_actime1.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build linux dragonfly openbsd solaris
+// +build aix linux dragonfly openbsd solaris
package tar
diff --git a/src/archive/tar/stat_unix.go b/src/archive/tar/stat_unix.go
index 868105f338..d1576db41d 100644
--- a/src/archive/tar/stat_unix.go
+++ b/src/archive/tar/stat_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build linux darwin dragonfly freebsd openbsd netbsd solaris
+// +build aix linux darwin dragonfly freebsd openbsd netbsd solaris
package tar
@@ -54,6 +54,11 @@ func statUnix(fi os.FileInfo, h *Header) error {
if h.Typeflag == TypeChar || h.Typeflag == TypeBlock {
dev := uint64(sys.Rdev) // May be int32 or uint32
switch runtime.GOOS {
+ case "aix":
+ var major, minor uint32
+ major = uint32((dev & 0x3fffffff00000000) >> 32)
+ minor = uint32((dev & 0x00000000ffffffff) >> 0)
+ h.Devmajor, h.Devminor = int64(major), int64(minor)
case "linux":
// Copied from golang.org/x/sys/unix/dev_linux.go.
major := uint32((dev & 0x00000000000fff00) >> 8)
diff --git a/src/archive/zip/struct.go b/src/archive/zip/struct.go
index bd637d185b..686e79781a 100644
--- a/src/archive/zip/struct.go
+++ b/src/archive/zip/struct.go
@@ -154,10 +154,15 @@ func (fi headerFileInfo) Size() int64 {
}
return int64(fi.fh.UncompressedSize)
}
-func (fi headerFileInfo) IsDir() bool { return fi.Mode().IsDir() }
-func (fi headerFileInfo) ModTime() time.Time { return fi.fh.ModTime() }
-func (fi headerFileInfo) Mode() os.FileMode { return fi.fh.Mode() }
-func (fi headerFileInfo) Sys() interface{} { return fi.fh }
+func (fi headerFileInfo) IsDir() bool { return fi.Mode().IsDir() }
+func (fi headerFileInfo) ModTime() time.Time {
+ if fi.fh.Modified.IsZero() {
+ return fi.fh.ModTime()
+ }
+ return fi.fh.Modified.UTC()
+}
+func (fi headerFileInfo) Mode() os.FileMode { return fi.fh.Mode() }
+func (fi headerFileInfo) Sys() interface{} { return fi.fh }
// FileInfoHeader creates a partially-populated FileHeader from an
// os.FileInfo.
diff --git a/src/archive/zip/zip_test.go b/src/archive/zip/zip_test.go
index 3d5c759851..efdb5bd044 100644
--- a/src/archive/zip/zip_test.go
+++ b/src/archive/zip/zip_test.go
@@ -114,6 +114,47 @@ func TestFileHeaderRoundTrip64(t *testing.T) {
testHeaderRoundTrip(fh, uint32max, fh.UncompressedSize64, t)
}
+func TestFileHeaderRoundTripModified(t *testing.T) {
+ fh := &FileHeader{
+ Name: "foo.txt",
+ UncompressedSize: 987654321,
+ Modified: time.Now().Local(),
+ ModifiedTime: 1234,
+ ModifiedDate: 5678,
+ }
+ fi := fh.FileInfo()
+ fh2, err := FileInfoHeader(fi)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if got, want := fh2.Modified, fh.Modified.UTC(); got != want {
+ t.Errorf("Modified: got %s, want %s\n", got, want)
+ }
+ if got, want := fi.ModTime(), fh.Modified.UTC(); got != want {
+ t.Errorf("Modified: got %s, want %s\n", got, want)
+ }
+}
+
+func TestFileHeaderRoundTripWithoutModified(t *testing.T) {
+ fh := &FileHeader{
+ Name: "foo.txt",
+ UncompressedSize: 987654321,
+ ModifiedTime: 1234,
+ ModifiedDate: 5678,
+ }
+ fi := fh.FileInfo()
+ fh2, err := FileInfoHeader(fi)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if got, want := fh2.ModTime(), fh.ModTime(); got != want {
+ t.Errorf("Modified: got %s, want %s\n", got, want)
+ }
+ if got, want := fi.ModTime(), fh.ModTime(); got != want {
+ t.Errorf("Modified: got %s, want %s\n", got, want)
+ }
+}
+
type repeatedByte struct {
off int64
b byte
diff --git a/src/bootstrap.bash b/src/bootstrap.bash
index 32b736ad78..88c080a948 100755
--- a/src/bootstrap.bash
+++ b/src/bootstrap.bash
@@ -45,10 +45,11 @@ fi
unset GOROOT
src=$(cd .. && pwd)
echo "#### Copying to $targ"
-cp -R "$src" "$targ"
+cp -Rp "$src" "$targ"
cd "$targ"
echo
echo "#### Cleaning $targ"
+chmod -R +w .
rm -f .gitignore
if [ -e .git ]; then
git clean -f -d
@@ -72,6 +73,7 @@ if [ "$goos" = "$gohostos" -a "$goarch" = "$gohostarch" ]; then
# prepare a clean toolchain for others.
true
else
+ rm -f bin/go_${goos}_${goarch}_exec
mv bin/*_*/* bin
rmdir bin/*_*
rm -rf "pkg/${gohostos}_${gohostarch}" "pkg/tool/${gohostos}_${gohostarch}"
diff --git a/src/bufio/example_test.go b/src/bufio/example_test.go
index 4666e6d985..bb57139918 100644
--- a/src/bufio/example_test.go
+++ b/src/bufio/example_test.go
@@ -94,6 +94,9 @@ func ExampleScanner_emptyFinalToken() {
return i + 1, data[:i], nil
}
}
+ if !atEOF {
+ return 0, nil, nil
+ }
// There is one final token to be delivered, which may be the empty string.
// Returning bufio.ErrFinalToken here tells Scan there are no more tokens after this
// but does not trigger an error to be returned from Scan itself.
diff --git a/src/buildall.bash b/src/buildall.bash
index 5820b4d589..5762a332de 100755
--- a/src/buildall.bash
+++ b/src/buildall.bash
@@ -73,7 +73,11 @@ do
export GOARCH=386
export GO386=387
fi
- if ! "$GOROOT/bin/go" build -a std cmd; then
+
+ # Build and vet everything.
+ # cmd/go/internal/work/exec.go enables the same vet flags during go test of std cmd
+ # and should be kept in sync with any vet flag changes here.
+ if ! "$GOROOT/bin/go" build std cmd || ! "$GOROOT/bin/go" vet -unsafeptr=false std cmd; then
failed=true
if $sete; then
exit 1
diff --git a/src/builtin/builtin.go b/src/builtin/builtin.go
index c78fe09ea6..01190e9900 100644
--- a/src/builtin/builtin.go
+++ b/src/builtin/builtin.go
@@ -151,7 +151,7 @@ func delete(m map[Type]Type1, key Type)
// Slice, or map: the number of elements in v; if v is nil, len(v) is zero.
// String: the number of bytes in v.
// Channel: the number of elements queued (unread) in the channel buffer;
-// if v is nil, len(v) is zero.
+// if v is nil, len(v) is zero.
// For some arguments, such as a string literal or a simple array expression, the
// result can be a constant. See the Go language specification's "Length and
// capacity" section for details.
@@ -226,10 +226,9 @@ func close(c chan<- Type)
// invocation of F then behaves like a call to panic, terminating G's
// execution and running any deferred functions. This continues until all
// functions in the executing goroutine have stopped, in reverse order. At
-// that point, the program is terminated and the error condition is reported,
-// including the value of the argument to panic. This termination sequence
-// is called panicking and can be controlled by the built-in function
-// recover.
+// that point, the program is terminated with a non-zero exit code. This
+// termination sequence is called panicking and can be controlled by the
+// built-in function recover.
func panic(v interface{})
// The recover built-in function allows a program to manage behavior of a
diff --git a/src/bytes/bytes.go b/src/bytes/bytes.go
index daf4a32f26..eb13212384 100644
--- a/src/bytes/bytes.go
+++ b/src/bytes/bytes.go
@@ -12,23 +12,12 @@ import (
"unicode/utf8"
)
-// Equal returns a boolean reporting whether a and b
+// Equal reports whether a and b
// are the same length and contain the same bytes.
// A nil argument is equivalent to an empty slice.
func Equal(a, b []byte) bool {
- return bytealg.Equal(a, b)
-}
-
-func equalPortable(a, b []byte) bool {
- if len(a) != len(b) {
- return false
- }
- for i, c := range a {
- if c != b[i] {
- return false
- }
- }
- return true
+ // Neither cmd/compile nor gccgo allocates for these string conversions.
+ return string(a) == string(b)
}
// Compare returns an integer comparing two byte slices lexicographically.
@@ -114,12 +103,34 @@ func indexBytePortable(s []byte, c byte) int {
// LastIndex returns the index of the last instance of sep in s, or -1 if sep is not present in s.
func LastIndex(s, sep []byte) int {
n := len(sep)
- if n == 0 {
+ switch {
+ case n == 0:
return len(s)
+ case n == 1:
+ return LastIndexByte(s, sep[0])
+ case n == len(s):
+ if Equal(s, sep) {
+ return 0
+ }
+ return -1
+ case n > len(s):
+ return -1
}
- c := sep[0]
- for i := len(s) - n; i >= 0; i-- {
- if s[i] == c && (n == 1 || Equal(s[i:i+n], sep)) {
+ // Rabin-Karp search from the end of the string
+ hashss, pow := hashStrRev(sep)
+ last := len(s) - n
+ var h uint32
+ for i := len(s) - 1; i >= last; i-- {
+ h = h*primeRK + uint32(s[i])
+ }
+ if h == hashss && Equal(s[last:], sep) {
+ return last
+ }
+ for i := last - 1; i >= 0; i-- {
+ h *= primeRK
+ h += uint32(s[i])
+ h -= pow * uint32(s[i+n])
+ if h == hashss && Equal(s[i:i+n], sep) {
return i
}
}
@@ -477,13 +488,16 @@ func Map(mapping func(r rune) rune, s []byte) []byte {
// It panics if count is negative or if
// the result of (len(b) * count) overflows.
func Repeat(b []byte, count int) []byte {
+ if count == 0 {
+ return []byte{}
+ }
// Since we cannot return an error on overflow,
// we should panic if the repeat will generate
// an overflow.
// See Issue golang.org/issue/16237.
if count < 0 {
panic("bytes: negative Repeat count")
- } else if count > 0 && len(b)*count/count != len(b) {
+ } else if len(b)*count/count != len(b) {
panic("bytes: Repeat count causes overflow")
}
@@ -496,11 +510,66 @@ func Repeat(b []byte, count int) []byte {
return nb
}
-// ToUpper treats s as UTF-8-encoded bytes and returns a copy with all the Unicode letters within it mapped to their upper case.
-func ToUpper(s []byte) []byte { return Map(unicode.ToUpper, s) }
+// ToUpper returns a copy of the byte slice s with all Unicode letters mapped to
+// their upper case.
+func ToUpper(s []byte) []byte {
+ isASCII, hasLower := true, false
+ for i := 0; i < len(s); i++ {
+ c := s[i]
+ if c >= utf8.RuneSelf {
+ isASCII = false
+ break
+ }
+ hasLower = hasLower || ('a' <= c && c <= 'z')
+ }
-// ToLower treats s as UTF-8-encoded bytes and returns a copy with all the Unicode letters mapped to their lower case.
-func ToLower(s []byte) []byte { return Map(unicode.ToLower, s) }
+ if isASCII { // optimize for ASCII-only byte slices.
+ if !hasLower {
+ // Just return a copy.
+ return append([]byte(""), s...)
+ }
+ b := make([]byte, len(s))
+ for i := 0; i < len(s); i++ {
+ c := s[i]
+ if 'a' <= c && c <= 'z' {
+ c -= 'a' - 'A'
+ }
+ b[i] = c
+ }
+ return b
+ }
+ return Map(unicode.ToUpper, s)
+}
+
+// ToLower returns a copy of the byte slice s with all Unicode letters mapped to
+// their lower case.
+func ToLower(s []byte) []byte {
+ isASCII, hasUpper := true, false
+ for i := 0; i < len(s); i++ {
+ c := s[i]
+ if c >= utf8.RuneSelf {
+ isASCII = false
+ break
+ }
+ hasUpper = hasUpper || ('A' <= c && c <= 'Z')
+ }
+
+ if isASCII { // optimize for ASCII-only byte slices.
+ if !hasUpper {
+ return append([]byte(""), s...)
+ }
+ b := make([]byte, len(s))
+ for i := 0; i < len(s); i++ {
+ c := s[i]
+ if 'A' <= c && c <= 'Z' {
+ c += 'a' - 'A'
+ }
+ b[i] = c
+ }
+ return b
+ }
+ return Map(unicode.ToLower, s)
+}
// ToTitle treats s as UTF-8-encoded bytes and returns a copy with all the Unicode letters mapped to their title case.
func ToTitle(s []byte) []byte { return Map(unicode.ToTitle, s) }
@@ -523,6 +592,35 @@ func ToTitleSpecial(c unicode.SpecialCase, s []byte) []byte {
return Map(c.ToTitle, s)
}
+// ToValidUTF8 treats s as UTF-8-encoded bytes and returns a copy with each run of bytes
+// representing invalid UTF-8 replaced with the bytes in replacement, which may be empty.
+func ToValidUTF8(s, replacement []byte) []byte {
+ b := make([]byte, 0, len(s)+len(replacement))
+ invalid := false // previous byte was from an invalid UTF-8 sequence
+ for i := 0; i < len(s); {
+ c := s[i]
+ if c < utf8.RuneSelf {
+ i++
+ invalid = false
+ b = append(b, byte(c))
+ continue
+ }
+ _, wid := utf8.DecodeRune(s[i:])
+ if wid == 1 {
+ i++
+ if !invalid {
+ invalid = true
+ b = append(b, replacement...)
+ }
+ continue
+ }
+ invalid = false
+ b = append(b, s[i:i+wid]...)
+ i += wid
+ }
+ return b
+}
+
// isSeparator reports whether the rune could mark a word boundary.
// TODO: update when package unicode captures more of the properties.
func isSeparator(r rune) bool {
@@ -734,7 +832,41 @@ func TrimRight(s []byte, cutset string) []byte {
// TrimSpace returns a subslice of s by slicing off all leading and
// trailing white space, as defined by Unicode.
func TrimSpace(s []byte) []byte {
- return TrimFunc(s, unicode.IsSpace)
+ // Fast path for ASCII: look for the first ASCII non-space byte
+ start := 0
+ for ; start < len(s); start++ {
+ c := s[start]
+ if c >= utf8.RuneSelf {
+ // If we run into a non-ASCII byte, fall back to the
+ // slower unicode-aware method on the remaining bytes
+ return TrimFunc(s[start:], unicode.IsSpace)
+ }
+ if asciiSpace[c] == 0 {
+ break
+ }
+ }
+
+ // Now look for the first ASCII non-space byte from the end
+ stop := len(s)
+ for ; stop > start; stop-- {
+ c := s[stop-1]
+ if c >= utf8.RuneSelf {
+ return TrimFunc(s[start:stop], unicode.IsSpace)
+ }
+ if asciiSpace[c] == 0 {
+ break
+ }
+ }
+
+ // At this point s[start:stop] starts and ends with an ASCII
+ // non-space bytes, so we're done. Non-ASCII cases have already
+ // been handled above.
+ if start == stop {
+ // Special case to preserve previous TrimLeftFunc behavior,
+ // returning nil instead of empty slice if all spaces.
+ return nil
+ }
+ return s[start:stop]
}
// Runes interprets s as a sequence of UTF-8-encoded code points.
@@ -987,3 +1119,20 @@ func hashStr(sep []byte) (uint32, uint32) {
}
return hash, pow
}
+
+// hashStrRev returns the hash of the reverse of sep and the
+// appropriate multiplicative factor for use in Rabin-Karp algorithm.
+func hashStrRev(sep []byte) (uint32, uint32) {
+ hash := uint32(0)
+ for i := len(sep) - 1; i >= 0; i-- {
+ hash = hash*primeRK + uint32(sep[i])
+ }
+ var pow, sq uint32 = 1, primeRK
+ for i := len(sep); i > 0; i >>= 1 {
+ if i&1 != 0 {
+ pow *= sq
+ }
+ sq *= sq
+ }
+ return hash, pow
+}
diff --git a/src/bytes/bytes_test.go b/src/bytes/bytes_test.go
index f4c0ffd2a9..2dbbb99f37 100644
--- a/src/bytes/bytes_test.go
+++ b/src/bytes/bytes_test.go
@@ -51,15 +51,17 @@ type BinOpTest struct {
}
func TestEqual(t *testing.T) {
- for _, tt := range compareTests {
- eql := Equal(tt.a, tt.b)
- if eql != (tt.i == 0) {
- t.Errorf(`Equal(%q, %q) = %v`, tt.a, tt.b, eql)
- }
- eql = EqualPortable(tt.a, tt.b)
- if eql != (tt.i == 0) {
- t.Errorf(`EqualPortable(%q, %q) = %v`, tt.a, tt.b, eql)
+ // Run the tests and check for allocation at the same time.
+ allocs := testing.AllocsPerRun(10, func() {
+ for _, tt := range compareTests {
+ eql := Equal(tt.a, tt.b)
+ if eql != (tt.i == 0) {
+ t.Errorf(`Equal(%q, %q) = %v`, tt.a, tt.b, eql)
+ }
}
+ })
+ if allocs > 0 {
+ t.Errorf("Equal allocated %v times", allocs)
}
}
@@ -572,11 +574,6 @@ func BenchmarkEqual(b *testing.B) {
benchBytes(b, sizes, bmEqual(Equal))
}
-func BenchmarkEqualPort(b *testing.B) {
- sizes := []int{1, 6, 32, 4 << 10, 4 << 20, 64 << 20}
- benchBytes(b, sizes, bmEqual(EqualPortable))
-}
-
func bmEqual(equal func([]byte, []byte) bool) func(b *testing.B, n int) {
return func(b *testing.B, n int) {
if len(bmbuf) < 2*n {
@@ -677,34 +674,6 @@ func BenchmarkCountSingle(b *testing.B) {
})
}
-type ExplodeTest struct {
- s string
- n int
- a []string
-}
-
-var explodetests = []ExplodeTest{
- {"", -1, []string{}},
- {abcd, -1, []string{"a", "b", "c", "d"}},
- {faces, -1, []string{"☺", "☻", "☹"}},
- {abcd, 2, []string{"a", "bcd"}},
-}
-
-func TestExplode(t *testing.T) {
- for _, tt := range explodetests {
- a := SplitN([]byte(tt.s), nil, tt.n)
- result := sliceOfString(a)
- if !eq(result, tt.a) {
- t.Errorf(`Explode("%s", %d) = %v; want %v`, tt.s, tt.n, result, tt.a)
- continue
- }
- s := Join(a, []byte{})
- if string(s) != tt.s {
- t.Errorf(`Join(Explode("%s", %d), "") = "%s"`, tt.s, tt.n, s)
- }
- }
-}
-
type SplitTest struct {
s string
sep string
@@ -713,7 +682,9 @@ type SplitTest struct {
}
var splittests = []SplitTest{
+ {"", "", -1, []string{}},
{abcd, "a", 0, nil},
+ {abcd, "", 2, []string{"a", "bcd"}},
{abcd, "a", -1, []string{"", "bcd"}},
{abcd, "z", -1, []string{"abcd"}},
{abcd, "", -1, []string{"a", "b", "c", "d"}},
@@ -743,7 +714,7 @@ func TestSplit(t *testing.T) {
t.Errorf(`Split(%q, %q, %d) = %v; want %v`, tt.s, tt.sep, tt.n, result, tt.a)
continue
}
- if tt.n == 0 {
+ if tt.n == 0 || len(a) == 0 {
continue
}
@@ -909,54 +880,72 @@ func TestFieldsFunc(t *testing.T) {
}
// Test case for any function which accepts and returns a byte slice.
-// For ease of creation, we write the byte slices as strings.
+// For ease of creation, we write the input byte slice as a string.
type StringTest struct {
- in, out string
+ in string
+ out []byte
}
var upperTests = []StringTest{
- {"", ""},
- {"abc", "ABC"},
- {"AbC123", "ABC123"},
- {"azAZ09_", "AZAZ09_"},
- {"\u0250\u0250\u0250\u0250\u0250", "\u2C6F\u2C6F\u2C6F\u2C6F\u2C6F"}, // grows one byte per char
+ {"", []byte("")},
+ {"ONLYUPPER", []byte("ONLYUPPER")},
+ {"abc", []byte("ABC")},
+ {"AbC123", []byte("ABC123")},
+ {"azAZ09_", []byte("AZAZ09_")},
+ {"longStrinGwitHmixofsmaLLandcAps", []byte("LONGSTRINGWITHMIXOFSMALLANDCAPS")},
+ {"long\u0250string\u0250with\u0250nonascii\u2C6Fchars", []byte("LONG\u2C6FSTRING\u2C6FWITH\u2C6FNONASCII\u2C6FCHARS")},
+ {"\u0250\u0250\u0250\u0250\u0250", []byte("\u2C6F\u2C6F\u2C6F\u2C6F\u2C6F")}, // grows one byte per char
+ {"a\u0080\U0010FFFF", []byte("A\u0080\U0010FFFF")}, // test utf8.RuneSelf and utf8.MaxRune
}
var lowerTests = []StringTest{
- {"", ""},
- {"abc", "abc"},
- {"AbC123", "abc123"},
- {"azAZ09_", "azaz09_"},
- {"\u2C6D\u2C6D\u2C6D\u2C6D\u2C6D", "\u0251\u0251\u0251\u0251\u0251"}, // shrinks one byte per char
+ {"", []byte("")},
+ {"abc", []byte("abc")},
+ {"AbC123", []byte("abc123")},
+ {"azAZ09_", []byte("azaz09_")},
+ {"longStrinGwitHmixofsmaLLandcAps", []byte("longstringwithmixofsmallandcaps")},
+ {"LONG\u2C6FSTRING\u2C6FWITH\u2C6FNONASCII\u2C6FCHARS", []byte("long\u0250string\u0250with\u0250nonascii\u0250chars")},
+ {"\u2C6D\u2C6D\u2C6D\u2C6D\u2C6D", []byte("\u0251\u0251\u0251\u0251\u0251")}, // shrinks one byte per char
+ {"A\u0080\U0010FFFF", []byte("a\u0080\U0010FFFF")}, // test utf8.RuneSelf and utf8.MaxRune
}
const space = "\t\v\r\f\n\u0085\u00a0\u2000\u3000"
var trimSpaceTests = []StringTest{
- {"", ""},
- {"abc", "abc"},
- {space + "abc" + space, "abc"},
- {" ", ""},
- {" \t\r\n \t\t\r\r\n\n ", ""},
- {" \t\r\n x\t\t\r\r\n\n ", "x"},
- {" \u2000\t\r\n x\t\t\r\r\ny\n \u3000", "x\t\t\r\r\ny"},
- {"1 \t\r\n2", "1 \t\r\n2"},
- {" x\x80", "x\x80"},
- {" x\xc0", "x\xc0"},
- {"x \xc0\xc0 ", "x \xc0\xc0"},
- {"x \xc0", "x \xc0"},
- {"x \xc0 ", "x \xc0"},
- {"x \xc0\xc0 ", "x \xc0\xc0"},
- {"x ☺\xc0\xc0 ", "x ☺\xc0\xc0"},
- {"x ☺ ", "x ☺"},
+ {"", nil},
+ {" a", []byte("a")},
+ {"b ", []byte("b")},
+ {"abc", []byte("abc")},
+ {space + "abc" + space, []byte("abc")},
+ {" ", nil},
+ {"\u3000 ", nil},
+ {" \u3000", nil},
+ {" \t\r\n \t\t\r\r\n\n ", nil},
+ {" \t\r\n x\t\t\r\r\n\n ", []byte("x")},
+ {" \u2000\t\r\n x\t\t\r\r\ny\n \u3000", []byte("x\t\t\r\r\ny")},
+ {"1 \t\r\n2", []byte("1 \t\r\n2")},
+ {" x\x80", []byte("x\x80")},
+ {" x\xc0", []byte("x\xc0")},
+ {"x \xc0\xc0 ", []byte("x \xc0\xc0")},
+ {"x \xc0", []byte("x \xc0")},
+ {"x \xc0 ", []byte("x \xc0")},
+ {"x \xc0\xc0 ", []byte("x \xc0\xc0")},
+ {"x ☺\xc0\xc0 ", []byte("x ☺\xc0\xc0")},
+ {"x ☺ ", []byte("x ☺")},
}
// Execute f on each test case. funcName should be the name of f; it's used
// in failure reports.
func runStringTests(t *testing.T, f func([]byte) []byte, funcName string, testCases []StringTest) {
for _, tc := range testCases {
- actual := string(f([]byte(tc.in)))
- if actual != tc.out {
+ actual := f([]byte(tc.in))
+ if actual == nil && tc.out != nil {
+ t.Errorf("%s(%q) = nil; want %q", funcName, tc.in, tc.out)
+ }
+ if actual != nil && tc.out == nil {
+ t.Errorf("%s(%q) = %q; want nil", funcName, tc.in, actual)
+ }
+ if !Equal(actual, tc.out) {
t.Errorf("%s(%q) = %q; want %q", funcName, tc.in, actual, tc.out)
}
}
@@ -1044,6 +1033,64 @@ func TestToUpper(t *testing.T) { runStringTests(t, ToUpper, "ToUpper", upperTest
func TestToLower(t *testing.T) { runStringTests(t, ToLower, "ToLower", lowerTests) }
+func BenchmarkToUpper(b *testing.B) {
+ for _, tc := range upperTests {
+ tin := []byte(tc.in)
+ b.Run(tc.in, func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ actual := ToUpper(tin)
+ if !Equal(actual, tc.out) {
+ b.Errorf("ToUpper(%q) = %q; want %q", tc.in, actual, tc.out)
+ }
+ }
+ })
+ }
+}
+
+func BenchmarkToLower(b *testing.B) {
+ for _, tc := range lowerTests {
+ tin := []byte(tc.in)
+ b.Run(tc.in, func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ actual := ToLower(tin)
+ if !Equal(actual, tc.out) {
+ b.Errorf("ToLower(%q) = %q; want %q", tc.in, actual, tc.out)
+ }
+ }
+ })
+ }
+}
+
+var toValidUTF8Tests = []struct {
+ in string
+ repl string
+ out string
+}{
+ {"", "\uFFFD", ""},
+ {"abc", "\uFFFD", "abc"},
+ {"\uFDDD", "\uFFFD", "\uFDDD"},
+ {"a\xffb", "\uFFFD", "a\uFFFDb"},
+ {"a\xffb\uFFFD", "X", "aXb\uFFFD"},
+ {"a☺\xffb☺\xC0\xAFc☺\xff", "", "a☺b☺c☺"},
+ {"a☺\xffb☺\xC0\xAFc☺\xff", "日本語", "a☺日本語b☺日本語c☺日本語"},
+ {"\xC0\xAF", "\uFFFD", "\uFFFD"},
+ {"\xE0\x80\xAF", "\uFFFD", "\uFFFD"},
+ {"\xed\xa0\x80", "abc", "abc"},
+ {"\xed\xbf\xbf", "\uFFFD", "\uFFFD"},
+ {"\xF0\x80\x80\xaf", "☺", "☺"},
+ {"\xF8\x80\x80\x80\xAF", "\uFFFD", "\uFFFD"},
+ {"\xFC\x80\x80\x80\x80\xAF", "\uFFFD", "\uFFFD"},
+}
+
+func TestToValidUTF8(t *testing.T) {
+ for _, tc := range toValidUTF8Tests {
+ got := ToValidUTF8([]byte(tc.in), []byte(tc.repl))
+ if !Equal(got, []byte(tc.out)) {
+ t.Errorf("ToValidUTF8(%q, %q) = %q; want %q", tc.in, tc.repl, got, tc.out)
+ }
+ }
+}
+
func TestTrimSpace(t *testing.T) { runStringTests(t, TrimSpace, "TrimSpace", trimSpaceTests) }
type RepeatTest struct {
@@ -1250,8 +1297,11 @@ var isValidRune = predicate{
}
type TrimFuncTest struct {
- f predicate
- in, out string
+ f predicate
+ in string
+ trimOut []byte
+ leftOut []byte
+ rightOut []byte
}
func not(p predicate) predicate {
@@ -1264,20 +1314,68 @@ func not(p predicate) predicate {
}
var trimFuncTests = []TrimFuncTest{
- {isSpace, space + " hello " + space, "hello"},
- {isDigit, "\u0e50\u0e5212hello34\u0e50\u0e51", "hello"},
- {isUpper, "\u2C6F\u2C6F\u2C6F\u2C6FABCDhelloEF\u2C6F\u2C6FGH\u2C6F\u2C6F", "hello"},
- {not(isSpace), "hello" + space + "hello", space},
- {not(isDigit), "hello\u0e50\u0e521234\u0e50\u0e51helo", "\u0e50\u0e521234\u0e50\u0e51"},
- {isValidRune, "ab\xc0a\xc0cd", "\xc0a\xc0"},
- {not(isValidRune), "\xc0a\xc0", "a"},
+ {isSpace, space + " hello " + space,
+ []byte("hello"),
+ []byte("hello " + space),
+ []byte(space + " hello")},
+ {isDigit, "\u0e50\u0e5212hello34\u0e50\u0e51",
+ []byte("hello"),
+ []byte("hello34\u0e50\u0e51"),
+ []byte("\u0e50\u0e5212hello")},
+ {isUpper, "\u2C6F\u2C6F\u2C6F\u2C6FABCDhelloEF\u2C6F\u2C6FGH\u2C6F\u2C6F",
+ []byte("hello"),
+ []byte("helloEF\u2C6F\u2C6FGH\u2C6F\u2C6F"),
+ []byte("\u2C6F\u2C6F\u2C6F\u2C6FABCDhello")},
+ {not(isSpace), "hello" + space + "hello",
+ []byte(space),
+ []byte(space + "hello"),
+ []byte("hello" + space)},
+ {not(isDigit), "hello\u0e50\u0e521234\u0e50\u0e51helo",
+ []byte("\u0e50\u0e521234\u0e50\u0e51"),
+ []byte("\u0e50\u0e521234\u0e50\u0e51helo"),
+ []byte("hello\u0e50\u0e521234\u0e50\u0e51")},
+ {isValidRune, "ab\xc0a\xc0cd",
+ []byte("\xc0a\xc0"),
+ []byte("\xc0a\xc0cd"),
+ []byte("ab\xc0a\xc0")},
+ {not(isValidRune), "\xc0a\xc0",
+ []byte("a"),
+ []byte("a\xc0"),
+ []byte("\xc0a")},
+ // The nils returned by TrimLeftFunc are odd behavior, but we need
+ // to preserve backwards compatibility.
+ {isSpace, "",
+ nil,
+ nil,
+ []byte("")},
+ {isSpace, " ",
+ nil,
+ nil,
+ []byte("")},
}
func TestTrimFunc(t *testing.T) {
for _, tc := range trimFuncTests {
- actual := string(TrimFunc([]byte(tc.in), tc.f.f))
- if actual != tc.out {
- t.Errorf("TrimFunc(%q, %q) = %q; want %q", tc.in, tc.f.name, actual, tc.out)
+ trimmers := []struct {
+ name string
+ trim func(s []byte, f func(r rune) bool) []byte
+ out []byte
+ }{
+ {"TrimFunc", TrimFunc, tc.trimOut},
+ {"TrimLeftFunc", TrimLeftFunc, tc.leftOut},
+ {"TrimRightFunc", TrimRightFunc, tc.rightOut},
+ }
+ for _, trimmer := range trimmers {
+ actual := trimmer.trim([]byte(tc.in), tc.f.f)
+ if actual == nil && trimmer.out != nil {
+ t.Errorf("%s(%q, %q) = nil; want %q", trimmer.name, tc.in, tc.f.name, trimmer.out)
+ }
+ if actual != nil && trimmer.out == nil {
+ t.Errorf("%s(%q, %q) = %q; want nil", trimmer.name, tc.in, tc.f.name, actual)
+ }
+ if !Equal(actual, trimmer.out) {
+ t.Errorf("%s(%q, %q) = %q; want %q", trimmer.name, tc.in, tc.f.name, actual, trimmer.out)
+ }
}
}
}
@@ -1617,9 +1715,41 @@ func BenchmarkFieldsFunc(b *testing.B) {
}
func BenchmarkTrimSpace(b *testing.B) {
- s := []byte(" Some text. \n")
- for i := 0; i < b.N; i++ {
- TrimSpace(s)
+ tests := []struct {
+ name string
+ input []byte
+ }{
+ {"NoTrim", []byte("typical")},
+ {"ASCII", []byte(" foo bar ")},
+ {"SomeNonASCII", []byte(" \u2000\t\r\n x\t\t\r\r\ny\n \u3000 ")},
+ {"JustNonASCII", []byte("\u2000\u2000\u2000☺☺☺☺\u3000\u3000\u3000")},
+ }
+ for _, test := range tests {
+ b.Run(test.name, func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ TrimSpace(test.input)
+ }
+ })
+ }
+}
+
+func BenchmarkToValidUTF8(b *testing.B) {
+ tests := []struct {
+ name string
+ input []byte
+ }{
+ {"Valid", []byte("typical")},
+ {"InvalidASCII", []byte("foo\xffbar")},
+ {"InvalidNonASCII", []byte("日本語\xff日本語")},
+ }
+ replacement := []byte("\uFFFD")
+ b.ResetTimer()
+ for _, test := range tests {
+ b.Run(test.name, func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ ToValidUTF8(test.input, replacement)
+ }
+ })
}
}
@@ -1642,6 +1772,39 @@ func makeBenchInputHard() []byte {
var benchInputHard = makeBenchInputHard()
+func benchmarkIndexHard(b *testing.B, sep []byte) {
+ for i := 0; i < b.N; i++ {
+ Index(benchInputHard, sep)
+ }
+}
+
+func benchmarkLastIndexHard(b *testing.B, sep []byte) {
+ for i := 0; i < b.N; i++ {
+ LastIndex(benchInputHard, sep)
+ }
+}
+
+func benchmarkCountHard(b *testing.B, sep []byte) {
+ for i := 0; i < b.N; i++ {
+ Count(benchInputHard, sep)
+ }
+}
+
+func BenchmarkIndexHard1(b *testing.B) { benchmarkIndexHard(b, []byte("<>")) }
+func BenchmarkIndexHard2(b *testing.B) { benchmarkIndexHard(b, []byte("")) }
+func BenchmarkIndexHard3(b *testing.B) { benchmarkIndexHard(b, []byte("hello world")) }
+func BenchmarkIndexHard4(b *testing.B) {
+ benchmarkIndexHard(b, []byte("helloworld
"))
+}
+
+func BenchmarkLastIndexHard1(b *testing.B) { benchmarkLastIndexHard(b, []byte("<>")) }
+func BenchmarkLastIndexHard2(b *testing.B) { benchmarkLastIndexHard(b, []byte("")) }
+func BenchmarkLastIndexHard3(b *testing.B) { benchmarkLastIndexHard(b, []byte("hello world")) }
+
+func BenchmarkCountHard1(b *testing.B) { benchmarkCountHard(b, []byte("<>")) }
+func BenchmarkCountHard2(b *testing.B) { benchmarkCountHard(b, []byte("")) }
+func BenchmarkCountHard3(b *testing.B) { benchmarkCountHard(b, []byte("hello world")) }
+
func BenchmarkSplitEmptySeparator(b *testing.B) {
for i := 0; i < b.N; i++ {
Split(benchInputHard, nil)
diff --git a/src/bytes/example_test.go b/src/bytes/example_test.go
index 6d328378fa..5ba7077c1d 100644
--- a/src/bytes/example_test.go
+++ b/src/bytes/example_test.go
@@ -365,6 +365,16 @@ func ExampleToTitle() {
// ХЛЕБ
}
+func ExampleToTitleSpecial() {
+ str := []byte("ahoj vývojári golang")
+ totitle := bytes.ToTitleSpecial(unicode.AzeriCase, str)
+ fmt.Println("Original : " + string(str))
+ fmt.Println("ToTitle : " + string(totitle))
+ // Output:
+ // Original : ahoj vývojári golang
+ // ToTitle : AHOJ VÃVOJÃRİ GOLANG
+}
+
func ExampleTrim() {
fmt.Printf("[%q]", bytes.Trim([]byte(" !!! Achtung! Achtung! !!! "), "! "))
// Output: ["Achtung! Achtung"]
@@ -438,11 +448,31 @@ func ExampleToUpper() {
// Output: GOPHER
}
+func ExampleToUpperSpecial() {
+ str := []byte("ahoj vývojári golang")
+ totitle := bytes.ToUpperSpecial(unicode.AzeriCase, str)
+ fmt.Println("Original : " + string(str))
+ fmt.Println("ToUpper : " + string(totitle))
+ // Output:
+ // Original : ahoj vývojári golang
+ // ToUpper : AHOJ VÃVOJÃRİ GOLANG
+}
+
func ExampleToLower() {
fmt.Printf("%s", bytes.ToLower([]byte("Gopher")))
// Output: gopher
}
+func ExampleToLowerSpecial() {
+ str := []byte("AHOJ VÃVOJÃRİ GOLANG")
+ totitle := bytes.ToLowerSpecial(unicode.AzeriCase, str)
+ fmt.Println("Original : " + string(str))
+ fmt.Println("ToLower : " + string(totitle))
+ // Output:
+ // Original : AHOJ VÃVOJÃRİ GOLANG
+ // ToLower : ahoj vývojári golang
+}
+
func ExampleReader_Len() {
fmt.Println(bytes.NewReader([]byte("Hi!")).Len())
fmt.Println(bytes.NewReader([]byte("ã“ã‚“ã«ã¡ã¯!")).Len())
diff --git a/src/bytes/export_test.go b/src/bytes/export_test.go
index f61523e60b..b65428d9ce 100644
--- a/src/bytes/export_test.go
+++ b/src/bytes/export_test.go
@@ -6,4 +6,3 @@ package bytes
// Export func for testing
var IndexBytePortable = indexBytePortable
-var EqualPortable = equalPortable
diff --git a/src/cmd/README.vendor b/src/cmd/README.vendor
new file mode 100644
index 0000000000..ac0df5e925
--- /dev/null
+++ b/src/cmd/README.vendor
@@ -0,0 +1,2 @@
+See src/README.vendor for information on loading vendored packages
+and updating the vendor directory.
diff --git a/src/cmd/api/goapi.go b/src/cmd/api/goapi.go
index 02dfa7c841..c74ee9bfa2 100644
--- a/src/cmd/api/goapi.go
+++ b/src/cmd/api/goapi.go
@@ -8,6 +8,7 @@ package main
import (
"bufio"
"bytes"
+ "encoding/json"
"flag"
"fmt"
"go/ast"
@@ -76,6 +77,8 @@ var contexts = []*build.Context{
{GOOS: "netbsd", GOARCH: "amd64"},
{GOOS: "netbsd", GOARCH: "arm", CgoEnabled: true},
{GOOS: "netbsd", GOARCH: "arm"},
+ {GOOS: "netbsd", GOARCH: "arm64", CgoEnabled: true},
+ {GOOS: "netbsd", GOARCH: "arm64"},
{GOOS: "openbsd", GOARCH: "386", CgoEnabled: true},
{GOOS: "openbsd", GOARCH: "386"},
{GOOS: "openbsd", GOARCH: "amd64", CgoEnabled: true},
@@ -153,6 +156,7 @@ func main() {
var featureCtx = make(map[string]map[string]bool) // feature -> context name -> true
for _, context := range contexts {
w := NewWalker(context, filepath.Join(build.Default.GOROOT, "src"))
+ w.loadImports(pkgNames, w.context)
for _, name := range pkgNames {
// Vendored packages do not contribute to our
@@ -169,7 +173,13 @@ func main() {
// w.Import(name) will return nil
continue
}
- pkg, _ := w.Import(name)
+ pkg, err := w.Import(name)
+ if _, nogo := err.(*build.NoGoError); nogo {
+ continue
+ }
+ if err != nil {
+ log.Fatalf("Import(%q): %v", name, err)
+ }
w.export(pkg)
}
}
@@ -233,7 +243,7 @@ func (w *Walker) export(pkg *types.Package) {
w.current = pkg
scope := pkg.Scope()
for _, name := range scope.Names() {
- if ast.IsExported(name) {
+ if token.IsExported(name) {
w.emitObj(scope.Lookup(name))
}
}
@@ -343,12 +353,14 @@ func fileFeatures(filename string) []string {
var fset = token.NewFileSet()
type Walker struct {
- context *build.Context
- root string
- scope []string
- current *types.Package
- features map[string]bool // set
- imported map[string]*types.Package // packages already imported
+ context *build.Context
+ root string
+ scope []string
+ current *types.Package
+ features map[string]bool // set
+ imported map[string]*types.Package // packages already imported
+ importMap map[string]map[string]string // importer dir -> import path -> canonical path
+ importDir map[string]string // canonical import path -> dir
}
func NewWalker(context *build.Context, root string) *Walker {
@@ -428,11 +440,74 @@ func tagKey(dir string, context *build.Context, tags []string) string {
return key
}
+func (w *Walker) loadImports(paths []string, context *build.Context) {
+ if context == nil {
+ context = &build.Default
+ }
+
+ var (
+ tags = context.BuildTags
+ cgoEnabled = "0"
+ )
+ if context.CgoEnabled {
+ tags = append(tags[:len(tags):len(tags)], "cgo")
+ cgoEnabled = "1"
+ }
+
+ // TODO(golang.org/issue/29666): Request only the fields that we need.
+ cmd := exec.Command(goCmd(), "list", "-e", "-deps", "-json")
+ if len(tags) > 0 {
+ cmd.Args = append(cmd.Args, "-tags", strings.Join(tags, " "))
+ }
+ cmd.Args = append(cmd.Args, paths...)
+
+ cmd.Env = append(os.Environ(),
+ "GOOS="+context.GOOS,
+ "GOARCH="+context.GOARCH,
+ "CGO_ENABLED="+cgoEnabled,
+ )
+
+ stdout := new(bytes.Buffer)
+ cmd.Stdout = stdout
+ cmd.Stderr = new(strings.Builder)
+ err := cmd.Run()
+ if err != nil {
+ log.Fatalf("%s failed: %v\n%s", strings.Join(cmd.Args, " "), err, cmd.Stderr)
+ }
+
+ w.importDir = make(map[string]string)
+ w.importMap = make(map[string]map[string]string)
+ dec := json.NewDecoder(stdout)
+ for {
+ var pkg struct {
+ ImportPath, Dir string
+ ImportMap map[string]string
+ }
+ if err := dec.Decode(&pkg); err == io.EOF {
+ break
+ } else if err != nil {
+ log.Fatalf("%s: invalid output: %v", strings.Join(cmd.Args, " "), err)
+ }
+
+ w.importDir[pkg.ImportPath] = pkg.Dir
+ w.importMap[pkg.Dir] = pkg.ImportMap
+ }
+}
+
// Importing is a sentinel taking the place in Walker.imported
// for a package that is in the process of being imported.
var importing types.Package
func (w *Walker) Import(name string) (*types.Package, error) {
+ return w.ImportFrom(name, "", 0)
+}
+
+func (w *Walker) ImportFrom(fromPath, fromDir string, mode types.ImportMode) (*types.Package, error) {
+ name := fromPath
+ if canonical, ok := w.importMap[fromDir][fromPath]; ok {
+ name = canonical
+ }
+
pkg := w.imported[name]
if pkg != nil {
if pkg == &importing {
@@ -443,7 +518,10 @@ func (w *Walker) Import(name string) (*types.Package, error) {
w.imported[name] = &importing
// Determine package files.
- dir := filepath.Join(w.root, filepath.FromSlash(name))
+ dir := w.importDir[name]
+ if dir == "" {
+ dir = filepath.Join(w.root, filepath.FromSlash(name))
+ }
if fi, err := os.Stat(dir); err != nil || !fi.IsDir() {
log.Fatalf("no source in tree for import %q: %v", name, err)
}
@@ -470,7 +548,7 @@ func (w *Walker) Import(name string) (*types.Package, error) {
info, err := context.ImportDir(dir, 0)
if err != nil {
if _, nogo := err.(*build.NoGoError); nogo {
- return nil, nil
+ return nil, err
}
log.Fatalf("pkg %q, dir %q: ScanDir: %v", name, dir, err)
}
diff --git a/src/cmd/api/goapi_test.go b/src/cmd/api/goapi_test.go
index 1c8e2a345b..fc1bcc908a 100644
--- a/src/cmd/api/goapi_test.go
+++ b/src/cmd/api/goapi_test.go
@@ -203,3 +203,16 @@ func TestIssue21181(t *testing.T) {
w.export(pkg)
}
}
+
+func TestIssue29837(t *testing.T) {
+ for _, c := range contexts {
+ c.Compiler = build.Default.Compiler
+ }
+ for _, context := range contexts {
+ w := NewWalker(context, "testdata/src/issue29837")
+ _, err := w.Import("p")
+ if _, nogo := err.(*build.NoGoError); !nogo {
+ t.Errorf("expected *build.NoGoError, got %T", err)
+ }
+ }
+}
diff --git a/src/cmd/api/testdata/src/issue29837/p/README b/src/cmd/api/testdata/src/issue29837/p/README
new file mode 100644
index 0000000000..770bc0f1b2
--- /dev/null
+++ b/src/cmd/api/testdata/src/issue29837/p/README
@@ -0,0 +1 @@
+Empty directory for test, see https://golang.org/issues/29837.
\ No newline at end of file
diff --git a/src/cmd/asm/internal/arch/arm64.go b/src/cmd/asm/internal/arch/arm64.go
index 98858bd181..3817fcd5c2 100644
--- a/src/cmd/asm/internal/arch/arm64.go
+++ b/src/cmd/asm/internal/arch/arm64.go
@@ -72,14 +72,11 @@ func IsARM64STLXR(op obj.As) bool {
switch op {
case arm64.ASTLXRB, arm64.ASTLXRH, arm64.ASTLXRW, arm64.ASTLXR,
arm64.ASTXRB, arm64.ASTXRH, arm64.ASTXRW, arm64.ASTXR,
- arm64.ASTXP, arm64.ASTXPW, arm64.ASTLXP, arm64.ASTLXPW,
- arm64.ASWPB, arm64.ASWPH, arm64.ASWPW, arm64.ASWPD,
- arm64.ASWPALB, arm64.ASWPALH, arm64.ASWPALW, arm64.ASWPALD,
- arm64.ALDADDB, arm64.ALDADDH, arm64.ALDADDW, arm64.ALDADDD,
- arm64.ALDANDB, arm64.ALDANDH, arm64.ALDANDW, arm64.ALDANDD,
- arm64.ALDEORB, arm64.ALDEORH, arm64.ALDEORW, arm64.ALDEORD,
- arm64.ALDORB, arm64.ALDORH, arm64.ALDORW, arm64.ALDORD,
- arm64.ALDADDALD, arm64.ALDADDALW, arm64.ALDADDALH, arm64.ALDADDALB:
+ arm64.ASTXP, arm64.ASTXPW, arm64.ASTLXP, arm64.ASTLXPW:
+ return true
+ }
+ // atomic instructions
+ if arm64.IsAtomicInstruction(op) {
return true
}
return false
diff --git a/src/cmd/asm/internal/arch/mips.go b/src/cmd/asm/internal/arch/mips.go
index 14b29331e5..79fb7cf02e 100644
--- a/src/cmd/asm/internal/arch/mips.go
+++ b/src/cmd/asm/internal/arch/mips.go
@@ -33,12 +33,13 @@ func IsMIPSCMP(op obj.As) bool {
}
// IsMIPSMUL reports whether the op (as defined by an mips.A* constant) is
-// one of the MUL/DIV/REM instructions that require special handling.
+// one of the MUL/DIV/REM/MADD/MSUB instructions that require special handling.
func IsMIPSMUL(op obj.As) bool {
switch op {
case mips.AMUL, mips.AMULU, mips.AMULV, mips.AMULVU,
mips.ADIV, mips.ADIVU, mips.ADIVV, mips.ADIVVU,
- mips.AREM, mips.AREMU, mips.AREMV, mips.AREMVU:
+ mips.AREM, mips.AREMU, mips.AREMV, mips.AREMVU,
+ mips.AMADD, mips.AMSUB:
return true
}
return false
diff --git a/src/cmd/asm/internal/asm/asm.go b/src/cmd/asm/internal/asm/asm.go
index 3d99af6889..d83cfb2284 100644
--- a/src/cmd/asm/internal/asm/asm.go
+++ b/src/cmd/asm/internal/asm/asm.go
@@ -789,6 +789,12 @@ func (p *Parser) asmInstruction(op obj.As, cond string, a []obj.Addr) {
prog.To = a[4]
break
}
+ if p.arch.Family == sys.S390X {
+ prog.From = a[0]
+ prog.RestArgs = []obj.Addr{a[1], a[2], a[3]}
+ prog.To = a[4]
+ break
+ }
p.errorf("can't handle %s instruction with 5 operands", op)
return
case 6:
diff --git a/src/cmd/asm/internal/asm/line_test.go b/src/cmd/asm/internal/asm/line_test.go
index 7462f24a1c..01b058bd95 100644
--- a/src/cmd/asm/internal/asm/line_test.go
+++ b/src/cmd/asm/internal/asm/line_test.go
@@ -28,6 +28,10 @@ func TestAMD64BadInstParser(t *testing.T) {
{"VADDPD.BCST.Z.SAE X0, X1, X2", `Z suffix should be the last; can't combine rounding/SAE and broadcast`},
{"VADDPD.SAE.SAE X0, X1, X2", `duplicate suffix "SAE"`},
{"VADDPD.RZ_SAE.SAE X0, X1, X2", `bad suffix combination`},
+
+ // BSWAP on 16-bit registers is undefined. See #29167,
+ {"BSWAPW DX", `unrecognized instruction`},
+ {"BSWAPW R11", `unrecognized instruction`},
})
}
diff --git a/src/cmd/asm/internal/asm/operand_test.go b/src/cmd/asm/internal/asm/operand_test.go
index 2ba3fd73df..f187d0b166 100644
--- a/src/cmd/asm/internal/asm/operand_test.go
+++ b/src/cmd/asm/internal/asm/operand_test.go
@@ -145,17 +145,18 @@ func TestFuncAddress(t *testing.T) {
isFuncSym := strings.HasSuffix(test.input, "(SB)") &&
// Ignore static symbols.
- !strings.Contains(test.input, "<>") &&
- // Ignore symbols with offsets.
- !strings.Contains(test.input, "+")
+ !strings.Contains(test.input, "<>")
wantName := ""
if isFuncSym {
- // Strip $|* and (SB).
+ // Strip $|* and (SB) and +Int.
wantName = test.output[:len(test.output)-4]
if strings.HasPrefix(wantName, "$") || strings.HasPrefix(wantName, "*") {
wantName = wantName[1:]
}
+ if i := strings.Index(wantName, "+"); i >= 0 {
+ wantName = wantName[:i]
+ }
}
if ok != isFuncSym || name != wantName {
t.Errorf("fail at %s as function address: got %s, %v; expected %s, %v", test.input, name, ok, wantName, isFuncSym)
diff --git a/src/cmd/asm/internal/asm/parse.go b/src/cmd/asm/internal/asm/parse.go
index 346976ef48..17d40ee415 100644
--- a/src/cmd/asm/internal/asm/parse.go
+++ b/src/cmd/asm/internal/asm/parse.go
@@ -800,9 +800,9 @@ func (p *Parser) setPseudoRegister(addr *obj.Addr, reg string, isStatic bool, pr
// funcAddress parses an external function address. This is a
// constrained form of the operand syntax that's always SB-based,
-// non-static, and has no additional offsets:
+// non-static, and has at most a simple integer offset:
//
-// [$|*]sym(SB)
+// [$|*]sym[+Int](SB)
func (p *Parser) funcAddress() (string, bool) {
switch p.peek() {
case '$', '*':
@@ -815,7 +815,14 @@ func (p *Parser) funcAddress() (string, bool) {
if tok.ScanToken != scanner.Ident || p.atStartOfRegister(name) {
return "", false
}
- if p.next().ScanToken != '(' {
+ tok = p.next()
+ if tok.ScanToken == '+' {
+ if p.next().ScanToken != scanner.Int {
+ return "", false
+ }
+ tok = p.next()
+ }
+ if tok.ScanToken != '(' {
return "", false
}
if reg := p.next(); reg.ScanToken != scanner.Ident || reg.String() != "SB" {
diff --git a/src/cmd/asm/internal/asm/testdata/386.s b/src/cmd/asm/internal/asm/testdata/386.s
index d524a4c8c1..e0855f5e4b 100644
--- a/src/cmd/asm/internal/asm/testdata/386.s
+++ b/src/cmd/asm/internal/asm/testdata/386.s
@@ -89,6 +89,10 @@ label:
loop:
LOOP loop // LOOP
+// Tests for TLS reference.
+ MOVL (TLS), AX
+ MOVL 8(TLS), DX
+
// LTYPE0 nonnon { outcode(int($1), &$2); }
RET
RET foo(SB)
diff --git a/src/cmd/asm/internal/asm/testdata/amd64.s b/src/cmd/asm/internal/asm/testdata/amd64.s
index 680d8eff38..1dec7f4135 100644
--- a/src/cmd/asm/internal/asm/testdata/amd64.s
+++ b/src/cmd/asm/internal/asm/testdata/amd64.s
@@ -143,6 +143,10 @@ loop:
MOVB foo+32(SP)(CX*4), AH // 8a648c20
MOVB foo+32323(SP)(CX*8), R9 // 448a8ccc437e0000
+// Tests for TLS reference.
+ MOVQ (TLS), AX
+ MOVQ 8(TLS), DX
+
// LTYPE0 nonnon { outcode($1, &$2); }
RET // c3
RET foo(SB)
diff --git a/src/cmd/asm/internal/asm/testdata/amd64enc.s b/src/cmd/asm/internal/asm/testdata/amd64enc.s
index 65aecf8faf..c02f51d125 100644
--- a/src/cmd/asm/internal/asm/testdata/amd64enc.s
+++ b/src/cmd/asm/internal/asm/testdata/amd64enc.s
@@ -588,8 +588,6 @@ TEXT asmtest(SB),DUPOK|NOSPLIT,$0
BSRQ (R11), R11 // 4d0fbd1b
BSRQ DX, R11 // 4c0fbdda
BSRQ R11, R11 // 4d0fbddb
- BSWAPW DX // 660fca
- BSWAPW R11 // 66410fcb
BSWAPL DX // 0fca
BSWAPL R11 // 410fcb
BSWAPQ DX // 480fca
diff --git a/src/cmd/asm/internal/asm/testdata/arm64.s b/src/cmd/asm/internal/asm/testdata/arm64.s
index b54fd86045..77671223c9 100644
--- a/src/cmd/asm/internal/asm/testdata/arm64.s
+++ b/src/cmd/asm/internal/asm/testdata/arm64.s
@@ -659,14 +659,14 @@ again:
STXP (R1, R2), (RSP), R10 // e10b2ac8
STXPW (R1, R2), (R3), R10 // 61082a88
STXPW (R1, R2), (RSP), R10 // e10b2a88
- SWPD R5, (R6), R7 // c78025f8
- SWPD R5, (RSP), R7 // e78325f8
- SWPW R5, (R6), R7 // c78025b8
- SWPW R5, (RSP), R7 // e78325b8
- SWPH R5, (R6), R7 // c7802578
- SWPH R5, (RSP), R7 // e7832578
- SWPB R5, (R6), R7 // c7802538
- SWPB R5, (RSP), R7 // e7832538
+ SWPAD R5, (R6), R7 // c780a5f8
+ SWPAD R5, (RSP), R7 // e783a5f8
+ SWPAW R5, (R6), R7 // c780a5b8
+ SWPAW R5, (RSP), R7 // e783a5b8
+ SWPAH R5, (R6), R7 // c780a578
+ SWPAH R5, (RSP), R7 // e783a578
+ SWPAB R5, (R6), R7 // c780a538
+ SWPAB R5, (RSP), R7 // e783a538
SWPALD R5, (R6), R7 // c780e5f8
SWPALD R5, (RSP), R7 // e783e5f8
SWPALW R5, (R6), R7 // c780e5b8
@@ -675,6 +675,38 @@ again:
SWPALH R5, (RSP), R7 // e783e578
SWPALB R5, (R6), R7 // c780e538
SWPALB R5, (RSP), R7 // e783e538
+ SWPD R5, (R6), R7 // c78025f8
+ SWPD R5, (RSP), R7 // e78325f8
+ SWPW R5, (R6), R7 // c78025b8
+ SWPW R5, (RSP), R7 // e78325b8
+ SWPH R5, (R6), R7 // c7802578
+ SWPH R5, (RSP), R7 // e7832578
+ SWPB R5, (R6), R7 // c7802538
+ SWPB R5, (RSP), R7 // e7832538
+ SWPLD R5, (R6), R7 // c78065f8
+ SWPLD R5, (RSP), R7 // e78365f8
+ SWPLW R5, (R6), R7 // c78065b8
+ SWPLW R5, (RSP), R7 // e78365b8
+ SWPLH R5, (R6), R7 // c7806578
+ SWPLH R5, (RSP), R7 // e7836578
+ SWPLB R5, (R6), R7 // c7806538
+ SWPLB R5, (RSP), R7 // e7836538
+ LDADDAD R5, (R6), R7 // c700a5f8
+ LDADDAD R5, (RSP), R7 // e703a5f8
+ LDADDAW R5, (R6), R7 // c700a5b8
+ LDADDAW R5, (RSP), R7 // e703a5b8
+ LDADDAH R5, (R6), R7 // c700a578
+ LDADDAH R5, (RSP), R7 // e703a578
+ LDADDAB R5, (R6), R7 // c700a538
+ LDADDAB R5, (RSP), R7 // e703a538
+ LDADDALD R5, (R6), R7 // c700e5f8
+ LDADDALD R5, (RSP), R7 // e703e5f8
+ LDADDALW R5, (R6), R7 // c700e5b8
+ LDADDALW R5, (RSP), R7 // e703e5b8
+ LDADDALH R5, (R6), R7 // c700e578
+ LDADDALH R5, (RSP), R7 // e703e578
+ LDADDALB R5, (R6), R7 // c700e538
+ LDADDALB R5, (RSP), R7 // e703e538
LDADDD R5, (R6), R7 // c70025f8
LDADDD R5, (RSP), R7 // e70325f8
LDADDW R5, (R6), R7 // c70025b8
@@ -683,6 +715,30 @@ again:
LDADDH R5, (RSP), R7 // e7032578
LDADDB R5, (R6), R7 // c7002538
LDADDB R5, (RSP), R7 // e7032538
+ LDADDLD R5, (R6), R7 // c70065f8
+ LDADDLD R5, (RSP), R7 // e70365f8
+ LDADDLW R5, (R6), R7 // c70065b8
+ LDADDLW R5, (RSP), R7 // e70365b8
+ LDADDLH R5, (R6), R7 // c7006578
+ LDADDLH R5, (RSP), R7 // e7036578
+ LDADDLB R5, (R6), R7 // c7006538
+ LDADDLB R5, (RSP), R7 // e7036538
+ LDANDAD R5, (R6), R7 // c710a5f8
+ LDANDAD R5, (RSP), R7 // e713a5f8
+ LDANDAW R5, (R6), R7 // c710a5b8
+ LDANDAW R5, (RSP), R7 // e713a5b8
+ LDANDAH R5, (R6), R7 // c710a578
+ LDANDAH R5, (RSP), R7 // e713a578
+ LDANDAB R5, (R6), R7 // c710a538
+ LDANDAB R5, (RSP), R7 // e713a538
+ LDANDALD R5, (R6), R7 // c710e5f8
+ LDANDALD R5, (RSP), R7 // e713e5f8
+ LDANDALW R5, (R6), R7 // c710e5b8
+ LDANDALW R5, (RSP), R7 // e713e5b8
+ LDANDALH R5, (R6), R7 // c710e578
+ LDANDALH R5, (RSP), R7 // e713e578
+ LDANDALB R5, (R6), R7 // c710e538
+ LDANDALB R5, (RSP), R7 // e713e538
LDANDD R5, (R6), R7 // c71025f8
LDANDD R5, (RSP), R7 // e71325f8
LDANDW R5, (R6), R7 // c71025b8
@@ -691,6 +747,30 @@ again:
LDANDH R5, (RSP), R7 // e7132578
LDANDB R5, (R6), R7 // c7102538
LDANDB R5, (RSP), R7 // e7132538
+ LDANDLD R5, (R6), R7 // c71065f8
+ LDANDLD R5, (RSP), R7 // e71365f8
+ LDANDLW R5, (R6), R7 // c71065b8
+ LDANDLW R5, (RSP), R7 // e71365b8
+ LDANDLH R5, (R6), R7 // c7106578
+ LDANDLH R5, (RSP), R7 // e7136578
+ LDANDLB R5, (R6), R7 // c7106538
+ LDANDLB R5, (RSP), R7 // e7136538
+ LDEORAD R5, (R6), R7 // c720a5f8
+ LDEORAD R5, (RSP), R7 // e723a5f8
+ LDEORAW R5, (R6), R7 // c720a5b8
+ LDEORAW R5, (RSP), R7 // e723a5b8
+ LDEORAH R5, (R6), R7 // c720a578
+ LDEORAH R5, (RSP), R7 // e723a578
+ LDEORAB R5, (R6), R7 // c720a538
+ LDEORAB R5, (RSP), R7 // e723a538
+ LDEORALD R5, (R6), R7 // c720e5f8
+ LDEORALD R5, (RSP), R7 // e723e5f8
+ LDEORALW R5, (R6), R7 // c720e5b8
+ LDEORALW R5, (RSP), R7 // e723e5b8
+ LDEORALH R5, (R6), R7 // c720e578
+ LDEORALH R5, (RSP), R7 // e723e578
+ LDEORALB R5, (R6), R7 // c720e538
+ LDEORALB R5, (RSP), R7 // e723e538
LDEORD R5, (R6), R7 // c72025f8
LDEORD R5, (RSP), R7 // e72325f8
LDEORW R5, (R6), R7 // c72025b8
@@ -699,6 +779,30 @@ again:
LDEORH R5, (RSP), R7 // e7232578
LDEORB R5, (R6), R7 // c7202538
LDEORB R5, (RSP), R7 // e7232538
+ LDEORLD R5, (R6), R7 // c72065f8
+ LDEORLD R5, (RSP), R7 // e72365f8
+ LDEORLW R5, (R6), R7 // c72065b8
+ LDEORLW R5, (RSP), R7 // e72365b8
+ LDEORLH R5, (R6), R7 // c7206578
+ LDEORLH R5, (RSP), R7 // e7236578
+ LDEORLB R5, (R6), R7 // c7206538
+ LDEORLB R5, (RSP), R7 // e7236538
+ LDORAD R5, (R6), R7 // c730a5f8
+ LDORAD R5, (RSP), R7 // e733a5f8
+ LDORAW R5, (R6), R7 // c730a5b8
+ LDORAW R5, (RSP), R7 // e733a5b8
+ LDORAH R5, (R6), R7 // c730a578
+ LDORAH R5, (RSP), R7 // e733a578
+ LDORAB R5, (R6), R7 // c730a538
+ LDORAB R5, (RSP), R7 // e733a538
+ LDORALD R5, (R6), R7 // c730e5f8
+ LDORALD R5, (RSP), R7 // e733e5f8
+ LDORALW R5, (R6), R7 // c730e5b8
+ LDORALW R5, (RSP), R7 // e733e5b8
+ LDORALH R5, (R6), R7 // c730e578
+ LDORALH R5, (RSP), R7 // e733e578
+ LDORALB R5, (R6), R7 // c730e538
+ LDORALB R5, (RSP), R7 // e733e538
LDORD R5, (R6), R7 // c73025f8
LDORD R5, (RSP), R7 // e73325f8
LDORW R5, (R6), R7 // c73025b8
@@ -707,11 +811,14 @@ again:
LDORH R5, (RSP), R7 // e7332578
LDORB R5, (R6), R7 // c7302538
LDORB R5, (RSP), R7 // e7332538
- LDADDALD R2, (R1), R3 // 2300e2f8
- LDADDALW R2, (R1), R3 // 2300e2b8
- LDADDALH R2, (R1), R3 // 2300e278
- LDADDALB R2, (R1), R3 // 2300e238
-
+ LDORLD R5, (R6), R7 // c73065f8
+ LDORLD R5, (RSP), R7 // e73365f8
+ LDORLW R5, (R6), R7 // c73065b8
+ LDORLW R5, (RSP), R7 // e73365b8
+ LDORLH R5, (R6), R7 // c7306578
+ LDORLH R5, (RSP), R7 // e7336578
+ LDORLB R5, (R6), R7 // c7306538
+ LDORLB R5, (RSP), R7 // e7336538
// RET
//
// LTYPEA comma
diff --git a/src/cmd/asm/internal/asm/testdata/arm64error.s b/src/cmd/asm/internal/asm/testdata/arm64error.s
index 357db80222..387836dcbe 100644
--- a/src/cmd/asm/internal/asm/testdata/arm64error.s
+++ b/src/cmd/asm/internal/asm/testdata/arm64error.s
@@ -112,4 +112,124 @@ TEXT errors(SB),$0
FSTPD (R1, R2), (R0) // ERROR "invalid register pair"
FMOVS (F2), F0 // ERROR "illegal combination"
FMOVD F0, (F1) // ERROR "illegal combination"
+ LDADDD R5, (R6), ZR // ERROR "illegal destination register"
+ LDADDW R5, (R6), ZR // ERROR "illegal destination register"
+ LDADDH R5, (R6), ZR // ERROR "illegal destination register"
+ LDADDB R5, (R6), ZR // ERROR "illegal destination register"
+ LDADDLD R5, (R6), ZR // ERROR "illegal destination register"
+ LDADDLW R5, (R6), ZR // ERROR "illegal destination register"
+ LDADDLH R5, (R6), ZR // ERROR "illegal destination register"
+ LDADDLB R5, (R6), ZR // ERROR "illegal destination register"
+ LDANDD R5, (R6), ZR // ERROR "illegal destination register"
+ LDANDW R5, (R6), ZR // ERROR "illegal destination register"
+ LDANDH R5, (R6), ZR // ERROR "illegal destination register"
+ LDANDB R5, (R6), ZR // ERROR "illegal destination register"
+ LDANDLD R5, (R6), ZR // ERROR "illegal destination register"
+ LDANDLW R5, (R6), ZR // ERROR "illegal destination register"
+ LDANDLH R5, (R6), ZR // ERROR "illegal destination register"
+ LDANDLB R5, (R6), ZR // ERROR "illegal destination register"
+ LDEORD R5, (R6), ZR // ERROR "illegal destination register"
+ LDEORW R5, (R6), ZR // ERROR "illegal destination register"
+ LDEORH R5, (R6), ZR // ERROR "illegal destination register"
+ LDEORB R5, (R6), ZR // ERROR "illegal destination register"
+ LDEORLD R5, (R6), ZR // ERROR "illegal destination register"
+ LDEORLW R5, (R6), ZR // ERROR "illegal destination register"
+ LDEORLH R5, (R6), ZR // ERROR "illegal destination register"
+ LDEORLB R5, (R6), ZR // ERROR "illegal destination register"
+ LDORD R5, (R6), ZR // ERROR "illegal destination register"
+ LDORW R5, (R6), ZR // ERROR "illegal destination register"
+ LDORH R5, (R6), ZR // ERROR "illegal destination register"
+ LDORB R5, (R6), ZR // ERROR "illegal destination register"
+ LDORLD R5, (R6), ZR // ERROR "illegal destination register"
+ LDORLW R5, (R6), ZR // ERROR "illegal destination register"
+ LDORLH R5, (R6), ZR // ERROR "illegal destination register"
+ LDORLB R5, (R6), ZR // ERROR "illegal destination register"
+ LDADDAD R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDAW R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDAH R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDAB R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDALD R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDALW R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDALH R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDALB R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDD R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDW R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDH R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDB R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDLD R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDLW R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDLH R5, (R6), RSP // ERROR "illegal destination register"
+ LDADDLB R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDAD R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDAW R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDAH R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDAB R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDALD R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDALW R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDALH R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDALB R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDD R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDW R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDH R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDB R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDLD R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDLW R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDLH R5, (R6), RSP // ERROR "illegal destination register"
+ LDANDLB R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORAD R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORAW R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORAH R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORAB R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORALD R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORALW R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORALH R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORALB R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORD R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORW R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORH R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORB R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORLD R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORLW R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORLH R5, (R6), RSP // ERROR "illegal destination register"
+ LDEORLB R5, (R6), RSP // ERROR "illegal destination register"
+ LDORAD R5, (R6), RSP // ERROR "illegal destination register"
+ LDORAW R5, (R6), RSP // ERROR "illegal destination register"
+ LDORAH R5, (R6), RSP // ERROR "illegal destination register"
+ LDORAB R5, (R6), RSP // ERROR "illegal destination register"
+ LDORALD R5, (R6), RSP // ERROR "illegal destination register"
+ LDORALW R5, (R6), RSP // ERROR "illegal destination register"
+ LDORALH R5, (R6), RSP // ERROR "illegal destination register"
+ LDORALB R5, (R6), RSP // ERROR "illegal destination register"
+ LDORD R5, (R6), RSP // ERROR "illegal destination register"
+ LDORW R5, (R6), RSP // ERROR "illegal destination register"
+ LDORH R5, (R6), RSP // ERROR "illegal destination register"
+ LDORB R5, (R6), RSP // ERROR "illegal destination register"
+ LDORLD R5, (R6), RSP // ERROR "illegal destination register"
+ LDORLW R5, (R6), RSP // ERROR "illegal destination register"
+ LDORLH R5, (R6), RSP // ERROR "illegal destination register"
+ LDORLB R5, (R6), RSP // ERROR "illegal destination register"
+ SWPAD R5, (R6), RSP // ERROR "illegal destination register"
+ SWPAW R5, (R6), RSP // ERROR "illegal destination register"
+ SWPAH R5, (R6), RSP // ERROR "illegal destination register"
+ SWPAB R5, (R6), RSP // ERROR "illegal destination register"
+ SWPALD R5, (R6), RSP // ERROR "illegal destination register"
+ SWPALW R5, (R6), RSP // ERROR "illegal destination register"
+ SWPALH R5, (R6), RSP // ERROR "illegal destination register"
+ SWPALB R5, (R6), RSP // ERROR "illegal destination register"
+ SWPD R5, (R6), RSP // ERROR "illegal destination register"
+ SWPW R5, (R6), RSP // ERROR "illegal destination register"
+ SWPH R5, (R6), RSP // ERROR "illegal destination register"
+ SWPB R5, (R6), RSP // ERROR "illegal destination register"
+ SWPLD R5, (R6), RSP // ERROR "illegal destination register"
+ SWPLW R5, (R6), RSP // ERROR "illegal destination register"
+ SWPLH R5, (R6), RSP // ERROR "illegal destination register"
+ SWPLB R5, (R6), RSP // ERROR "illegal destination register"
+ STXR R5, (R6), RSP // ERROR "illegal destination register"
+ STXRW R5, (R6), RSP // ERROR "illegal destination register"
+ STLXR R5, (R6), RSP // ERROR "illegal destination register"
+ STLXRW R5, (R6), RSP // ERROR "illegal destination register"
+ STXP (R5, R7), (R6), RSP // ERROR "illegal destination register"
+ STXPW (R5, R7), (R6), RSP // ERROR "illegal destination register"
+ STLXP (R5, R7), (R6), RSP // ERROR "illegal destination register"
+ STLXP (R5, R7), (R6), RSP // ERROR "illegal destination register"
RET
diff --git a/src/cmd/asm/internal/asm/testdata/mips.s b/src/cmd/asm/internal/asm/testdata/mips.s
index 0c6f7fd552..7136d686d7 100644
--- a/src/cmd/asm/internal/asm/testdata/mips.s
+++ b/src/cmd/asm/internal/asm/testdata/mips.s
@@ -424,7 +424,15 @@ label4:
CALL foo(SB)
RET foo(SB)
+ // unary operation
NEGW R1, R2 // 00011023
+ CLZ R1, R2 // 70221020
+ CLO R1, R2 // 70221021
+
+ // to (Hi, Lo)
+ MADD R2, R1 // 70220000
+ MSUB R2, R1 // 70220004
+ MUL R2, R1 // 00220018
// END
//
diff --git a/src/cmd/asm/internal/asm/testdata/ppc64.s b/src/cmd/asm/internal/asm/testdata/ppc64.s
index 366c80c090..8440375de6 100644
--- a/src/cmd/asm/internal/asm/testdata/ppc64.s
+++ b/src/cmd/asm/internal/asm/testdata/ppc64.s
@@ -1021,18 +1021,24 @@ label1:
// VSX move from VSR, XX1-form
// XS,RA produces
// RA,XS
+// Extended mnemonics accept VMX and FP registers as sources
MFVSRD VS0, R1
MFVSRWZ VS33, R1
MFVSRLD VS63, R1
+ MFVRD V0, R1
+ MFFPRD F0, R1
// VSX move to VSR, XX1-form
// RA,XT produces
// XT,RA
+// Extended mnemonics accept VMX and FP registers as targets
MTVSRD R1, VS0
MTVSRWA R1, VS31
MTVSRWZ R1, VS63
MTVSRDD R1, R2, VS0
MTVSRWS R1, VS32
+ MTVRD R1, V13
+ MTFPRD R1, F24
// VSX AND, XX3-form
// XA,XB,XT produces
diff --git a/src/cmd/asm/internal/asm/testdata/s390x.s b/src/cmd/asm/internal/asm/testdata/s390x.s
index 0e50303d70..c9f4d69736 100644
--- a/src/cmd/asm/internal/asm/testdata/s390x.s
+++ b/src/cmd/asm/internal/asm/testdata/s390x.s
@@ -66,6 +66,7 @@ TEXT main·foo(SB),DUPOK|NOSPLIT,$16-0 // TEXT main.foo(SB), DUPOK|NOSPLIT, $16-
ADD $32768, R1, R2 // b9040021c22800008000
ADDC R1, R2 // b9ea1022
ADDC $1, R1, R2 // ec21000100db
+ ADDC $-1, R1, R2 // ec21ffff00db
ADDC R1, R2, R3 // b9ea1032
ADDW R1, R2 // 1a21
ADDW R1, R2, R3 // b9f81032
@@ -182,6 +183,21 @@ TEXT main·foo(SB),DUPOK|NOSPLIT,$16-0 // TEXT main.foo(SB), DUPOK|NOSPLIT, $16-
XORW (R1), R2 // 57201000
XORW -1(R1), R2 // e3201fffff57
+ RNSBG $0, $31, $32, R1, R2 // ec21001f2054
+ RXSBG $17, $8, $16, R3, R4 // ec4311081057
+ ROSBG $9, $24, $11, R5, R6 // ec6509180b56
+ RNSBGT $0, $31, $32, R7, R8 // ec87801f2054
+ RXSBGT $17, $8, $16, R9, R10 // eca991081057
+ ROSBGT $9, $24, $11, R11, R0 // ec0b89180b56
+ RISBG $0, $31, $32, R1, R2 // ec21001f2055
+ RISBGN $17, $8, $16, R3, R4 // ec4311081059
+ RISBGZ $9, $24, $11, R5, R6 // ec6509980b55
+ RISBGNZ $0, $31, $32, R7, R8 // ec87009f2059
+ RISBHG $17, $8, $16, R9, R10 // eca91108105d
+ RISBLG $9, $24, $11, R11, R0 // ec0b09180b51
+ RISBHGZ $17, $8, $16, R9, R10 // eca91188105d
+ RISBLGZ $9, $24, $11, R11, R0 // ec0b09980b51
+
LAA R1, R2, 524287(R3) // eb213fff7ff8
LAAG R4, R5, -524288(R6) // eb54600080e8
LAAL R7, R8, 8192(R9) // eb87900002fa
@@ -219,6 +235,9 @@ TEXT main·foo(SB),DUPOK|NOSPLIT,$16-0 // TEXT main.foo(SB), DUPOK|NOSPLIT, $16-
TMLH R3, $0 // a7300000
TMLL R4, $32768 // a7418000
+ IPM R3 // b2220030
+ IPM R12 // b22200c0
+
BNE 0(PC) // a7740000
BEQ 0(PC) // a7840000
BLT 0(PC) // a7440000
diff --git a/src/cmd/asm/main.go b/src/cmd/asm/main.go
index 447d1afde3..fc6acc74c0 100644
--- a/src/cmd/asm/main.go
+++ b/src/cmd/asm/main.go
@@ -83,7 +83,7 @@ func main() {
}
}
if ok && !*flags.SymABIs {
- obj.WriteObjFile(ctxt, buf)
+ obj.WriteObjFile(ctxt, buf, "")
}
if !ok || diag {
if failedFile != "" {
diff --git a/src/cmd/cgo/ast.go b/src/cmd/cgo/ast.go
index 83d727a8a5..54d6bc2559 100644
--- a/src/cmd/cgo/ast.go
+++ b/src/cmd/cgo/ast.go
@@ -200,18 +200,6 @@ func (f *File) saveExprs(x interface{}, context astContext) {
}
case *ast.CallExpr:
f.saveCall(x, context)
- case *ast.GenDecl:
- if x.Tok == token.CONST {
- for _, spec := range x.Specs {
- vs := spec.(*ast.ValueSpec)
- if vs.Type == nil {
- for _, name := range spec.(*ast.ValueSpec).Names {
- consts[name.Name] = true
- }
- }
- }
- }
-
}
}
diff --git a/src/cmd/cgo/doc.go b/src/cmd/cgo/doc.go
index cceb33edbd..2ca77fe8be 100644
--- a/src/cmd/cgo/doc.go
+++ b/src/cmd/cgo/doc.go
@@ -148,6 +148,8 @@ C.long, C.ulong (unsigned long), C.longlong (long long),
C.ulonglong (unsigned long long), C.float, C.double,
C.complexfloat (complex float), and C.complexdouble (complex double).
The C type void* is represented by Go's unsafe.Pointer.
+The C sized integer types (int8_t, uint8_t, …) are represented by their Go
+counterparts (int8, uint8, …).
The C types __int128_t and __uint128_t are represented by [16]byte.
A few special C types which would normally be represented by a pointer
@@ -296,7 +298,7 @@ Go functions can be exported for use by C code in the following way:
They will be available in the C code as:
- extern int64 MyFunction(int arg1, int arg2, GoString arg3);
+ extern int64_t MyFunction(int arg1, int arg2, GoString arg3);
extern struct MyFunction2_return MyFunction2(int arg1, int arg2, GoString arg3);
found in the _cgo_export.h generated header, after any preambles
@@ -710,7 +712,7 @@ _cgo_main.c:
int main() { return 0; }
void crosscall2(void(*fn)(void*, int, uintptr_t), void *a, int c, uintptr_t ctxt) { }
- uintptr_t _cgo_wait_runtime_init_done() { return 0; }
+ uintptr_t _cgo_wait_runtime_init_done(void) { return 0; }
void _cgo_release_context(uintptr_t ctxt) { }
char* _cgo_topofstack(void) { return (char*)0; }
void _cgo_allocate(void *a, int c) { }
diff --git a/src/cmd/cgo/gcc.go b/src/cmd/cgo/gcc.go
index b5cf04cf4c..941f1db832 100644
--- a/src/cmd/cgo/gcc.go
+++ b/src/cmd/cgo/gcc.go
@@ -23,6 +23,7 @@ import (
"internal/xcoff"
"math"
"os"
+ "regexp"
"strconv"
"strings"
"unicode"
@@ -897,21 +898,16 @@ func (p *Package) rewriteCall(f *File, call *Call) (string, bool) {
needsUnsafe = true
}
- // Explicitly convert untyped constants to the
- // parameter type, to avoid a type mismatch.
- if p.isConst(f, arg) {
- ptype := p.rewriteUnsafe(param.Go)
+ // Use "var x T = ..." syntax to explicitly convert untyped
+ // constants to the parameter type, to avoid a type mismatch.
+ ptype := p.rewriteUnsafe(param.Go)
+
+ if !p.needsPointerCheck(f, param.Go, args[i]) || param.BadPointer {
if ptype != param.Go {
needsUnsafe = true
}
- arg = &ast.CallExpr{
- Fun: ptype,
- Args: []ast.Expr{arg},
- }
- }
-
- if !p.needsPointerCheck(f, param.Go, args[i]) {
- fmt.Fprintf(&sb, "_cgo%d := %s; ", i, gofmtPos(arg, origArg.Pos()))
+ fmt.Fprintf(&sb, "var _cgo%d %s = %s; ", i,
+ gofmtLine(ptype), gofmtPos(arg, origArg.Pos()))
continue
}
@@ -1254,47 +1250,6 @@ func (p *Package) isType(t ast.Expr) bool {
return false
}
-// isConst reports whether x is an untyped constant expression.
-func (p *Package) isConst(f *File, x ast.Expr) bool {
- switch x := x.(type) {
- case *ast.BasicLit:
- return true
- case *ast.SelectorExpr:
- id, ok := x.X.(*ast.Ident)
- if !ok || id.Name != "C" {
- return false
- }
- name := f.Name[x.Sel.Name]
- if name != nil {
- return name.IsConst()
- }
- case *ast.Ident:
- return x.Name == "nil" ||
- strings.HasPrefix(x.Name, "_Ciconst_") ||
- strings.HasPrefix(x.Name, "_Cfconst_") ||
- strings.HasPrefix(x.Name, "_Csconst_") ||
- consts[x.Name]
- case *ast.UnaryExpr:
- return p.isConst(f, x.X)
- case *ast.BinaryExpr:
- return p.isConst(f, x.X) && p.isConst(f, x.Y)
- case *ast.ParenExpr:
- return p.isConst(f, x.X)
- case *ast.CallExpr:
- // Calling the builtin function complex on two untyped
- // constants returns an untyped constant.
- // TODO: It's possible to construct a case that will
- // erroneously succeed if there is a local function
- // named "complex", shadowing the builtin, that returns
- // a numeric type. I can't think of any cases that will
- // erroneously fail.
- if id, ok := x.Fun.(*ast.Ident); ok && id.Name == "complex" && len(x.Args) == 2 {
- return p.isConst(f, x.Args[0]) && p.isConst(f, x.Args[1])
- }
- }
- return false
-}
-
// isVariable reports whether x is a variable, possibly with field references.
func (p *Package) isVariable(x ast.Expr) bool {
switch x := x.(type) {
@@ -1633,6 +1588,7 @@ func (p *Package) gccCmd() []string {
c = append(c, p.gccMachine()...)
if goos == "aix" {
c = append(c, "-maix64")
+ c = append(c, "-mcmodel=large")
}
c = append(c, "-") //read input from standard input
return c
@@ -2091,6 +2047,8 @@ type typeConv struct {
ptrSize int64
intSize int64
+
+ exactWidthIntegerTypes map[string]*Type
}
var tagGen int
@@ -2133,6 +2091,21 @@ func (c *typeConv) Init(ptrSize, intSize int64) {
} else {
c.goVoidPtr = c.Ident("unsafe.Pointer")
}
+
+ c.exactWidthIntegerTypes = make(map[string]*Type)
+ for _, t := range []ast.Expr{
+ c.int8, c.int16, c.int32, c.int64,
+ c.uint8, c.uint16, c.uint32, c.uint64,
+ } {
+ name := t.(*ast.Ident).Name
+ u := new(Type)
+ *u = *goTypes[name]
+ if u.Align > ptrSize {
+ u.Align = ptrSize
+ }
+ u.Go = t
+ c.exactWidthIntegerTypes[name] = u
+ }
}
// base strips away qualifiers and typedefs to get the underlying type
@@ -2504,6 +2477,26 @@ func (c *typeConv) Type(dtype dwarf.Type, pos token.Pos) *Type {
t.Align = c.ptrSize
break
}
+ // Exact-width integer types. These are always compatible with
+ // the corresponding Go types since the C standard requires
+ // them to have no padding bit and use the two’s complement
+ // representation.
+ if exactWidthIntegerType.MatchString(dt.Name) {
+ sub := c.Type(dt.Type, pos)
+ goname := strings.TrimPrefix(dt.Name, "__")
+ goname = strings.TrimSuffix(goname, "_t")
+ u := c.exactWidthIntegerTypes[goname]
+ if sub.Size != u.Size {
+ fatalf("%s: unexpected size: %d vs. %d – %s", lineno(pos), sub.Size, u.Size, dtype)
+ }
+ if sub.Align != u.Align {
+ fatalf("%s: unexpected alignment: %d vs. %d – %s", lineno(pos), sub.Align, u.Align, dtype)
+ }
+ t.Size = u.Size
+ t.Align = u.Align
+ t.Go = u.Go
+ break
+ }
name := c.Ident("_Ctype_" + dt.Name)
goIdent[name.Name] = name
sub := c.Type(dt.Type, pos)
@@ -2511,13 +2504,16 @@ func (c *typeConv) Type(dtype dwarf.Type, pos token.Pos) *Type {
// Treat this typedef as a uintptr.
s := *sub
s.Go = c.uintptr
+ s.BadPointer = true
sub = &s
// Make sure we update any previously computed type.
if oldType := typedef[name.Name]; oldType != nil {
oldType.Go = sub.Go
+ oldType.BadPointer = true
}
}
t.Go = name
+ t.BadPointer = sub.BadPointer
if unionWithPointer[sub.Go] {
unionWithPointer[t.Go] = true
}
@@ -2527,6 +2523,7 @@ func (c *typeConv) Type(dtype dwarf.Type, pos token.Pos) *Type {
if oldType == nil {
tt := *t
tt.Go = sub.Go
+ tt.BadPointer = sub.BadPointer
typedef[name.Name] = &tt
}
@@ -2635,6 +2632,8 @@ func (c *typeConv) Type(dtype dwarf.Type, pos token.Pos) *Type {
return t
}
+var exactWidthIntegerType = regexp.MustCompile(`^(__)?u?int(8|16|32|64)_t$`)
+
// isStructUnionClass reports whether the type described by the Go syntax x
// is a struct, union, or class with a tag.
func isStructUnionClass(x ast.Expr) bool {
diff --git a/src/cmd/cgo/godefs.go b/src/cmd/cgo/godefs.go
index 64384a606b..b4fd9c5a6e 100644
--- a/src/cmd/cgo/godefs.go
+++ b/src/cmd/cgo/godefs.go
@@ -136,21 +136,31 @@ func gofmt(n interface{}) string {
// (due to the printer possibly inserting newlines because of position
// information) operators.
var gofmtLineReplacer = strings.NewReplacer(
- "{\n", "{",
- ",\n", ",",
+ // Want to replace \n without ; after everything from
+ // https://golang.org/ref/spec#Operators_and_punctuation
+ // EXCEPT ++ -- ) ] }
"++\n", "++;",
"--\n", "--;",
- "+\n", "+",
- "-\n", "-",
- "*\n", "*",
- "/\n", "/",
- "%\n", "%",
- "&\n", "&",
- "|\n", "|",
- "^\n", "^",
- "<\n", "<",
- ">\n", ">",
- "=\n", "=",
+
+ "+\n", "+ ",
+ "-\n", "- ",
+ "*\n", "* ",
+ "/\n", "/ ",
+ "%\n", "% ",
+ "&\n", "& ",
+ "|\n", "| ",
+ "^\n", "^ ",
+ "<\n", "< ",
+ ">\n", "> ",
+ "=\n", "= ",
+ "!\n", "! ", // not possible in gofmt today
+ "(\n", "(",
+ "[\n", "[", // not possible in gofmt today
+ "{\n", "{",
+ ",\n", ",",
+ ".\n", ". ",
+ ":\n", ": ", // not possible in gofmt today
+
"\n", ";",
)
diff --git a/src/cmd/cgo/main.go b/src/cmd/cgo/main.go
index 80435b0634..5a7bb3f87b 100644
--- a/src/cmd/cgo/main.go
+++ b/src/cmd/cgo/main.go
@@ -71,9 +71,6 @@ type File struct {
Edit *edit.Buffer
}
-// Untyped constants in the current package.
-var consts = make(map[string]bool)
-
func (f *File) offset(p token.Pos) int {
return fset.Position(p).Offset
}
@@ -154,6 +151,7 @@ type Type struct {
Go ast.Expr
EnumValues map[string]int64
Typedef string
+ BadPointer bool
}
// A FuncType collects information about a function type in both the C and Go worlds.
diff --git a/src/cmd/cgo/out.go b/src/cmd/cgo/out.go
index 0cf8b174f8..5b3a7cb9c1 100644
--- a/src/cmd/cgo/out.go
+++ b/src/cmd/cgo/out.go
@@ -59,14 +59,14 @@ func (p *Package) writeDefs() {
fmt.Fprintf(fm, "int main() { return 0; }\n")
if *importRuntimeCgo {
fmt.Fprintf(fm, "void crosscall2(void(*fn)(void*, int, __SIZE_TYPE__), void *a, int c, __SIZE_TYPE__ ctxt) { }\n")
- fmt.Fprintf(fm, "__SIZE_TYPE__ _cgo_wait_runtime_init_done() { return 0; }\n")
+ fmt.Fprintf(fm, "__SIZE_TYPE__ _cgo_wait_runtime_init_done(void) { return 0; }\n")
fmt.Fprintf(fm, "void _cgo_release_context(__SIZE_TYPE__ ctxt) { }\n")
fmt.Fprintf(fm, "char* _cgo_topofstack(void) { return (char*)0; }\n")
} else {
// If we're not importing runtime/cgo, we *are* runtime/cgo,
// which provides these functions. We just need a prototype.
fmt.Fprintf(fm, "void crosscall2(void(*fn)(void*, int, __SIZE_TYPE__), void *a, int c, __SIZE_TYPE__ ctxt);\n")
- fmt.Fprintf(fm, "__SIZE_TYPE__ _cgo_wait_runtime_init_done();\n")
+ fmt.Fprintf(fm, "__SIZE_TYPE__ _cgo_wait_runtime_init_done(void);\n")
fmt.Fprintf(fm, "void _cgo_release_context(__SIZE_TYPE__);\n")
}
fmt.Fprintf(fm, "void _cgo_allocate(void *a, int c) { }\n")
@@ -336,6 +336,12 @@ func dynimport(obj string) {
fatalf("cannot load imported symbols from XCOFF file %s: %v", obj, err)
}
for _, s := range sym {
+ if s.Name == "runtime_rt0_go" || s.Name == "_rt0_ppc64_aix_lib" {
+ // These symbols are imported by runtime/cgo but
+ // must not be added to _cgo_import.go as there are
+ // Go symbols.
+ continue
+ }
fmt.Fprintf(stdout, "//go:cgo_import_dynamic %s %s %q\n", s.Name, s.Name, s.Library)
}
lib, err := f.ImportedLibraries()
@@ -777,14 +783,14 @@ func (p *Package) writeExports(fgo2, fm, fgcc, fgcch io.Writer) {
fmt.Fprintf(fgcc, "#include \"_cgo_export.h\"\n\n")
// We use packed structs, but they are always aligned.
- // The pragmas and address-of-packed-member are not recognized as warning groups in clang 3.4.1, so ignore unknown pragmas first.
- // remove as part of #27619 (all: drop support for FreeBSD 10).
+ // The pragmas and address-of-packed-member are only recognized as
+ // warning groups in clang 4.0+, so ignore unknown pragmas first.
fmt.Fprintf(fgcc, "#pragma GCC diagnostic ignored \"-Wunknown-pragmas\"\n")
fmt.Fprintf(fgcc, "#pragma GCC diagnostic ignored \"-Wpragmas\"\n")
fmt.Fprintf(fgcc, "#pragma GCC diagnostic ignored \"-Waddress-of-packed-member\"\n")
fmt.Fprintf(fgcc, "extern void crosscall2(void (*fn)(void *, int, __SIZE_TYPE__), void *, int, __SIZE_TYPE__);\n")
- fmt.Fprintf(fgcc, "extern __SIZE_TYPE__ _cgo_wait_runtime_init_done();\n")
+ fmt.Fprintf(fgcc, "extern __SIZE_TYPE__ _cgo_wait_runtime_init_done(void);\n")
fmt.Fprintf(fgcc, "extern void _cgo_release_context(__SIZE_TYPE__);\n\n")
fmt.Fprintf(fgcc, "extern char* _cgo_topofstack(void);")
fmt.Fprintf(fgcc, "%s\n", tsanProlog)
@@ -1361,19 +1367,19 @@ func c(repr string, args ...interface{}) *TypeRepr {
// Map predeclared Go types to Type.
var goTypes = map[string]*Type{
- "bool": {Size: 1, Align: 1, C: c("GoUint8")},
- "byte": {Size: 1, Align: 1, C: c("GoUint8")},
+ "bool": {Size: 1, Align: 1, C: c("uint8_t")},
+ "byte": {Size: 1, Align: 1, C: c("uint8_t")},
"int": {Size: 0, Align: 0, C: c("GoInt")},
"uint": {Size: 0, Align: 0, C: c("GoUint")},
- "rune": {Size: 4, Align: 4, C: c("GoInt32")},
- "int8": {Size: 1, Align: 1, C: c("GoInt8")},
- "uint8": {Size: 1, Align: 1, C: c("GoUint8")},
- "int16": {Size: 2, Align: 2, C: c("GoInt16")},
- "uint16": {Size: 2, Align: 2, C: c("GoUint16")},
- "int32": {Size: 4, Align: 4, C: c("GoInt32")},
- "uint32": {Size: 4, Align: 4, C: c("GoUint32")},
- "int64": {Size: 8, Align: 8, C: c("GoInt64")},
- "uint64": {Size: 8, Align: 8, C: c("GoUint64")},
+ "rune": {Size: 4, Align: 4, C: c("int32_t")},
+ "int8": {Size: 1, Align: 1, C: c("int8_t")},
+ "uint8": {Size: 1, Align: 1, C: c("uint8_t")},
+ "int16": {Size: 2, Align: 2, C: c("int16_t")},
+ "uint16": {Size: 2, Align: 2, C: c("uint16_t")},
+ "int32": {Size: 4, Align: 4, C: c("int32_t")},
+ "uint32": {Size: 4, Align: 4, C: c("uint32_t")},
+ "int64": {Size: 8, Align: 8, C: c("int64_t")},
+ "uint64": {Size: 8, Align: 8, C: c("uint64_t")},
"float32": {Size: 4, Align: 4, C: c("GoFloat32")},
"float64": {Size: 8, Align: 8, C: c("GoFloat64")},
"complex64": {Size: 8, Align: 4, C: c("GoComplex64")},
@@ -1480,10 +1486,11 @@ __cgo_size_assert(double, 8)
extern char* _cgo_topofstack(void);
-/* We use packed structs, but they are always aligned. */
-/* The pragmas and address-of-packed-member are not recognized as warning groups in clang 3.4.1, so ignore unknown pragmas first. */
-/* remove as part of #27619 (all: drop support for FreeBSD 10). */
-
+/*
+ We use packed structs, but they are always aligned.
+ The pragmas and address-of-packed-member are only recognized as warning
+ groups in clang 4.0+, so ignore unknown pragmas first.
+*/
#pragma GCC diagnostic ignored "-Wunknown-pragmas"
#pragma GCC diagnostic ignored "-Wpragmas"
#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
@@ -1864,16 +1871,10 @@ const gccExportHeaderProlog = `
#ifndef GO_CGO_PROLOGUE_H
#define GO_CGO_PROLOGUE_H
-typedef signed char GoInt8;
-typedef unsigned char GoUint8;
-typedef short GoInt16;
-typedef unsigned short GoUint16;
-typedef int GoInt32;
-typedef unsigned int GoUint32;
-typedef long long GoInt64;
-typedef unsigned long long GoUint64;
-typedef GoIntGOINTBITS GoInt;
-typedef GoUintGOINTBITS GoUint;
+#include
+
+typedef intGOINTBITS_t GoInt;
+typedef uintGOINTBITS_t GoUint;
typedef __SIZE_TYPE__ GoUintptr;
typedef float GoFloat32;
typedef double GoFloat64;
@@ -1924,5 +1925,5 @@ static void GoInit(void) {
runtime_iscgo = 1;
}
-extern __SIZE_TYPE__ _cgo_wait_runtime_init_done() __attribute__ ((weak));
+extern __SIZE_TYPE__ _cgo_wait_runtime_init_done(void) __attribute__ ((weak));
`
diff --git a/src/cmd/compile/internal/amd64/ssa.go b/src/cmd/compile/internal/amd64/ssa.go
index a2c7d5d8d8..9c91e05661 100644
--- a/src/cmd/compile/internal/amd64/ssa.go
+++ b/src/cmd/compile/internal/amd64/ssa.go
@@ -117,6 +117,21 @@ func opregreg(s *gc.SSAGenState, op obj.As, dest, src int16) *obj.Prog {
return p
}
+// memIdx fills out a as an indexed memory reference for v.
+// It assumes that the base register and the index register
+// are v.Args[0].Reg() and v.Args[1].Reg(), respectively.
+// The caller must still use gc.AddAux/gc.AddAux2 to handle v.Aux as necessary.
+func memIdx(a *obj.Addr, v *ssa.Value) {
+ r, i := v.Args[0].Reg(), v.Args[1].Reg()
+ a.Type = obj.TYPE_MEM
+ a.Scale = v.Op.Scale()
+ if a.Scale == 1 && i == x86.REG_SP {
+ r, i = i, r
+ }
+ a.Reg = r
+ a.Index = i
+}
+
// DUFFZERO consists of repeated blocks of 4 MOVUPSs + LEAQ,
// See runtime/mkduff.go.
func duffStart(size int64) int64 {
@@ -399,7 +414,8 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
r := v.Reg()
a := v.Args[0].Reg()
if r == a {
- if v.AuxInt == 1 {
+ switch v.AuxInt {
+ case 1:
var asm obj.As
// Software optimization manual recommends add $1,reg.
// But inc/dec is 1 byte smaller. ICC always uses inc
@@ -415,8 +431,7 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p.To.Type = obj.TYPE_REG
p.To.Reg = r
return
- }
- if v.AuxInt == -1 {
+ case -1:
var asm obj.As
if v.Op == ssa.OpAMD64ADDQconst {
asm = x86.ADECQ
@@ -427,6 +442,20 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p.To.Type = obj.TYPE_REG
p.To.Reg = r
return
+ case 0x80:
+ // 'SUBQ $-0x80, r' is shorter to encode than
+ // and functionally equivalent to 'ADDQ $0x80, r'.
+ asm := x86.ASUBL
+ if v.Op == ssa.OpAMD64ADDQconst {
+ asm = x86.ASUBQ
+ }
+ p := s.Prog(asm)
+ p.From.Type = obj.TYPE_CONST
+ p.From.Offset = -0x80
+ p.To.Type = obj.TYPE_REG
+ p.To.Reg = r
+ return
+
}
p := s.Prog(v.Op.Asm())
p.From.Type = obj.TYPE_CONST
@@ -571,26 +600,9 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
case ssa.OpAMD64LEAQ1, ssa.OpAMD64LEAQ2, ssa.OpAMD64LEAQ4, ssa.OpAMD64LEAQ8,
ssa.OpAMD64LEAL1, ssa.OpAMD64LEAL2, ssa.OpAMD64LEAL4, ssa.OpAMD64LEAL8,
ssa.OpAMD64LEAW1, ssa.OpAMD64LEAW2, ssa.OpAMD64LEAW4, ssa.OpAMD64LEAW8:
- o := v.Reg()
- r := v.Args[0].Reg()
- i := v.Args[1].Reg()
p := s.Prog(v.Op.Asm())
- switch v.Op {
- case ssa.OpAMD64LEAQ1, ssa.OpAMD64LEAL1, ssa.OpAMD64LEAW1:
- p.From.Scale = 1
- if i == x86.REG_SP {
- r, i = i, r
- }
- case ssa.OpAMD64LEAQ2, ssa.OpAMD64LEAL2, ssa.OpAMD64LEAW2:
- p.From.Scale = 2
- case ssa.OpAMD64LEAQ4, ssa.OpAMD64LEAL4, ssa.OpAMD64LEAW4:
- p.From.Scale = 4
- case ssa.OpAMD64LEAQ8, ssa.OpAMD64LEAL8, ssa.OpAMD64LEAW8:
- p.From.Scale = 8
- }
- p.From.Type = obj.TYPE_MEM
- p.From.Reg = r
- p.From.Index = i
+ memIdx(&p.From, v)
+ o := v.Reg()
p.To.Type = obj.TYPE_REG
p.To.Reg = o
if v.AuxInt != 0 && v.Aux == nil {
@@ -702,25 +714,8 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p.To.Reg = v.Reg()
case ssa.OpAMD64MOVBloadidx1, ssa.OpAMD64MOVWloadidx1, ssa.OpAMD64MOVLloadidx1, ssa.OpAMD64MOVQloadidx1, ssa.OpAMD64MOVSSloadidx1, ssa.OpAMD64MOVSDloadidx1,
ssa.OpAMD64MOVQloadidx8, ssa.OpAMD64MOVSDloadidx8, ssa.OpAMD64MOVLloadidx8, ssa.OpAMD64MOVLloadidx4, ssa.OpAMD64MOVSSloadidx4, ssa.OpAMD64MOVWloadidx2:
- r := v.Args[0].Reg()
- i := v.Args[1].Reg()
p := s.Prog(v.Op.Asm())
- p.From.Type = obj.TYPE_MEM
- switch v.Op {
- case ssa.OpAMD64MOVBloadidx1, ssa.OpAMD64MOVWloadidx1, ssa.OpAMD64MOVLloadidx1, ssa.OpAMD64MOVQloadidx1, ssa.OpAMD64MOVSSloadidx1, ssa.OpAMD64MOVSDloadidx1:
- if i == x86.REG_SP {
- r, i = i, r
- }
- p.From.Scale = 1
- case ssa.OpAMD64MOVQloadidx8, ssa.OpAMD64MOVSDloadidx8, ssa.OpAMD64MOVLloadidx8:
- p.From.Scale = 8
- case ssa.OpAMD64MOVLloadidx4, ssa.OpAMD64MOVSSloadidx4:
- p.From.Scale = 4
- case ssa.OpAMD64MOVWloadidx2:
- p.From.Scale = 2
- }
- p.From.Reg = r
- p.From.Index = i
+ memIdx(&p.From, v)
gc.AddAux(&p.From, v)
p.To.Type = obj.TYPE_REG
p.To.Reg = v.Reg()
@@ -736,27 +731,10 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
gc.AddAux(&p.To, v)
case ssa.OpAMD64MOVBstoreidx1, ssa.OpAMD64MOVWstoreidx1, ssa.OpAMD64MOVLstoreidx1, ssa.OpAMD64MOVQstoreidx1, ssa.OpAMD64MOVSSstoreidx1, ssa.OpAMD64MOVSDstoreidx1,
ssa.OpAMD64MOVQstoreidx8, ssa.OpAMD64MOVSDstoreidx8, ssa.OpAMD64MOVLstoreidx8, ssa.OpAMD64MOVSSstoreidx4, ssa.OpAMD64MOVLstoreidx4, ssa.OpAMD64MOVWstoreidx2:
- r := v.Args[0].Reg()
- i := v.Args[1].Reg()
p := s.Prog(v.Op.Asm())
p.From.Type = obj.TYPE_REG
p.From.Reg = v.Args[2].Reg()
- p.To.Type = obj.TYPE_MEM
- switch v.Op {
- case ssa.OpAMD64MOVBstoreidx1, ssa.OpAMD64MOVWstoreidx1, ssa.OpAMD64MOVLstoreidx1, ssa.OpAMD64MOVQstoreidx1, ssa.OpAMD64MOVSSstoreidx1, ssa.OpAMD64MOVSDstoreidx1:
- if i == x86.REG_SP {
- r, i = i, r
- }
- p.To.Scale = 1
- case ssa.OpAMD64MOVQstoreidx8, ssa.OpAMD64MOVSDstoreidx8, ssa.OpAMD64MOVLstoreidx8:
- p.To.Scale = 8
- case ssa.OpAMD64MOVSSstoreidx4, ssa.OpAMD64MOVLstoreidx4:
- p.To.Scale = 4
- case ssa.OpAMD64MOVWstoreidx2:
- p.To.Scale = 2
- }
- p.To.Reg = r
- p.To.Index = i
+ memIdx(&p.To, v)
gc.AddAux(&p.To, v)
case ssa.OpAMD64ADDQconstmodify, ssa.OpAMD64ADDLconstmodify:
sc := v.AuxValAndOff()
@@ -809,24 +787,7 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p.From.Type = obj.TYPE_CONST
sc := v.AuxValAndOff()
p.From.Offset = sc.Val()
- r := v.Args[0].Reg()
- i := v.Args[1].Reg()
- switch v.Op {
- case ssa.OpAMD64MOVBstoreconstidx1, ssa.OpAMD64MOVWstoreconstidx1, ssa.OpAMD64MOVLstoreconstidx1, ssa.OpAMD64MOVQstoreconstidx1:
- p.To.Scale = 1
- if i == x86.REG_SP {
- r, i = i, r
- }
- case ssa.OpAMD64MOVWstoreconstidx2:
- p.To.Scale = 2
- case ssa.OpAMD64MOVLstoreconstidx4:
- p.To.Scale = 4
- case ssa.OpAMD64MOVQstoreconstidx8:
- p.To.Scale = 8
- }
- p.To.Type = obj.TYPE_MEM
- p.To.Reg = r
- p.To.Index = i
+ memIdx(&p.To, v)
gc.AddAux2(&p.To, v, sc.Off())
case ssa.OpAMD64MOVLQSX, ssa.OpAMD64MOVWQSX, ssa.OpAMD64MOVBQSX, ssa.OpAMD64MOVLQZX, ssa.OpAMD64MOVWQZX, ssa.OpAMD64MOVBQZX,
ssa.OpAMD64CVTTSS2SL, ssa.OpAMD64CVTTSD2SL, ssa.OpAMD64CVTTSS2SQ, ssa.OpAMD64CVTTSD2SQ,
@@ -979,6 +940,20 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p.To.Name = obj.NAME_EXTERN
p.To.Sym = v.Aux.(*obj.LSym)
+ case ssa.OpAMD64LoweredPanicBoundsA, ssa.OpAMD64LoweredPanicBoundsB, ssa.OpAMD64LoweredPanicBoundsC:
+ p := s.Prog(obj.ACALL)
+ p.To.Type = obj.TYPE_MEM
+ p.To.Name = obj.NAME_EXTERN
+ p.To.Sym = gc.BoundsCheckFunc[v.AuxInt]
+ s.UseArgs(int64(2 * gc.Widthptr)) // space used in callee args area by assembly stubs
+
+ case ssa.OpAMD64LoweredPanicExtendA, ssa.OpAMD64LoweredPanicExtendB, ssa.OpAMD64LoweredPanicExtendC:
+ p := s.Prog(obj.ACALL)
+ p.To.Type = obj.TYPE_MEM
+ p.To.Name = obj.NAME_EXTERN
+ p.To.Sym = gc.ExtendCheckFunc[v.AuxInt]
+ s.UseArgs(int64(3 * gc.Widthptr)) // space used in callee args area by assembly stubs
+
case ssa.OpAMD64NEGQ, ssa.OpAMD64NEGL,
ssa.OpAMD64BSWAPQ, ssa.OpAMD64BSWAPL,
ssa.OpAMD64NOTQ, ssa.OpAMD64NOTL:
@@ -1108,7 +1083,7 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
if gc.Debug_checknil != 0 && v.Pos.Line() > 1 { // v.Pos.Line()==1 in generated wrappers
gc.Warnl(v.Pos, "generated nil check")
}
- case ssa.OpAMD64MOVLatomicload, ssa.OpAMD64MOVQatomicload:
+ case ssa.OpAMD64MOVBatomicload, ssa.OpAMD64MOVLatomicload, ssa.OpAMD64MOVQatomicload:
p := s.Prog(v.Op.Asm())
p.From.Type = obj.TYPE_MEM
p.From.Reg = v.Args[0].Reg()
@@ -1233,7 +1208,6 @@ func ssaGenBlock(s *gc.SSAGenState, b, next *ssa.Block) {
s.Branches = append(s.Branches, gc.Branch{P: p, B: b.Succs[0].Block()})
}
case ssa.BlockExit:
- s.Prog(obj.AUNDEF) // tell plive.go that we never reach here
case ssa.BlockRet:
s.Prog(obj.ARET)
case ssa.BlockRetJmp:
diff --git a/src/cmd/compile/internal/arm/ssa.go b/src/cmd/compile/internal/arm/ssa.go
index 9a8fabf622..16752977a8 100644
--- a/src/cmd/compile/internal/arm/ssa.go
+++ b/src/cmd/compile/internal/arm/ssa.go
@@ -206,6 +206,9 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
ssa.OpARMADDD,
ssa.OpARMSUBF,
ssa.OpARMSUBD,
+ ssa.OpARMSLL,
+ ssa.OpARMSRL,
+ ssa.OpARMSRA,
ssa.OpARMMULF,
ssa.OpARMMULD,
ssa.OpARMNMULF,
@@ -247,18 +250,6 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p.Reg = r1
p.To.Type = obj.TYPE_REG
p.To.Reg = r
- case ssa.OpARMSLL,
- ssa.OpARMSRL,
- ssa.OpARMSRA:
- r := v.Reg()
- r1 := v.Args[0].Reg()
- r2 := v.Args[1].Reg()
- p := s.Prog(v.Op.Asm())
- p.From.Type = obj.TYPE_REG
- p.From.Reg = r2
- p.Reg = r1
- p.To.Type = obj.TYPE_REG
- p.To.Reg = r
case ssa.OpARMSRAcond:
// ARM shift instructions uses only the low-order byte of the shift amount
// generate conditional instructions to deal with large shifts
@@ -659,6 +650,7 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
case ssa.OpARMMVN,
ssa.OpARMCLZ,
ssa.OpARMREV,
+ ssa.OpARMREV16,
ssa.OpARMRBIT,
ssa.OpARMSQRTD,
ssa.OpARMNEGF,
@@ -710,6 +702,18 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p.To.Type = obj.TYPE_MEM
p.To.Name = obj.NAME_EXTERN
p.To.Sym = v.Aux.(*obj.LSym)
+ case ssa.OpARMLoweredPanicBoundsA, ssa.OpARMLoweredPanicBoundsB, ssa.OpARMLoweredPanicBoundsC:
+ p := s.Prog(obj.ACALL)
+ p.To.Type = obj.TYPE_MEM
+ p.To.Name = obj.NAME_EXTERN
+ p.To.Sym = gc.BoundsCheckFunc[v.AuxInt]
+ s.UseArgs(8) // space used in callee args area by assembly stubs
+ case ssa.OpARMLoweredPanicExtendA, ssa.OpARMLoweredPanicExtendB, ssa.OpARMLoweredPanicExtendC:
+ p := s.Prog(obj.ACALL)
+ p.To.Type = obj.TYPE_MEM
+ p.To.Name = obj.NAME_EXTERN
+ p.To.Sym = gc.ExtendCheckFunc[v.AuxInt]
+ s.UseArgs(12) // space used in callee args area by assembly stubs
case ssa.OpARMDUFFZERO:
p := s.Prog(obj.ADUFFZERO)
p.To.Type = obj.TYPE_MEM
@@ -916,7 +920,6 @@ func ssaGenBlock(s *gc.SSAGenState, b, next *ssa.Block) {
}
case ssa.BlockExit:
- s.Prog(obj.AUNDEF) // tell plive.go that we never reach here
case ssa.BlockRet:
s.Prog(obj.ARET)
diff --git a/src/cmd/compile/internal/arm64/ssa.go b/src/cmd/compile/internal/arm64/ssa.go
index 87703dd80d..fc7a60e63e 100644
--- a/src/cmd/compile/internal/arm64/ssa.go
+++ b/src/cmd/compile/internal/arm64/ssa.go
@@ -246,6 +246,45 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p.Reg = v.Args[0].Reg()
p.To.Type = obj.TYPE_REG
p.To.Reg = v.Reg()
+ case ssa.OpARM64ADDSconstflags:
+ p := s.Prog(v.Op.Asm())
+ p.From.Type = obj.TYPE_CONST
+ p.From.Offset = v.AuxInt
+ p.Reg = v.Args[0].Reg()
+ p.To.Type = obj.TYPE_REG
+ p.To.Reg = v.Reg0()
+ case ssa.OpARM64ADCzerocarry:
+ p := s.Prog(v.Op.Asm())
+ p.From.Type = obj.TYPE_REG
+ p.From.Reg = arm64.REGZERO
+ p.Reg = arm64.REGZERO
+ p.To.Type = obj.TYPE_REG
+ p.To.Reg = v.Reg()
+ case ssa.OpARM64ADCSflags,
+ ssa.OpARM64ADDSflags,
+ ssa.OpARM64SBCSflags,
+ ssa.OpARM64SUBSflags:
+ r := v.Reg0()
+ r1 := v.Args[0].Reg()
+ r2 := v.Args[1].Reg()
+ p := s.Prog(v.Op.Asm())
+ p.From.Type = obj.TYPE_REG
+ p.From.Reg = r2
+ p.Reg = r1
+ p.To.Type = obj.TYPE_REG
+ p.To.Reg = r
+ case ssa.OpARM64NEGSflags:
+ p := s.Prog(v.Op.Asm())
+ p.From.Type = obj.TYPE_REG
+ p.From.Reg = v.Args[0].Reg()
+ p.To.Type = obj.TYPE_REG
+ p.To.Reg = v.Reg0()
+ case ssa.OpARM64NGCzerocarry:
+ p := s.Prog(v.Op.Asm())
+ p.From.Type = obj.TYPE_REG
+ p.From.Reg = arm64.REGZERO
+ p.To.Type = obj.TYPE_REG
+ p.To.Reg = v.Reg()
case ssa.OpARM64EXTRconst,
ssa.OpARM64EXTRWconst:
p := s.Prog(v.Op.Asm())
@@ -301,6 +340,12 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p.From.Val = math.Float64frombits(uint64(v.AuxInt))
p.To.Type = obj.TYPE_REG
p.To.Reg = v.Reg()
+ case ssa.OpARM64FCMPS0,
+ ssa.OpARM64FCMPD0:
+ p := s.Prog(v.Op.Asm())
+ p.From.Type = obj.TYPE_FCONST
+ p.From.Val = math.Float64frombits(0)
+ p.Reg = v.Args[0].Reg()
case ssa.OpARM64CMP,
ssa.OpARM64CMPW,
ssa.OpARM64CMN,
@@ -393,6 +438,7 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p.To.Type = obj.TYPE_REG
p.To.Reg = v.Reg()
case ssa.OpARM64LDAR,
+ ssa.OpARM64LDARB,
ssa.OpARM64LDARW:
p := s.Prog(v.Op.Asm())
p.From.Type = obj.TYPE_MEM
@@ -840,6 +886,12 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p.To.Type = obj.TYPE_MEM
p.To.Name = obj.NAME_EXTERN
p.To.Sym = v.Aux.(*obj.LSym)
+ case ssa.OpARM64LoweredPanicBoundsA, ssa.OpARM64LoweredPanicBoundsB, ssa.OpARM64LoweredPanicBoundsC:
+ p := s.Prog(obj.ACALL)
+ p.To.Type = obj.TYPE_MEM
+ p.To.Name = obj.NAME_EXTERN
+ p.To.Sym = gc.BoundsCheckFunc[v.AuxInt]
+ s.UseArgs(16) // space used in callee args area by assembly stubs
case ssa.OpARM64LoweredNilCheck:
// Issue a load which will fault if arg is nil.
p := s.Prog(arm64.AMOVB)
@@ -860,7 +912,11 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
ssa.OpARM64LessThanU,
ssa.OpARM64LessEqualU,
ssa.OpARM64GreaterThanU,
- ssa.OpARM64GreaterEqualU:
+ ssa.OpARM64GreaterEqualU,
+ ssa.OpARM64LessThanF,
+ ssa.OpARM64LessEqualF,
+ ssa.OpARM64GreaterThanF,
+ ssa.OpARM64GreaterEqualF:
// generate boolean values using CSET
p := s.Prog(arm64.ACSET)
p.From.Type = obj.TYPE_REG // assembler encodes conditional bits in Reg
@@ -908,6 +964,10 @@ var condBits = map[ssa.Op]int16{
ssa.OpARM64GreaterThanU: arm64.COND_HI,
ssa.OpARM64GreaterEqual: arm64.COND_GE,
ssa.OpARM64GreaterEqualU: arm64.COND_HS,
+ ssa.OpARM64LessThanF: arm64.COND_MI,
+ ssa.OpARM64LessEqualF: arm64.COND_LS,
+ ssa.OpARM64GreaterThanF: arm64.COND_GT,
+ ssa.OpARM64GreaterEqualF: arm64.COND_GE,
}
var blockJump = map[ssa.BlockKind]struct {
@@ -929,6 +989,10 @@ var blockJump = map[ssa.BlockKind]struct {
ssa.BlockARM64NZW: {arm64.ACBNZW, arm64.ACBZW},
ssa.BlockARM64TBZ: {arm64.ATBZ, arm64.ATBNZ},
ssa.BlockARM64TBNZ: {arm64.ATBNZ, arm64.ATBZ},
+ ssa.BlockARM64FLT: {arm64.ABMI, arm64.ABPL},
+ ssa.BlockARM64FGE: {arm64.ABGE, arm64.ABLT},
+ ssa.BlockARM64FLE: {arm64.ABLS, arm64.ABHI},
+ ssa.BlockARM64FGT: {arm64.ABGT, arm64.ABLE},
}
func ssaGenBlock(s *gc.SSAGenState, b, next *ssa.Block) {
@@ -958,7 +1022,6 @@ func ssaGenBlock(s *gc.SSAGenState, b, next *ssa.Block) {
}
case ssa.BlockExit:
- s.Prog(obj.AUNDEF) // tell plive.go that we never reach here
case ssa.BlockRet:
s.Prog(obj.ARET)
@@ -975,7 +1038,9 @@ func ssaGenBlock(s *gc.SSAGenState, b, next *ssa.Block) {
ssa.BlockARM64ULT, ssa.BlockARM64UGT,
ssa.BlockARM64ULE, ssa.BlockARM64UGE,
ssa.BlockARM64Z, ssa.BlockARM64NZ,
- ssa.BlockARM64ZW, ssa.BlockARM64NZW:
+ ssa.BlockARM64ZW, ssa.BlockARM64NZW,
+ ssa.BlockARM64FLT, ssa.BlockARM64FGE,
+ ssa.BlockARM64FLE, ssa.BlockARM64FGT:
jmp := blockJump[b.Kind]
var p *obj.Prog
switch next {
diff --git a/src/cmd/compile/internal/gc/align.go b/src/cmd/compile/internal/gc/align.go
index 87a7de547a..17c549d252 100644
--- a/src/cmd/compile/internal/gc/align.go
+++ b/src/cmd/compile/internal/gc/align.go
@@ -172,7 +172,16 @@ func dowidth(t *types.Type) {
if t.Width == -2 {
if !t.Broke() {
t.SetBroke(true)
- yyerrorl(asNode(t.Nod).Pos, "invalid recursive type %v", t)
+ // t.Nod should not be nil here, but in some cases is appears to be
+ // (see issue #23823). For now (temporary work-around) at a minimum
+ // don't crash and provide a meaningful error message.
+ // TODO(gri) determine the correct fix during a regular devel cycle
+ // (see issue #31872).
+ if t.Nod == nil {
+ yyerror("invalid recursive type %v", t)
+ } else {
+ yyerrorl(asNode(t.Nod).Pos, "invalid recursive type %v", t)
+ }
}
t.Width = 0
diff --git a/src/cmd/compile/internal/gc/builtin.go b/src/cmd/compile/internal/gc/builtin.go
index f32fcd675d..8244929f74 100644
--- a/src/cmd/compile/internal/gc/builtin.go
+++ b/src/cmd/compile/internal/gc/builtin.go
@@ -10,8 +10,6 @@ var runtimeDecls = [...]struct {
typ int
}{
{"newobject", funcTag, 4},
- {"panicindex", funcTag, 5},
- {"panicslice", funcTag, 5},
{"panicdivide", funcTag, 5},
{"panicshift", funcTag, 5},
{"panicmakeslicelen", funcTag, 5},
@@ -20,138 +18,154 @@ var runtimeDecls = [...]struct {
{"gopanic", funcTag, 7},
{"gorecover", funcTag, 10},
{"goschedguarded", funcTag, 5},
- {"printbool", funcTag, 12},
- {"printfloat", funcTag, 14},
- {"printint", funcTag, 16},
- {"printhex", funcTag, 18},
- {"printuint", funcTag, 18},
- {"printcomplex", funcTag, 20},
- {"printstring", funcTag, 22},
- {"printpointer", funcTag, 23},
- {"printiface", funcTag, 23},
- {"printeface", funcTag, 23},
- {"printslice", funcTag, 23},
+ {"goPanicIndex", funcTag, 12},
+ {"goPanicIndexU", funcTag, 14},
+ {"goPanicSliceAlen", funcTag, 12},
+ {"goPanicSliceAlenU", funcTag, 14},
+ {"goPanicSliceAcap", funcTag, 12},
+ {"goPanicSliceAcapU", funcTag, 14},
+ {"goPanicSliceB", funcTag, 12},
+ {"goPanicSliceBU", funcTag, 14},
+ {"goPanicSlice3Alen", funcTag, 12},
+ {"goPanicSlice3AlenU", funcTag, 14},
+ {"goPanicSlice3Acap", funcTag, 12},
+ {"goPanicSlice3AcapU", funcTag, 14},
+ {"goPanicSlice3B", funcTag, 12},
+ {"goPanicSlice3BU", funcTag, 14},
+ {"goPanicSlice3C", funcTag, 12},
+ {"goPanicSlice3CU", funcTag, 14},
+ {"printbool", funcTag, 16},
+ {"printfloat", funcTag, 18},
+ {"printint", funcTag, 20},
+ {"printhex", funcTag, 22},
+ {"printuint", funcTag, 22},
+ {"printcomplex", funcTag, 24},
+ {"printstring", funcTag, 26},
+ {"printpointer", funcTag, 27},
+ {"printiface", funcTag, 27},
+ {"printeface", funcTag, 27},
+ {"printslice", funcTag, 27},
{"printnl", funcTag, 5},
{"printsp", funcTag, 5},
{"printlock", funcTag, 5},
{"printunlock", funcTag, 5},
- {"concatstring2", funcTag, 26},
- {"concatstring3", funcTag, 27},
- {"concatstring4", funcTag, 28},
- {"concatstring5", funcTag, 29},
- {"concatstrings", funcTag, 31},
- {"cmpstring", funcTag, 33},
- {"intstring", funcTag, 36},
- {"slicebytetostring", funcTag, 38},
- {"slicebytetostringtmp", funcTag, 39},
- {"slicerunetostring", funcTag, 42},
- {"stringtoslicebyte", funcTag, 43},
- {"stringtoslicerune", funcTag, 46},
- {"slicecopy", funcTag, 48},
- {"slicestringcopy", funcTag, 49},
- {"decoderune", funcTag, 50},
- {"countrunes", funcTag, 51},
- {"convI2I", funcTag, 52},
- {"convT16", funcTag, 54},
- {"convT32", funcTag, 54},
- {"convT64", funcTag, 54},
- {"convTstring", funcTag, 54},
- {"convTslice", funcTag, 54},
- {"convT2E", funcTag, 55},
- {"convT2Enoptr", funcTag, 55},
- {"convT2I", funcTag, 55},
- {"convT2Inoptr", funcTag, 55},
- {"assertE2I", funcTag, 52},
- {"assertE2I2", funcTag, 56},
- {"assertI2I", funcTag, 52},
- {"assertI2I2", funcTag, 56},
- {"panicdottypeE", funcTag, 57},
- {"panicdottypeI", funcTag, 57},
- {"panicnildottype", funcTag, 58},
- {"ifaceeq", funcTag, 60},
- {"efaceeq", funcTag, 60},
- {"fastrand", funcTag, 62},
- {"makemap64", funcTag, 64},
- {"makemap", funcTag, 65},
- {"makemap_small", funcTag, 66},
- {"mapaccess1", funcTag, 67},
- {"mapaccess1_fast32", funcTag, 68},
- {"mapaccess1_fast64", funcTag, 68},
- {"mapaccess1_faststr", funcTag, 68},
- {"mapaccess1_fat", funcTag, 69},
- {"mapaccess2", funcTag, 70},
- {"mapaccess2_fast32", funcTag, 71},
- {"mapaccess2_fast64", funcTag, 71},
- {"mapaccess2_faststr", funcTag, 71},
- {"mapaccess2_fat", funcTag, 72},
- {"mapassign", funcTag, 67},
- {"mapassign_fast32", funcTag, 68},
- {"mapassign_fast32ptr", funcTag, 68},
- {"mapassign_fast64", funcTag, 68},
- {"mapassign_fast64ptr", funcTag, 68},
- {"mapassign_faststr", funcTag, 68},
- {"mapiterinit", funcTag, 73},
- {"mapdelete", funcTag, 73},
- {"mapdelete_fast32", funcTag, 74},
- {"mapdelete_fast64", funcTag, 74},
- {"mapdelete_faststr", funcTag, 74},
- {"mapiternext", funcTag, 75},
- {"mapclear", funcTag, 76},
- {"makechan64", funcTag, 78},
- {"makechan", funcTag, 79},
- {"chanrecv1", funcTag, 81},
- {"chanrecv2", funcTag, 82},
- {"chansend1", funcTag, 84},
- {"closechan", funcTag, 23},
- {"writeBarrier", varTag, 86},
- {"typedmemmove", funcTag, 87},
- {"typedmemclr", funcTag, 88},
- {"typedslicecopy", funcTag, 89},
- {"selectnbsend", funcTag, 90},
- {"selectnbrecv", funcTag, 91},
- {"selectnbrecv2", funcTag, 93},
- {"selectsetpc", funcTag, 58},
- {"selectgo", funcTag, 94},
+ {"concatstring2", funcTag, 30},
+ {"concatstring3", funcTag, 31},
+ {"concatstring4", funcTag, 32},
+ {"concatstring5", funcTag, 33},
+ {"concatstrings", funcTag, 35},
+ {"cmpstring", funcTag, 36},
+ {"intstring", funcTag, 39},
+ {"slicebytetostring", funcTag, 41},
+ {"slicebytetostringtmp", funcTag, 42},
+ {"slicerunetostring", funcTag, 45},
+ {"stringtoslicebyte", funcTag, 46},
+ {"stringtoslicerune", funcTag, 49},
+ {"slicecopy", funcTag, 51},
+ {"slicestringcopy", funcTag, 52},
+ {"decoderune", funcTag, 53},
+ {"countrunes", funcTag, 54},
+ {"convI2I", funcTag, 55},
+ {"convT16", funcTag, 57},
+ {"convT32", funcTag, 57},
+ {"convT64", funcTag, 57},
+ {"convTstring", funcTag, 57},
+ {"convTslice", funcTag, 57},
+ {"convT2E", funcTag, 58},
+ {"convT2Enoptr", funcTag, 58},
+ {"convT2I", funcTag, 58},
+ {"convT2Inoptr", funcTag, 58},
+ {"assertE2I", funcTag, 55},
+ {"assertE2I2", funcTag, 59},
+ {"assertI2I", funcTag, 55},
+ {"assertI2I2", funcTag, 59},
+ {"panicdottypeE", funcTag, 60},
+ {"panicdottypeI", funcTag, 60},
+ {"panicnildottype", funcTag, 61},
+ {"ifaceeq", funcTag, 63},
+ {"efaceeq", funcTag, 63},
+ {"fastrand", funcTag, 65},
+ {"makemap64", funcTag, 67},
+ {"makemap", funcTag, 68},
+ {"makemap_small", funcTag, 69},
+ {"mapaccess1", funcTag, 70},
+ {"mapaccess1_fast32", funcTag, 71},
+ {"mapaccess1_fast64", funcTag, 71},
+ {"mapaccess1_faststr", funcTag, 71},
+ {"mapaccess1_fat", funcTag, 72},
+ {"mapaccess2", funcTag, 73},
+ {"mapaccess2_fast32", funcTag, 74},
+ {"mapaccess2_fast64", funcTag, 74},
+ {"mapaccess2_faststr", funcTag, 74},
+ {"mapaccess2_fat", funcTag, 75},
+ {"mapassign", funcTag, 70},
+ {"mapassign_fast32", funcTag, 71},
+ {"mapassign_fast32ptr", funcTag, 71},
+ {"mapassign_fast64", funcTag, 71},
+ {"mapassign_fast64ptr", funcTag, 71},
+ {"mapassign_faststr", funcTag, 71},
+ {"mapiterinit", funcTag, 76},
+ {"mapdelete", funcTag, 76},
+ {"mapdelete_fast32", funcTag, 77},
+ {"mapdelete_fast64", funcTag, 77},
+ {"mapdelete_faststr", funcTag, 77},
+ {"mapiternext", funcTag, 78},
+ {"mapclear", funcTag, 79},
+ {"makechan64", funcTag, 81},
+ {"makechan", funcTag, 82},
+ {"chanrecv1", funcTag, 84},
+ {"chanrecv2", funcTag, 85},
+ {"chansend1", funcTag, 87},
+ {"closechan", funcTag, 27},
+ {"writeBarrier", varTag, 89},
+ {"typedmemmove", funcTag, 90},
+ {"typedmemclr", funcTag, 91},
+ {"typedslicecopy", funcTag, 92},
+ {"selectnbsend", funcTag, 93},
+ {"selectnbrecv", funcTag, 94},
+ {"selectnbrecv2", funcTag, 96},
+ {"selectsetpc", funcTag, 61},
+ {"selectgo", funcTag, 97},
{"block", funcTag, 5},
- {"makeslice", funcTag, 95},
- {"makeslice64", funcTag, 96},
- {"growslice", funcTag, 98},
- {"memmove", funcTag, 99},
- {"memclrNoHeapPointers", funcTag, 100},
- {"memclrHasPointers", funcTag, 100},
- {"memequal", funcTag, 101},
- {"memequal8", funcTag, 102},
- {"memequal16", funcTag, 102},
- {"memequal32", funcTag, 102},
- {"memequal64", funcTag, 102},
- {"memequal128", funcTag, 102},
- {"int64div", funcTag, 103},
- {"uint64div", funcTag, 104},
- {"int64mod", funcTag, 103},
- {"uint64mod", funcTag, 104},
- {"float64toint64", funcTag, 105},
- {"float64touint64", funcTag, 106},
- {"float64touint32", funcTag, 107},
- {"int64tofloat64", funcTag, 108},
- {"uint64tofloat64", funcTag, 109},
- {"uint32tofloat64", funcTag, 110},
- {"complex128div", funcTag, 111},
- {"racefuncenter", funcTag, 112},
+ {"makeslice", funcTag, 98},
+ {"makeslice64", funcTag, 99},
+ {"growslice", funcTag, 101},
+ {"memmove", funcTag, 102},
+ {"memclrNoHeapPointers", funcTag, 103},
+ {"memclrHasPointers", funcTag, 103},
+ {"memequal", funcTag, 104},
+ {"memequal8", funcTag, 105},
+ {"memequal16", funcTag, 105},
+ {"memequal32", funcTag, 105},
+ {"memequal64", funcTag, 105},
+ {"memequal128", funcTag, 105},
+ {"int64div", funcTag, 106},
+ {"uint64div", funcTag, 107},
+ {"int64mod", funcTag, 106},
+ {"uint64mod", funcTag, 107},
+ {"float64toint64", funcTag, 108},
+ {"float64touint64", funcTag, 109},
+ {"float64touint32", funcTag, 110},
+ {"int64tofloat64", funcTag, 111},
+ {"uint64tofloat64", funcTag, 112},
+ {"uint32tofloat64", funcTag, 113},
+ {"complex128div", funcTag, 114},
+ {"racefuncenter", funcTag, 115},
{"racefuncenterfp", funcTag, 5},
{"racefuncexit", funcTag, 5},
- {"raceread", funcTag, 112},
- {"racewrite", funcTag, 112},
- {"racereadrange", funcTag, 113},
- {"racewriterange", funcTag, 113},
- {"msanread", funcTag, 113},
- {"msanwrite", funcTag, 113},
- {"x86HasPOPCNT", varTag, 11},
- {"x86HasSSE41", varTag, 11},
- {"arm64HasATOMICS", varTag, 11},
+ {"raceread", funcTag, 115},
+ {"racewrite", funcTag, 115},
+ {"racereadrange", funcTag, 116},
+ {"racewriterange", funcTag, 116},
+ {"msanread", funcTag, 116},
+ {"msanwrite", funcTag, 116},
+ {"x86HasPOPCNT", varTag, 15},
+ {"x86HasSSE41", varTag, 15},
+ {"arm64HasATOMICS", varTag, 15},
}
func runtimeTypes() []*types.Type {
- var typs [114]*types.Type
+ var typs [117]*types.Type
typs[0] = types.Bytetype
typs[1] = types.NewPtr(typs[0])
typs[2] = types.Types[TANY]
@@ -163,108 +177,111 @@ func runtimeTypes() []*types.Type {
typs[8] = types.Types[TINT32]
typs[9] = types.NewPtr(typs[8])
typs[10] = functype(nil, []*Node{anonfield(typs[9])}, []*Node{anonfield(typs[6])})
- typs[11] = types.Types[TBOOL]
- typs[12] = functype(nil, []*Node{anonfield(typs[11])}, nil)
- typs[13] = types.Types[TFLOAT64]
- typs[14] = functype(nil, []*Node{anonfield(typs[13])}, nil)
- typs[15] = types.Types[TINT64]
+ typs[11] = types.Types[TINT]
+ typs[12] = functype(nil, []*Node{anonfield(typs[11]), anonfield(typs[11])}, nil)
+ typs[13] = types.Types[TUINT]
+ typs[14] = functype(nil, []*Node{anonfield(typs[13]), anonfield(typs[11])}, nil)
+ typs[15] = types.Types[TBOOL]
typs[16] = functype(nil, []*Node{anonfield(typs[15])}, nil)
- typs[17] = types.Types[TUINT64]
+ typs[17] = types.Types[TFLOAT64]
typs[18] = functype(nil, []*Node{anonfield(typs[17])}, nil)
- typs[19] = types.Types[TCOMPLEX128]
+ typs[19] = types.Types[TINT64]
typs[20] = functype(nil, []*Node{anonfield(typs[19])}, nil)
- typs[21] = types.Types[TSTRING]
+ typs[21] = types.Types[TUINT64]
typs[22] = functype(nil, []*Node{anonfield(typs[21])}, nil)
- typs[23] = functype(nil, []*Node{anonfield(typs[2])}, nil)
- typs[24] = types.NewArray(typs[0], 32)
- typs[25] = types.NewPtr(typs[24])
- typs[26] = functype(nil, []*Node{anonfield(typs[25]), anonfield(typs[21]), anonfield(typs[21])}, []*Node{anonfield(typs[21])})
- typs[27] = functype(nil, []*Node{anonfield(typs[25]), anonfield(typs[21]), anonfield(typs[21]), anonfield(typs[21])}, []*Node{anonfield(typs[21])})
- typs[28] = functype(nil, []*Node{anonfield(typs[25]), anonfield(typs[21]), anonfield(typs[21]), anonfield(typs[21]), anonfield(typs[21])}, []*Node{anonfield(typs[21])})
- typs[29] = functype(nil, []*Node{anonfield(typs[25]), anonfield(typs[21]), anonfield(typs[21]), anonfield(typs[21]), anonfield(typs[21]), anonfield(typs[21])}, []*Node{anonfield(typs[21])})
- typs[30] = types.NewSlice(typs[21])
- typs[31] = functype(nil, []*Node{anonfield(typs[25]), anonfield(typs[30])}, []*Node{anonfield(typs[21])})
- typs[32] = types.Types[TINT]
- typs[33] = functype(nil, []*Node{anonfield(typs[21]), anonfield(typs[21])}, []*Node{anonfield(typs[32])})
- typs[34] = types.NewArray(typs[0], 4)
- typs[35] = types.NewPtr(typs[34])
- typs[36] = functype(nil, []*Node{anonfield(typs[35]), anonfield(typs[15])}, []*Node{anonfield(typs[21])})
- typs[37] = types.NewSlice(typs[0])
- typs[38] = functype(nil, []*Node{anonfield(typs[25]), anonfield(typs[37])}, []*Node{anonfield(typs[21])})
- typs[39] = functype(nil, []*Node{anonfield(typs[37])}, []*Node{anonfield(typs[21])})
- typs[40] = types.Runetype
- typs[41] = types.NewSlice(typs[40])
- typs[42] = functype(nil, []*Node{anonfield(typs[25]), anonfield(typs[41])}, []*Node{anonfield(typs[21])})
- typs[43] = functype(nil, []*Node{anonfield(typs[25]), anonfield(typs[21])}, []*Node{anonfield(typs[37])})
- typs[44] = types.NewArray(typs[40], 32)
- typs[45] = types.NewPtr(typs[44])
- typs[46] = functype(nil, []*Node{anonfield(typs[45]), anonfield(typs[21])}, []*Node{anonfield(typs[41])})
- typs[47] = types.Types[TUINTPTR]
- typs[48] = functype(nil, []*Node{anonfield(typs[2]), anonfield(typs[2]), anonfield(typs[47])}, []*Node{anonfield(typs[32])})
- typs[49] = functype(nil, []*Node{anonfield(typs[2]), anonfield(typs[2])}, []*Node{anonfield(typs[32])})
- typs[50] = functype(nil, []*Node{anonfield(typs[21]), anonfield(typs[32])}, []*Node{anonfield(typs[40]), anonfield(typs[32])})
- typs[51] = functype(nil, []*Node{anonfield(typs[21])}, []*Node{anonfield(typs[32])})
- typs[52] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[2])}, []*Node{anonfield(typs[2])})
- typs[53] = types.Types[TUNSAFEPTR]
- typs[54] = functype(nil, []*Node{anonfield(typs[2])}, []*Node{anonfield(typs[53])})
- typs[55] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[3])}, []*Node{anonfield(typs[2])})
- typs[56] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[2])}, []*Node{anonfield(typs[2]), anonfield(typs[11])})
- typs[57] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[1]), anonfield(typs[1])}, nil)
- typs[58] = functype(nil, []*Node{anonfield(typs[1])}, nil)
- typs[59] = types.NewPtr(typs[47])
- typs[60] = functype(nil, []*Node{anonfield(typs[59]), anonfield(typs[53]), anonfield(typs[53])}, []*Node{anonfield(typs[11])})
- typs[61] = types.Types[TUINT32]
- typs[62] = functype(nil, nil, []*Node{anonfield(typs[61])})
- typs[63] = types.NewMap(typs[2], typs[2])
- typs[64] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[15]), anonfield(typs[3])}, []*Node{anonfield(typs[63])})
- typs[65] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[32]), anonfield(typs[3])}, []*Node{anonfield(typs[63])})
- typs[66] = functype(nil, nil, []*Node{anonfield(typs[63])})
- typs[67] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[63]), anonfield(typs[3])}, []*Node{anonfield(typs[3])})
- typs[68] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[63]), anonfield(typs[2])}, []*Node{anonfield(typs[3])})
- typs[69] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[63]), anonfield(typs[3]), anonfield(typs[1])}, []*Node{anonfield(typs[3])})
- typs[70] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[63]), anonfield(typs[3])}, []*Node{anonfield(typs[3]), anonfield(typs[11])})
- typs[71] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[63]), anonfield(typs[2])}, []*Node{anonfield(typs[3]), anonfield(typs[11])})
- typs[72] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[63]), anonfield(typs[3]), anonfield(typs[1])}, []*Node{anonfield(typs[3]), anonfield(typs[11])})
- typs[73] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[63]), anonfield(typs[3])}, nil)
- typs[74] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[63]), anonfield(typs[2])}, nil)
- typs[75] = functype(nil, []*Node{anonfield(typs[3])}, nil)
- typs[76] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[63])}, nil)
- typs[77] = types.NewChan(typs[2], types.Cboth)
- typs[78] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[15])}, []*Node{anonfield(typs[77])})
- typs[79] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[32])}, []*Node{anonfield(typs[77])})
- typs[80] = types.NewChan(typs[2], types.Crecv)
- typs[81] = functype(nil, []*Node{anonfield(typs[80]), anonfield(typs[3])}, nil)
- typs[82] = functype(nil, []*Node{anonfield(typs[80]), anonfield(typs[3])}, []*Node{anonfield(typs[11])})
- typs[83] = types.NewChan(typs[2], types.Csend)
+ typs[23] = types.Types[TCOMPLEX128]
+ typs[24] = functype(nil, []*Node{anonfield(typs[23])}, nil)
+ typs[25] = types.Types[TSTRING]
+ typs[26] = functype(nil, []*Node{anonfield(typs[25])}, nil)
+ typs[27] = functype(nil, []*Node{anonfield(typs[2])}, nil)
+ typs[28] = types.NewArray(typs[0], 32)
+ typs[29] = types.NewPtr(typs[28])
+ typs[30] = functype(nil, []*Node{anonfield(typs[29]), anonfield(typs[25]), anonfield(typs[25])}, []*Node{anonfield(typs[25])})
+ typs[31] = functype(nil, []*Node{anonfield(typs[29]), anonfield(typs[25]), anonfield(typs[25]), anonfield(typs[25])}, []*Node{anonfield(typs[25])})
+ typs[32] = functype(nil, []*Node{anonfield(typs[29]), anonfield(typs[25]), anonfield(typs[25]), anonfield(typs[25]), anonfield(typs[25])}, []*Node{anonfield(typs[25])})
+ typs[33] = functype(nil, []*Node{anonfield(typs[29]), anonfield(typs[25]), anonfield(typs[25]), anonfield(typs[25]), anonfield(typs[25]), anonfield(typs[25])}, []*Node{anonfield(typs[25])})
+ typs[34] = types.NewSlice(typs[25])
+ typs[35] = functype(nil, []*Node{anonfield(typs[29]), anonfield(typs[34])}, []*Node{anonfield(typs[25])})
+ typs[36] = functype(nil, []*Node{anonfield(typs[25]), anonfield(typs[25])}, []*Node{anonfield(typs[11])})
+ typs[37] = types.NewArray(typs[0], 4)
+ typs[38] = types.NewPtr(typs[37])
+ typs[39] = functype(nil, []*Node{anonfield(typs[38]), anonfield(typs[19])}, []*Node{anonfield(typs[25])})
+ typs[40] = types.NewSlice(typs[0])
+ typs[41] = functype(nil, []*Node{anonfield(typs[29]), anonfield(typs[40])}, []*Node{anonfield(typs[25])})
+ typs[42] = functype(nil, []*Node{anonfield(typs[40])}, []*Node{anonfield(typs[25])})
+ typs[43] = types.Runetype
+ typs[44] = types.NewSlice(typs[43])
+ typs[45] = functype(nil, []*Node{anonfield(typs[29]), anonfield(typs[44])}, []*Node{anonfield(typs[25])})
+ typs[46] = functype(nil, []*Node{anonfield(typs[29]), anonfield(typs[25])}, []*Node{anonfield(typs[40])})
+ typs[47] = types.NewArray(typs[43], 32)
+ typs[48] = types.NewPtr(typs[47])
+ typs[49] = functype(nil, []*Node{anonfield(typs[48]), anonfield(typs[25])}, []*Node{anonfield(typs[44])})
+ typs[50] = types.Types[TUINTPTR]
+ typs[51] = functype(nil, []*Node{anonfield(typs[2]), anonfield(typs[2]), anonfield(typs[50])}, []*Node{anonfield(typs[11])})
+ typs[52] = functype(nil, []*Node{anonfield(typs[2]), anonfield(typs[2])}, []*Node{anonfield(typs[11])})
+ typs[53] = functype(nil, []*Node{anonfield(typs[25]), anonfield(typs[11])}, []*Node{anonfield(typs[43]), anonfield(typs[11])})
+ typs[54] = functype(nil, []*Node{anonfield(typs[25])}, []*Node{anonfield(typs[11])})
+ typs[55] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[2])}, []*Node{anonfield(typs[2])})
+ typs[56] = types.Types[TUNSAFEPTR]
+ typs[57] = functype(nil, []*Node{anonfield(typs[2])}, []*Node{anonfield(typs[56])})
+ typs[58] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[3])}, []*Node{anonfield(typs[2])})
+ typs[59] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[2])}, []*Node{anonfield(typs[2]), anonfield(typs[15])})
+ typs[60] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[1]), anonfield(typs[1])}, nil)
+ typs[61] = functype(nil, []*Node{anonfield(typs[1])}, nil)
+ typs[62] = types.NewPtr(typs[50])
+ typs[63] = functype(nil, []*Node{anonfield(typs[62]), anonfield(typs[56]), anonfield(typs[56])}, []*Node{anonfield(typs[15])})
+ typs[64] = types.Types[TUINT32]
+ typs[65] = functype(nil, nil, []*Node{anonfield(typs[64])})
+ typs[66] = types.NewMap(typs[2], typs[2])
+ typs[67] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[19]), anonfield(typs[3])}, []*Node{anonfield(typs[66])})
+ typs[68] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[11]), anonfield(typs[3])}, []*Node{anonfield(typs[66])})
+ typs[69] = functype(nil, nil, []*Node{anonfield(typs[66])})
+ typs[70] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[66]), anonfield(typs[3])}, []*Node{anonfield(typs[3])})
+ typs[71] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[66]), anonfield(typs[2])}, []*Node{anonfield(typs[3])})
+ typs[72] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[66]), anonfield(typs[3]), anonfield(typs[1])}, []*Node{anonfield(typs[3])})
+ typs[73] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[66]), anonfield(typs[3])}, []*Node{anonfield(typs[3]), anonfield(typs[15])})
+ typs[74] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[66]), anonfield(typs[2])}, []*Node{anonfield(typs[3]), anonfield(typs[15])})
+ typs[75] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[66]), anonfield(typs[3]), anonfield(typs[1])}, []*Node{anonfield(typs[3]), anonfield(typs[15])})
+ typs[76] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[66]), anonfield(typs[3])}, nil)
+ typs[77] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[66]), anonfield(typs[2])}, nil)
+ typs[78] = functype(nil, []*Node{anonfield(typs[3])}, nil)
+ typs[79] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[66])}, nil)
+ typs[80] = types.NewChan(typs[2], types.Cboth)
+ typs[81] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[19])}, []*Node{anonfield(typs[80])})
+ typs[82] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[11])}, []*Node{anonfield(typs[80])})
+ typs[83] = types.NewChan(typs[2], types.Crecv)
typs[84] = functype(nil, []*Node{anonfield(typs[83]), anonfield(typs[3])}, nil)
- typs[85] = types.NewArray(typs[0], 3)
- typs[86] = tostruct([]*Node{namedfield("enabled", typs[11]), namedfield("pad", typs[85]), namedfield("needed", typs[11]), namedfield("cgo", typs[11]), namedfield("alignme", typs[17])})
- typs[87] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[3]), anonfield(typs[3])}, nil)
- typs[88] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[3])}, nil)
- typs[89] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[2]), anonfield(typs[2])}, []*Node{anonfield(typs[32])})
- typs[90] = functype(nil, []*Node{anonfield(typs[83]), anonfield(typs[3])}, []*Node{anonfield(typs[11])})
- typs[91] = functype(nil, []*Node{anonfield(typs[3]), anonfield(typs[80])}, []*Node{anonfield(typs[11])})
- typs[92] = types.NewPtr(typs[11])
- typs[93] = functype(nil, []*Node{anonfield(typs[3]), anonfield(typs[92]), anonfield(typs[80])}, []*Node{anonfield(typs[11])})
- typs[94] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[1]), anonfield(typs[32])}, []*Node{anonfield(typs[32]), anonfield(typs[11])})
- typs[95] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[32]), anonfield(typs[32])}, []*Node{anonfield(typs[53])})
- typs[96] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[15]), anonfield(typs[15])}, []*Node{anonfield(typs[53])})
- typs[97] = types.NewSlice(typs[2])
- typs[98] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[97]), anonfield(typs[32])}, []*Node{anonfield(typs[97])})
- typs[99] = functype(nil, []*Node{anonfield(typs[3]), anonfield(typs[3]), anonfield(typs[47])}, nil)
- typs[100] = functype(nil, []*Node{anonfield(typs[53]), anonfield(typs[47])}, nil)
- typs[101] = functype(nil, []*Node{anonfield(typs[3]), anonfield(typs[3]), anonfield(typs[47])}, []*Node{anonfield(typs[11])})
- typs[102] = functype(nil, []*Node{anonfield(typs[3]), anonfield(typs[3])}, []*Node{anonfield(typs[11])})
- typs[103] = functype(nil, []*Node{anonfield(typs[15]), anonfield(typs[15])}, []*Node{anonfield(typs[15])})
- typs[104] = functype(nil, []*Node{anonfield(typs[17]), anonfield(typs[17])}, []*Node{anonfield(typs[17])})
- typs[105] = functype(nil, []*Node{anonfield(typs[13])}, []*Node{anonfield(typs[15])})
- typs[106] = functype(nil, []*Node{anonfield(typs[13])}, []*Node{anonfield(typs[17])})
- typs[107] = functype(nil, []*Node{anonfield(typs[13])}, []*Node{anonfield(typs[61])})
- typs[108] = functype(nil, []*Node{anonfield(typs[15])}, []*Node{anonfield(typs[13])})
- typs[109] = functype(nil, []*Node{anonfield(typs[17])}, []*Node{anonfield(typs[13])})
- typs[110] = functype(nil, []*Node{anonfield(typs[61])}, []*Node{anonfield(typs[13])})
- typs[111] = functype(nil, []*Node{anonfield(typs[19]), anonfield(typs[19])}, []*Node{anonfield(typs[19])})
- typs[112] = functype(nil, []*Node{anonfield(typs[47])}, nil)
- typs[113] = functype(nil, []*Node{anonfield(typs[47]), anonfield(typs[47])}, nil)
+ typs[85] = functype(nil, []*Node{anonfield(typs[83]), anonfield(typs[3])}, []*Node{anonfield(typs[15])})
+ typs[86] = types.NewChan(typs[2], types.Csend)
+ typs[87] = functype(nil, []*Node{anonfield(typs[86]), anonfield(typs[3])}, nil)
+ typs[88] = types.NewArray(typs[0], 3)
+ typs[89] = tostruct([]*Node{namedfield("enabled", typs[15]), namedfield("pad", typs[88]), namedfield("needed", typs[15]), namedfield("cgo", typs[15]), namedfield("alignme", typs[21])})
+ typs[90] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[3]), anonfield(typs[3])}, nil)
+ typs[91] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[3])}, nil)
+ typs[92] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[2]), anonfield(typs[2])}, []*Node{anonfield(typs[11])})
+ typs[93] = functype(nil, []*Node{anonfield(typs[86]), anonfield(typs[3])}, []*Node{anonfield(typs[15])})
+ typs[94] = functype(nil, []*Node{anonfield(typs[3]), anonfield(typs[83])}, []*Node{anonfield(typs[15])})
+ typs[95] = types.NewPtr(typs[15])
+ typs[96] = functype(nil, []*Node{anonfield(typs[3]), anonfield(typs[95]), anonfield(typs[83])}, []*Node{anonfield(typs[15])})
+ typs[97] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[1]), anonfield(typs[11])}, []*Node{anonfield(typs[11]), anonfield(typs[15])})
+ typs[98] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[11]), anonfield(typs[11])}, []*Node{anonfield(typs[56])})
+ typs[99] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[19]), anonfield(typs[19])}, []*Node{anonfield(typs[56])})
+ typs[100] = types.NewSlice(typs[2])
+ typs[101] = functype(nil, []*Node{anonfield(typs[1]), anonfield(typs[100]), anonfield(typs[11])}, []*Node{anonfield(typs[100])})
+ typs[102] = functype(nil, []*Node{anonfield(typs[3]), anonfield(typs[3]), anonfield(typs[50])}, nil)
+ typs[103] = functype(nil, []*Node{anonfield(typs[56]), anonfield(typs[50])}, nil)
+ typs[104] = functype(nil, []*Node{anonfield(typs[3]), anonfield(typs[3]), anonfield(typs[50])}, []*Node{anonfield(typs[15])})
+ typs[105] = functype(nil, []*Node{anonfield(typs[3]), anonfield(typs[3])}, []*Node{anonfield(typs[15])})
+ typs[106] = functype(nil, []*Node{anonfield(typs[19]), anonfield(typs[19])}, []*Node{anonfield(typs[19])})
+ typs[107] = functype(nil, []*Node{anonfield(typs[21]), anonfield(typs[21])}, []*Node{anonfield(typs[21])})
+ typs[108] = functype(nil, []*Node{anonfield(typs[17])}, []*Node{anonfield(typs[19])})
+ typs[109] = functype(nil, []*Node{anonfield(typs[17])}, []*Node{anonfield(typs[21])})
+ typs[110] = functype(nil, []*Node{anonfield(typs[17])}, []*Node{anonfield(typs[64])})
+ typs[111] = functype(nil, []*Node{anonfield(typs[19])}, []*Node{anonfield(typs[17])})
+ typs[112] = functype(nil, []*Node{anonfield(typs[21])}, []*Node{anonfield(typs[17])})
+ typs[113] = functype(nil, []*Node{anonfield(typs[64])}, []*Node{anonfield(typs[17])})
+ typs[114] = functype(nil, []*Node{anonfield(typs[23]), anonfield(typs[23])}, []*Node{anonfield(typs[23])})
+ typs[115] = functype(nil, []*Node{anonfield(typs[50])}, nil)
+ typs[116] = functype(nil, []*Node{anonfield(typs[50]), anonfield(typs[50])}, nil)
return typs[:]
}
diff --git a/src/cmd/compile/internal/gc/builtin/runtime.go b/src/cmd/compile/internal/gc/builtin/runtime.go
index 210881a6e9..a8a9b061ec 100644
--- a/src/cmd/compile/internal/gc/builtin/runtime.go
+++ b/src/cmd/compile/internal/gc/builtin/runtime.go
@@ -15,8 +15,6 @@ package runtime
import "unsafe"
func newobject(typ *byte) *any
-func panicindex()
-func panicslice()
func panicdivide()
func panicshift()
func panicmakeslicelen()
@@ -27,6 +25,25 @@ func gopanic(interface{})
func gorecover(*int32) interface{}
func goschedguarded()
+// Note: these declarations are just for wasm port.
+// Other ports call assembly stubs instead.
+func goPanicIndex(x int, y int)
+func goPanicIndexU(x uint, y int)
+func goPanicSliceAlen(x int, y int)
+func goPanicSliceAlenU(x uint, y int)
+func goPanicSliceAcap(x int, y int)
+func goPanicSliceAcapU(x uint, y int)
+func goPanicSliceB(x int, y int)
+func goPanicSliceBU(x uint, y int)
+func goPanicSlice3Alen(x int, y int)
+func goPanicSlice3AlenU(x uint, y int)
+func goPanicSlice3Acap(x int, y int)
+func goPanicSlice3AcapU(x uint, y int)
+func goPanicSlice3B(x int, y int)
+func goPanicSlice3BU(x uint, y int)
+func goPanicSlice3C(x int, y int)
+func goPanicSlice3CU(x uint, y int)
+
func printbool(bool)
func printfloat(float64)
func printint(int64)
diff --git a/src/cmd/compile/internal/gc/builtin_test.go b/src/cmd/compile/internal/gc/builtin_test.go
index 31b078525c..57f24b2287 100644
--- a/src/cmd/compile/internal/gc/builtin_test.go
+++ b/src/cmd/compile/internal/gc/builtin_test.go
@@ -14,6 +14,7 @@ import (
func TestBuiltin(t *testing.T) {
testenv.MustHaveGoRun(t)
+ t.Parallel()
old, err := ioutil.ReadFile("builtin.go")
if err != nil {
diff --git a/src/cmd/compile/internal/gc/closure.go b/src/cmd/compile/internal/gc/closure.go
index 6db0f02001..89e2a4ef00 100644
--- a/src/cmd/compile/internal/gc/closure.go
+++ b/src/cmd/compile/internal/gc/closure.go
@@ -73,6 +73,16 @@ func (p *noder) funcLit(expr *syntax.FuncLit) *Node {
func typecheckclosure(clo *Node, top int) {
xfunc := clo.Func.Closure
+ clo.Func.Ntype = typecheck(clo.Func.Ntype, Etype)
+ clo.Type = clo.Func.Ntype.Type
+ clo.Func.Top = top
+
+ // Do not typecheck xfunc twice, otherwise, we will end up pushing
+ // xfunc to xtop multiple times, causing initLSym called twice.
+ // See #30709
+ if xfunc.Typecheck() == 1 {
+ return
+ }
for _, ln := range xfunc.Func.Cvars.Slice() {
n := ln.Name.Defn
@@ -95,10 +105,6 @@ func typecheckclosure(clo *Node, top int) {
declare(xfunc.Func.Nname, PFUNC)
xfunc = typecheck(xfunc, ctxStmt)
- clo.Func.Ntype = typecheck(clo.Func.Ntype, Etype)
- clo.Type = clo.Func.Ntype.Type
- clo.Func.Top = top
-
// Type check the body now, but only if we're inside a function.
// At top level (in a variable initialization: curfn==nil) we're not
// ready to type check code yet; we'll check it later, because the
diff --git a/src/cmd/compile/internal/gc/const.go b/src/cmd/compile/internal/gc/const.go
index de7df645e6..39adba0f07 100644
--- a/src/cmd/compile/internal/gc/const.go
+++ b/src/cmd/compile/internal/gc/const.go
@@ -584,14 +584,6 @@ func Isconst(n *Node, ct Ctype) bool {
// evconst rewrites constant expressions into OLITERAL nodes.
func evconst(n *Node) {
- if !n.isGoConst() {
- // Avoid constant evaluation of things that aren't actually constants
- // according to the spec. See issue 24760.
- // The SSA backend has a more robust optimizer that will catch
- // all of these weird cases (like uintptr(unsafe.Pointer(uintptr(1)))).
- return
- }
-
nl, nr := n.Left, n.Right
// Pick off just the opcodes that can be constant evaluated.
@@ -626,15 +618,16 @@ func evconst(n *Node) {
}
case OCONV:
- if n.Type != nil && okforconst[n.Type.Etype] && nl.Op == OLITERAL {
+ if okforconst[n.Type.Etype] && nl.Op == OLITERAL {
// TODO(mdempsky): There should be a convval function.
setconst(n, convlit1(nl, n.Type, true, false).Val())
}
- case OBYTES2STR:
- // string([]byte(nil)) or string([]rune(nil))
- if nl.Op == OLITERAL && nl.Val().Ctype() == CTNIL {
- setconst(n, Val{U: ""})
+ case OCONVNOP:
+ if okforconst[n.Type.Etype] && nl.Op == OLITERAL {
+ // set so n.Orig gets OCONV instead of OCONVNOP
+ n.Op = OCONV
+ setconst(n, nl.Val())
}
case OADDSTR:
@@ -664,6 +657,60 @@ func evconst(n *Node) {
} else {
n.List.Set(s)
}
+
+ case OCAP, OLEN:
+ switch nl.Type.Etype {
+ case TSTRING:
+ if Isconst(nl, CTSTR) {
+ setintconst(n, int64(len(nl.Val().U.(string))))
+ }
+ case TARRAY:
+ if !hascallchan(nl) {
+ setintconst(n, nl.Type.NumElem())
+ }
+ }
+
+ case OALIGNOF, OOFFSETOF, OSIZEOF:
+ setintconst(n, evalunsafe(n))
+
+ case OREAL, OIMAG:
+ if nl.Op == OLITERAL {
+ var re, im *Mpflt
+ switch u := nl.Val().U.(type) {
+ case *Mpint:
+ re = newMpflt()
+ re.SetInt(u)
+ // im = 0
+ case *Mpflt:
+ re = u
+ // im = 0
+ case *Mpcplx:
+ re = &u.Real
+ im = &u.Imag
+ default:
+ Fatalf("impossible")
+ }
+ if n.Op == OIMAG {
+ if im == nil {
+ im = newMpflt()
+ }
+ re = im
+ }
+ setconst(n, Val{re})
+ }
+
+ case OCOMPLEX:
+ if nl == nil || nr == nil {
+ // TODO(mdempsky): Remove after early OAS2FUNC rewrite CL lands.
+ break
+ }
+ if nl.Op == OLITERAL && nr.Op == OLITERAL {
+ // make it a complex literal
+ c := newMpcmplx()
+ c.Real.Set(toflt(nl.Val()).U.(*Mpflt))
+ c.Imag.Set(toflt(nr.Val()).U.(*Mpflt))
+ setconst(n, Val{c})
+ }
}
}
@@ -791,15 +838,13 @@ Outer:
case ODIV:
if y.CmpInt64(0) == 0 {
yyerror("division by zero")
- u.SetOverflow()
- break
+ return Val{}
}
u.Quo(y)
case OMOD:
if y.CmpInt64(0) == 0 {
yyerror("division by zero")
- u.SetOverflow()
- break
+ return Val{}
}
u.Rem(y)
case OOR:
@@ -830,13 +875,13 @@ Outer:
case ODIV:
if y.CmpFloat64(0) == 0 {
yyerror("division by zero")
- u.SetFloat64(1)
- break
+ return Val{}
}
u.Quo(y)
- case OMOD:
- // TODO(mdempsky): Move to typecheck.
- yyerror("illegal constant expression: floating-point %% operation")
+ case OMOD, OOR, OAND, OANDNOT, OXOR:
+ // TODO(mdempsky): Move to typecheck; see #31060.
+ yyerror("invalid operation: operator %v not defined on untyped float", op)
+ return Val{}
default:
break Outer
}
@@ -860,9 +905,12 @@ Outer:
case ODIV:
if !u.Div(y) {
yyerror("complex division by zero")
- u.Real.SetFloat64(1)
- u.Imag.SetFloat64(0)
+ return Val{}
}
+ case OMOD, OOR, OAND, OANDNOT, OXOR:
+ // TODO(mdempsky): Move to typecheck; see #31060.
+ yyerror("invalid operation: operator %v not defined on untyped complex", op)
+ return Val{}
default:
break Outer
}
@@ -909,19 +957,31 @@ func unaryOp(op Op, x Val, t *types.Type) Val {
}
case OBITNOT:
- x := x.U.(*Mpint)
+ switch x.Ctype() {
+ case CTINT, CTRUNE:
+ x := x.U.(*Mpint)
- u := new(Mpint)
- u.Rune = x.Rune
- if t.IsSigned() || t.IsUntyped() {
- // Signed values change sign.
- u.SetInt64(-1)
- } else {
- // Unsigned values invert their bits.
- u.Set(maxintval[t.Etype])
+ u := new(Mpint)
+ u.Rune = x.Rune
+ if t.IsSigned() || t.IsUntyped() {
+ // Signed values change sign.
+ u.SetInt64(-1)
+ } else {
+ // Unsigned values invert their bits.
+ u.Set(maxintval[t.Etype])
+ }
+ u.Xor(x)
+ return Val{U: u}
+
+ case CTFLT:
+ // TODO(mdempsky): Move to typecheck; see #31060.
+ yyerror("invalid operation: operator %v not defined on untyped float", op)
+ return Val{}
+ case CTCPLX:
+ // TODO(mdempsky): Move to typecheck; see #31060.
+ yyerror("invalid operation: operator %v not defined on untyped complex", op)
+ return Val{}
}
- u.Xor(x)
- return Val{U: u}
case ONOT:
return Val{U: !x.U.(bool)}
@@ -954,6 +1014,12 @@ func shiftOp(x Val, op Op, y Val) Val {
// setconst rewrites n as an OLITERAL with value v.
func setconst(n *Node, v Val) {
+ // If constant folding failed, mark n as broken and give up.
+ if v.U == nil {
+ n.Type = nil
+ return
+ }
+
// Ensure n.Orig still points to a semantically-equivalent
// expression after we rewrite n into a constant.
if n.Orig == n {
@@ -1280,102 +1346,8 @@ func indexconst(n *Node) int64 {
//
// Expressions derived from nil, like string([]byte(nil)), while they
// may be known at compile time, are not Go language constants.
-// Only called for expressions known to evaluate to compile-time
-// constants.
func (n *Node) isGoConst() bool {
- if n.Orig != nil {
- n = n.Orig
- }
-
- switch n.Op {
- case OADD,
- OAND,
- OANDAND,
- OANDNOT,
- OBITNOT,
- ODIV,
- OEQ,
- OGE,
- OGT,
- OLE,
- OLSH,
- OLT,
- ONEG,
- OMOD,
- OMUL,
- ONE,
- ONOT,
- OOR,
- OOROR,
- OPLUS,
- ORSH,
- OSUB,
- OXOR,
- OIOTA,
- OREAL,
- OIMAG:
- if n.Left.isGoConst() && (n.Right == nil || n.Right.isGoConst()) {
- return true
- }
-
- case OCOMPLEX:
- if n.List.Len() == 0 && n.Left.isGoConst() && n.Right.isGoConst() {
- return true
- }
-
- case OADDSTR:
- for _, n1 := range n.List.Slice() {
- if !n1.isGoConst() {
- return false
- }
- }
- return true
-
- case OCONV, OCONVNOP:
- if okforconst[n.Type.Etype] && n.Left.isGoConst() {
- return true
- }
-
- case OLEN, OCAP:
- l := n.Left
- if l.isGoConst() {
- return true
- }
-
- // Special case: len/cap is constant when applied to array or
- // pointer to array when the expression does not contain
- // function calls or channel receive operations.
- t := l.Type
-
- if t != nil && t.IsPtr() {
- t = t.Elem()
- }
- if t != nil && t.IsArray() && !hascallchan(l) {
- return true
- }
-
- case OLITERAL:
- if n.Val().Ctype() != CTNIL {
- return true
- }
-
- case ONAME:
- l := asNode(n.Sym.Def)
- if l != nil && l.Op == OLITERAL && n.Val().Ctype() != CTNIL {
- return true
- }
-
- case ONONAME:
- if asNode(n.Sym.Def) != nil && asNode(n.Sym.Def).Op == OIOTA {
- return true
- }
-
- case OALIGNOF, OOFFSETOF, OSIZEOF:
- return true
- }
-
- //dump("nonconst", n);
- return false
+ return n.Op == OLITERAL && n.Val().Ctype() != CTNIL
}
func hascallchan(n *Node) bool {
diff --git a/src/cmd/compile/internal/gc/dcl.go b/src/cmd/compile/internal/gc/dcl.go
index 9f25e5e15b..12875e798e 100644
--- a/src/cmd/compile/internal/gc/dcl.go
+++ b/src/cmd/compile/internal/gc/dcl.go
@@ -166,11 +166,12 @@ func variter(vl []*Node, t *Node, el []*Node) []*Node {
return append(init, as2)
}
+ nel := len(el)
for _, v := range vl {
var e *Node
if doexpr {
if len(el) == 0 {
- yyerror("missing expression in var declaration")
+ yyerror("assignment mismatch: %d variables but %d values", len(vl), nel)
break
}
e = el[0]
@@ -194,7 +195,7 @@ func variter(vl []*Node, t *Node, el []*Node) []*Node {
}
if len(el) != 0 {
- yyerror("extra expression in var declaration")
+ yyerror("assignment mismatch: %d variables but %d values", len(vl), nel)
}
return init
}
diff --git a/src/cmd/compile/internal/gc/dep_test.go b/src/cmd/compile/internal/gc/dep_test.go
new file mode 100644
index 0000000000..7fc9be5e64
--- /dev/null
+++ b/src/cmd/compile/internal/gc/dep_test.go
@@ -0,0 +1,26 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package gc
+
+import (
+ "internal/testenv"
+ "os/exec"
+ "strings"
+ "testing"
+)
+
+func TestDeps(t *testing.T) {
+ testenv.MustHaveGoBuild(t)
+ out, err := exec.Command("go", "list", "-f", "{{.Deps}}", "cmd/compile/internal/gc").Output()
+ if err != nil {
+ t.Fatal(err)
+ }
+ for _, dep := range strings.Fields(strings.Trim(string(out), "[]")) {
+ switch dep {
+ case "go/build", "go/token":
+ t.Errorf("undesired dependency on %q", dep)
+ }
+ }
+}
diff --git a/src/cmd/compile/internal/gc/dump.go b/src/cmd/compile/internal/gc/dump.go
index 8de90adf05..29eb1c1e48 100644
--- a/src/cmd/compile/internal/gc/dump.go
+++ b/src/cmd/compile/internal/gc/dump.go
@@ -16,8 +16,6 @@ import (
"os"
"reflect"
"regexp"
- "unicode"
- "unicode/utf8"
)
// dump is like fdump but prints to stderr.
@@ -216,7 +214,7 @@ func (p *dumper) dump(x reflect.Value, depth int) {
for i, n := 0, typ.NumField(); i < n; i++ {
// Exclude non-exported fields because their
// values cannot be accessed via reflection.
- if name := typ.Field(i).Name; isExported(name) {
+ if name := typ.Field(i).Name; types.IsExported(name) {
if !p.fieldrx.MatchString(name) {
omitted = true
continue // field name not selected by filter
@@ -274,11 +272,6 @@ func isZeroVal(x reflect.Value) bool {
return false
}
-func isExported(name string) bool {
- ch, _ := utf8.DecodeRuneInString(name)
- return unicode.IsUpper(ch)
-}
-
func commonPrefixLen(a, b string) (i int) {
for i < len(a) && i < len(b) && a[i] == b[i] {
i++
diff --git a/src/cmd/compile/internal/gc/dwinl.go b/src/cmd/compile/internal/gc/dwinl.go
index ade76f40f8..27e2cbcd98 100644
--- a/src/cmd/compile/internal/gc/dwinl.go
+++ b/src/cmd/compile/internal/gc/dwinl.go
@@ -127,7 +127,7 @@ func assembleInlines(fnsym *obj.LSym, dwVars []*dwarf.Var) dwarf.InlCalls {
DeclLine: v.DeclLine,
DeclCol: v.DeclCol,
}
- synthesized := strings.HasPrefix(v.Name, "~r") || canonName == "_"
+ synthesized := strings.HasPrefix(v.Name, "~r") || canonName == "_" || strings.HasPrefix(v.Name, "~b")
if idx, found := m[vp]; found {
v.ChildIndex = int32(idx)
v.IsInAbstract = !synthesized
@@ -147,8 +147,8 @@ func assembleInlines(fnsym *obj.LSym, dwVars []*dwarf.Var) dwarf.InlCalls {
// Make a second pass through the progs to compute PC ranges for
// the various inlined calls.
+ start := int64(-1)
curii := -1
- var crange *dwarf.Range
var prevp *obj.Prog
for p := fnsym.Func.Text; p != nil; prevp, p = p, p.Link {
if prevp != nil && p.Pos == prevp.Pos {
@@ -157,17 +157,17 @@ func assembleInlines(fnsym *obj.LSym, dwVars []*dwarf.Var) dwarf.InlCalls {
ii := posInlIndex(p.Pos)
if ii == curii {
continue
- } else {
- // Close out the current range
- endRange(crange, p)
-
- // Begin new range
- crange = beginRange(inlcalls.Calls, p, ii, imap)
- curii = ii
}
+ // Close out the current range
+ if start != -1 {
+ addRange(inlcalls.Calls, start, p.Pc, curii, imap)
+ }
+ // Begin new range
+ start = p.Pc
+ curii = ii
}
- if crange != nil {
- crange.End = fnsym.Size
+ if start != -1 {
+ addRange(inlcalls.Calls, start, fnsym.Size, curii, imap)
}
// Debugging
@@ -287,26 +287,26 @@ func posInlIndex(xpos src.XPos) int {
return -1
}
-func endRange(crange *dwarf.Range, p *obj.Prog) {
- if crange == nil {
+func addRange(calls []dwarf.InlCall, start, end int64, ii int, imap map[int]int) {
+ if start == -1 {
+ panic("bad range start")
+ }
+ if end == -1 {
+ panic("bad range end")
+ }
+ if ii == -1 {
return
}
- crange.End = p.Pc
-}
-
-func beginRange(calls []dwarf.InlCall, p *obj.Prog, ii int, imap map[int]int) *dwarf.Range {
- if ii == -1 {
- return nil
+ if start == end {
+ return
}
+ // Append range to correct inlined call
callIdx, found := imap[ii]
if !found {
- Fatalf("can't find inlIndex %d in imap for prog at %d\n", ii, p.Pc)
+ Fatalf("can't find inlIndex %d in imap for prog at %d\n", ii, start)
}
call := &calls[callIdx]
-
- // Set up range and append to correct inlined call
- call.Ranges = append(call.Ranges, dwarf.Range{Start: p.Pc, End: -1})
- return &call.Ranges[len(call.Ranges)-1]
+ call.Ranges = append(call.Ranges, dwarf.Range{Start: start, End: end})
}
func dumpInlCall(inlcalls dwarf.InlCalls, idx, ilevel int) {
diff --git a/src/cmd/compile/internal/gc/esc.go b/src/cmd/compile/internal/gc/esc.go
index bd0fb82554..ded9439a14 100644
--- a/src/cmd/compile/internal/gc/esc.go
+++ b/src/cmd/compile/internal/gc/esc.go
@@ -11,144 +11,6 @@ import (
"strings"
)
-// Run analysis on minimal sets of mutually recursive functions
-// or single non-recursive functions, bottom up.
-//
-// Finding these sets is finding strongly connected components
-// by reverse topological order in the static call graph.
-// The algorithm (known as Tarjan's algorithm) for doing that is taken from
-// Sedgewick, Algorithms, Second Edition, p. 482, with two adaptations.
-//
-// First, a hidden closure function (n.Func.IsHiddenClosure()) cannot be the
-// root of a connected component. Refusing to use it as a root
-// forces it into the component of the function in which it appears.
-// This is more convenient for escape analysis.
-//
-// Second, each function becomes two virtual nodes in the graph,
-// with numbers n and n+1. We record the function's node number as n
-// but search from node n+1. If the search tells us that the component
-// number (min) is n+1, we know that this is a trivial component: one function
-// plus its closures. If the search tells us that the component number is
-// n, then there was a path from node n+1 back to node n, meaning that
-// the function set is mutually recursive. The escape analysis can be
-// more precise when analyzing a single non-recursive function than
-// when analyzing a set of mutually recursive functions.
-
-type bottomUpVisitor struct {
- analyze func([]*Node, bool)
- visitgen uint32
- nodeID map[*Node]uint32
- stack []*Node
-}
-
-// visitBottomUp invokes analyze on the ODCLFUNC nodes listed in list.
-// It calls analyze with successive groups of functions, working from
-// the bottom of the call graph upward. Each time analyze is called with
-// a list of functions, every function on that list only calls other functions
-// on the list or functions that have been passed in previous invocations of
-// analyze. Closures appear in the same list as their outer functions.
-// The lists are as short as possible while preserving those requirements.
-// (In a typical program, many invocations of analyze will be passed just
-// a single function.) The boolean argument 'recursive' passed to analyze
-// specifies whether the functions on the list are mutually recursive.
-// If recursive is false, the list consists of only a single function and its closures.
-// If recursive is true, the list may still contain only a single function,
-// if that function is itself recursive.
-func visitBottomUp(list []*Node, analyze func(list []*Node, recursive bool)) {
- var v bottomUpVisitor
- v.analyze = analyze
- v.nodeID = make(map[*Node]uint32)
- for _, n := range list {
- if n.Op == ODCLFUNC && !n.Func.IsHiddenClosure() {
- v.visit(n)
- }
- }
-}
-
-func (v *bottomUpVisitor) visit(n *Node) uint32 {
- if id := v.nodeID[n]; id > 0 {
- // already visited
- return id
- }
-
- v.visitgen++
- id := v.visitgen
- v.nodeID[n] = id
- v.visitgen++
- min := v.visitgen
-
- v.stack = append(v.stack, n)
- min = v.visitcodelist(n.Nbody, min)
- if (min == id || min == id+1) && !n.Func.IsHiddenClosure() {
- // This node is the root of a strongly connected component.
-
- // The original min passed to visitcodelist was v.nodeID[n]+1.
- // If visitcodelist found its way back to v.nodeID[n], then this
- // block is a set of mutually recursive functions.
- // Otherwise it's just a lone function that does not recurse.
- recursive := min == id
-
- // Remove connected component from stack.
- // Mark walkgen so that future visits return a large number
- // so as not to affect the caller's min.
-
- var i int
- for i = len(v.stack) - 1; i >= 0; i-- {
- x := v.stack[i]
- if x == n {
- break
- }
- v.nodeID[x] = ^uint32(0)
- }
- v.nodeID[n] = ^uint32(0)
- block := v.stack[i:]
- // Run escape analysis on this set of functions.
- v.stack = v.stack[:i]
- v.analyze(block, recursive)
- }
-
- return min
-}
-
-func (v *bottomUpVisitor) visitcodelist(l Nodes, min uint32) uint32 {
- for _, n := range l.Slice() {
- min = v.visitcode(n, min)
- }
- return min
-}
-
-func (v *bottomUpVisitor) visitcode(n *Node, min uint32) uint32 {
- if n == nil {
- return min
- }
-
- min = v.visitcodelist(n.Ninit, min)
- min = v.visitcode(n.Left, min)
- min = v.visitcode(n.Right, min)
- min = v.visitcodelist(n.List, min)
- min = v.visitcodelist(n.Nbody, min)
- min = v.visitcodelist(n.Rlist, min)
-
- switch n.Op {
- case OCALLFUNC, OCALLMETH:
- fn := asNode(n.Left.Type.Nname())
- if fn != nil && fn.Op == ONAME && fn.Class() == PFUNC && fn.Name.Defn != nil {
- m := v.visit(fn.Name.Defn)
- if m < min {
- min = m
- }
- }
-
- case OCLOSURE:
- m := v.visit(n.Func.Closure)
- if m < min {
- min = m
- }
- }
-
- return min
-}
-
// Escape analysis.
// An escape analysis pass for a set of functions. The
@@ -179,8 +41,19 @@ func (v *bottomUpVisitor) visitcode(n *Node, min uint32) uint32 {
// not escape, then new(T) can be rewritten into a stack allocation.
// The same is true of slice literals.
+// If newescape is true, then escape.go drives escape analysis instead
+// of esc.go.
+var newescape bool
+
func escapes(all []*Node) {
- visitBottomUp(all, escAnalyze)
+ visitBottomUp(all, escapeImpl())
+}
+
+func escapeImpl() func([]*Node, bool) {
+ if newescape {
+ return escapeFuncs
+ }
+ return escAnalyze
}
const (
@@ -531,13 +404,13 @@ func escAnalyze(all []*Node, recursive bool) {
// for all top level functions, tag the typenodes corresponding to the param nodes
for _, n := range all {
if n.Op == ODCLFUNC {
- e.esctag(n)
+ esctag(n)
}
}
if Debug['m'] != 0 {
for _, n := range e.noesc {
- if n.Esc == EscNone {
+ if n.Esc == EscNone && n.Op != OADDR {
Warnl(n.Pos, "%v %S does not escape", e.curfnSym(n), n)
}
}
@@ -654,7 +527,7 @@ func (e *EscState) esclist(l Nodes, parent *Node) {
}
}
-func (e *EscState) isSliceSelfAssign(dst, src *Node) bool {
+func isSliceSelfAssign(dst, src *Node) bool {
// Detect the following special case.
//
// func (b *Buffer) Foo() {
@@ -704,8 +577,8 @@ func (e *EscState) isSliceSelfAssign(dst, src *Node) bool {
// isSelfAssign reports whether assignment from src to dst can
// be ignored by the escape analysis as it's effectively a self-assignment.
-func (e *EscState) isSelfAssign(dst, src *Node) bool {
- if e.isSliceSelfAssign(dst, src) {
+func isSelfAssign(dst, src *Node) bool {
+ if isSliceSelfAssign(dst, src) {
return true
}
@@ -727,7 +600,7 @@ func (e *EscState) isSelfAssign(dst, src *Node) bool {
case ODOT, ODOTPTR:
// Safe trailing accessors that are permitted to differ.
case OINDEX:
- if e.mayAffectMemory(dst.Right) || e.mayAffectMemory(src.Right) {
+ if mayAffectMemory(dst.Right) || mayAffectMemory(src.Right) {
return false
}
default:
@@ -740,7 +613,7 @@ func (e *EscState) isSelfAssign(dst, src *Node) bool {
// mayAffectMemory reports whether n evaluation may affect program memory state.
// If expression can't affect it, then it can be safely ignored by the escape analysis.
-func (e *EscState) mayAffectMemory(n *Node) bool {
+func mayAffectMemory(n *Node) bool {
// We may want to use "memory safe" black list instead of general
// "side-effect free", which can include all calls and other ops
// that can affect allocate or change global state.
@@ -754,18 +627,26 @@ func (e *EscState) mayAffectMemory(n *Node) bool {
// Left+Right group.
case OINDEX, OADD, OSUB, OOR, OXOR, OMUL, OLSH, ORSH, OAND, OANDNOT, ODIV, OMOD:
- return e.mayAffectMemory(n.Left) || e.mayAffectMemory(n.Right)
+ return mayAffectMemory(n.Left) || mayAffectMemory(n.Right)
// Left group.
case ODOT, ODOTPTR, ODEREF, OCONVNOP, OCONV, OLEN, OCAP,
ONOT, OBITNOT, OPLUS, ONEG, OALIGNOF, OOFFSETOF, OSIZEOF:
- return e.mayAffectMemory(n.Left)
+ return mayAffectMemory(n.Left)
default:
return true
}
}
+func mustHeapAlloc(n *Node) bool {
+ // TODO(mdempsky): Cleanup this mess.
+ return n.Type != nil &&
+ (n.Type.Width > maxStackVarSize ||
+ (n.Op == ONEW || n.Op == OPTRLIT) && n.Type.Elem().Width >= maxImplicitStackVarSize ||
+ n.Op == OMAKESLICE && !isSmallMakeSlice(n))
+}
+
func (e *EscState) esc(n *Node, parent *Node) {
if n == nil {
return
@@ -796,10 +677,7 @@ func (e *EscState) esc(n *Node, parent *Node) {
// Big stuff and non-constant-sized stuff escapes unconditionally.
// "Big" conditions that were scattered around in walk have been
// gathered here.
- if n.Esc != EscHeap && n.Type != nil &&
- (n.Type.Width > maxStackVarSize ||
- (n.Op == ONEW || n.Op == OPTRLIT) && n.Type.Elem().Width >= maxImplicitStackVarSize ||
- n.Op == OMAKESLICE && !isSmallMakeSlice(n)) {
+ if n.Esc != EscHeap && mustHeapAlloc(n) {
// isSmallMakeSlice returns false for non-constant len/cap.
// If that's the case, print a more accurate escape reason.
var msgVerb, escapeMsg string
@@ -894,7 +772,7 @@ opSwitch:
case OAS, OASOP:
// Filter out some no-op assignments for escape analysis.
- if e.isSelfAssign(n.Left, n.Right) {
+ if isSelfAssign(n.Left, n.Right) {
if Debug['m'] != 0 {
Warnl(n.Pos, "%v ignoring self-assignment in %S", e.curfnSym(n), n)
}
@@ -1604,13 +1482,6 @@ func (e *EscState) esccall(call *Node, parent *Node) {
}
argList := call.List
- if argList.Len() == 1 {
- arg := argList.First()
- if arg.Type.IsFuncArgStruct() { // f(g())
- argList = e.nodeEscState(arg).Retval
- }
- }
-
args := argList.Slice()
if indirect {
@@ -1982,10 +1853,6 @@ func (e *EscState) escwalkBody(level Level, dst *Node, src *Node, step *EscStep,
src.Op == ONAME && src.Class() == PPARAM && src.Esc&EscMask < EscHeap &&
level.int() > 0 {
src.Esc = escMax(EscContentEscapes|src.Esc, EscNone)
- if Debug['m'] != 0 {
- Warnl(src.Pos, "mark escaped content: %S", src)
- step.describe(src)
- }
}
leaks = level.int() <= 0 && level.guaranteedDereference() <= 0 && dstE.Loopdepth < modSrcLoopdepth
@@ -2025,10 +1892,6 @@ func (e *EscState) escwalkBody(level Level, dst *Node, src *Node, step *EscStep,
// Treat a captured closure variable as equivalent to the
// original variable.
if src.IsClosureVar() {
- if leaks && Debug['m'] != 0 {
- Warnl(src.Pos, "leaking closure reference %S", src)
- step.describe(src)
- }
e.escwalk(level, dst, src.Name.Defn, e.stepWalk(dst, src.Name.Defn, "closure-var", step))
}
@@ -2039,7 +1902,7 @@ func (e *EscState) escwalkBody(level Level, dst *Node, src *Node, step *EscStep,
}
if leaks {
src.Esc = EscHeap
- if Debug['m'] != 0 && osrcesc != src.Esc {
+ if Debug['m'] != 0 && osrcesc != src.Esc && src.Op != OADDR {
p := src
if p.Left.Op == OCLOSURE {
p = p.Left // merely to satisfy error messages in tests
@@ -2335,7 +2198,7 @@ const unsafeUintptrTag = "unsafe-uintptr"
// marked go:uintptrescapes.
const uintptrEscapesTag = "uintptr-escapes"
-func (e *EscState) esctag(fn *Node) {
+func esctag(fn *Node) {
fn.Esc = EscFuncTagged
name := func(s *types.Sym, narg int) string {
diff --git a/src/cmd/compile/internal/gc/escape.go b/src/cmd/compile/internal/gc/escape.go
new file mode 100644
index 0000000000..88dc9ef8a8
--- /dev/null
+++ b/src/cmd/compile/internal/gc/escape.go
@@ -0,0 +1,1386 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package gc
+
+import (
+ "cmd/compile/internal/types"
+ "fmt"
+)
+
+// Escape analysis.
+//
+// Here we analyze functions to determine which Go variables
+// (including implicit allocations such as calls to "new" or "make",
+// composite literals, etc.) can be allocated on the stack. The two
+// key invariants we have to ensure are: (1) pointers to stack objects
+// cannot be stored in the heap, and (2) pointers to a stack object
+// cannot outlive that object (e.g., because the declaring function
+// returned and destroyed the object's stack frame, or its space is
+// reused across loop iterations for logically distinct variables).
+//
+// We implement this with a static data-flow analysis of the AST.
+// First, we construct a directed weighted graph where vertices
+// (termed "locations") represent variables allocated by statements
+// and expressions, and edges represent assignments between variables
+// (with weights reperesenting addressing/dereference counts).
+//
+// Next we walk the graph looking for assignment paths that might
+// violate the invariants stated above. If a variable v's address is
+// stored in the heap or elsewhere that may outlive it, then v is
+// marked as requiring heap allocation.
+//
+// To support interprocedural analysis, we also record data-flow from
+// each function's parameters to the heap and to its result
+// parameters. This information is summarized as "paremeter tags",
+// which are used at static call sites to improve escape analysis of
+// function arguments.
+
+// Constructing the location graph.
+//
+// Every allocating statement (e.g., variable declaration) or
+// expression (e.g., "new" or "make") is first mapped to a unique
+// "location."
+//
+// We also model every Go assignment as a directed edges between
+// locations. The number of derefence operations minus the number of
+// addressing operations is recorded as the edge's weight (termed
+// "derefs"). For example:
+//
+// p = &q // -1
+// p = q // 0
+// p = *q // 1
+// p = **q // 2
+//
+// p = **&**&q // 2
+//
+// Note that the & operator can only be applied to addressable
+// expressions, and the expression &x itself is not addressable, so
+// derefs cannot go below -1.
+//
+// Every Go language construct is lowered into this representation,
+// generally without sensitivity to flow, path, or context; and
+// without distinguishing elements within a compound variable. For
+// example:
+//
+// var x struct { f, g *int }
+// var u []*int
+//
+// x.f = u[0]
+//
+// is modeled simply as
+//
+// x = *u
+//
+// That is, we don't distinguish x.f from x.g, or u[0] from u[1],
+// u[2], etc. However, we do record the implicit dereference involved
+// in indexing a slice.
+
+type Escape struct {
+ allLocs []*EscLocation
+
+ curfn *Node
+
+ // loopDepth counts the current loop nesting depth within
+ // curfn. It increments within each "for" loop and at each
+ // label with a corresponding backwards "goto" (i.e.,
+ // unstructured loop).
+ loopDepth int
+
+ heapLoc EscLocation
+ blankLoc EscLocation
+}
+
+// An EscLocation represents an abstract location that stores a Go
+// variable.
+type EscLocation struct {
+ n *Node // represented variable or expression, if any
+ curfn *Node // enclosing function
+ edges []EscEdge // incoming edges
+ loopDepth int // loopDepth at declaration
+
+ // derefs and walkgen are used during walk to track the
+ // minimal dereferences from the walk root.
+ derefs int // >= -1
+ walkgen uint32
+
+ // escapes reports whether the represented variable's address
+ // escapes; that is, whether the variable must be heap
+ // allocated.
+ escapes bool
+
+ // transient reports whether the represented expression's
+ // address does not outlive the statement; that is, whether
+ // its storage can be immediately reused.
+ transient bool
+
+ // paramEsc records the represented parameter's escape tags.
+ // See "Parameter tags" below for details.
+ paramEsc uint16
+}
+
+// An EscEdge represents an assignment edge between two Go variables.
+type EscEdge struct {
+ src *EscLocation
+ derefs int // >= -1
+}
+
+// escapeFuncs performs escape analysis on a minimal batch of
+// functions.
+func escapeFuncs(fns []*Node, recursive bool) {
+ for _, fn := range fns {
+ if fn.Op != ODCLFUNC {
+ Fatalf("unexpected node: %v", fn)
+ }
+ }
+
+ var e Escape
+
+ // Construct data-flow graph from syntax trees.
+ for _, fn := range fns {
+ e.initFunc(fn)
+ }
+ for _, fn := range fns {
+ e.walkFunc(fn)
+ }
+ e.curfn = nil
+
+ e.walkAll()
+ e.finish()
+
+ // Record parameter tags for package export data.
+ for _, fn := range fns {
+ esctag(fn)
+ }
+}
+
+func (e *Escape) initFunc(fn *Node) {
+ if fn.Op != ODCLFUNC || fn.Esc != EscFuncUnknown {
+ Fatalf("unexpected node: %v", fn)
+ }
+ fn.Esc = EscFuncPlanned
+ if Debug['m'] > 3 {
+ Dump("escAnalyze", fn)
+ }
+
+ e.curfn = fn
+ e.loopDepth = 1
+
+ // Allocate locations for local variables.
+ for _, dcl := range fn.Func.Dcl {
+ if dcl.Op == ONAME {
+ loc := e.newLoc(dcl, false)
+
+ if dcl.Class() == PPARAM && fn.Nbody.Len() == 0 && !fn.Noescape() {
+ loc.paramEsc = EscHeap
+ }
+ }
+ }
+}
+
+func (e *Escape) walkFunc(fn *Node) {
+ fn.Esc = EscFuncStarted
+
+ // Identify labels that mark the head of an unstructured loop.
+ inspectList(fn.Nbody, func(n *Node) bool {
+ switch n.Op {
+ case OLABEL:
+ n.Sym.Label = asTypesNode(&nonlooping)
+
+ case OGOTO:
+ // If we visited the label before the goto,
+ // then this is a looping label.
+ if n.Sym.Label == asTypesNode(&nonlooping) {
+ n.Sym.Label = asTypesNode(&looping)
+ }
+ }
+
+ return true
+ })
+
+ e.curfn = fn
+ e.loopDepth = 1
+ e.stmts(fn.Nbody)
+}
+
+// Below we implement the methods for walking the AST and recording
+// data flow edges. Note that because a sub-expression might have
+// side-effects, it's important to always visit the entire AST.
+//
+// For example, write either:
+//
+// if x {
+// e.discard(n.Left)
+// } else {
+// e.value(k, n.Left)
+// }
+//
+// or
+//
+// if x {
+// k = e.discardHole()
+// }
+// e.value(k, n.Left)
+//
+// Do NOT write:
+//
+// // BAD: possibly loses side-effects within n.Left
+// if !x {
+// e.value(k, n.Left)
+// }
+
+// stmt evaluates a single Go statement.
+func (e *Escape) stmt(n *Node) {
+ if n == nil {
+ return
+ }
+
+ lno := setlineno(n)
+ defer func() {
+ lineno = lno
+ }()
+
+ if Debug['m'] > 2 {
+ fmt.Printf("%v:[%d] %v stmt: %v\n", linestr(lineno), e.loopDepth, funcSym(e.curfn), n)
+ }
+
+ e.stmts(n.Ninit)
+
+ switch n.Op {
+ default:
+ Fatalf("unexpected stmt: %v", n)
+
+ case ODCLCONST, ODCLTYPE, OEMPTY, OFALL, OINLMARK:
+ // nop
+
+ case OBREAK, OCONTINUE, OGOTO:
+ // TODO(mdempsky): Handle dead code?
+
+ case OBLOCK:
+ e.stmts(n.List)
+
+ case ODCL:
+ // Record loop depth at declaration.
+ if !n.Left.isBlank() {
+ e.dcl(n.Left)
+ }
+
+ case OLABEL:
+ switch asNode(n.Sym.Label) {
+ case &nonlooping:
+ if Debug['m'] > 2 {
+ fmt.Printf("%v:%v non-looping label\n", linestr(lineno), n)
+ }
+ case &looping:
+ if Debug['m'] > 2 {
+ fmt.Printf("%v: %v looping label\n", linestr(lineno), n)
+ }
+ e.loopDepth++
+ default:
+ Fatalf("label missing tag")
+ }
+ n.Sym.Label = nil
+
+ case OIF:
+ e.discard(n.Left)
+ e.stmts(n.Nbody)
+ e.stmts(n.Rlist)
+
+ case OFOR, OFORUNTIL:
+ e.loopDepth++
+ e.discard(n.Left)
+ e.stmt(n.Right)
+ e.stmts(n.Nbody)
+ e.loopDepth--
+
+ case ORANGE:
+ // for List = range Right { Nbody }
+
+ // Right is evaluated outside the loop.
+ tv := e.newLoc(n, false)
+ e.expr(tv.asHole(), n.Right)
+
+ e.loopDepth++
+ ks := e.addrs(n.List)
+ if len(ks) >= 2 {
+ if n.Right.Type.IsArray() {
+ e.flow(ks[1].note(n, "range"), tv)
+ } else {
+ e.flow(ks[1].deref(n, "range-deref"), tv)
+ }
+ }
+
+ e.stmts(n.Nbody)
+ e.loopDepth--
+
+ case OSWITCH:
+ var tv *EscLocation
+ if n.Left != nil {
+ if n.Left.Op == OTYPESW {
+ k := e.discardHole()
+ if n.Left.Left != nil {
+ tv = e.newLoc(n.Left, false)
+ k = tv.asHole()
+ }
+ e.expr(k, n.Left.Right)
+ } else {
+ e.discard(n.Left)
+ }
+ }
+
+ for _, cas := range n.List.Slice() { // cases
+ if tv != nil {
+ // type switch variables have no ODCL.
+ cv := cas.Rlist.First()
+ k := e.dcl(cv)
+ if types.Haspointers(cv.Type) {
+ e.flow(k.dotType(cv.Type, n, "switch case"), tv)
+ }
+ }
+
+ e.discards(cas.List)
+ e.stmts(cas.Nbody)
+ }
+
+ case OSELECT:
+ for _, cas := range n.List.Slice() {
+ e.stmt(cas.Left)
+ e.stmts(cas.Nbody)
+ }
+ case OSELRECV:
+ e.assign(n.Left, n.Right, "selrecv", n)
+ case OSELRECV2:
+ e.assign(n.Left, n.Right, "selrecv", n)
+ e.assign(n.List.First(), nil, "selrecv", n)
+ case ORECV:
+ // TODO(mdempsky): Consider e.discard(n.Left).
+ e.exprSkipInit(e.discardHole(), n) // already visited n.Ninit
+ case OSEND:
+ e.discard(n.Left)
+ e.assignHeap(n.Right, "send", n)
+
+ case OAS, OASOP:
+ e.assign(n.Left, n.Right, "assign", n)
+
+ case OAS2:
+ for i, nl := range n.List.Slice() {
+ e.assign(nl, n.Rlist.Index(i), "assign-pair", n)
+ }
+
+ case OAS2DOTTYPE: // v, ok = x.(type)
+ e.assign(n.List.First(), n.Rlist.First(), "assign-pair-dot-type", n)
+ e.assign(n.List.Second(), nil, "assign-pair-dot-type", n)
+ case OAS2MAPR: // v, ok = m[k]
+ e.assign(n.List.First(), n.Rlist.First(), "assign-pair-mapr", n)
+ e.assign(n.List.Second(), nil, "assign-pair-mapr", n)
+ case OAS2RECV: // v, ok = <-ch
+ e.assign(n.List.First(), n.Rlist.First(), "assign-pair-receive", n)
+ e.assign(n.List.Second(), nil, "assign-pair-receive", n)
+
+ case OAS2FUNC:
+ e.stmts(n.Rlist.First().Ninit)
+ e.call(e.addrs(n.List), n.Rlist.First(), nil)
+ case ORETURN:
+ results := e.curfn.Type.Results().FieldSlice()
+ for i, v := range n.List.Slice() {
+ e.assign(asNode(results[i].Nname), v, "return", n)
+ }
+ case OCALLFUNC, OCALLMETH, OCALLINTER, OCLOSE, OCOPY, ODELETE, OPANIC, OPRINT, OPRINTN, ORECOVER:
+ e.call(nil, n, nil)
+ case OGO, ODEFER:
+ e.stmts(n.Left.Ninit)
+ e.call(nil, n.Left, n)
+
+ case ORETJMP:
+ // TODO(mdempsky): What do? esc.go just ignores it.
+ }
+}
+
+func (e *Escape) stmts(l Nodes) {
+ // TODO(mdempsky): Preserve and restore e.loopDepth? See also #22438.
+ for _, n := range l.Slice() {
+ e.stmt(n)
+ }
+}
+
+// expr models evaluating an expression n and flowing the result into
+// hole k.
+func (e *Escape) expr(k EscHole, n *Node) {
+ if n == nil {
+ return
+ }
+ e.stmts(n.Ninit)
+ e.exprSkipInit(k, n)
+}
+
+func (e *Escape) exprSkipInit(k EscHole, n *Node) {
+ if n == nil {
+ return
+ }
+
+ lno := setlineno(n)
+ defer func() {
+ lineno = lno
+ }()
+
+ if k.derefs >= 0 && !types.Haspointers(n.Type) {
+ k = e.discardHole()
+ }
+
+ switch n.Op {
+ default:
+ Fatalf("unexpected expr: %v", n)
+
+ case OLITERAL, OGETG, OCLOSUREVAR, OTYPE:
+ // nop
+
+ case ONAME:
+ if n.Class() == PFUNC || n.Class() == PEXTERN {
+ return
+ }
+ e.flow(k, e.oldLoc(n))
+
+ case OPLUS, ONEG, OBITNOT, ONOT:
+ e.discard(n.Left)
+ case OADD, OSUB, OOR, OXOR, OMUL, ODIV, OMOD, OLSH, ORSH, OAND, OANDNOT, OEQ, ONE, OLT, OLE, OGT, OGE, OANDAND, OOROR:
+ e.discard(n.Left)
+ e.discard(n.Right)
+
+ case OADDR:
+ e.expr(k.addr(n, "address-of"), n.Left) // "address-of"
+ case ODEREF:
+ e.expr(k.deref(n, "indirection"), n.Left) // "indirection"
+ case ODOT, ODOTMETH, ODOTINTER:
+ e.expr(k.note(n, "dot"), n.Left)
+ case ODOTPTR:
+ e.expr(k.deref(n, "dot of pointer"), n.Left) // "dot of pointer"
+ case ODOTTYPE, ODOTTYPE2:
+ e.expr(k.dotType(n.Type, n, "dot"), n.Left)
+ case OINDEX:
+ if n.Left.Type.IsArray() {
+ e.expr(k.note(n, "fixed-array-index-of"), n.Left)
+ } else {
+ // TODO(mdempsky): Fix why reason text.
+ e.expr(k.deref(n, "dot of pointer"), n.Left)
+ }
+ e.discard(n.Right)
+ case OINDEXMAP:
+ e.discard(n.Left)
+ e.discard(n.Right)
+ case OSLICE, OSLICEARR, OSLICE3, OSLICE3ARR, OSLICESTR:
+ e.expr(k.note(n, "slice"), n.Left)
+ low, high, max := n.SliceBounds()
+ e.discard(low)
+ e.discard(high)
+ e.discard(max)
+
+ case OCONV, OCONVNOP:
+ if n.Type.Etype == TUNSAFEPTR && n.Left.Type.Etype == TUINTPTR {
+ e.unsafeValue(k, n.Left)
+ } else {
+ e.expr(k, n.Left)
+ }
+ case OCONVIFACE:
+ if !n.Left.Type.IsInterface() && !isdirectiface(n.Left.Type) {
+ k = e.spill(k, n)
+ } else {
+ // esc.go prints "escapes to heap" / "does not
+ // escape" messages for OCONVIFACE even when
+ // they don't allocate. Match that behavior
+ // because it's easy.
+ // TODO(mdempsky): Remove and cleanup test expectations.
+ _ = e.spill(k, n)
+ }
+ e.expr(k.note(n, "interface-converted"), n.Left)
+
+ case ORECV:
+ e.discard(n.Left)
+
+ case OCALLMETH, OCALLFUNC, OCALLINTER, OLEN, OCAP, OCOMPLEX, OREAL, OIMAG, OAPPEND, OCOPY:
+ e.call([]EscHole{k}, n, nil)
+
+ case ONEW:
+ e.spill(k, n)
+
+ case OMAKESLICE:
+ e.spill(k, n)
+ e.discard(n.Left)
+ e.discard(n.Right)
+ case OMAKECHAN:
+ e.discard(n.Left)
+ case OMAKEMAP:
+ e.spill(k, n)
+ e.discard(n.Left)
+
+ case ORECOVER:
+ // nop
+
+ case OCALLPART:
+ e.spill(k, n)
+
+ // esc.go says "Contents make it to memory, lose
+ // track." I think we can just flow n.Left to our
+ // spilled location though.
+ // TODO(mdempsky): Try that.
+ e.assignHeap(n.Left, "call part", n)
+
+ case OPTRLIT:
+ e.expr(e.spill(k, n), n.Left)
+
+ case OARRAYLIT:
+ for _, elt := range n.List.Slice() {
+ if elt.Op == OKEY {
+ elt = elt.Right
+ }
+ e.expr(k.note(n, "array literal element"), elt)
+ }
+
+ case OSLICELIT:
+ k = e.spill(k, n)
+
+ for _, elt := range n.List.Slice() {
+ if elt.Op == OKEY {
+ elt = elt.Right
+ }
+ e.expr(k.note(n, "slice-literal-element"), elt)
+ }
+
+ case OSTRUCTLIT:
+ for _, elt := range n.List.Slice() {
+ e.expr(k.note(n, "struct literal element"), elt.Left)
+ }
+
+ case OMAPLIT:
+ e.spill(k, n)
+
+ // Map keys and values are always stored in the heap.
+ for _, elt := range n.List.Slice() {
+ e.assignHeap(elt.Left, "map literal key", n)
+ e.assignHeap(elt.Right, "map literal value", n)
+ }
+
+ case OCLOSURE:
+ k = e.spill(k, n)
+
+ // Link addresses of captured variables to closure.
+ for _, v := range n.Func.Closure.Func.Cvars.Slice() {
+ if v.Op == OXXX { // unnamed out argument; see dcl.go:/^funcargs
+ continue
+ }
+
+ k := k
+ if !v.Name.Byval() {
+ k = k.addr(v, "reference")
+ }
+
+ e.expr(k.note(n, "captured by a closure"), v.Name.Defn)
+ }
+
+ case ORUNES2STR, OBYTES2STR, OSTR2RUNES, OSTR2BYTES, ORUNESTR:
+ e.spill(k, n)
+ e.discard(n.Left)
+
+ case OADDSTR:
+ e.spill(k, n)
+
+ // Arguments of OADDSTR never escape;
+ // runtime.concatstrings makes sure of that.
+ e.discards(n.List)
+ }
+}
+
+// unsafeValue evaluates a uintptr-typed arithmetic expression looking
+// for conversions from an unsafe.Pointer.
+func (e *Escape) unsafeValue(k EscHole, n *Node) {
+ if n.Type.Etype != TUINTPTR {
+ Fatalf("unexpected type %v for %v", n.Type, n)
+ }
+
+ e.stmts(n.Ninit)
+
+ switch n.Op {
+ case OCONV, OCONVNOP:
+ if n.Left.Type.Etype == TUNSAFEPTR {
+ e.expr(k, n.Left)
+ } else {
+ e.discard(n.Left)
+ }
+ case ODOTPTR:
+ if isReflectHeaderDataField(n) {
+ e.expr(k.deref(n, "reflect.Header.Data"), n.Left)
+ } else {
+ e.discard(n.Left)
+ }
+ case OPLUS, ONEG, OBITNOT:
+ e.unsafeValue(k, n.Left)
+ case OADD, OSUB, OOR, OXOR, OMUL, ODIV, OMOD, OLSH, ORSH, OAND, OANDNOT:
+ e.unsafeValue(k, n.Left)
+ e.unsafeValue(k, n.Right)
+ default:
+ e.exprSkipInit(e.discardHole(), n)
+ }
+}
+
+// discard evaluates an expression n for side-effects, but discards
+// its value.
+func (e *Escape) discard(n *Node) {
+ e.expr(e.discardHole(), n)
+}
+
+func (e *Escape) discards(l Nodes) {
+ for _, n := range l.Slice() {
+ e.discard(n)
+ }
+}
+
+// addr evaluates an addressable expression n and returns an EscHole
+// that represents storing into the represented location.
+func (e *Escape) addr(n *Node) EscHole {
+ if n == nil || n.isBlank() {
+ // Can happen at least in OSELRECV.
+ // TODO(mdempsky): Anywhere else?
+ return e.discardHole()
+ }
+
+ k := e.heapHole()
+
+ switch n.Op {
+ default:
+ Fatalf("unexpected addr: %v", n)
+ case ONAME:
+ if n.Class() == PEXTERN {
+ break
+ }
+ k = e.oldLoc(n).asHole()
+ case ODOT:
+ k = e.addr(n.Left)
+ case OINDEX:
+ e.discard(n.Right)
+ if n.Left.Type.IsArray() {
+ k = e.addr(n.Left)
+ } else {
+ e.discard(n.Left)
+ }
+ case ODEREF, ODOTPTR:
+ e.discard(n)
+ case OINDEXMAP:
+ e.discard(n.Left)
+ e.assignHeap(n.Right, "key of map put", n)
+ }
+
+ if !types.Haspointers(n.Type) {
+ k = e.discardHole()
+ }
+
+ return k
+}
+
+func (e *Escape) addrs(l Nodes) []EscHole {
+ var ks []EscHole
+ for _, n := range l.Slice() {
+ ks = append(ks, e.addr(n))
+ }
+ return ks
+}
+
+// assign evaluates the assignment dst = src.
+func (e *Escape) assign(dst, src *Node, why string, where *Node) {
+ // Filter out some no-op assignments for escape analysis.
+ ignore := dst != nil && src != nil && isSelfAssign(dst, src)
+ if ignore && Debug['m'] != 0 {
+ Warnl(where.Pos, "%v ignoring self-assignment in %S", funcSym(e.curfn), where)
+ }
+
+ k := e.addr(dst)
+ if dst != nil && dst.Op == ODOTPTR && isReflectHeaderDataField(dst) {
+ e.unsafeValue(e.heapHole(), src)
+ } else {
+ if ignore {
+ k = e.discardHole()
+ }
+ e.expr(k, src)
+ }
+}
+
+func (e *Escape) assignHeap(src *Node, why string, where *Node) {
+ e.expr(e.heapHole().note(where, why), src)
+}
+
+// call evaluates a call expressions, including builtin calls. ks
+// should contain the holes representing where the function callee's
+// results flows; where is the OGO/ODEFER context of the call, if any.
+func (e *Escape) call(ks []EscHole, call, where *Node) {
+ // First, pick out the function callee, its type, and receiver
+ // (if any) and normal arguments list.
+ var fn, recv *Node
+ var fntype *types.Type
+ args := call.List.Slice()
+ switch call.Op {
+ case OCALLFUNC:
+ fn = call.Left
+ if fn.Op == OCLOSURE {
+ fn = fn.Func.Closure.Func.Nname
+ }
+ fntype = fn.Type
+ case OCALLMETH:
+ fn = asNode(call.Left.Type.FuncType().Nname)
+ fntype = fn.Type
+ recv = call.Left.Left
+ case OCALLINTER:
+ fntype = call.Left.Type
+ recv = call.Left.Left
+ case OAPPEND, ODELETE, OPRINT, OPRINTN, ORECOVER:
+ // ok
+ case OLEN, OCAP, OREAL, OIMAG, OCLOSE, OPANIC:
+ args = []*Node{call.Left}
+ case OCOMPLEX, OCOPY:
+ args = []*Node{call.Left, call.Right}
+ default:
+ Fatalf("unexpected call op: %v", call.Op)
+ }
+
+ static := fn != nil && fn.Op == ONAME && fn.Class() == PFUNC
+
+ // Setup evaluation holes for each receiver/argument.
+ var recvK EscHole
+ var paramKs []EscHole
+
+ if static && fn.Name.Defn != nil && fn.Name.Defn.Esc < EscFuncTagged {
+ // Static call to function in same mutually recursive
+ // group; incorporate into data flow graph.
+
+ if fn.Name.Defn.Esc == EscFuncUnknown {
+ Fatalf("graph inconsistency")
+ }
+
+ if ks != nil {
+ for i, result := range fntype.Results().FieldSlice() {
+ e.expr(ks[i], asNode(result.Nname))
+ }
+ }
+
+ if r := fntype.Recv(); r != nil {
+ recvK = e.addr(asNode(r.Nname))
+ }
+ for _, param := range fntype.Params().FieldSlice() {
+ paramKs = append(paramKs, e.addr(asNode(param.Nname)))
+ }
+ } else if call.Op == OCALLFUNC || call.Op == OCALLMETH || call.Op == OCALLINTER {
+ // Dynamic call, or call to previously tagged
+ // function. Setup flows to heap and/or ks according
+ // to parameter tags.
+ if r := fntype.Recv(); r != nil {
+ recvK = e.tagHole(ks, r, static)
+ }
+ for _, param := range fntype.Params().FieldSlice() {
+ paramKs = append(paramKs, e.tagHole(ks, param, static))
+ }
+ } else {
+ // Handle escape analysis for builtins.
+ // By default, we just discard everything.
+ for range args {
+ paramKs = append(paramKs, e.discardHole())
+ }
+
+ switch call.Op {
+ case OAPPEND:
+ // Appendee slice may flow directly to the
+ // result, if it has enough capacity.
+ // Alternatively, a new heap slice might be
+ // allocated, and all slice elements might
+ // flow to heap.
+ paramKs[0] = e.teeHole(paramKs[0], ks[0])
+ if types.Haspointers(args[0].Type.Elem()) {
+ paramKs[0] = e.teeHole(paramKs[0], e.heapHole().deref(call, "appendee slice"))
+ }
+
+ if call.IsDDD() {
+ if args[1].Type.IsSlice() && types.Haspointers(args[1].Type.Elem()) {
+ paramKs[1] = e.teeHole(paramKs[1], e.heapHole().deref(call, "appended slice..."))
+ }
+ } else {
+ for i := 1; i < len(args); i++ {
+ paramKs[i] = e.heapHole()
+ }
+ }
+
+ case OCOPY:
+ if call.Right.Type.IsSlice() && types.Haspointers(call.Right.Type.Elem()) {
+ paramKs[1] = e.teeHole(paramKs[1], e.heapHole().deref(call, "copied slice"))
+ }
+
+ case OPANIC:
+ paramKs[0] = e.heapHole()
+ }
+ }
+
+ if call.Op == OCALLFUNC {
+ // Evaluate callee function expression.
+ e.expr(e.augmentParamHole(e.discardHole(), where), call.Left)
+ }
+
+ if recv != nil {
+ // TODO(mdempsky): Handle go:uintptrescapes here too?
+ e.expr(e.augmentParamHole(recvK, where), recv)
+ }
+
+ // Apply augmentParamHole before ODDDARG so that it affects
+ // the implicit slice allocation for variadic calls, if any.
+ for i, paramK := range paramKs {
+ paramKs[i] = e.augmentParamHole(paramK, where)
+ }
+
+ // TODO(mdempsky): Remove after early ddd-ification.
+ if fntype != nil && fntype.IsVariadic() && !call.IsDDD() {
+ vi := fntype.NumParams() - 1
+
+ elt := fntype.Params().Field(vi).Type.Elem()
+ nva := call.List.Len()
+ nva -= vi
+
+ // Introduce ODDDARG node to represent ... allocation.
+ ddd := nodl(call.Pos, ODDDARG, nil, nil)
+ ddd.Type = types.NewPtr(types.NewArray(elt, int64(nva)))
+ call.Right = ddd
+
+ dddK := e.spill(paramKs[vi], ddd)
+ paramKs = paramKs[:vi]
+ for i := 0; i < nva; i++ {
+ paramKs = append(paramKs, dddK)
+ }
+ }
+
+ for i, arg := range args {
+ // For arguments to go:uintptrescapes, peel
+ // away an unsafe.Pointer->uintptr conversion,
+ // if present.
+ if static && arg.Op == OCONVNOP && arg.Type.Etype == TUINTPTR && arg.Left.Type.Etype == TUNSAFEPTR {
+ x := i
+ if fntype.IsVariadic() && x >= fntype.NumParams() {
+ x = fntype.NumParams() - 1
+ }
+ if fntype.Params().Field(x).Note == uintptrEscapesTag {
+ arg = arg.Left
+ }
+ }
+
+ // no augmentParamHole here; handled in loop before ODDDARG
+ e.expr(paramKs[i], arg)
+ }
+}
+
+// augmentParamHole augments parameter holes as necessary for use in
+// go/defer statements.
+func (e *Escape) augmentParamHole(k EscHole, where *Node) EscHole {
+ if where == nil {
+ return k
+ }
+
+ // Top level defers arguments don't escape to heap, but they
+ // do need to last until end of function. Tee with a
+ // non-transient location to avoid arguments from being
+ // transiently allocated.
+ if where.Op == ODEFER && e.loopDepth == 1 {
+ // TODO(mdempsky): Eliminate redundant EscLocation allocs.
+ return e.teeHole(k, e.newLoc(nil, false).asHole())
+ }
+
+ return e.heapHole()
+}
+
+// tagHole returns a hole for evaluating an argument passed to param.
+// ks should contain the holes representing where the function
+// callee's results flows; static indicates whether this is a static
+// call.
+func (e *Escape) tagHole(ks []EscHole, param *types.Field, static bool) EscHole {
+ // If this is a dynamic call, we can't rely on param.Note.
+ if !static {
+ return e.heapHole()
+ }
+
+ esc := parsetag(param.Note)
+ switch esc {
+ case EscHeap, EscUnknown:
+ return e.heapHole()
+ }
+
+ var tagKs []EscHole
+ if esc&EscContentEscapes != 0 {
+ tagKs = append(tagKs, e.heapHole().shift(1))
+ }
+
+ if ks != nil {
+ for i := 0; i < numEscReturns; i++ {
+ if x := getEscReturn(esc, i); x >= 0 {
+ tagKs = append(tagKs, ks[i].shift(x))
+ }
+ }
+ }
+
+ return e.teeHole(tagKs...)
+}
+
+// An EscHole represents a context for evaluation a Go
+// expression. E.g., when evaluating p in "x = **p", we'd have a hole
+// with dst==x and derefs==2.
+type EscHole struct {
+ dst *EscLocation
+ derefs int // >= -1
+}
+
+func (k EscHole) note(where *Node, why string) EscHole {
+ // TODO(mdempsky): Keep a record of where/why for diagnostics.
+ return k
+}
+
+func (k EscHole) shift(delta int) EscHole {
+ k.derefs += delta
+ if k.derefs < -1 {
+ Fatalf("derefs underflow: %v", k.derefs)
+ }
+ return k
+}
+
+func (k EscHole) deref(where *Node, why string) EscHole { return k.shift(1).note(where, why) }
+func (k EscHole) addr(where *Node, why string) EscHole { return k.shift(-1).note(where, why) }
+
+func (k EscHole) dotType(t *types.Type, where *Node, why string) EscHole {
+ if !t.IsInterface() && !isdirectiface(t) {
+ k = k.shift(1)
+ }
+ return k.note(where, why)
+}
+
+// teeHole returns a new hole that flows into each hole of ks,
+// similar to the Unix tee(1) command.
+func (e *Escape) teeHole(ks ...EscHole) EscHole {
+ if len(ks) == 0 {
+ return e.discardHole()
+ }
+ if len(ks) == 1 {
+ return ks[0]
+ }
+ // TODO(mdempsky): Optimize if there's only one non-discard hole?
+
+ // Given holes "l1 = _", "l2 = **_", "l3 = *_", ..., create a
+ // new temporary location ltmp, wire it into place, and return
+ // a hole for "ltmp = _".
+ loc := e.newLoc(nil, true)
+ for _, k := range ks {
+ // N.B., "p = &q" and "p = &tmp; tmp = q" are not
+ // semantically equivalent. To combine holes like "l1
+ // = _" and "l2 = &_", we'd need to wire them as "l1 =
+ // *ltmp" and "l2 = ltmp" and return "ltmp = &_"
+ // instead.
+ if k.derefs < 0 {
+ Fatalf("teeHole: negative derefs")
+ }
+
+ e.flow(k, loc)
+ }
+ return loc.asHole()
+}
+
+func (e *Escape) dcl(n *Node) EscHole {
+ loc := e.oldLoc(n)
+ loc.loopDepth = e.loopDepth
+ return loc.asHole()
+}
+
+func (e *Escape) spill(k EscHole, n *Node) EscHole {
+ // TODO(mdempsky): Optimize. E.g., if k is the heap or blank,
+ // then we already know whether n leaks, and we can return a
+ // more optimized hole.
+ loc := e.newLoc(n, true)
+ e.flow(k.addr(n, "spill"), loc)
+ return loc.asHole()
+}
+
+// canonicalNode returns the canonical *Node that n logically
+// represents.
+func canonicalNode(n *Node) *Node {
+ if n != nil && n.IsClosureVar() {
+ n = n.Name.Defn
+ if n.IsClosureVar() {
+ Fatalf("still closure var")
+ }
+ }
+
+ return n
+}
+
+func (e *Escape) newLoc(n *Node, transient bool) *EscLocation {
+ if e.curfn == nil {
+ Fatalf("e.curfn isn't set")
+ }
+
+ n = canonicalNode(n)
+ loc := &EscLocation{
+ n: n,
+ curfn: e.curfn,
+ loopDepth: e.loopDepth,
+ transient: transient,
+ }
+ e.allLocs = append(e.allLocs, loc)
+ if n != nil {
+ if n.Op == ONAME && n.Name.Curfn != e.curfn {
+ Fatalf("curfn mismatch: %v != %v", n.Name.Curfn, e.curfn)
+ }
+
+ if n.HasOpt() {
+ Fatalf("%v already has a location", n)
+ }
+ n.SetOpt(loc)
+
+ // TODO(mdempsky): Perhaps set n.Esc and then just return &HeapLoc?
+ if mustHeapAlloc(n) && !loc.isName(PPARAM) && !loc.isName(PPARAMOUT) {
+ e.flow(e.heapHole().addr(nil, ""), loc)
+ }
+ }
+ return loc
+}
+
+func (e *Escape) oldLoc(n *Node) *EscLocation {
+ n = canonicalNode(n)
+ return n.Opt().(*EscLocation)
+}
+
+func (l *EscLocation) asHole() EscHole {
+ return EscHole{dst: l}
+}
+
+func (e *Escape) flow(k EscHole, src *EscLocation) {
+ dst := k.dst
+ if dst == &e.blankLoc {
+ return
+ }
+ if dst == src && k.derefs >= 0 {
+ return
+ }
+ // TODO(mdempsky): More optimizations?
+
+ // TODO(mdempsky): Deduplicate edges?
+ dst.edges = append(dst.edges, EscEdge{src: src, derefs: k.derefs})
+}
+
+func (e *Escape) heapHole() EscHole { return e.heapLoc.asHole() }
+func (e *Escape) discardHole() EscHole { return e.blankLoc.asHole() }
+
+// walkAll computes the minimal dereferences between all pairs of
+// locations.
+func (e *Escape) walkAll() {
+ var walkgen uint32
+
+ for _, loc := range e.allLocs {
+ walkgen++
+ e.walkOne(loc, walkgen)
+ }
+
+ // Walk the heap last so that we catch any edges to the heap
+ // added during walkOne.
+ walkgen++
+ e.walkOne(&e.heapLoc, walkgen)
+}
+
+// walkOne computes the minimal number of dereferences from root to
+// all other locations.
+func (e *Escape) walkOne(root *EscLocation, walkgen uint32) {
+ // The data flow graph has negative edges (from addressing
+ // operations), so we use the Bellman-Ford algorithm. However,
+ // we don't have to worry about infinite negative cycles since
+ // we bound intermediate dereference counts to 0.
+ root.walkgen = walkgen
+ root.derefs = 0
+
+ todo := []*EscLocation{root}
+ for len(todo) > 0 {
+ l := todo[len(todo)-1]
+ todo = todo[:len(todo)-1]
+
+ base := l.derefs
+
+ // If l.derefs < 0, then l's address flows to root.
+ addressOf := base < 0
+ if addressOf {
+ // For a flow path like "root = &l; l = x",
+ // l's address flows to root, but x's does
+ // not. We recognize this by lower bounding
+ // base at 0.
+ base = 0
+
+ // If l's address flows to a non-transient
+ // location, then l can't be transiently
+ // allocated.
+ if !root.transient {
+ l.transient = false
+ // TODO(mdempsky): Should we re-walk from l now?
+ }
+ }
+
+ if e.outlives(root, l) {
+ // If l's address flows somewhere that
+ // outlives it, then l needs to be heap
+ // allocated.
+ if addressOf && !l.escapes {
+ l.escapes = true
+
+ // If l is heap allocated, then any
+ // values stored into it flow to the
+ // heap too.
+ // TODO(mdempsky): Better way to handle this?
+ if root != &e.heapLoc {
+ e.flow(e.heapHole(), l)
+ }
+ }
+
+ // l's value flows to root. If l is a function
+ // parameter and root is the heap or a
+ // corresponding result parameter, then record
+ // that value flow for tagging the function
+ // later.
+ if l.isName(PPARAM) {
+ l.leakTo(root, base)
+ }
+ }
+
+ for _, edge := range l.edges {
+ derefs := base + edge.derefs
+ if edge.src.walkgen != walkgen || edge.src.derefs > derefs {
+ edge.src.walkgen = walkgen
+ edge.src.derefs = derefs
+ todo = append(todo, edge.src)
+ }
+ }
+ }
+}
+
+// outlives reports whether values stored in l may survive beyond
+// other's lifetime if stack allocated.
+func (e *Escape) outlives(l, other *EscLocation) bool {
+ // The heap outlives everything.
+ if l == &e.heapLoc {
+ return true
+ }
+
+ // We don't know what callers do with returned values, so
+ // pessimistically we need to assume they flow to the heap and
+ // outlive everything too.
+ if l.isName(PPARAMOUT) {
+ // Exception: Directly called closures can return
+ // locations allocated outside of them without forcing
+ // them to the heap. For example:
+ //
+ // var u int // okay to stack allocate
+ // *(func() *int { return &u }()) = 42
+ if containsClosure(other.curfn, l.curfn) && l.curfn.Func.Closure.Func.Top&ctxCallee != 0 {
+ return false
+ }
+
+ return true
+ }
+
+ // If l and other are within the same function, then l
+ // outlives other if it was declared outside other's loop
+ // scope. For example:
+ //
+ // var l *int
+ // for {
+ // l = new(int)
+ // }
+ if l.curfn == other.curfn && l.loopDepth < other.loopDepth {
+ return true
+ }
+
+ // If other is declared within a child closure of where l is
+ // declared, then l outlives it. For example:
+ //
+ // var l *int
+ // func() {
+ // l = new(int)
+ // }
+ if containsClosure(l.curfn, other.curfn) {
+ return true
+ }
+
+ return false
+}
+
+// containsClosure reports whether c is a closure contained within f.
+func containsClosure(f, c *Node) bool {
+ if f.Op != ODCLFUNC || c.Op != ODCLFUNC {
+ Fatalf("bad containsClosure: %v, %v", f, c)
+ }
+
+ // Common case.
+ if f == c {
+ return false
+ }
+
+ // Closures within function Foo are named like "Foo.funcN..."
+ // TODO(mdempsky): Better way to recognize this.
+ fn := f.Func.Nname.Sym.Name
+ cn := c.Func.Nname.Sym.Name
+ return len(cn) > len(fn) && cn[:len(fn)] == fn && cn[len(fn)] == '.'
+}
+
+// leak records that parameter l leaks to sink.
+func (l *EscLocation) leakTo(sink *EscLocation, derefs int) {
+ // Short circuit if l already leaks to heap.
+ if l.paramEsc == EscHeap {
+ return
+ }
+
+ // If sink is a result parameter and we can fit return bits
+ // into the escape analysis tag, then record a return leak.
+ if sink.isName(PPARAMOUT) && sink.curfn == l.curfn {
+ // TODO(mdempsky): Eliminate dependency on Vargen here.
+ ri := int(sink.n.Name.Vargen) - 1
+ if ri < numEscReturns {
+ // Leak to result parameter.
+ if old := getEscReturn(l.paramEsc, ri); old < 0 || derefs < old {
+ l.paramEsc = setEscReturn(l.paramEsc, ri, derefs)
+ }
+ return
+ }
+ }
+
+ // Otherwise, record as heap leak.
+ if derefs > 0 {
+ l.paramEsc |= EscContentEscapes
+ } else {
+ l.paramEsc = EscHeap
+ }
+}
+
+func (e *Escape) finish() {
+ for _, loc := range e.allLocs {
+ n := loc.n
+ if n == nil {
+ continue
+ }
+ n.SetOpt(nil)
+
+ // Update n.Esc based on escape analysis results.
+ //
+ // TODO(mdempsky): Simplify once compatibility with
+ // esc.go is no longer necessary.
+ //
+ // TODO(mdempsky): Describe path when Debug['m'] >= 2.
+
+ if loc.escapes {
+ if Debug['m'] != 0 && n.Op != ONAME {
+ Warnl(n.Pos, "%S escapes to heap", n)
+ }
+ n.Esc = EscHeap
+ addrescapes(n)
+ } else if loc.isName(PPARAM) {
+ n.Esc = finalizeEsc(loc.paramEsc)
+
+ if Debug['m'] != 0 && types.Haspointers(n.Type) {
+ if n.Esc == EscNone {
+ Warnl(n.Pos, "%S %S does not escape", funcSym(loc.curfn), n)
+ } else if n.Esc == EscHeap {
+ Warnl(n.Pos, "leaking param: %S", n)
+ } else {
+ if n.Esc&EscContentEscapes != 0 {
+ Warnl(n.Pos, "leaking param content: %S", n)
+ }
+ for i := 0; i < numEscReturns; i++ {
+ if x := getEscReturn(n.Esc, i); x >= 0 {
+ res := n.Name.Curfn.Type.Results().Field(i).Sym
+ Warnl(n.Pos, "leaking param: %S to result %v level=%d", n, res, x)
+ }
+ }
+ }
+ }
+ } else {
+ n.Esc = EscNone
+ if loc.transient {
+ switch n.Op {
+ case OCALLPART, OCLOSURE, ODDDARG, OARRAYLIT, OSLICELIT, OPTRLIT, OSTRUCTLIT:
+ n.SetNoescape(true)
+ }
+ }
+
+ if Debug['m'] != 0 && n.Op != ONAME && n.Op != OTYPESW && n.Op != ORANGE && n.Op != ODEFER {
+ Warnl(n.Pos, "%S %S does not escape", funcSym(loc.curfn), n)
+ }
+ }
+ }
+}
+
+func (l *EscLocation) isName(c Class) bool {
+ return l.n != nil && l.n.Op == ONAME && l.n.Class() == c
+}
+
+func finalizeEsc(esc uint16) uint16 {
+ esc = optimizeReturns(esc)
+
+ if esc>>EscReturnBits != 0 {
+ esc |= EscReturn
+ } else if esc&EscMask == 0 {
+ esc |= EscNone
+ }
+
+ return esc
+}
+
+func optimizeReturns(esc uint16) uint16 {
+ if esc&EscContentEscapes != 0 {
+ // EscContentEscapes represents a path of length 1
+ // from the heap. No point in keeping paths of equal
+ // or longer length to result parameters.
+ for i := 0; i < numEscReturns; i++ {
+ if x := getEscReturn(esc, i); x >= 1 {
+ esc = setEscReturn(esc, i, -1)
+ }
+ }
+ }
+ return esc
+}
+
+// Parameter tags.
+//
+// The escape bits saved for each analyzed parameter record the
+// minimal derefs (if any) from that parameter to the heap, or to any
+// of its function's (first numEscReturns) result parameters.
+//
+// Paths to the heap are encoded via EscHeap (length 0) or
+// EscContentEscapes (length 1); if neither of these are set, then
+// there's no path to the heap.
+//
+// Paths to the result parameters are encoded in the upper
+// bits.
+//
+// There are other values stored in the escape bits by esc.go for
+// vestigial reasons, and other special tag values used (e.g.,
+// uintptrEscapesTag and unsafeUintptrTag). These could be simplified
+// once compatibility with esc.go is no longer a concern.
+
+const numEscReturns = (16 - EscReturnBits) / bitsPerOutputInTag
+
+func getEscReturn(esc uint16, i int) int {
+ return int((esc>>escReturnShift(i))&bitsMaskForTag) - 1
+}
+
+func setEscReturn(esc uint16, i, v int) uint16 {
+ if v < -1 {
+ Fatalf("invalid esc return value: %v", v)
+ }
+ if v > maxEncodedLevel {
+ v = maxEncodedLevel
+ }
+
+ shift := escReturnShift(i)
+ esc &^= bitsMaskForTag << shift
+ esc |= uint16(v+1) << shift
+ return esc
+}
+
+func escReturnShift(i int) uint {
+ if uint(i) >= numEscReturns {
+ Fatalf("esc return index out of bounds: %v", i)
+ }
+ return uint(EscReturnBits + i*bitsPerOutputInTag)
+}
diff --git a/src/cmd/compile/internal/gc/fmt.go b/src/cmd/compile/internal/gc/fmt.go
index fc1af603a2..72b1e35b6a 100644
--- a/src/cmd/compile/internal/gc/fmt.go
+++ b/src/cmd/compile/internal/gc/fmt.go
@@ -752,7 +752,11 @@ func typefmt(t *types.Type, flag FmtFlag, mode fmtMode, depth int) string {
case types.IsExported(f.Sym.Name):
buf = append(buf, sconv(f.Sym, FmtShort, mode)...)
default:
- buf = append(buf, sconv(f.Sym, FmtUnsigned, mode)...)
+ flag1 := FmtLeft
+ if flag&FmtUnsigned != 0 {
+ flag1 = FmtUnsigned
+ }
+ buf = append(buf, sconv(f.Sym, flag1, mode)...)
}
buf = append(buf, tconv(f.Type, FmtShort, mode, depth)...)
}
@@ -1404,14 +1408,11 @@ func (n *Node) exprfmt(s fmt.State, prec int, mode fmtMode) {
}
mode.Fprintf(s, "sliceheader{%v,%v,%v}", n.Left, n.List.First(), n.List.Second())
- case OCOPY:
- mode.Fprintf(s, "%#v(%v, %v)", n.Op, n.Left, n.Right)
-
- case OCOMPLEX:
- if n.List.Len() == 1 {
- mode.Fprintf(s, "%#v(%v)", n.Op, n.List.First())
- } else {
+ case OCOMPLEX, OCOPY:
+ if n.Left != nil {
mode.Fprintf(s, "%#v(%v, %v)", n.Op, n.Left, n.Right)
+ } else {
+ mode.Fprintf(s, "%#v(%.v)", n.Op, n.List)
}
case OCONV,
@@ -1540,6 +1541,8 @@ func (n *Node) nodefmt(s fmt.State, flag FmtFlag, mode fmtMode) {
if flag&FmtLong != 0 && t != nil {
if t.Etype == TNIL {
fmt.Fprint(s, "nil")
+ } else if n.Op == ONAME && n.Name.AutoTemp() {
+ mode.Fprintf(s, "%v value", t)
} else {
mode.Fprintf(s, "%v (type %v)", n, t)
}
@@ -1576,9 +1579,6 @@ func (n *Node) nodedump(s fmt.State, flag FmtFlag, mode fmtMode) {
default:
mode.Fprintf(s, "%v%j", n.Op, n)
- case OINDREGSP:
- mode.Fprintf(s, "%v-SP%j", n.Op, n)
-
case OLITERAL:
mode.Fprintf(s, "%v-%v%j", n.Op, n.Val(), n)
diff --git a/src/cmd/compile/internal/gc/global_test.go b/src/cmd/compile/internal/gc/global_test.go
index 56855d797a..edad6d042a 100644
--- a/src/cmd/compile/internal/gc/global_test.go
+++ b/src/cmd/compile/internal/gc/global_test.go
@@ -19,6 +19,7 @@ import (
// fmt.scanf routines. See issue 6853.
func TestScanfRemoval(t *testing.T) {
testenv.MustHaveGoBuild(t)
+ t.Parallel()
// Make a directory to work in.
dir, err := ioutil.TempDir("", "issue6853a-")
@@ -66,6 +67,7 @@ func main() {
// Make sure -S prints assembly code. See issue 14515.
func TestDashS(t *testing.T) {
testenv.MustHaveGoBuild(t)
+ t.Parallel()
// Make a directory to work in.
dir, err := ioutil.TempDir("", "issue14515-")
diff --git a/src/cmd/compile/internal/gc/go.go b/src/cmd/compile/internal/gc/go.go
index 007585ef10..6123e6acc1 100644
--- a/src/cmd/compile/internal/gc/go.go
+++ b/src/cmd/compile/internal/gc/go.go
@@ -295,15 +295,14 @@ var (
growslice,
msanread,
msanwrite,
+ newobject,
newproc,
panicdivide,
panicshift,
panicdottypeE,
panicdottypeI,
- panicindex,
panicnildottype,
panicoverflow,
- panicslice,
raceread,
racereadrange,
racewrite,
@@ -314,7 +313,11 @@ var (
typedmemclr,
typedmemmove,
Udiv,
- writeBarrier *obj.LSym
+ writeBarrier,
+ zerobaseSym *obj.LSym
+
+ BoundsCheckFunc [ssa.BoundsKindCount]*obj.LSym
+ ExtendCheckFunc [ssa.BoundsKindCount]*obj.LSym
// GO386=387
ControlWord64trunc,
diff --git a/src/cmd/compile/internal/gc/iexport.go b/src/cmd/compile/internal/gc/iexport.go
index 2a34e2ea77..560aeabf76 100644
--- a/src/cmd/compile/internal/gc/iexport.go
+++ b/src/cmd/compile/internal/gc/iexport.go
@@ -202,13 +202,12 @@ import (
"bufio"
"bytes"
"cmd/compile/internal/types"
- "cmd/internal/obj"
"cmd/internal/src"
"encoding/binary"
"fmt"
- "go/ast"
"io"
"math/big"
+ "sort"
"strings"
)
@@ -322,12 +321,12 @@ func (w *exportWriter) writeIndex(index map[*Node]uint64, mainIndex bool) {
for pkg, objs := range pkgObjs {
pkgs = append(pkgs, pkg)
- obj.SortSlice(objs, func(i, j int) bool {
+ sort.Slice(objs, func(i, j int) bool {
return objs[i].Sym.Name < objs[j].Sym.Name
})
}
- obj.SortSlice(pkgs, func(i, j int) bool {
+ sort.Slice(pkgs, func(i, j int) bool {
return pkgs[i].Path < pkgs[j].Path
})
@@ -1277,6 +1276,7 @@ func (w *exportWriter) expr(n *Node) {
case OCALL, OCALLFUNC, OCALLMETH, OCALLINTER, OGETG:
w.op(OCALL)
w.pos(n.Pos)
+ w.stmtList(n.Ninit)
w.expr(n.Left)
w.exprList(n.List)
w.bool(n.IsDDD())
@@ -1387,7 +1387,8 @@ func (w *exportWriter) localIdent(s *types.Sym, v int32) {
return
}
- if i := strings.LastIndex(name, "."); i >= 0 {
+ // TODO(mdempsky): Fix autotmp hack.
+ if i := strings.LastIndex(name, "."); i >= 0 && !strings.HasPrefix(name, ".autotmp_") {
Fatalf("unexpected dot in identifier: %v", name)
}
@@ -1398,7 +1399,7 @@ func (w *exportWriter) localIdent(s *types.Sym, v int32) {
name = fmt.Sprintf("%s·%d", name, v)
}
- if !ast.IsExported(name) && s.Pkg != w.currPkg {
+ if !types.IsExported(name) && s.Pkg != w.currPkg {
Fatalf("weird package in name: %v => %v, not %q", s, name, w.currPkg.Path)
}
diff --git a/src/cmd/compile/internal/gc/iimport.go b/src/cmd/compile/internal/gc/iimport.go
index addf829b04..38a7201a63 100644
--- a/src/cmd/compile/internal/gc/iimport.go
+++ b/src/cmd/compile/internal/gc/iimport.go
@@ -117,7 +117,7 @@ func iimport(pkg *types.Pkg, in *bio.Reader) {
stringData := data[:sLen]
declData := data[sLen:]
- in.Seek(int64(sLen+dLen), os.SEEK_CUR)
+ in.MustSeek(int64(sLen+dLen), os.SEEK_CUR)
p := &iimporter{
ipkg: pkg,
@@ -907,7 +907,9 @@ func (r *importReader) node() *Node {
// unreachable - mapped to OCALL case below by exporter
case OCALL:
- n := nodl(r.pos(), OCALL, r.expr(), nil)
+ n := nodl(r.pos(), OCALL, nil, nil)
+ n.Ninit.Set(r.stmtList())
+ n.Left = r.expr()
n.List.Set(r.exprList())
n.SetIsDDD(r.bool())
return n
diff --git a/src/cmd/compile/internal/gc/init.go b/src/cmd/compile/internal/gc/init.go
index e981f83653..6467aafd53 100644
--- a/src/cmd/compile/internal/gc/init.go
+++ b/src/cmd/compile/internal/gc/init.go
@@ -6,6 +6,7 @@ package gc
import (
"cmd/compile/internal/types"
+ "cmd/internal/obj"
)
// A function named init is a special case.
@@ -14,85 +15,46 @@ import (
// the name, normally "pkg.init", is altered to "pkg.init.0".
var renameinitgen int
+// Dummy function for autotmps generated during typechecking.
+var dummyInitFn = nod(ODCLFUNC, nil, nil)
+
func renameinit() *types.Sym {
s := lookupN("init.", renameinitgen)
renameinitgen++
return s
}
-// anyinit reports whether there any interesting init statements.
-func anyinit(n []*Node) bool {
- for _, ln := range n {
- switch ln.Op {
- case ODCLFUNC, ODCLCONST, ODCLTYPE, OEMPTY:
- case OAS:
- if !ln.Left.isBlank() || !candiscard(ln.Right) {
- return true
- }
- default:
- return true
- }
- }
-
- // is this main
- if localpkg.Name == "main" {
- return true
- }
-
- // is there an explicit init function
- if renameinitgen > 0 {
- return true
- }
-
- // are there any imported init functions
- for _, s := range types.InitSyms {
- if s.Def != nil {
- return true
- }
- }
-
- // then none
- return false
-}
-
-// fninit hand-crafts package initialization code.
-//
-// func init.ializers() { (0)
-//
-// }
-// var initdone· uint8 (1)
-// func init() { (2)
-// if initdone· > 1 { (3)
-// return (3a)
-// }
-// if initdone· == 1 { (4)
-// throw() (4a)
-// }
-// initdone· = 1 (5)
-// // over all matching imported symbols
-// .init() (6)
-// init.ializers() (7)
-// init.() // if any (8)
-// initdone· = 2 (9)
-// return (10)
-// }
+// fninit makes an initialization record for the package.
+// See runtime/proc.go:initTask for its layout.
+// The 3 tasks for initialization are:
+// 1) Initialize all of the packages the current package depends on.
+// 2) Initialize all the variables that have initializers.
+// 3) Run any init functions.
func fninit(n []*Node) {
- lineno = autogeneratedPos
nf := initfix(n)
- if !anyinit(nf) {
- return
+
+ var deps []*obj.LSym // initTask records for packages the current package depends on
+ var fns []*obj.LSym // functions to call for package initialization
+
+ // Find imported packages with init tasks.
+ for _, p := range types.ImportedPkgList() {
+ if s, ok := p.LookupOK(".inittask"); ok {
+ deps = append(deps, s.Linksym())
+ }
}
- // (0)
// Make a function that contains all the initialization statements.
- // This is a separate function because we want it to appear in
- // stack traces, where the init function itself does not.
- var initializers *types.Sym
if len(nf) > 0 {
lineno = nf[0].Pos // prolog/epilog gets line number of first init stmt
- initializers = lookup("init.ializers")
+ initializers := lookup("init")
disableExport(initializers)
fn := dclfunc(initializers, nod(OTFUNC, nil, nil))
+ for _, dcl := range dummyInitFn.Func.Dcl {
+ dcl.Name.Curfn = fn
+ }
+ fn.Func.Dcl = append(fn.Func.Dcl, dummyInitFn.Func.Dcl...)
+ dummyInitFn.Func.Dcl = nil
+
fn.Nbody.Set(nf)
funcbody()
@@ -101,143 +63,46 @@ func fninit(n []*Node) {
typecheckslice(nf, ctxStmt)
Curfn = nil
funccompile(fn)
- lineno = autogeneratedPos
+ fns = append(fns, initializers.Linksym())
+ }
+ if dummyInitFn.Func.Dcl != nil {
+ // We only generate temps using dummyInitFn if there
+ // are package-scope initialization statements, so
+ // something's weird if we get here.
+ Fatalf("dummyInitFn still has declarations")
}
- var r []*Node
-
- // (1)
- gatevar := newname(lookup("initdone·"))
- addvar(gatevar, types.Types[TUINT8], PEXTERN)
-
- // (2)
- initsym := lookup("init")
- fn := dclfunc(initsym, nod(OTFUNC, nil, nil))
-
- // (3)
- a := nod(OIF, nil, nil)
- a.Left = nod(OGT, gatevar, nodintconst(1))
- a.SetLikely(true)
- r = append(r, a)
- // (3a)
- a.Nbody.Set1(nod(ORETURN, nil, nil))
-
- // (4)
- b := nod(OIF, nil, nil)
- b.Left = nod(OEQ, gatevar, nodintconst(1))
- // this actually isn't likely, but code layout is better
- // like this: no JMP needed after the call.
- b.SetLikely(true)
- r = append(r, b)
- // (4a)
- b.Nbody.Set1(nod(OCALL, syslook("throwinit"), nil))
-
- // (5)
- a = nod(OAS, gatevar, nodintconst(1))
-
- r = append(r, a)
-
- // (6)
- for _, s := range types.InitSyms {
- if s == initsym {
- continue
- }
- n := resolve(oldname(s))
- if n.Op == ONONAME {
- // No package-scope init function; just a
- // local variable, field name, or something.
- continue
- }
- n.checkInitFuncSignature()
- a = nod(OCALL, n, nil)
- r = append(r, a)
+ // Record user init functions.
+ for i := 0; i < renameinitgen; i++ {
+ s := lookupN("init.", i)
+ fns = append(fns, s.Linksym())
}
- // (7)
- if initializers != nil {
- n := newname(initializers)
- addvar(n, functype(nil, nil, nil), PFUNC)
- r = append(r, nod(OCALL, n, nil))
+ if len(deps) == 0 && len(fns) == 0 && localpkg.Name != "main" && localpkg.Name != "runtime" {
+ return // nothing to initialize
}
- // (8)
-
- // maxInlineInitCalls is the threshold at which we switch
- // from generating calls inline to generating a static array
- // of functions and calling them in a loop.
- // See CL 41500 for more discussion.
- const maxInlineInitCalls = 500
-
- if renameinitgen < maxInlineInitCalls {
- // Not many init functions. Just call them all directly.
- for i := 0; i < renameinitgen; i++ {
- s := lookupN("init.", i)
- n := asNode(s.Def)
- n.checkInitFuncSignature()
- a = nod(OCALL, n, nil)
- r = append(r, a)
- }
- } else {
- // Lots of init functions.
- // Set up an array of functions and loop to call them.
- // This is faster to compile and similar at runtime.
-
- // Build type [renameinitgen]func().
- typ := types.NewArray(functype(nil, nil, nil), int64(renameinitgen))
-
- // Make and fill array.
- fnarr := staticname(typ)
- fnarr.Name.SetReadonly(true)
- for i := 0; i < renameinitgen; i++ {
- s := lookupN("init.", i)
- lhs := nod(OINDEX, fnarr, nodintconst(int64(i)))
- rhs := asNode(s.Def)
- rhs.checkInitFuncSignature()
- as := nod(OAS, lhs, rhs)
- as = typecheck(as, ctxStmt)
- genAsStatic(as)
- }
-
- // Generate a loop that calls each function in turn.
- // for i := 0; i < renameinitgen; i++ {
- // fnarr[i]()
- // }
- i := temp(types.Types[TINT])
- fnidx := nod(OINDEX, fnarr, i)
- fnidx.SetBounded(true)
-
- zero := nod(OAS, i, nodintconst(0))
- cond := nod(OLT, i, nodintconst(int64(renameinitgen)))
- incr := nod(OAS, i, nod(OADD, i, nodintconst(1)))
- body := nod(OCALL, fnidx, nil)
-
- loop := nod(OFOR, cond, incr)
- loop.Nbody.Set1(body)
- loop.Ninit.Set1(zero)
-
- loop = typecheck(loop, ctxStmt)
- r = append(r, loop)
+ // Make an .inittask structure.
+ sym := lookup(".inittask")
+ nn := newname(sym)
+ nn.Type = types.Types[TUINT8] // dummy type
+ nn.SetClass(PEXTERN)
+ sym.Def = asTypesNode(nn)
+ exportsym(nn)
+ lsym := sym.Linksym()
+ ot := 0
+ ot = duintptr(lsym, ot, 0) // state: not initialized yet
+ ot = duintptr(lsym, ot, uint64(len(deps)))
+ ot = duintptr(lsym, ot, uint64(len(fns)))
+ for _, d := range deps {
+ ot = dsymptr(lsym, ot, d, 0)
}
-
- // (9)
- a = nod(OAS, gatevar, nodintconst(2))
-
- r = append(r, a)
-
- // (10)
- a = nod(ORETURN, nil, nil)
-
- r = append(r, a)
- exportsym(fn.Func.Nname)
-
- fn.Nbody.Set(r)
- funcbody()
-
- Curfn = fn
- fn = typecheck(fn, ctxStmt)
- typecheckslice(r, ctxStmt)
- Curfn = nil
- funccompile(fn)
+ for _, f := range fns {
+ ot = dsymptr(lsym, ot, f, 0)
+ }
+ // An initTask has pointers, but none into the Go heap.
+ // It's not quite read only, the state field must be modifiable.
+ ggloblsym(lsym, int32(ot), obj.NOPTR)
}
func (n *Node) checkInitFuncSignature() {
diff --git a/src/cmd/compile/internal/gc/inl.go b/src/cmd/compile/internal/gc/inl.go
index 81cad31a13..b41b8cb1a4 100644
--- a/src/cmd/compile/internal/gc/inl.go
+++ b/src/cmd/compile/internal/gc/inl.go
@@ -289,10 +289,6 @@ func (v *hairyVisitor) visit(n *Node) bool {
switch n.Op {
// Call is okay if inlinable and we have the budget for the body.
case OCALLFUNC:
- if isIntrinsicCall(n) {
- v.budget--
- break
- }
// Functions that call runtime.getcaller{pc,sp} can not be inlined
// because getcaller{pc,sp} expect a pointer to the caller's first argument.
//
@@ -309,6 +305,11 @@ func (v *hairyVisitor) visit(n *Node) bool {
}
}
+ if isIntrinsicCall(n) {
+ v.budget--
+ break
+ }
+
if fn := n.Left.Func; fn != nil && fn.Inl != nil {
v.budget -= fn.Inl.Cost
break
@@ -342,10 +343,6 @@ func (v *hairyVisitor) visit(n *Node) bool {
// runtime.heapBits.next even though
// it calls slow-path
// runtime.heapBits.nextArena.
- //
- // TODO(austin): Once mid-stack
- // inlining is the default, remove
- // this special case.
break
}
}
@@ -589,24 +586,13 @@ func inlnode(n *Node, maxCost int32) *Node {
}
inlnodelist(n.List, maxCost)
- switch n.Op {
- case OBLOCK:
+ if n.Op == OBLOCK {
for _, n2 := range n.List.Slice() {
if n2.Op == OINLCALL {
inlconv2stmt(n2)
}
}
-
- case ORETURN, OCALLFUNC, OCALLMETH, OCALLINTER, OAPPEND, OCOMPLEX:
- // if we just replaced arg in f(arg()) or return arg with an inlined call
- // and arg returns multiple values, glue as list
- if n.List.Len() == 1 && n.List.First().Op == OINLCALL && n.List.First().Rlist.Len() > 1 {
- n.List.Set(inlconv2list(n.List.First()))
- break
- }
- fallthrough
-
- default:
+ } else {
s := n.List.Slice()
for i1, n1 := range s {
if n1 != nil && n1.Op == OINLCALL {
@@ -1016,9 +1002,6 @@ func mkinlcall(n, fn *Node, maxCost int32) *Node {
// to pass as a slice.
numvals := n.List.Len()
- if numvals == 1 && n.List.First().Type.IsFuncArgStruct() {
- numvals = n.List.First().Type.NumFields()
- }
x := as.List.Len()
for as.List.Len() < numvals {
@@ -1063,12 +1046,13 @@ func mkinlcall(n, fn *Node, maxCost int32) *Node {
}
newIndex := Ctxt.InlTree.Add(parent, n.Pos, fn.Sym.Linksym())
- // Add a inline mark just before the inlined body.
+ // Add an inline mark just before the inlined body.
// This mark is inline in the code so that it's a reasonable spot
// to put a breakpoint. Not sure if that's really necessary or not
// (in which case it could go at the end of the function instead).
+ // Note issue 28603.
inlMark := nod(OINLMARK, nil, nil)
- inlMark.Pos = n.Pos
+ inlMark.Pos = n.Pos.WithIsStmt()
inlMark.Xoffset = int64(newIndex)
ninit.Append(inlMark)
diff --git a/src/cmd/compile/internal/gc/inl_test.go b/src/cmd/compile/internal/gc/inl_test.go
index c29c1755f3..a04869c5a3 100644
--- a/src/cmd/compile/internal/gc/inl_test.go
+++ b/src/cmd/compile/internal/gc/inl_test.go
@@ -8,6 +8,7 @@ import (
"bufio"
"internal/testenv"
"io"
+ "math/bits"
"os/exec"
"regexp"
"runtime"
@@ -118,6 +119,10 @@ func TestIntendedInlining(t *testing.T) {
"byLiteral.Less",
"byLiteral.Swap",
},
+ "encoding/base64": {
+ "assemble32",
+ "assemble64",
+ },
"unicode/utf8": {
"FullRune",
"FullRuneInString",
@@ -127,25 +132,25 @@ func TestIntendedInlining(t *testing.T) {
"reflect": {
"Value.CanAddr",
"Value.CanSet",
+ "Value.CanInterface",
"Value.IsValid",
+ "Value.pointer",
"add",
"align",
+ "flag.mustBe",
+ "flag.mustBeAssignable",
+ "flag.mustBeExported",
"flag.kind",
"flag.ro",
-
- // TODO: these use panic, need mid-stack
- // inlining
- // "Value.CanInterface",
- // "Value.pointer",
- // "flag.mustBe",
- // "flag.mustBeAssignable",
- // "flag.mustBeExported",
},
"regexp": {
"(*bitState).push",
},
"math/big": {
"bigEndianWord",
+ // The following functions require the math_big_pure_go build tag.
+ "addVW",
+ "subVW",
},
}
@@ -163,12 +168,27 @@ func TestIntendedInlining(t *testing.T) {
want["runtime/internal/sys"] = append(want["runtime/internal/sys"], "Ctz32")
want["runtime/internal/sys"] = append(want["runtime/internal/sys"], "Bswap32")
}
- switch runtime.GOARCH {
- case "amd64", "amd64p32", "arm64", "mips64", "mips64le", "ppc64", "ppc64le", "s390x":
+ if bits.UintSize == 64 {
// rotl_31 is only defined on 64-bit architectures
want["runtime"] = append(want["runtime"], "rotl_31")
}
+ switch runtime.GOARCH {
+ case "nacl", "386", "wasm", "arm":
+ default:
+ // TODO(mvdan): As explained in /test/inline_sync.go, some
+ // architectures don't have atomic intrinsics, so these go over
+ // the inlining budget. Move back to the main table once that
+ // problem is solved.
+ want["sync"] = []string{
+ "(*Mutex).Lock",
+ "(*Mutex).Unlock",
+ "(*RWMutex).RLock",
+ "(*RWMutex).RUnlock",
+ "(*Once).Do",
+ }
+ }
+
// Functions that must actually be inlined; they must have actual callers.
must := map[string]bool{
"compress/flate.byLiteral.Len": true,
@@ -189,7 +209,7 @@ func TestIntendedInlining(t *testing.T) {
}
}
- args := append([]string{"build", "-a", "-gcflags=all=-m -m"}, pkgs...)
+ args := append([]string{"build", "-a", "-gcflags=all=-m -m", "-tags=math_big_pure_go"}, pkgs...)
cmd := testenv.CleanCmdEnv(exec.Command(testenv.GoToolPath(t), args...))
pr, pw := io.Pipe()
cmd.Stdout = pw
diff --git a/src/cmd/compile/internal/gc/lex.go b/src/cmd/compile/internal/gc/lex.go
index bd68ebffff..557f98604d 100644
--- a/src/cmd/compile/internal/gc/lex.go
+++ b/src/cmd/compile/internal/gc/lex.go
@@ -116,8 +116,9 @@ func (p *noder) pragcgo(pos syntax.Pos, text string) {
f[3] = strings.Trim(f[3], `"`)
if objabi.GOOS == "aix" && f[3] != "" {
// On Aix, library pattern must be "lib.a/object.o"
+ // or "lib.a/libname.so.X"
n := strings.Split(f[3], "/")
- if len(n) != 2 || !strings.HasSuffix(n[0], ".a") || !strings.HasSuffix(n[1], ".o") {
+ if len(n) != 2 || !strings.HasSuffix(n[0], ".a") || (!strings.HasSuffix(n[1], ".o") && !strings.Contains(n[1], ".so.")) {
p.error(syntax.Error{Pos: pos, Msg: `usage: //go:cgo_import_dynamic local [remote ["lib.a/object.o"]]`})
return
}
diff --git a/src/cmd/compile/internal/gc/main.go b/src/cmd/compile/internal/gc/main.go
index 98ff2a3d27..51b60fb417 100644
--- a/src/cmd/compile/internal/gc/main.go
+++ b/src/cmd/compile/internal/gc/main.go
@@ -19,7 +19,7 @@ import (
"cmd/internal/sys"
"flag"
"fmt"
- "go/build"
+ "internal/goversion"
"io"
"io/ioutil"
"log"
@@ -27,6 +27,7 @@ import (
"path"
"regexp"
"runtime"
+ "sort"
"strconv"
"strings"
)
@@ -140,6 +141,12 @@ func Main(archInit func(*Arch)) {
Ctxt.DiagFlush = flusherrors
Ctxt.Bso = bufio.NewWriter(os.Stdout)
+ // UseBASEntries is preferred because it shaves about 2% off build time, but LLDB, dsymutil, and dwarfdump
+ // on Darwin don't support it properly, especially since macOS 10.14 (Mojave). This is exposed as a flag
+ // to allow testing with LLVM tools on Linux, and to help with reporting this bug to the LLVM project.
+ // See bugs 31188 and 21945 (CLs 170638, 98075, 72371).
+ Ctxt.UseBASEntries = Ctxt.Headtype != objabi.Hdarwin
+
localpkg = types.NewPkg("", "")
localpkg.Prefix = "\"\""
@@ -253,12 +260,14 @@ func Main(archInit func(*Arch)) {
flag.StringVar(&blockprofile, "blockprofile", "", "write block profile to `file`")
flag.StringVar(&mutexprofile, "mutexprofile", "", "write mutex profile to `file`")
flag.StringVar(&benchfile, "bench", "", "append benchmark times to `file`")
+ flag.BoolVar(&newescape, "newescape", true, "enable new escape analysis")
+ flag.BoolVar(&Ctxt.UseBASEntries, "dwarfbasentries", Ctxt.UseBASEntries, "use base address selection entries in DWARF")
objabi.Flagparse(usage)
// Record flags that affect the build result. (And don't
// record flags that don't, since that would cause spurious
// changes in the binary.)
- recordFlags("B", "N", "l", "msan", "race", "shared", "dynlink", "dwarflocationlists")
+ recordFlags("B", "N", "l", "msan", "race", "shared", "dynlink", "dwarflocationlists", "newescape", "dwarfbasentries")
Ctxt.Flag_shared = flag_dynlink || flag_shared
Ctxt.Flag_dynlink = flag_dynlink
@@ -497,6 +506,8 @@ func Main(archInit func(*Arch)) {
finishUniverse()
+ recordPackageName()
+
typecheckok = true
// Process top-level declarations in phases.
@@ -713,7 +724,7 @@ func Main(archInit func(*Arch)) {
}
// Check whether any of the functions we have compiled have gigantic stack frames.
- obj.SortSlice(largeStackFrames, func(i, j int) bool {
+ sort.Slice(largeStackFrames, func(i, j int) bool {
return largeStackFrames[i].pos.Before(largeStackFrames[j].pos)
})
for _, large := range largeStackFrames {
@@ -1303,7 +1314,7 @@ func clearImports() {
}
}
- obj.SortSlice(unused, func(i, j int) bool { return unused[i].pos.Before(unused[j].pos) })
+ sort.Slice(unused, func(i, j int) bool { return unused[i].pos.Before(unused[j].pos) })
for _, pkg := range unused {
pkgnotused(pkg.pos, pkg.path, pkg.name)
}
@@ -1406,13 +1417,24 @@ func recordFlags(flags ...string) {
s.P = cmd.Bytes()[1:]
}
+// recordPackageName records the name of the package being
+// compiled, so that the linker can save it in the compile unit's DIE.
+func recordPackageName() {
+ s := Ctxt.Lookup(dwarf.CUInfoPrefix + "packagename." + myimportpath)
+ s.Type = objabi.SDWARFINFO
+ // Sometimes (for example when building tests) we can link
+ // together two package main archives. So allow dups.
+ s.Set(obj.AttrDuplicateOK, true)
+ Ctxt.Data = append(Ctxt.Data, s)
+ s.P = []byte(localpkg.Name)
+}
+
// flag_lang is the language version we are compiling for, set by the -lang flag.
var flag_lang string
// currentLang returns the current language version.
func currentLang() string {
- tags := build.Default.ReleaseTags
- return tags[len(tags)-1]
+ return fmt.Sprintf("go1.%d", goversion.Version)
}
// goVersionRE is a regular expression that matches the valid
diff --git a/src/cmd/compile/internal/gc/mpfloat.go b/src/cmd/compile/internal/gc/mpfloat.go
index c1bbd3c1b4..d15f26784e 100644
--- a/src/cmd/compile/internal/gc/mpfloat.go
+++ b/src/cmd/compile/internal/gc/mpfloat.go
@@ -8,7 +8,6 @@ import (
"fmt"
"math"
"math/big"
- "strings"
)
// implements float arithmetic
@@ -180,36 +179,16 @@ func (a *Mpflt) Neg() {
}
func (a *Mpflt) SetString(as string) {
- // TODO(gri) remove this code once math/big.Float.Parse can handle separators
- as = strings.Replace(as, "_", "", -1) // strip separators
-
// TODO(gri) why is this needed?
for len(as) > 0 && (as[0] == ' ' || as[0] == '\t') {
as = as[1:]
}
- // Currently, Val.Parse below (== math/big.Float.Parse) does not
- // handle the 0o-octal prefix which can appear with octal integers
- // with 'i' suffix, which end up here as imaginary components of
- // complex numbers. Handle explicitly for now.
- // TODO(gri) remove once Float.Parse can handle octals (it handles 0b/0B)
- var f *big.Float
- if strings.HasPrefix(as, "0o") || strings.HasPrefix(as, "0O") {
- x, ok := new(big.Int).SetString(as[2:], 8)
- if !ok {
- yyerror("malformed constant: %s", as)
- a.Val.SetFloat64(0)
- return
- }
- f = a.Val.SetInt(x)
- } else {
- var err error
- f, _, err = a.Val.Parse(as, 0)
- if err != nil {
- yyerror("malformed constant: %s (%v)", as, err)
- a.Val.SetFloat64(0)
- return
- }
+ f, _, err := a.Val.Parse(as, 0)
+ if err != nil {
+ yyerror("malformed constant: %s (%v)", as, err)
+ a.Val.SetFloat64(0)
+ return
}
if f.IsInf() {
diff --git a/src/cmd/compile/internal/gc/mpint.go b/src/cmd/compile/internal/gc/mpint.go
index e06f39f8d9..340350bca7 100644
--- a/src/cmd/compile/internal/gc/mpint.go
+++ b/src/cmd/compile/internal/gc/mpint.go
@@ -7,7 +7,6 @@ package gc
import (
"fmt"
"math/big"
- "strings"
)
// implements integer arithmetic
@@ -282,23 +281,13 @@ func (a *Mpint) SetInt64(c int64) {
}
func (a *Mpint) SetString(as string) {
- // TODO(gri) remove this code once math/big.Int.SetString can handle 0o-octals and separators
- as = strings.Replace(as, "_", "", -1) // strip separators
- if len(as) >= 2 && as[0] == '0' && (as[1] == 'o' || as[1] == 'O') {
- as = "0" + as[2:]
- }
-
_, ok := a.Val.SetString(as, 0)
if !ok {
- // required syntax is [+-][0[x]]d*
- // At the moment we lose precise error cause;
- // the old code distinguished between:
- // - malformed hex constant
- // - malformed octal constant
- // - malformed decimal constant
- // TODO(gri) use different conversion function
- yyerror("malformed integer constant: %s", as)
- a.Val.SetUint64(0)
+ // The lexer checks for correct syntax of the literal
+ // and reports detailed errors. Thus SetString should
+ // never fail (in theory it might run out of memory,
+ // but that wouldn't be reported as an error here).
+ Fatalf("malformed integer constant: %s", as)
return
}
if a.checkOverflow(0) {
diff --git a/src/cmd/compile/internal/gc/noder.go b/src/cmd/compile/internal/gc/noder.go
index 3fab95b917..e83ae7c5eb 100644
--- a/src/cmd/compile/internal/gc/noder.go
+++ b/src/cmd/compile/internal/gc/noder.go
@@ -1310,6 +1310,35 @@ func (p *noder) binOp(op syntax.Operator) Op {
return binOps[op]
}
+// checkLangCompat reports an error if the representation of a numeric
+// literal is not compatible with the current language version.
+func checkLangCompat(lit *syntax.BasicLit) {
+ s := lit.Value
+ if len(s) <= 2 || langSupported(1, 13) {
+ return
+ }
+ // len(s) > 2
+ if strings.Contains(s, "_") {
+ yyerror("underscores in numeric literals only supported as of -lang=go1.13")
+ return
+ }
+ if s[0] != '0' {
+ return
+ }
+ base := s[1]
+ if base == 'b' || base == 'B' {
+ yyerror("binary literals only supported as of -lang=go1.13")
+ return
+ }
+ if base == 'o' || base == 'O' {
+ yyerror("0o/0O-style octal literals only supported as of -lang=go1.13")
+ return
+ }
+ if lit.Kind != syntax.IntLit && (base == 'x' || base == 'X') {
+ yyerror("hexadecimal floating-point literals only supported as of -lang=go1.13")
+ }
+}
+
func (p *noder) basicLit(lit *syntax.BasicLit) Val {
// TODO: Don't try to convert if we had syntax errors (conversions may fail).
// Use dummy values so we can continue to compile. Eventually, use a
@@ -1317,16 +1346,19 @@ func (p *noder) basicLit(lit *syntax.BasicLit) Val {
// we can continue type-checking w/o spurious follow-up errors.
switch s := lit.Value; lit.Kind {
case syntax.IntLit:
+ checkLangCompat(lit)
x := new(Mpint)
x.SetString(s)
return Val{U: x}
case syntax.FloatLit:
+ checkLangCompat(lit)
x := newMpflt()
x.SetString(s)
return Val{U: x}
case syntax.ImagLit:
+ checkLangCompat(lit)
x := newMpcmplx()
x.Imag.SetString(strings.TrimSuffix(s, "i"))
return Val{U: x}
diff --git a/src/cmd/compile/internal/gc/obj.go b/src/cmd/compile/internal/gc/obj.go
index 5630e12ace..c85268c120 100644
--- a/src/cmd/compile/internal/gc/obj.go
+++ b/src/cmd/compile/internal/gc/obj.go
@@ -14,6 +14,7 @@ import (
"encoding/json"
"fmt"
"io"
+ "sort"
"strconv"
)
@@ -96,13 +97,13 @@ func finishArchiveEntry(bout *bio.Writer, start int64, name string) {
if size&1 != 0 {
bout.WriteByte(0)
}
- bout.Seek(start-ArhdrSize, 0)
+ bout.MustSeek(start-ArhdrSize, 0)
var arhdr [ArhdrSize]byte
formathdr(arhdr[:], name, size)
bout.Write(arhdr[:])
bout.Flush()
- bout.Seek(start+size+(size&1), 0)
+ bout.MustSeek(start+size+(size&1), 0)
}
func dumpCompilerObj(bout *bio.Writer) {
@@ -163,7 +164,7 @@ func dumpLinkerObj(bout *bio.Writer) {
addGCLocals()
- obj.WriteObjFile(Ctxt, bout.Writer)
+ obj.WriteObjFile(Ctxt, bout.Writer, myimportpath)
}
func addptabs() {
@@ -259,7 +260,7 @@ func dumpglobls() {
}
}
- obj.SortSlice(funcsyms, func(i, j int) bool {
+ sort.Slice(funcsyms, func(i, j int) bool {
return funcsyms[i].LinksymName() < funcsyms[j].LinksymName()
})
for _, s := range funcsyms {
@@ -287,7 +288,7 @@ func addGCLocals() {
}
}
if x := s.Func.StackObjects; x != nil {
- ggloblsym(x, int32(len(x.P)), obj.RODATA|obj.LOCAL)
+ ggloblsym(x, int32(len(x.P)), obj.RODATA|obj.DUPOK)
}
}
}
diff --git a/src/cmd/compile/internal/gc/op_string.go b/src/cmd/compile/internal/gc/op_string.go
index fe80e39064..d8910e7d06 100644
--- a/src/cmd/compile/internal/gc/op_string.go
+++ b/src/cmd/compile/internal/gc/op_string.go
@@ -4,9 +4,169 @@ package gc
import "strconv"
-const _Op_name = "XXXNAMENONAMETYPEPACKLITERALADDSUBORXORADDSTRADDRANDANDAPPENDBYTES2STRBYTES2STRTMPRUNES2STRSTR2BYTESSTR2BYTESTMPSTR2RUNESASAS2AS2FUNCAS2RECVAS2MAPRAS2DOTTYPEASOPCALLCALLFUNCCALLMETHCALLINTERCALLPARTCAPCLOSECLOSURECOMPLITMAPLITSTRUCTLITARRAYLITSLICELITPTRLITCONVCONVIFACECONVNOPCOPYDCLDCLFUNCDCLFIELDDCLCONSTDCLTYPEDELETEDOTDOTPTRDOTMETHDOTINTERXDOTDOTTYPEDOTTYPE2EQNELTLEGEGTDEREFINDEXINDEXMAPKEYSTRUCTKEYLENMAKEMAKECHANMAKEMAPMAKESLICEMULDIVMODLSHRSHANDANDNOTNEWNOTBITNOTPLUSNEGORORPANICPRINTPRINTNPARENSENDSLICESLICEARRSLICESTRSLICE3SLICE3ARRSLICEHEADERRECOVERRECVRUNESTRSELRECVSELRECV2IOTAREALIMAGCOMPLEXALIGNOFOFFSETOFSIZEOFBLOCKBREAKCASEXCASECONTINUEDEFEREMPTYFALLFORFORUNTILGOTOIFLABELGORANGERETURNSELECTSWITCHTYPESWTCHANTMAPTSTRUCTTINTERTFUNCTARRAYDDDDDDARGINLCALLEFACEITABIDATASPTRCLOSUREVARCFUNCCHECKNILVARDEFVARKILLVARLIVEINDREGSPRETJMPGETGEND"
+func _() {
+ // An "invalid array index" compiler error signifies that the constant values have changed.
+ // Re-run the stringer command to generate them again.
+ var x [1]struct{}
+ _ = x[OXXX-0]
+ _ = x[ONAME-1]
+ _ = x[ONONAME-2]
+ _ = x[OTYPE-3]
+ _ = x[OPACK-4]
+ _ = x[OLITERAL-5]
+ _ = x[OADD-6]
+ _ = x[OSUB-7]
+ _ = x[OOR-8]
+ _ = x[OXOR-9]
+ _ = x[OADDSTR-10]
+ _ = x[OADDR-11]
+ _ = x[OANDAND-12]
+ _ = x[OAPPEND-13]
+ _ = x[OBYTES2STR-14]
+ _ = x[OBYTES2STRTMP-15]
+ _ = x[ORUNES2STR-16]
+ _ = x[OSTR2BYTES-17]
+ _ = x[OSTR2BYTESTMP-18]
+ _ = x[OSTR2RUNES-19]
+ _ = x[OAS-20]
+ _ = x[OAS2-21]
+ _ = x[OAS2FUNC-22]
+ _ = x[OAS2RECV-23]
+ _ = x[OAS2MAPR-24]
+ _ = x[OAS2DOTTYPE-25]
+ _ = x[OASOP-26]
+ _ = x[OCALL-27]
+ _ = x[OCALLFUNC-28]
+ _ = x[OCALLMETH-29]
+ _ = x[OCALLINTER-30]
+ _ = x[OCALLPART-31]
+ _ = x[OCAP-32]
+ _ = x[OCLOSE-33]
+ _ = x[OCLOSURE-34]
+ _ = x[OCOMPLIT-35]
+ _ = x[OMAPLIT-36]
+ _ = x[OSTRUCTLIT-37]
+ _ = x[OARRAYLIT-38]
+ _ = x[OSLICELIT-39]
+ _ = x[OPTRLIT-40]
+ _ = x[OCONV-41]
+ _ = x[OCONVIFACE-42]
+ _ = x[OCONVNOP-43]
+ _ = x[OCOPY-44]
+ _ = x[ODCL-45]
+ _ = x[ODCLFUNC-46]
+ _ = x[ODCLFIELD-47]
+ _ = x[ODCLCONST-48]
+ _ = x[ODCLTYPE-49]
+ _ = x[ODELETE-50]
+ _ = x[ODOT-51]
+ _ = x[ODOTPTR-52]
+ _ = x[ODOTMETH-53]
+ _ = x[ODOTINTER-54]
+ _ = x[OXDOT-55]
+ _ = x[ODOTTYPE-56]
+ _ = x[ODOTTYPE2-57]
+ _ = x[OEQ-58]
+ _ = x[ONE-59]
+ _ = x[OLT-60]
+ _ = x[OLE-61]
+ _ = x[OGE-62]
+ _ = x[OGT-63]
+ _ = x[ODEREF-64]
+ _ = x[OINDEX-65]
+ _ = x[OINDEXMAP-66]
+ _ = x[OKEY-67]
+ _ = x[OSTRUCTKEY-68]
+ _ = x[OLEN-69]
+ _ = x[OMAKE-70]
+ _ = x[OMAKECHAN-71]
+ _ = x[OMAKEMAP-72]
+ _ = x[OMAKESLICE-73]
+ _ = x[OMUL-74]
+ _ = x[ODIV-75]
+ _ = x[OMOD-76]
+ _ = x[OLSH-77]
+ _ = x[ORSH-78]
+ _ = x[OAND-79]
+ _ = x[OANDNOT-80]
+ _ = x[ONEW-81]
+ _ = x[ONEWOBJ-82]
+ _ = x[ONOT-83]
+ _ = x[OBITNOT-84]
+ _ = x[OPLUS-85]
+ _ = x[ONEG-86]
+ _ = x[OOROR-87]
+ _ = x[OPANIC-88]
+ _ = x[OPRINT-89]
+ _ = x[OPRINTN-90]
+ _ = x[OPAREN-91]
+ _ = x[OSEND-92]
+ _ = x[OSLICE-93]
+ _ = x[OSLICEARR-94]
+ _ = x[OSLICESTR-95]
+ _ = x[OSLICE3-96]
+ _ = x[OSLICE3ARR-97]
+ _ = x[OSLICEHEADER-98]
+ _ = x[ORECOVER-99]
+ _ = x[ORECV-100]
+ _ = x[ORUNESTR-101]
+ _ = x[OSELRECV-102]
+ _ = x[OSELRECV2-103]
+ _ = x[OIOTA-104]
+ _ = x[OREAL-105]
+ _ = x[OIMAG-106]
+ _ = x[OCOMPLEX-107]
+ _ = x[OALIGNOF-108]
+ _ = x[OOFFSETOF-109]
+ _ = x[OSIZEOF-110]
+ _ = x[OBLOCK-111]
+ _ = x[OBREAK-112]
+ _ = x[OCASE-113]
+ _ = x[OXCASE-114]
+ _ = x[OCONTINUE-115]
+ _ = x[ODEFER-116]
+ _ = x[OEMPTY-117]
+ _ = x[OFALL-118]
+ _ = x[OFOR-119]
+ _ = x[OFORUNTIL-120]
+ _ = x[OGOTO-121]
+ _ = x[OIF-122]
+ _ = x[OLABEL-123]
+ _ = x[OGO-124]
+ _ = x[ORANGE-125]
+ _ = x[ORETURN-126]
+ _ = x[OSELECT-127]
+ _ = x[OSWITCH-128]
+ _ = x[OTYPESW-129]
+ _ = x[OTCHAN-130]
+ _ = x[OTMAP-131]
+ _ = x[OTSTRUCT-132]
+ _ = x[OTINTER-133]
+ _ = x[OTFUNC-134]
+ _ = x[OTARRAY-135]
+ _ = x[ODDD-136]
+ _ = x[ODDDARG-137]
+ _ = x[OINLCALL-138]
+ _ = x[OEFACE-139]
+ _ = x[OITAB-140]
+ _ = x[OIDATA-141]
+ _ = x[OSPTR-142]
+ _ = x[OCLOSUREVAR-143]
+ _ = x[OCFUNC-144]
+ _ = x[OCHECKNIL-145]
+ _ = x[OVARDEF-146]
+ _ = x[OVARKILL-147]
+ _ = x[OVARLIVE-148]
+ _ = x[ORESULT-149]
+ _ = x[OINLMARK-150]
+ _ = x[ORETJMP-151]
+ _ = x[OGETG-152]
+ _ = x[OEND-153]
+}
-var _Op_index = [...]uint16{0, 3, 7, 13, 17, 21, 28, 31, 34, 36, 39, 45, 49, 55, 61, 70, 82, 91, 100, 112, 121, 123, 126, 133, 140, 147, 157, 161, 165, 173, 181, 190, 198, 201, 206, 213, 220, 226, 235, 243, 251, 257, 261, 270, 277, 281, 284, 291, 299, 307, 314, 320, 323, 329, 336, 344, 348, 355, 363, 365, 367, 369, 371, 373, 375, 380, 385, 393, 396, 405, 408, 412, 420, 427, 436, 439, 442, 445, 448, 451, 454, 460, 463, 466, 472, 476, 479, 483, 488, 493, 499, 504, 508, 513, 521, 529, 535, 544, 555, 562, 566, 573, 580, 588, 592, 596, 600, 607, 614, 622, 628, 633, 638, 642, 647, 655, 660, 665, 669, 672, 680, 684, 686, 691, 693, 698, 704, 710, 716, 722, 727, 731, 738, 744, 749, 755, 758, 764, 771, 776, 780, 785, 789, 799, 804, 812, 818, 825, 832, 840, 846, 850, 853}
+const _Op_name = "XXXNAMENONAMETYPEPACKLITERALADDSUBORXORADDSTRADDRANDANDAPPENDBYTES2STRBYTES2STRTMPRUNES2STRSTR2BYTESSTR2BYTESTMPSTR2RUNESASAS2AS2FUNCAS2RECVAS2MAPRAS2DOTTYPEASOPCALLCALLFUNCCALLMETHCALLINTERCALLPARTCAPCLOSECLOSURECOMPLITMAPLITSTRUCTLITARRAYLITSLICELITPTRLITCONVCONVIFACECONVNOPCOPYDCLDCLFUNCDCLFIELDDCLCONSTDCLTYPEDELETEDOTDOTPTRDOTMETHDOTINTERXDOTDOTTYPEDOTTYPE2EQNELTLEGEGTDEREFINDEXINDEXMAPKEYSTRUCTKEYLENMAKEMAKECHANMAKEMAPMAKESLICEMULDIVMODLSHRSHANDANDNOTNEWNEWOBJNOTBITNOTPLUSNEGORORPANICPRINTPRINTNPARENSENDSLICESLICEARRSLICESTRSLICE3SLICE3ARRSLICEHEADERRECOVERRECVRUNESTRSELRECVSELRECV2IOTAREALIMAGCOMPLEXALIGNOFOFFSETOFSIZEOFBLOCKBREAKCASEXCASECONTINUEDEFEREMPTYFALLFORFORUNTILGOTOIFLABELGORANGERETURNSELECTSWITCHTYPESWTCHANTMAPTSTRUCTTINTERTFUNCTARRAYDDDDDDARGINLCALLEFACEITABIDATASPTRCLOSUREVARCFUNCCHECKNILVARDEFVARKILLVARLIVERESULTINLMARKRETJMPGETGEND"
+
+var _Op_index = [...]uint16{0, 3, 7, 13, 17, 21, 28, 31, 34, 36, 39, 45, 49, 55, 61, 70, 82, 91, 100, 112, 121, 123, 126, 133, 140, 147, 157, 161, 165, 173, 181, 190, 198, 201, 206, 213, 220, 226, 235, 243, 251, 257, 261, 270, 277, 281, 284, 291, 299, 307, 314, 320, 323, 329, 336, 344, 348, 355, 363, 365, 367, 369, 371, 373, 375, 380, 385, 393, 396, 405, 408, 412, 420, 427, 436, 439, 442, 445, 448, 451, 454, 460, 463, 469, 472, 478, 482, 485, 489, 494, 499, 505, 510, 514, 519, 527, 535, 541, 550, 561, 568, 572, 579, 586, 594, 598, 602, 606, 613, 620, 628, 634, 639, 644, 648, 653, 661, 666, 671, 675, 678, 686, 690, 692, 697, 699, 704, 710, 716, 722, 728, 733, 737, 744, 750, 755, 761, 764, 770, 777, 782, 786, 791, 795, 805, 810, 818, 824, 831, 838, 844, 851, 857, 861, 864}
func (i Op) String() string {
if i >= Op(len(_Op_index)-1) {
diff --git a/src/cmd/compile/internal/gc/order.go b/src/cmd/compile/internal/gc/order.go
index 4848a02bb6..64716d8402 100644
--- a/src/cmd/compile/internal/gc/order.go
+++ b/src/cmd/compile/internal/gc/order.go
@@ -208,9 +208,9 @@ func (o *Order) addrTemp(n *Node) *Node {
dowidth(n.Type)
vstat := staticname(n.Type)
vstat.Name.SetReadonly(true)
- var out []*Node
- staticassign(vstat, n, &out)
- if out != nil {
+ var s InitSchedule
+ s.staticassign(vstat, n)
+ if s.out != nil {
Fatalf("staticassign of const generated code: %+v", n)
}
vstat = typecheck(vstat, ctxExpr)
@@ -380,66 +380,16 @@ func (o *Order) init(n *Node) {
n.Ninit.Set(nil)
}
-// Ismulticall reports whether the list l is f() for a multi-value function.
-// Such an f() could appear as the lone argument to a multi-arg function.
-func ismulticall(l Nodes) bool {
- // one arg only
- if l.Len() != 1 {
- return false
- }
- n := l.First()
-
- // must be call
- switch n.Op {
- default:
- return false
- case OCALLFUNC, OCALLMETH, OCALLINTER:
- // call must return multiple values
- return n.Left.Type.NumResults() > 1
- }
-}
-
-// copyRet emits t1, t2, ... = n, where n is a function call,
-// and then returns the list t1, t2, ....
-func (o *Order) copyRet(n *Node) []*Node {
- if !n.Type.IsFuncArgStruct() {
- Fatalf("copyret %v %d", n.Type, n.Left.Type.NumResults())
- }
-
- slice := n.Type.Fields().Slice()
- l1 := make([]*Node, len(slice))
- l2 := make([]*Node, len(slice))
- for i, t := range slice {
- tmp := temp(t.Type)
- l1[i] = tmp
- l2[i] = tmp
- }
-
- as := nod(OAS2, nil, nil)
- as.List.Set(l1)
- as.Rlist.Set1(n)
- as = typecheck(as, ctxStmt)
- o.stmt(as)
-
- return l2
-}
-
-// callArgs orders the list of call arguments *l.
-func (o *Order) callArgs(l *Nodes) {
- if ismulticall(*l) {
- // return f() where f() is multiple values.
- l.Set(o.copyRet(l.First()))
- } else {
- o.exprList(*l)
- }
-}
-
// call orders the call expression n.
// n.Op is OCALLMETH/OCALLFUNC/OCALLINTER or a builtin like OCOPY.
func (o *Order) call(n *Node) {
+ if n.Ninit.Len() > 0 {
+ // Caller should have already called o.init(n).
+ Fatalf("%v with unexpected ninit", n.Op)
+ }
n.Left = o.expr(n.Left, nil)
n.Right = o.expr(n.Right, nil) // ODDDARG temp
- o.callArgs(&n.List)
+ o.exprList(n.List)
if n.Op != OCALLFUNC {
return
@@ -632,6 +582,7 @@ func (o *Order) stmt(n *Node) {
case OAS2FUNC:
t := o.markTemp()
o.exprList(n.List)
+ o.init(n.Rlist.First())
o.call(n.Rlist.First())
o.as2(n)
o.cleanTemp(t)
@@ -691,6 +642,7 @@ func (o *Order) stmt(n *Node) {
// Special: order arguments to inner call but not call itself.
case ODEFER, OGO:
t := o.markTemp()
+ o.init(n.Left)
o.call(n.Left)
o.out = append(o.out, n)
o.cleanTemp(t)
@@ -811,7 +763,7 @@ func (o *Order) stmt(n *Node) {
o.cleanTemp(t)
case ORETURN:
- o.callArgs(&n.List)
+ o.exprList(n.List)
o.out = append(o.out, n)
// Special: clean case temporaries in each block entry.
@@ -1108,10 +1060,10 @@ func (o *Order) expr(n, lhs *Node) *Node {
if n.Left.Type.IsInterface() {
break
}
- if _, needsaddr := convFuncName(n.Left.Type, n.Type); needsaddr || consttype(n.Left) > 0 {
+ if _, needsaddr := convFuncName(n.Left.Type, n.Type); needsaddr || isStaticCompositeLiteral(n.Left) {
// Need a temp if we need to pass the address to the conversion function.
- // We also process constants here, making a named static global whose
- // address we can put directly in an interface (see OCONVIFACE case in walk).
+ // We also process static composite literal node here, making a named static global
+ // whose address we can put directly in an interface (see OCONVIFACE case in walk).
n.Left = o.addrTemp(n.Left)
}
@@ -1130,14 +1082,40 @@ func (o *Order) expr(n, lhs *Node) *Node {
}
case OANDAND, OOROR:
- mark := o.markTemp()
- n.Left = o.expr(n.Left, nil)
+ // ... = LHS && RHS
+ //
+ // var r bool
+ // r = LHS
+ // if r { // or !r, for OROR
+ // r = RHS
+ // }
+ // ... = r
- // Clean temporaries from first branch at beginning of second.
- // Leave them on the stack so that they can be killed in the outer
- // context in case the short circuit is taken.
- n.Right = addinit(n.Right, o.cleanTempNoPop(mark))
- n.Right = o.exprInPlace(n.Right)
+ r := o.newTemp(n.Type, false)
+
+ // Evaluate left-hand side.
+ lhs := o.expr(n.Left, nil)
+ o.out = append(o.out, typecheck(nod(OAS, r, lhs), ctxStmt))
+
+ // Evaluate right-hand side, save generated code.
+ saveout := o.out
+ o.out = nil
+ t := o.markTemp()
+ rhs := o.expr(n.Right, nil)
+ o.out = append(o.out, typecheck(nod(OAS, r, rhs), ctxStmt))
+ o.cleanTemp(t)
+ gen := o.out
+ o.out = saveout
+
+ // If left-hand side doesn't cause a short-circuit, issue right-hand side.
+ nif := nod(OIF, r, nil)
+ if n.Op == OANDAND {
+ nif.Nbody.Set(gen)
+ } else {
+ nif.Rlist.Set(gen)
+ }
+ o.out = append(o.out, nif)
+ n = r
case OCALLFUNC,
OCALLINTER,
@@ -1174,7 +1152,7 @@ func (o *Order) expr(n, lhs *Node) *Node {
n.List.SetFirst(o.expr(n.List.First(), nil)) // order x
n.List.Second().Left = o.expr(n.List.Second().Left, nil) // order y
} else {
- o.callArgs(&n.List)
+ o.exprList(n.List)
}
if lhs == nil || lhs.Op != ONAME && !samesafeexpr(lhs, n.List.First()) {
@@ -1261,6 +1239,64 @@ func (o *Order) expr(n, lhs *Node) *Node {
n.Left = o.addrTemp(n.Left)
n.Right = o.addrTemp(n.Right)
}
+ case OMAPLIT:
+ // Order map by converting:
+ // map[int]int{
+ // a(): b(),
+ // c(): d(),
+ // e(): f(),
+ // }
+ // to
+ // m := map[int]int{}
+ // m[a()] = b()
+ // m[c()] = d()
+ // m[e()] = f()
+ // Then order the result.
+ // Without this special case, order would otherwise compute all
+ // the keys and values before storing any of them to the map.
+ // See issue 26552.
+ entries := n.List.Slice()
+ statics := entries[:0]
+ var dynamics []*Node
+ for _, r := range entries {
+ if r.Op != OKEY {
+ Fatalf("OMAPLIT entry not OKEY: %v\n", r)
+ }
+
+ if !isStaticCompositeLiteral(r.Left) || !isStaticCompositeLiteral(r.Right) {
+ dynamics = append(dynamics, r)
+ continue
+ }
+
+ // Recursively ordering some static entries can change them to dynamic;
+ // e.g., OCONVIFACE nodes. See #31777.
+ r = o.expr(r, nil)
+ if !isStaticCompositeLiteral(r.Left) || !isStaticCompositeLiteral(r.Right) {
+ dynamics = append(dynamics, r)
+ continue
+ }
+
+ statics = append(statics, r)
+ }
+ n.List.Set(statics)
+
+ if len(dynamics) == 0 {
+ break
+ }
+
+ // Emit the creation of the map (with all its static entries).
+ m := o.newTemp(n.Type, false)
+ as := nod(OAS, m, n)
+ typecheck(as, ctxStmt)
+ o.stmt(as)
+ n = m
+
+ // Emit eval+insert of dynamic entries, one at a time.
+ for _, r := range dynamics {
+ as := nod(OAS, nod(OINDEX, n, r.Left), r.Right)
+ typecheck(as, ctxStmt) // Note: this converts the OINDEX to an OINDEXMAP
+ o.stmt(as)
+ }
}
lineno = lno
diff --git a/src/cmd/compile/internal/gc/pgen.go b/src/cmd/compile/internal/gc/pgen.go
index 6914e3c5f8..2ae7452e7d 100644
--- a/src/cmd/compile/internal/gc/pgen.go
+++ b/src/cmd/compile/internal/gc/pgen.go
@@ -266,7 +266,7 @@ func compile(fn *Node) {
// Also make sure we allocate a linker symbol
// for the stack object data, for the same reason.
if fn.Func.lsym.Func.StackObjects == nil {
- fn.Func.lsym.Func.StackObjects = lookup(fmt.Sprintf("%s.stkobj", fn.funcname())).Linksym()
+ fn.Func.lsym.Func.StackObjects = Ctxt.Lookup(fn.Func.lsym.Name + ".stkobj")
}
}
}
@@ -348,7 +348,7 @@ func compileFunctions() {
// Compile the longest functions first,
// since they're most likely to be the slowest.
// This helps avoid stragglers.
- obj.SortSlice(compilequeue, func(i, j int) bool {
+ sort.Slice(compilequeue, func(i, j int) bool {
return compilequeue[i].Nbody.Len() > compilequeue[j].Nbody.Len()
})
}
@@ -553,11 +553,9 @@ func createDwarfVars(fnsym *obj.LSym, fn *Func, automDecls []*Node) ([]*Node, []
decls, vars, selected = createSimpleVars(automDecls)
}
- var dcl []*Node
+ dcl := automDecls
if fnsym.WasInlined() {
dcl = preInliningDcls(fnsym)
- } else {
- dcl = automDecls
}
// If optimization is enabled, the list above will typically be
@@ -595,8 +593,22 @@ func createDwarfVars(fnsym *obj.LSym, fn *Func, automDecls []*Node) ([]*Node, []
typename := dwarf.InfoPrefix + typesymname(n.Type)
decls = append(decls, n)
abbrev := dwarf.DW_ABRV_AUTO_LOCLIST
+ isReturnValue := (n.Class() == PPARAMOUT)
if n.Class() == PPARAM || n.Class() == PPARAMOUT {
abbrev = dwarf.DW_ABRV_PARAM_LOCLIST
+ } else if n.Class() == PAUTOHEAP {
+ // If dcl in question has been promoted to heap, do a bit
+ // of extra work to recover original class (auto or param);
+ // see issue 30908. This insures that we get the proper
+ // signature in the abstract function DIE, but leaves a
+ // misleading location for the param (we want pointer-to-heap
+ // and not stack).
+ // TODO(thanm): generate a better location expression
+ stackcopy := n.Name.Param.Stackcopy
+ if stackcopy != nil && (stackcopy.Class() == PPARAM || stackcopy.Class() == PPARAMOUT) {
+ abbrev = dwarf.DW_ABRV_PARAM_LOCLIST
+ isReturnValue = (stackcopy.Class() == PPARAMOUT)
+ }
}
inlIndex := 0
if genDwarfInline > 1 {
@@ -610,7 +622,7 @@ func createDwarfVars(fnsym *obj.LSym, fn *Func, automDecls []*Node) ([]*Node, []
declpos := Ctxt.InnermostPos(n.Pos)
vars = append(vars, &dwarf.Var{
Name: n.Sym.Name,
- IsReturnValue: n.Class() == PPARAMOUT,
+ IsReturnValue: isReturnValue,
Abbrev: abbrev,
StackOffset: int32(n.Xoffset),
Type: Ctxt.Lookup(typename),
diff --git a/src/cmd/compile/internal/gc/range.go b/src/cmd/compile/internal/gc/range.go
index 5c19d54e78..4d354f23cf 100644
--- a/src/cmd/compile/internal/gc/range.go
+++ b/src/cmd/compile/internal/gc/range.go
@@ -15,7 +15,7 @@ func typecheckrange(n *Node) {
// Typechecking order is important here:
// 0. first typecheck range expression (slice/map/chan),
// it is evaluated only once and so logically it is not part of the loop.
- // 1. typcheck produced values,
+ // 1. typecheck produced values,
// this part can declare new vars and so it must be typechecked before body,
// because body can contain a closure that captures the vars.
// 2. decldepth++ to denote loop body.
@@ -298,8 +298,8 @@ func walkrange(n *Node) *Node {
hit := prealloc[n]
th := hit.Type
n.Left = nil
- keysym := th.Field(0).Sym // depends on layout of iterator struct. See reflect.go:hiter
- valsym := th.Field(1).Sym // ditto
+ keysym := th.Field(0).Sym // depends on layout of iterator struct. See reflect.go:hiter
+ elemsym := th.Field(1).Sym // ditto
fn := syslook("mapiterinit")
@@ -318,11 +318,11 @@ func walkrange(n *Node) *Node {
} else if v2 == nil {
body = []*Node{nod(OAS, v1, key)}
} else {
- val := nodSym(ODOT, hit, valsym)
- val = nod(ODEREF, val, nil)
+ elem := nodSym(ODOT, hit, elemsym)
+ elem = nod(ODEREF, elem, nil)
a := nod(OAS2, nil, nil)
a.List.Set2(v1, v2)
- a.Rlist.Set2(key, val)
+ a.Rlist.Set2(key, elem)
body = []*Node{a}
}
diff --git a/src/cmd/compile/internal/gc/reflect.go b/src/cmd/compile/internal/gc/reflect.go
index 3c6879c978..eade8f4a5e 100644
--- a/src/cmd/compile/internal/gc/reflect.go
+++ b/src/cmd/compile/internal/gc/reflect.go
@@ -56,9 +56,9 @@ type Sig struct {
// program for it.
// Make sure this stays in sync with runtime/map.go.
const (
- BUCKETSIZE = 8
- MAXKEYSIZE = 128
- MAXVALSIZE = 128
+ BUCKETSIZE = 8
+ MAXKEYSIZE = 128
+ MAXELEMSIZE = 128
)
func structfieldSize() int { return 3 * Widthptr } // Sizeof(runtime.structfield{})
@@ -86,14 +86,14 @@ func bmap(t *types.Type) *types.Type {
bucket := types.New(TSTRUCT)
keytype := t.Key()
- valtype := t.Elem()
+ elemtype := t.Elem()
dowidth(keytype)
- dowidth(valtype)
+ dowidth(elemtype)
if keytype.Width > MAXKEYSIZE {
keytype = types.NewPtr(keytype)
}
- if valtype.Width > MAXVALSIZE {
- valtype = types.NewPtr(valtype)
+ if elemtype.Width > MAXELEMSIZE {
+ elemtype = types.NewPtr(elemtype)
}
field := make([]*types.Field, 0, 5)
@@ -107,10 +107,10 @@ func bmap(t *types.Type) *types.Type {
keys := makefield("keys", arr)
field = append(field, keys)
- arr = types.NewArray(valtype, BUCKETSIZE)
+ arr = types.NewArray(elemtype, BUCKETSIZE)
arr.SetNoalg(true)
- values := makefield("values", arr)
- field = append(field, values)
+ elems := makefield("elems", arr)
+ field = append(field, elems)
// Make sure the overflow pointer is the last memory in the struct,
// because the runtime assumes it can use size-ptrSize as the
@@ -126,21 +126,21 @@ func bmap(t *types.Type) *types.Type {
// will end with no padding.
// On nacl/amd64p32, however, the max alignment is 64-bit,
// but the overflow pointer will add only a 32-bit field,
- // so if the struct needs 64-bit padding (because a key or value does)
+ // so if the struct needs 64-bit padding (because a key or elem does)
// then it would end with an extra 32-bit padding field.
// Preempt that by emitting the padding here.
- if int(valtype.Align) > Widthptr || int(keytype.Align) > Widthptr {
+ if int(elemtype.Align) > Widthptr || int(keytype.Align) > Widthptr {
field = append(field, makefield("pad", types.Types[TUINTPTR]))
}
- // If keys and values have no pointers, the map implementation
+ // If keys and elems have no pointers, the map implementation
// can keep a list of overflow pointers on the side so that
// buckets can be marked as having no pointers.
// Arrange for the bucket to have no pointers by changing
// the type of the overflow field to uintptr in this case.
// See comment on hmap.overflow in runtime/map.go.
otyp := types.NewPtr(bucket)
- if !types.Haspointers(valtype) && !types.Haspointers(keytype) {
+ if !types.Haspointers(elemtype) && !types.Haspointers(keytype) {
otyp = types.Types[TUINTPTR]
}
overflow := makefield("overflow", otyp)
@@ -161,38 +161,38 @@ func bmap(t *types.Type) *types.Type {
if keytype.Align > BUCKETSIZE {
Fatalf("key align too big for %v", t)
}
- if valtype.Align > BUCKETSIZE {
- Fatalf("value align too big for %v", t)
+ if elemtype.Align > BUCKETSIZE {
+ Fatalf("elem align too big for %v", t)
}
if keytype.Width > MAXKEYSIZE {
Fatalf("key size to large for %v", t)
}
- if valtype.Width > MAXVALSIZE {
- Fatalf("value size to large for %v", t)
+ if elemtype.Width > MAXELEMSIZE {
+ Fatalf("elem size to large for %v", t)
}
if t.Key().Width > MAXKEYSIZE && !keytype.IsPtr() {
Fatalf("key indirect incorrect for %v", t)
}
- if t.Elem().Width > MAXVALSIZE && !valtype.IsPtr() {
- Fatalf("value indirect incorrect for %v", t)
+ if t.Elem().Width > MAXELEMSIZE && !elemtype.IsPtr() {
+ Fatalf("elem indirect incorrect for %v", t)
}
if keytype.Width%int64(keytype.Align) != 0 {
Fatalf("key size not a multiple of key align for %v", t)
}
- if valtype.Width%int64(valtype.Align) != 0 {
- Fatalf("value size not a multiple of value align for %v", t)
+ if elemtype.Width%int64(elemtype.Align) != 0 {
+ Fatalf("elem size not a multiple of elem align for %v", t)
}
if bucket.Align%keytype.Align != 0 {
Fatalf("bucket align not multiple of key align %v", t)
}
- if bucket.Align%valtype.Align != 0 {
- Fatalf("bucket align not multiple of value align %v", t)
+ if bucket.Align%elemtype.Align != 0 {
+ Fatalf("bucket align not multiple of elem align %v", t)
}
if keys.Offset%int64(keytype.Align) != 0 {
Fatalf("bad alignment of keys in bmap for %v", t)
}
- if values.Offset%int64(valtype.Align) != 0 {
- Fatalf("bad alignment of values in bmap for %v", t)
+ if elems.Offset%int64(elemtype.Align) != 0 {
+ Fatalf("bad alignment of elems in bmap for %v", t)
}
// Double-check that overflow field is final memory in struct,
@@ -270,7 +270,7 @@ func hiter(t *types.Type) *types.Type {
// build a struct:
// type hiter struct {
// key *Key
- // val *Value
+ // elem *Elem
// t unsafe.Pointer // *MapType
// h *hmap
// buckets *bmap
@@ -287,8 +287,8 @@ func hiter(t *types.Type) *types.Type {
// }
// must match runtime/map.go:hiter.
fields := []*types.Field{
- makefield("key", types.NewPtr(t.Key())), // Used in range.go for TMAP.
- makefield("val", types.NewPtr(t.Elem())), // Used in range.go for TMAP.
+ makefield("key", types.NewPtr(t.Key())), // Used in range.go for TMAP.
+ makefield("elem", types.NewPtr(t.Elem())), // Used in range.go for TMAP.
makefield("t", types.Types[TUNSAFEPTR]),
makefield("h", types.NewPtr(hmap)),
makefield("buckets", types.NewPtr(bmap)),
@@ -477,12 +477,10 @@ func dimportpath(p *types.Pkg) {
return
}
- var str string
+ str := p.Path
if p == localpkg {
// Note: myimportpath != "", or else dgopkgpath won't call dimportpath.
str = myimportpath
- } else {
- str = p.Path
}
s := Ctxt.Lookup("type..importpath." + p.Prefix + ".")
@@ -884,9 +882,6 @@ func dcommontype(lsym *obj.LSym, t *types.Type) int {
ot = duint8(lsym, ot, t.Align) // fieldAlign
i = kinds[t.Etype]
- if !types.Haspointers(t) {
- i |= objabi.KindNoPointers
- }
if isdirectiface(t) {
i |= objabi.KindDirectIface
}
@@ -1289,7 +1284,7 @@ func dtypesym(t *types.Type) *obj.LSym {
ot = duint8(lsym, ot, uint8(t.Key().Width))
}
- if t.Elem().Width > MAXVALSIZE {
+ if t.Elem().Width > MAXELEMSIZE {
ot = duint8(lsym, ot, uint8(Widthptr))
flags |= 2 // indirect value
} else {
@@ -1926,7 +1921,7 @@ func (p *GCProg) emit(t *types.Type, offset int64) {
// size bytes of zeros.
func zeroaddr(size int64) *Node {
if size >= 1<<31 {
- Fatalf("map value too big %d", size)
+ Fatalf("map elem too big %d", size)
}
if zerosize < size {
zerosize = size
diff --git a/src/cmd/compile/internal/gc/scc.go b/src/cmd/compile/internal/gc/scc.go
new file mode 100644
index 0000000000..0428a6af8d
--- /dev/null
+++ b/src/cmd/compile/internal/gc/scc.go
@@ -0,0 +1,122 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package gc
+
+// Strongly connected components.
+//
+// Run analysis on minimal sets of mutually recursive functions
+// or single non-recursive functions, bottom up.
+//
+// Finding these sets is finding strongly connected components
+// by reverse topological order in the static call graph.
+// The algorithm (known as Tarjan's algorithm) for doing that is taken from
+// Sedgewick, Algorithms, Second Edition, p. 482, with two adaptations.
+//
+// First, a hidden closure function (n.Func.IsHiddenClosure()) cannot be the
+// root of a connected component. Refusing to use it as a root
+// forces it into the component of the function in which it appears.
+// This is more convenient for escape analysis.
+//
+// Second, each function becomes two virtual nodes in the graph,
+// with numbers n and n+1. We record the function's node number as n
+// but search from node n+1. If the search tells us that the component
+// number (min) is n+1, we know that this is a trivial component: one function
+// plus its closures. If the search tells us that the component number is
+// n, then there was a path from node n+1 back to node n, meaning that
+// the function set is mutually recursive. The escape analysis can be
+// more precise when analyzing a single non-recursive function than
+// when analyzing a set of mutually recursive functions.
+
+type bottomUpVisitor struct {
+ analyze func([]*Node, bool)
+ visitgen uint32
+ nodeID map[*Node]uint32
+ stack []*Node
+}
+
+// visitBottomUp invokes analyze on the ODCLFUNC nodes listed in list.
+// It calls analyze with successive groups of functions, working from
+// the bottom of the call graph upward. Each time analyze is called with
+// a list of functions, every function on that list only calls other functions
+// on the list or functions that have been passed in previous invocations of
+// analyze. Closures appear in the same list as their outer functions.
+// The lists are as short as possible while preserving those requirements.
+// (In a typical program, many invocations of analyze will be passed just
+// a single function.) The boolean argument 'recursive' passed to analyze
+// specifies whether the functions on the list are mutually recursive.
+// If recursive is false, the list consists of only a single function and its closures.
+// If recursive is true, the list may still contain only a single function,
+// if that function is itself recursive.
+func visitBottomUp(list []*Node, analyze func(list []*Node, recursive bool)) {
+ var v bottomUpVisitor
+ v.analyze = analyze
+ v.nodeID = make(map[*Node]uint32)
+ for _, n := range list {
+ if n.Op == ODCLFUNC && !n.Func.IsHiddenClosure() {
+ v.visit(n)
+ }
+ }
+}
+
+func (v *bottomUpVisitor) visit(n *Node) uint32 {
+ if id := v.nodeID[n]; id > 0 {
+ // already visited
+ return id
+ }
+
+ v.visitgen++
+ id := v.visitgen
+ v.nodeID[n] = id
+ v.visitgen++
+ min := v.visitgen
+ v.stack = append(v.stack, n)
+
+ inspectList(n.Nbody, func(n *Node) bool {
+ switch n.Op {
+ case OCALLFUNC, OCALLMETH:
+ fn := asNode(n.Left.Type.Nname())
+ if fn != nil && fn.Op == ONAME && fn.Class() == PFUNC && fn.Name.Defn != nil {
+ if m := v.visit(fn.Name.Defn); m < min {
+ min = m
+ }
+ }
+ case OCLOSURE:
+ if m := v.visit(n.Func.Closure); m < min {
+ min = m
+ }
+ }
+ return true
+ })
+
+ if (min == id || min == id+1) && !n.Func.IsHiddenClosure() {
+ // This node is the root of a strongly connected component.
+
+ // The original min passed to visitcodelist was v.nodeID[n]+1.
+ // If visitcodelist found its way back to v.nodeID[n], then this
+ // block is a set of mutually recursive functions.
+ // Otherwise it's just a lone function that does not recurse.
+ recursive := min == id
+
+ // Remove connected component from stack.
+ // Mark walkgen so that future visits return a large number
+ // so as not to affect the caller's min.
+
+ var i int
+ for i = len(v.stack) - 1; i >= 0; i-- {
+ x := v.stack[i]
+ if x == n {
+ break
+ }
+ v.nodeID[x] = ^uint32(0)
+ }
+ v.nodeID[n] = ^uint32(0)
+ block := v.stack[i:]
+ // Run escape analysis on this set of functions.
+ v.stack = v.stack[:i]
+ v.analyze(block, recursive)
+ }
+
+ return min
+}
diff --git a/src/cmd/compile/internal/gc/scope.go b/src/cmd/compile/internal/gc/scope.go
index 3d543084bc..d7239d5693 100644
--- a/src/cmd/compile/internal/gc/scope.go
+++ b/src/cmd/compile/internal/gc/scope.go
@@ -55,14 +55,6 @@ func scopeVariables(dwarfVars []*dwarf.Var, varScopes []ScopeID, dwarfScopes []d
}
}
-// A scopedPCs represents a non-empty half-open interval of PCs that
-// share a common source position.
-type scopedPCs struct {
- start, end int64
- pos src.XPos
- scope ScopeID
-}
-
// scopePCs assigns PC ranges to their scopes.
func scopePCs(fnsym *obj.LSym, marks []Mark, dwarfScopes []dwarf.Scope) {
// If there aren't any child scopes (in particular, when scope
@@ -70,36 +62,18 @@ func scopePCs(fnsym *obj.LSym, marks []Mark, dwarfScopes []dwarf.Scope) {
if len(marks) == 0 {
return
}
-
- // Break function text into scopedPCs.
- var pcs []scopedPCs
p0 := fnsym.Func.Text
+ scope := findScope(marks, p0.Pos)
for p := fnsym.Func.Text; p != nil; p = p.Link {
if p.Pos == p0.Pos {
continue
}
- if p0.Pc < p.Pc {
- pcs = append(pcs, scopedPCs{start: p0.Pc, end: p.Pc, pos: p0.Pos})
- }
+ dwarfScopes[scope].AppendRange(dwarf.Range{Start: p0.Pc, End: p.Pc})
p0 = p
+ scope = findScope(marks, p0.Pos)
}
if p0.Pc < fnsym.Size {
- pcs = append(pcs, scopedPCs{start: p0.Pc, end: fnsym.Size, pos: p0.Pos})
- }
-
- // Assign scopes to each chunk of instructions.
- for i := range pcs {
- pcs[i].scope = findScope(marks, pcs[i].pos)
- }
-
- // Create sorted PC ranges for each DWARF scope.
- for _, pc := range pcs {
- r := &dwarfScopes[pc.scope].Ranges
- if i := len(*r); i > 0 && (*r)[i-1].End == pc.start {
- (*r)[i-1].End = pc.end
- } else {
- *r = append(*r, dwarf.Range{Start: pc.start, End: pc.end})
- }
+ dwarfScopes[scope].AppendRange(dwarf.Range{Start: p0.Pc, End: fnsym.Size})
}
}
diff --git a/src/cmd/compile/internal/gc/scope_test.go b/src/cmd/compile/internal/gc/scope_test.go
index e327dc02af..d3af61824d 100644
--- a/src/cmd/compile/internal/gc/scope_test.go
+++ b/src/cmd/compile/internal/gc/scope_test.go
@@ -207,6 +207,7 @@ const detailOutput = false
// corresponds to what we expect it to be.
func TestScopeRanges(t *testing.T) {
testenv.MustHaveGoBuild(t)
+ t.Parallel()
if runtime.GOOS == "plan9" {
t.Skip("skipping on plan9; no DWARF symbol table in executables")
@@ -445,6 +446,7 @@ func gobuild(t *testing.T, dir string, optimized bool, testfile []testline) (str
// See issue #23928.
func TestEmptyDwarfRanges(t *testing.T) {
testenv.MustHaveGoRun(t)
+ t.Parallel()
if runtime.GOOS == "plan9" {
t.Skip("skipping on plan9; no DWARF symbol table in executables")
diff --git a/src/cmd/compile/internal/gc/sinit.go b/src/cmd/compile/internal/gc/sinit.go
index efdaf1c3c5..eaccde99c1 100644
--- a/src/cmd/compile/internal/gc/sinit.go
+++ b/src/cmd/compile/internal/gc/sinit.go
@@ -26,28 +26,33 @@ type InitPlan struct {
E []InitEntry
}
-var (
+type InitSchedule struct {
+ out []*Node
initlist []*Node
initplans map[*Node]*InitPlan
- inittemps = make(map[*Node]*Node)
-)
+ inittemps map[*Node]*Node
+}
+
+func (s *InitSchedule) append(n *Node) {
+ s.out = append(s.out, n)
+}
// init1 walks the AST starting at n, and accumulates in out
// the list of definitions needing init code in dependency order.
-func init1(n *Node, out *[]*Node) {
+func (s *InitSchedule) init1(n *Node) {
if n == nil {
return
}
- init1(n.Left, out)
- init1(n.Right, out)
+ s.init1(n.Left)
+ s.init1(n.Right)
for _, n1 := range n.List.Slice() {
- init1(n1, out)
+ s.init1(n1)
}
if n.isMethodExpression() {
// Methods called as Type.Method(receiver, ...).
// Definitions for method expressions are stored in type->nname.
- init1(asNode(n.Type.FuncType().Nname), out)
+ s.init1(asNode(n.Type.FuncType().Nname))
}
if n.Op != ONAME {
@@ -78,16 +83,16 @@ func init1(n *Node, out *[]*Node) {
// a variable in the program, the tree walk will reach a cycle
// involving that variable.
if n.Class() != PFUNC {
- foundinitloop(n, n)
+ s.foundinitloop(n, n)
}
- for i := len(initlist) - 1; i >= 0; i-- {
- x := initlist[i]
+ for i := len(s.initlist) - 1; i >= 0; i-- {
+ x := s.initlist[i]
if x == n {
break
}
if x.Class() != PFUNC {
- foundinitloop(n, x)
+ s.foundinitloop(n, x)
}
}
@@ -97,7 +102,7 @@ func init1(n *Node, out *[]*Node) {
// reached a new unvisited node.
n.SetInitorder(InitPending)
- initlist = append(initlist, n)
+ s.initlist = append(s.initlist, n)
// make sure that everything n depends on is initialized.
// n->defn is an assignment to n
@@ -108,7 +113,7 @@ func init1(n *Node, out *[]*Node) {
Fatalf("init1: bad defn")
case ODCLFUNC:
- init2list(defn.Nbody, out)
+ s.init2list(defn.Nbody)
case OAS:
if defn.Left != n {
@@ -122,15 +127,15 @@ func init1(n *Node, out *[]*Node) {
break
}
- init2(defn.Right, out)
+ s.init2(defn.Right)
if Debug['j'] != 0 {
fmt.Printf("%v\n", n.Sym)
}
- if n.isBlank() || !staticinit(n, out) {
+ if n.isBlank() || !s.staticinit(n) {
if Debug['%'] != 0 {
Dump("nonstatic", defn)
}
- *out = append(*out, defn)
+ s.append(defn)
}
case OAS2FUNC, OAS2MAPR, OAS2DOTTYPE, OAS2RECV:
@@ -139,28 +144,28 @@ func init1(n *Node, out *[]*Node) {
}
defn.SetInitorder(InitPending)
for _, n2 := range defn.Rlist.Slice() {
- init1(n2, out)
+ s.init1(n2)
}
if Debug['%'] != 0 {
Dump("nonstatic", defn)
}
- *out = append(*out, defn)
+ s.append(defn)
defn.SetInitorder(InitDone)
}
}
- last := len(initlist) - 1
- if initlist[last] != n {
- Fatalf("bad initlist %v", initlist)
+ last := len(s.initlist) - 1
+ if s.initlist[last] != n {
+ Fatalf("bad initlist %v", s.initlist)
}
- initlist[last] = nil // allow GC
- initlist = initlist[:last]
+ s.initlist[last] = nil // allow GC
+ s.initlist = s.initlist[:last]
n.SetInitorder(InitDone)
}
// foundinitloop prints an init loop error and exits.
-func foundinitloop(node, visited *Node) {
+func (s *InitSchedule) foundinitloop(node, visited *Node) {
// If there have already been errors printed,
// those errors probably confused us and
// there might not be a loop. Let the user
@@ -172,9 +177,9 @@ func foundinitloop(node, visited *Node) {
// Find the index of node and visited in the initlist.
var nodeindex, visitedindex int
- for ; initlist[nodeindex] != node; nodeindex++ {
+ for ; s.initlist[nodeindex] != node; nodeindex++ {
}
- for ; initlist[visitedindex] != visited; visitedindex++ {
+ for ; s.initlist[visitedindex] != visited; visitedindex++ {
}
// There is a loop involving visited. We know about node and
@@ -182,12 +187,12 @@ func foundinitloop(node, visited *Node) {
fmt.Printf("%v: initialization loop:\n", visited.Line())
// Print visited -> ... -> n1 -> node.
- for _, n := range initlist[visitedindex:] {
+ for _, n := range s.initlist[visitedindex:] {
fmt.Printf("\t%v %v refers to\n", n.Line(), n.Sym)
}
// Print node -> ... -> visited.
- for _, n := range initlist[nodeindex:visitedindex] {
+ for _, n := range s.initlist[nodeindex:visitedindex] {
fmt.Printf("\t%v %v refers to\n", n.Line(), n.Sym)
}
@@ -196,7 +201,7 @@ func foundinitloop(node, visited *Node) {
}
// recurse over n, doing init1 everywhere.
-func init2(n *Node, out *[]*Node) {
+func (s *InitSchedule) init2(n *Node) {
if n == nil || n.Initorder() == InitDone {
return
}
@@ -205,38 +210,38 @@ func init2(n *Node, out *[]*Node) {
Fatalf("name %v with ninit: %+v\n", n.Sym, n)
}
- init1(n, out)
- init2(n.Left, out)
- init2(n.Right, out)
- init2list(n.Ninit, out)
- init2list(n.List, out)
- init2list(n.Rlist, out)
- init2list(n.Nbody, out)
+ s.init1(n)
+ s.init2(n.Left)
+ s.init2(n.Right)
+ s.init2list(n.Ninit)
+ s.init2list(n.List)
+ s.init2list(n.Rlist)
+ s.init2list(n.Nbody)
switch n.Op {
case OCLOSURE:
- init2list(n.Func.Closure.Nbody, out)
+ s.init2list(n.Func.Closure.Nbody)
case ODOTMETH, OCALLPART:
- init2(asNode(n.Type.FuncType().Nname), out)
+ s.init2(asNode(n.Type.FuncType().Nname))
}
}
-func init2list(l Nodes, out *[]*Node) {
+func (s *InitSchedule) init2list(l Nodes) {
for _, n := range l.Slice() {
- init2(n, out)
+ s.init2(n)
}
}
-func initreorder(l []*Node, out *[]*Node) {
+func (s *InitSchedule) initreorder(l []*Node) {
for _, n := range l {
switch n.Op {
case ODCLFUNC, ODCLCONST, ODCLTYPE:
continue
}
- initreorder(n.Ninit.Slice(), out)
+ s.initreorder(n.Ninit.Slice())
n.Ninit.Set(nil)
- init1(n, out)
+ s.init1(n)
}
}
@@ -244,18 +249,19 @@ func initreorder(l []*Node, out *[]*Node) {
// declarations and outputs the corresponding list of statements
// to include in the init() function body.
func initfix(l []*Node) []*Node {
- var lout []*Node
- initplans = make(map[*Node]*InitPlan)
+ s := InitSchedule{
+ initplans: make(map[*Node]*InitPlan),
+ inittemps: make(map[*Node]*Node),
+ }
lno := lineno
- initreorder(l, &lout)
+ s.initreorder(l)
lineno = lno
- initplans = nil
- return lout
+ return s.out
}
// compilation of top-level (static) assignments
// into DATA statements if at all possible.
-func staticinit(n *Node, out *[]*Node) bool {
+func (s *InitSchedule) staticinit(n *Node) bool {
if n.Op != ONAME || n.Class() != PEXTERN || n.Name.Defn == nil || n.Name.Defn.Op != OAS {
Fatalf("staticinit")
}
@@ -263,12 +269,12 @@ func staticinit(n *Node, out *[]*Node) bool {
lineno = n.Pos
l := n.Name.Defn.Left
r := n.Name.Defn.Right
- return staticassign(l, r, out)
+ return s.staticassign(l, r)
}
// like staticassign but we are copying an already
// initialized value r.
-func staticcopy(l *Node, r *Node, out *[]*Node) bool {
+func (s *InitSchedule) staticcopy(l *Node, r *Node) bool {
if r.Op != ONAME {
return false
}
@@ -294,12 +300,12 @@ func staticcopy(l *Node, r *Node, out *[]*Node) bool {
switch r.Op {
case ONAME:
- if staticcopy(l, r, out) {
+ if s.staticcopy(l, r) {
return true
}
// We may have skipped past one or more OCONVNOPs, so
// use conv to ensure r is assignable to l (#13263).
- *out = append(*out, nod(OAS, l, conv(r, l.Type)))
+ s.append(nod(OAS, l, conv(r, l.Type)))
return true
case OLITERAL:
@@ -320,13 +326,13 @@ func staticcopy(l *Node, r *Node, out *[]*Node) bool {
switch r.Left.Op {
case OARRAYLIT, OSLICELIT, OSTRUCTLIT, OMAPLIT:
// copy pointer
- gdata(l, nod(OADDR, inittemps[r], nil), int(l.Type.Width))
+ gdata(l, nod(OADDR, s.inittemps[r], nil), int(l.Type.Width))
return true
}
case OSLICELIT:
// copy slice
- a := inittemps[r]
+ a := s.inittemps[r]
n := l.copy()
n.Xoffset = l.Xoffset + int64(array_array)
@@ -338,7 +344,7 @@ func staticcopy(l *Node, r *Node, out *[]*Node) bool {
return true
case OARRAYLIT, OSTRUCTLIT:
- p := initplans[r]
+ p := s.initplans[r]
n := l.copy()
for i := range p.E {
@@ -350,7 +356,7 @@ func staticcopy(l *Node, r *Node, out *[]*Node) bool {
continue
}
ll := n.sepcopy()
- if staticcopy(ll, e.Expr, out) {
+ if s.staticcopy(ll, e.Expr) {
continue
}
// Requires computation, but we're
@@ -359,7 +365,7 @@ func staticcopy(l *Node, r *Node, out *[]*Node) bool {
rr.Type = ll.Type
rr.Xoffset += e.Xoffset
setlineno(rr)
- *out = append(*out, nod(OAS, ll, rr))
+ s.append(nod(OAS, ll, rr))
}
return true
@@ -368,14 +374,14 @@ func staticcopy(l *Node, r *Node, out *[]*Node) bool {
return false
}
-func staticassign(l *Node, r *Node, out *[]*Node) bool {
+func (s *InitSchedule) staticassign(l *Node, r *Node) bool {
for r.Op == OCONVNOP {
r = r.Left
}
switch r.Op {
case ONAME:
- return staticcopy(l, r, out)
+ return s.staticcopy(l, r)
case OLITERAL:
if isZero(r) {
@@ -400,12 +406,12 @@ func staticassign(l *Node, r *Node, out *[]*Node) bool {
// Init pointer.
a := staticname(r.Left.Type)
- inittemps[r] = a
+ s.inittemps[r] = a
gdata(l, nod(OADDR, a, nil), int(l.Type.Width))
// Init underlying literal.
- if !staticassign(a, r.Left, out) {
- *out = append(*out, nod(OAS, a, r.Left))
+ if !s.staticassign(a, r.Left) {
+ s.append(nod(OAS, a, r.Left))
}
return true
}
@@ -419,12 +425,12 @@ func staticassign(l *Node, r *Node, out *[]*Node) bool {
}
case OSLICELIT:
- initplan(r)
+ s.initplan(r)
// Init slice.
bound := r.Right.Int64()
ta := types.NewArray(r.Type.Elem(), bound)
a := staticname(ta)
- inittemps[r] = a
+ s.inittemps[r] = a
n := l.copy()
n.Xoffset = l.Xoffset + int64(array_array)
gdata(n, nod(OADDR, a, nil), Widthptr)
@@ -438,9 +444,9 @@ func staticassign(l *Node, r *Node, out *[]*Node) bool {
fallthrough
case OARRAYLIT, OSTRUCTLIT:
- initplan(r)
+ s.initplan(r)
- p := initplans[r]
+ p := s.initplans[r]
n := l.copy()
for i := range p.E {
e := &p.E[i]
@@ -452,8 +458,8 @@ func staticassign(l *Node, r *Node, out *[]*Node) bool {
}
setlineno(e.Expr)
a := n.sepcopy()
- if !staticassign(a, e.Expr, out) {
- *out = append(*out, nod(OAS, a, e.Expr))
+ if !s.staticassign(a, e.Expr) {
+ s.append(nod(OAS, a, e.Expr))
}
}
@@ -516,15 +522,15 @@ func staticassign(l *Node, r *Node, out *[]*Node) bool {
n.Type = val.Type
setlineno(val)
a := n.sepcopy()
- if !staticassign(a, val, out) {
- *out = append(*out, nod(OAS, a, val))
+ if !s.staticassign(a, val) {
+ s.append(nod(OAS, a, val))
}
} else {
// Construct temp to hold val, write pointer to temp into n.
a := staticname(val.Type)
- inittemps[val] = a
- if !staticassign(a, val, out) {
- *out = append(*out, nod(OAS, a, val))
+ s.inittemps[val] = a
+ if !s.staticassign(a, val) {
+ s.append(nod(OAS, a, val))
}
ptr := nod(OADDR, a, nil)
n.Type = types.NewPtr(val.Type)
@@ -555,6 +561,13 @@ const (
inNonInitFunction
)
+func (c initContext) String() string {
+ if c == inInitFunction {
+ return "inInitFunction"
+ }
+ return "inNonInitFunction"
+}
+
// from here down is the walk analysis
// of composite literals.
// most of the work is to generate
@@ -729,6 +742,7 @@ func fixedlit(ctxt initContext, kind initKind, n *Node, var_ *Node, init *Nodes)
if r.Sym.IsBlank() {
return nblank, r.Left
}
+ setlineno(r)
return nodSym(ODOT, var_, r.Sym), r.Left
}
default:
@@ -756,7 +770,7 @@ func fixedlit(ctxt initContext, kind initKind, n *Node, var_ *Node, init *Nodes)
}
// build list of assignments: var[index] = expr
- setlineno(value)
+ setlineno(a)
a = nod(OAS, a, value)
a = typecheck(a, ctxStmt)
switch kind {
@@ -913,7 +927,13 @@ func slicelit(ctxt initContext, n *Node, var_ *Node, init *Nodes) {
break
case OARRAYLIT, OSTRUCTLIT:
- fixedlit(ctxt, initKindDynamic, value, a, init)
+ k := initKindDynamic
+ if vstat == nil {
+ // Generate both static and dynamic initializations.
+ // See issue #31987.
+ k = initKindLocalCode
+ }
+ fixedlit(ctxt, k, value, a, init)
continue
}
@@ -947,52 +967,48 @@ func maplit(n *Node, m *Node, init *Nodes) {
a.List.Set2(typenod(n.Type), nodintconst(int64(n.List.Len())))
litas(m, a, init)
- // Split the initializers into static and dynamic.
- var stat, dyn []*Node
- for _, r := range n.List.Slice() {
- if r.Op != OKEY {
- Fatalf("maplit: rhs not OKEY: %v", r)
- }
- if isStaticCompositeLiteral(r.Left) && isStaticCompositeLiteral(r.Right) {
- stat = append(stat, r)
- } else {
- dyn = append(dyn, r)
+ entries := n.List.Slice()
+
+ // The order pass already removed any dynamic (runtime-computed) entries.
+ // All remaining entries are static. Double-check that.
+ for _, r := range entries {
+ if !isStaticCompositeLiteral(r.Left) || !isStaticCompositeLiteral(r.Right) {
+ Fatalf("maplit: entry is not a literal: %v", r)
}
}
- // Add static entries.
- if len(stat) > 25 {
- // For a large number of static entries, put them in an array and loop.
+ if len(entries) > 25 {
+ // For a large number of entries, put them in an array and loop.
// build types [count]Tindex and [count]Tvalue
- tk := types.NewArray(n.Type.Key(), int64(len(stat)))
- tv := types.NewArray(n.Type.Elem(), int64(len(stat)))
+ tk := types.NewArray(n.Type.Key(), int64(len(entries)))
+ te := types.NewArray(n.Type.Elem(), int64(len(entries)))
// TODO(josharian): suppress alg generation for these types?
dowidth(tk)
- dowidth(tv)
+ dowidth(te)
// make and initialize static arrays
vstatk := staticname(tk)
vstatk.Name.SetReadonly(true)
- vstatv := staticname(tv)
- vstatv.Name.SetReadonly(true)
+ vstate := staticname(te)
+ vstate.Name.SetReadonly(true)
datak := nod(OARRAYLIT, nil, nil)
- datav := nod(OARRAYLIT, nil, nil)
- for _, r := range stat {
+ datae := nod(OARRAYLIT, nil, nil)
+ for _, r := range entries {
datak.List.Append(r.Left)
- datav.List.Append(r.Right)
+ datae.List.Append(r.Right)
}
fixedlit(inInitFunction, initKindStatic, datak, vstatk, init)
- fixedlit(inInitFunction, initKindStatic, datav, vstatv, init)
+ fixedlit(inInitFunction, initKindStatic, datae, vstate, init)
// loop adding structure elements to map
// for i = 0; i < len(vstatk); i++ {
- // map[vstatk[i]] = vstatv[i]
+ // map[vstatk[i]] = vstate[i]
// }
i := temp(types.Types[TINT])
- rhs := nod(OINDEX, vstatv, i)
+ rhs := nod(OINDEX, vstate, i)
rhs.SetBounded(true)
kidx := nod(OINDEX, vstatk, i)
@@ -1011,58 +1027,42 @@ func maplit(n *Node, m *Node, init *Nodes) {
loop = typecheck(loop, ctxStmt)
loop = walkstmt(loop)
init.Append(loop)
- } else {
- // For a small number of static entries, just add them directly.
- addMapEntries(m, stat, init)
- }
-
- // Add dynamic entries.
- addMapEntries(m, dyn, init)
-}
-
-func addMapEntries(m *Node, dyn []*Node, init *Nodes) {
- if len(dyn) == 0 {
return
}
-
- nerr := nerrors
+ // For a small number of entries, just add them directly.
// Build list of var[c] = expr.
- // Use temporaries so that mapassign1 can have addressable key, val.
+ // Use temporaries so that mapassign1 can have addressable key, elem.
// TODO(josharian): avoid map key temporaries for mapfast_* assignments with literal keys.
- key := temp(m.Type.Key())
- val := temp(m.Type.Elem())
+ tmpkey := temp(m.Type.Key())
+ tmpelem := temp(m.Type.Elem())
- for _, r := range dyn {
- index, value := r.Left, r.Right
+ for _, r := range entries {
+ index, elem := r.Left, r.Right
setlineno(index)
- a := nod(OAS, key, index)
+ a := nod(OAS, tmpkey, index)
a = typecheck(a, ctxStmt)
a = walkstmt(a)
init.Append(a)
- setlineno(value)
- a = nod(OAS, val, value)
+ setlineno(elem)
+ a = nod(OAS, tmpelem, elem)
a = typecheck(a, ctxStmt)
a = walkstmt(a)
init.Append(a)
- setlineno(val)
- a = nod(OAS, nod(OINDEX, m, key), val)
+ setlineno(tmpelem)
+ a = nod(OAS, nod(OINDEX, m, tmpkey), tmpelem)
a = typecheck(a, ctxStmt)
a = walkstmt(a)
init.Append(a)
-
- if nerr != nerrors {
- break
- }
}
- a := nod(OVARKILL, key, nil)
+ a = nod(OVARKILL, tmpkey, nil)
a = typecheck(a, ctxStmt)
init.Append(a)
- a = nod(OVARKILL, val, nil)
+ a = nod(OVARKILL, tmpelem, nil)
a = typecheck(a, ctxStmt)
init.Append(a)
}
@@ -1073,6 +1073,11 @@ func anylit(n *Node, var_ *Node, init *Nodes) {
default:
Fatalf("anylit: not lit, op=%v node=%v", n.Op, n)
+ case ONAME:
+ a := nod(OAS, var_, n)
+ a = typecheck(a, ctxStmt)
+ init.Append(a)
+
case OPTRLIT:
if !t.IsPtr() {
Fatalf("anylit: not ptr")
@@ -1242,12 +1247,12 @@ func stataddr(nam *Node, n *Node) bool {
return false
}
-func initplan(n *Node) {
- if initplans[n] != nil {
+func (s *InitSchedule) initplan(n *Node) {
+ if s.initplans[n] != nil {
return
}
p := new(InitPlan)
- initplans[n] = p
+ s.initplans[n] = p
switch n.Op {
default:
Fatalf("initplan")
@@ -1262,7 +1267,7 @@ func initplan(n *Node) {
}
a = a.Right
}
- addvalue(p, k*n.Type.Elem().Width, a)
+ s.addvalue(p, k*n.Type.Elem().Width, a)
k++
}
@@ -1271,7 +1276,10 @@ func initplan(n *Node) {
if a.Op != OSTRUCTKEY {
Fatalf("initplan structlit")
}
- addvalue(p, a.Xoffset, a.Left)
+ if a.Sym.IsBlank() {
+ continue
+ }
+ s.addvalue(p, a.Xoffset, a.Left)
}
case OMAPLIT:
@@ -1279,12 +1287,12 @@ func initplan(n *Node) {
if a.Op != OKEY {
Fatalf("initplan maplit")
}
- addvalue(p, -1, a.Right)
+ s.addvalue(p, -1, a.Right)
}
}
}
-func addvalue(p *InitPlan, xoffset int64, n *Node) {
+func (s *InitSchedule) addvalue(p *InitPlan, xoffset int64, n *Node) {
// special case: zero can be dropped entirely
if isZero(n) {
return
@@ -1292,8 +1300,8 @@ func addvalue(p *InitPlan, xoffset int64, n *Node) {
// special case: inline struct and array (not slice) literals
if isvaluelit(n) {
- initplan(n)
- q := initplans[n]
+ s.initplan(n)
+ q := s.initplans[n]
for _, qe := range q.E {
// qe is a copy; we are not modifying entries in q.E
qe.Xoffset += xoffset
diff --git a/src/cmd/compile/internal/gc/ssa.go b/src/cmd/compile/internal/gc/ssa.go
index c8befa40cd..cafff01ddc 100644
--- a/src/cmd/compile/internal/gc/ssa.go
+++ b/src/cmd/compile/internal/gc/ssa.go
@@ -76,14 +76,13 @@ func initssaconfig() {
growslice = sysfunc("growslice")
msanread = sysfunc("msanread")
msanwrite = sysfunc("msanwrite")
+ newobject = sysfunc("newobject")
newproc = sysfunc("newproc")
panicdivide = sysfunc("panicdivide")
panicdottypeE = sysfunc("panicdottypeE")
panicdottypeI = sysfunc("panicdottypeI")
- panicindex = sysfunc("panicindex")
panicnildottype = sysfunc("panicnildottype")
panicoverflow = sysfunc("panicoverflow")
- panicslice = sysfunc("panicslice")
panicshift = sysfunc("panicshift")
raceread = sysfunc("raceread")
racereadrange = sysfunc("racereadrange")
@@ -96,6 +95,61 @@ func initssaconfig() {
typedmemmove = sysfunc("typedmemmove")
Udiv = sysvar("udiv") // asm func with special ABI
writeBarrier = sysvar("writeBarrier") // struct { bool; ... }
+ zerobaseSym = sysvar("zerobase")
+
+ if thearch.LinkArch.Family == sys.Wasm {
+ BoundsCheckFunc[ssa.BoundsIndex] = sysvar("goPanicIndex")
+ BoundsCheckFunc[ssa.BoundsIndexU] = sysvar("goPanicIndexU")
+ BoundsCheckFunc[ssa.BoundsSliceAlen] = sysvar("goPanicSliceAlen")
+ BoundsCheckFunc[ssa.BoundsSliceAlenU] = sysvar("goPanicSliceAlenU")
+ BoundsCheckFunc[ssa.BoundsSliceAcap] = sysvar("goPanicSliceAcap")
+ BoundsCheckFunc[ssa.BoundsSliceAcapU] = sysvar("goPanicSliceAcapU")
+ BoundsCheckFunc[ssa.BoundsSliceB] = sysvar("goPanicSliceB")
+ BoundsCheckFunc[ssa.BoundsSliceBU] = sysvar("goPanicSliceBU")
+ BoundsCheckFunc[ssa.BoundsSlice3Alen] = sysvar("goPanicSlice3Alen")
+ BoundsCheckFunc[ssa.BoundsSlice3AlenU] = sysvar("goPanicSlice3AlenU")
+ BoundsCheckFunc[ssa.BoundsSlice3Acap] = sysvar("goPanicSlice3Acap")
+ BoundsCheckFunc[ssa.BoundsSlice3AcapU] = sysvar("goPanicSlice3AcapU")
+ BoundsCheckFunc[ssa.BoundsSlice3B] = sysvar("goPanicSlice3B")
+ BoundsCheckFunc[ssa.BoundsSlice3BU] = sysvar("goPanicSlice3BU")
+ BoundsCheckFunc[ssa.BoundsSlice3C] = sysvar("goPanicSlice3C")
+ BoundsCheckFunc[ssa.BoundsSlice3CU] = sysvar("goPanicSlice3CU")
+ } else {
+ BoundsCheckFunc[ssa.BoundsIndex] = sysvar("panicIndex")
+ BoundsCheckFunc[ssa.BoundsIndexU] = sysvar("panicIndexU")
+ BoundsCheckFunc[ssa.BoundsSliceAlen] = sysvar("panicSliceAlen")
+ BoundsCheckFunc[ssa.BoundsSliceAlenU] = sysvar("panicSliceAlenU")
+ BoundsCheckFunc[ssa.BoundsSliceAcap] = sysvar("panicSliceAcap")
+ BoundsCheckFunc[ssa.BoundsSliceAcapU] = sysvar("panicSliceAcapU")
+ BoundsCheckFunc[ssa.BoundsSliceB] = sysvar("panicSliceB")
+ BoundsCheckFunc[ssa.BoundsSliceBU] = sysvar("panicSliceBU")
+ BoundsCheckFunc[ssa.BoundsSlice3Alen] = sysvar("panicSlice3Alen")
+ BoundsCheckFunc[ssa.BoundsSlice3AlenU] = sysvar("panicSlice3AlenU")
+ BoundsCheckFunc[ssa.BoundsSlice3Acap] = sysvar("panicSlice3Acap")
+ BoundsCheckFunc[ssa.BoundsSlice3AcapU] = sysvar("panicSlice3AcapU")
+ BoundsCheckFunc[ssa.BoundsSlice3B] = sysvar("panicSlice3B")
+ BoundsCheckFunc[ssa.BoundsSlice3BU] = sysvar("panicSlice3BU")
+ BoundsCheckFunc[ssa.BoundsSlice3C] = sysvar("panicSlice3C")
+ BoundsCheckFunc[ssa.BoundsSlice3CU] = sysvar("panicSlice3CU")
+ }
+ if thearch.LinkArch.PtrSize == 4 {
+ ExtendCheckFunc[ssa.BoundsIndex] = sysvar("panicExtendIndex")
+ ExtendCheckFunc[ssa.BoundsIndexU] = sysvar("panicExtendIndexU")
+ ExtendCheckFunc[ssa.BoundsSliceAlen] = sysvar("panicExtendSliceAlen")
+ ExtendCheckFunc[ssa.BoundsSliceAlenU] = sysvar("panicExtendSliceAlenU")
+ ExtendCheckFunc[ssa.BoundsSliceAcap] = sysvar("panicExtendSliceAcap")
+ ExtendCheckFunc[ssa.BoundsSliceAcapU] = sysvar("panicExtendSliceAcapU")
+ ExtendCheckFunc[ssa.BoundsSliceB] = sysvar("panicExtendSliceB")
+ ExtendCheckFunc[ssa.BoundsSliceBU] = sysvar("panicExtendSliceBU")
+ ExtendCheckFunc[ssa.BoundsSlice3Alen] = sysvar("panicExtendSlice3Alen")
+ ExtendCheckFunc[ssa.BoundsSlice3AlenU] = sysvar("panicExtendSlice3AlenU")
+ ExtendCheckFunc[ssa.BoundsSlice3Acap] = sysvar("panicExtendSlice3Acap")
+ ExtendCheckFunc[ssa.BoundsSlice3AcapU] = sysvar("panicExtendSlice3AcapU")
+ ExtendCheckFunc[ssa.BoundsSlice3B] = sysvar("panicExtendSlice3B")
+ ExtendCheckFunc[ssa.BoundsSlice3BU] = sysvar("panicExtendSlice3BU")
+ ExtendCheckFunc[ssa.BoundsSlice3C] = sysvar("panicExtendSlice3C")
+ ExtendCheckFunc[ssa.BoundsSlice3CU] = sysvar("panicExtendSlice3CU")
+ }
// GO386=387 runtime definitions
ControlWord64trunc = sysvar("controlWord64trunc") // uint16
@@ -575,6 +629,11 @@ func (s *state) newValue4(op ssa.Op, t *types.Type, arg0, arg1, arg2, arg3 *ssa.
return s.curBlock.NewValue4(s.peekPos(), op, t, arg0, arg1, arg2, arg3)
}
+// newValue4 adds a new value with four arguments and an auxint value to the current block.
+func (s *state) newValue4I(op ssa.Op, t *types.Type, aux int64, arg0, arg1, arg2, arg3 *ssa.Value) *ssa.Value {
+ return s.curBlock.NewValue4I(s.peekPos(), op, t, aux, arg0, arg1, arg2, arg3)
+}
+
// entryNewValue0 adds a new value with no arguments to the entry block.
func (s *state) entryNewValue0(op ssa.Op, t *types.Type) *ssa.Value {
return s.f.Entry.NewValue0(src.NoXPos, op, t)
@@ -994,26 +1053,32 @@ func (s *state) stmt(n *Node) {
s.assign(n.Left, r, deref, skip)
case OIF:
- bThen := s.f.NewBlock(ssa.BlockPlain)
bEnd := s.f.NewBlock(ssa.BlockPlain)
- var bElse *ssa.Block
var likely int8
if n.Likely() {
likely = 1
}
+ var bThen *ssa.Block
+ if n.Nbody.Len() != 0 {
+ bThen = s.f.NewBlock(ssa.BlockPlain)
+ } else {
+ bThen = bEnd
+ }
+ var bElse *ssa.Block
if n.Rlist.Len() != 0 {
bElse = s.f.NewBlock(ssa.BlockPlain)
- s.condBranch(n.Left, bThen, bElse, likely)
} else {
- s.condBranch(n.Left, bThen, bEnd, likely)
+ bElse = bEnd
}
+ s.condBranch(n.Left, bThen, bElse, likely)
- s.startBlock(bThen)
- s.stmtList(n.Nbody)
- if b := s.endBlock(); b != nil {
- b.AddEdgeTo(bEnd)
+ if n.Nbody.Len() != 0 {
+ s.startBlock(bThen)
+ s.stmtList(n.Nbody)
+ if b := s.endBlock(); b != nil {
+ b.AddEdgeTo(bEnd)
+ }
}
-
if n.Rlist.Len() != 0 {
s.startBlock(bElse)
s.stmtList(n.Rlist)
@@ -1071,6 +1136,9 @@ func (s *state) stmt(n *Node) {
bIncr := s.f.NewBlock(ssa.BlockPlain)
bEnd := s.f.NewBlock(ssa.BlockPlain)
+ // ensure empty for loops have correct position; issue #30167
+ bBody.Pos = n.Pos
+
// first, jump to condition test (OFOR) or body (OFORUNTIL)
b := s.endBlock()
if n.Op == OFOR {
@@ -2026,7 +2094,7 @@ func (s *state) expr(n *Node) *ssa.Value {
addop := ssa.OpAdd64F
subop := ssa.OpSub64F
pt := floatForComplex(n.Type) // Could be Float32 or Float64
- wt := types.Types[TFLOAT64] // Compute in Float64 to minimize cancelation error
+ wt := types.Types[TFLOAT64] // Compute in Float64 to minimize cancellation error
areal := s.newValue1(ssa.OpComplexReal, pt, a)
breal := s.newValue1(ssa.OpComplexReal, pt, b)
@@ -2069,7 +2137,7 @@ func (s *state) expr(n *Node) *ssa.Value {
subop := ssa.OpSub64F
divop := ssa.OpDiv64F
pt := floatForComplex(n.Type) // Could be Float32 or Float64
- wt := types.Types[TFLOAT64] // Compute in Float64 to minimize cancelation error
+ wt := types.Types[TFLOAT64] // Compute in Float64 to minimize cancellation error
areal := s.newValue1(ssa.OpComplexReal, pt, a)
breal := s.newValue1(ssa.OpComplexReal, pt, b)
@@ -2208,7 +2276,7 @@ func (s *state) expr(n *Node) *ssa.Value {
case OADDR:
return s.addr(n.Left, n.Bounded())
- case OINDREGSP:
+ case ORESULT:
addr := s.constOffPtrSP(types.NewPtr(n.Type), n.Xoffset)
return s.load(n.Type, addr)
@@ -2253,11 +2321,8 @@ func (s *state) expr(n *Node) *ssa.Value {
}
a := s.expr(n.Left)
i := s.expr(n.Right)
- i = s.extendIndex(i, panicindex)
- if !n.Bounded() {
- len := s.newValue1(ssa.OpStringLen, types.Types[TINT], a)
- s.boundsCheck(i, len)
- }
+ len := s.newValue1(ssa.OpStringLen, types.Types[TINT], a)
+ i = s.boundsCheck(i, len, ssa.BoundsIndex, n.Bounded())
ptrtyp := s.f.Config.Types.BytePtr
ptr := s.newValue1(ssa.OpStringPtr, ptrtyp, a)
if Isconst(n.Right, CTINT) {
@@ -2279,14 +2344,12 @@ func (s *state) expr(n *Node) *ssa.Value {
// Bounds check will never succeed. Might as well
// use constants for the bounds check.
z := s.constInt(types.Types[TINT], 0)
- s.boundsCheck(z, z)
+ s.boundsCheck(z, z, ssa.BoundsIndex, false)
// The return value won't be live, return junk.
return s.newValue0(ssa.OpUnknown, n.Type)
}
- i = s.extendIndex(i, panicindex)
- if !n.Bounded() {
- s.boundsCheck(i, s.constInt(types.Types[TINT], bound))
- }
+ len := s.constInt(types.Types[TINT], bound)
+ i = s.boundsCheck(i, len, ssa.BoundsIndex, n.Bounded())
return s.newValue1I(ssa.OpArraySelect, n.Type, 0, a)
}
p := s.addr(n, false)
@@ -2344,15 +2407,15 @@ func (s *state) expr(n *Node) *ssa.Value {
var i, j, k *ssa.Value
low, high, max := n.SliceBounds()
if low != nil {
- i = s.extendIndex(s.expr(low), panicslice)
+ i = s.expr(low)
}
if high != nil {
- j = s.extendIndex(s.expr(high), panicslice)
+ j = s.expr(high)
}
if max != nil {
- k = s.extendIndex(s.expr(max), panicslice)
+ k = s.expr(max)
}
- p, l, c := s.slice(n.Left.Type, v, i, j, k, n.Bounded())
+ p, l, c := s.slice(v, i, j, k, n.Bounded())
return s.newValue3(ssa.OpSliceMake, n.Type, p, l, c)
case OSLICESTR:
@@ -2360,12 +2423,12 @@ func (s *state) expr(n *Node) *ssa.Value {
var i, j *ssa.Value
low, high, _ := n.SliceBounds()
if low != nil {
- i = s.extendIndex(s.expr(low), panicslice)
+ i = s.expr(low)
}
if high != nil {
- j = s.extendIndex(s.expr(high), panicslice)
+ j = s.expr(high)
}
- p, l, _ := s.slice(n.Left.Type, v, i, j, nil, n.Bounded())
+ p, l, _ := s.slice(v, i, j, nil, n.Bounded())
return s.newValue2(ssa.OpStringMake, n.Type, p, l)
case OCALLFUNC:
@@ -2393,6 +2456,14 @@ func (s *state) expr(n *Node) *ssa.Value {
}
return s.zeroVal(n.Type)
+ case ONEWOBJ:
+ if n.Type.Elem().Size() == 0 {
+ return s.newValue1A(ssa.OpAddr, n.Type, zerobaseSym, s.sb)
+ }
+ typ := s.expr(n.Left)
+ vv := s.rtcall(newobject, true, []*types.Type{n.Type}, typ)
+ return vv[0]
+
default:
s.Fatalf("unhandled expr %v", n.Op)
return nil
@@ -2661,6 +2732,8 @@ func (s *state) assign(left *Node, right *ssa.Value, deref bool, skip skipMask)
return
}
if left.Op == OINDEX && left.Left.Type.IsArray() {
+ s.pushLine(left.Pos)
+ defer s.popLine()
// We're assigning to an element of an ssa-able array.
// a[i] = v
t := left.Left.Type
@@ -2671,15 +2744,15 @@ func (s *state) assign(left *Node, right *ssa.Value, deref bool, skip skipMask)
// The bounds check must fail. Might as well
// ignore the actual index and just use zeros.
z := s.constInt(types.Types[TINT], 0)
- s.boundsCheck(z, z)
+ s.boundsCheck(z, z, ssa.BoundsIndex, false)
return
}
if n != 1 {
s.Fatalf("assigning to non-1-length array")
}
// Rewrite to a = [1]{v}
- i = s.extendIndex(i, panicindex)
- s.boundsCheck(i, s.constInt(types.Types[TINT], 1))
+ len := s.constInt(types.Types[TINT], 1)
+ i = s.boundsCheck(i, len, ssa.BoundsIndex, false)
v := s.newValue1(ssa.OpArrayMake1, t, right)
s.assign(left.Left, v, false, 0)
return
@@ -3000,6 +3073,13 @@ func init() {
return s.newValue1(ssa.OpSelect0, types.Types[TUINT32], v)
},
sys.AMD64, sys.ARM64, sys.S390X, sys.MIPS, sys.MIPS64, sys.PPC64)
+ addF("runtime/internal/atomic", "Load8",
+ func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
+ v := s.newValue2(ssa.OpAtomicLoad8, types.NewTuple(types.Types[TUINT8], types.TypeMem), args[0], s.mem())
+ s.vars[&memVar] = s.newValue1(ssa.OpSelect1, types.TypeMem, v)
+ return s.newValue1(ssa.OpSelect0, types.Types[TUINT8], v)
+ },
+ sys.AMD64, sys.ARM64, sys.S390X, sys.MIPS64, sys.PPC64)
addF("runtime/internal/atomic", "Load64",
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
v := s.newValue2(ssa.OpAtomicLoad64, types.NewTuple(types.Types[TUINT64], types.TypeMem), args[0], s.mem())
@@ -3181,22 +3261,22 @@ func init() {
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return s.newValue1(ssa.OpSqrt, types.Types[TFLOAT64], args[0])
},
- sys.I386, sys.AMD64, sys.ARM, sys.ARM64, sys.MIPS, sys.MIPS64, sys.PPC64, sys.S390X)
+ sys.I386, sys.AMD64, sys.ARM, sys.ARM64, sys.MIPS, sys.MIPS64, sys.PPC64, sys.S390X, sys.Wasm)
addF("math", "Trunc",
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return s.newValue1(ssa.OpTrunc, types.Types[TFLOAT64], args[0])
},
- sys.ARM64, sys.PPC64, sys.S390X)
+ sys.ARM64, sys.PPC64, sys.S390X, sys.Wasm)
addF("math", "Ceil",
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return s.newValue1(ssa.OpCeil, types.Types[TFLOAT64], args[0])
},
- sys.ARM64, sys.PPC64, sys.S390X)
+ sys.ARM64, sys.PPC64, sys.S390X, sys.Wasm)
addF("math", "Floor",
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return s.newValue1(ssa.OpFloor, types.Types[TFLOAT64], args[0])
},
- sys.ARM64, sys.PPC64, sys.S390X)
+ sys.ARM64, sys.PPC64, sys.S390X, sys.Wasm)
addF("math", "Round",
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return s.newValue1(ssa.OpRound, types.Types[TFLOAT64], args[0])
@@ -3206,17 +3286,17 @@ func init() {
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return s.newValue1(ssa.OpRoundToEven, types.Types[TFLOAT64], args[0])
},
- sys.ARM64, sys.S390X)
+ sys.ARM64, sys.S390X, sys.Wasm)
addF("math", "Abs",
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return s.newValue1(ssa.OpAbs, types.Types[TFLOAT64], args[0])
},
- sys.ARM64, sys.PPC64)
+ sys.ARM64, sys.PPC64, sys.Wasm)
addF("math", "Copysign",
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return s.newValue2(ssa.OpCopysign, types.Types[TFLOAT64], args[0], args[1])
},
- sys.PPC64)
+ sys.PPC64, sys.Wasm)
makeRoundAMD64 := func(op ssa.Op) func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
@@ -3266,12 +3346,12 @@ func init() {
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return s.newValue1(ssa.OpCtz64, types.Types[TINT], args[0])
},
- sys.AMD64, sys.ARM64, sys.ARM, sys.S390X, sys.MIPS, sys.PPC64)
+ sys.AMD64, sys.ARM64, sys.ARM, sys.S390X, sys.MIPS, sys.PPC64, sys.Wasm)
addF("math/bits", "TrailingZeros32",
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return s.newValue1(ssa.OpCtz32, types.Types[TINT], args[0])
},
- sys.AMD64, sys.ARM64, sys.ARM, sys.S390X, sys.MIPS, sys.PPC64)
+ sys.AMD64, sys.ARM64, sys.ARM, sys.S390X, sys.MIPS, sys.PPC64, sys.Wasm)
addF("math/bits", "TrailingZeros16",
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
x := s.newValue1(ssa.OpZeroExt16to32, types.Types[TUINT32], args[0])
@@ -3279,12 +3359,12 @@ func init() {
y := s.newValue2(ssa.OpOr32, types.Types[TUINT32], x, c)
return s.newValue1(ssa.OpCtz32, types.Types[TINT], y)
},
- sys.ARM, sys.MIPS)
+ sys.MIPS)
addF("math/bits", "TrailingZeros16",
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return s.newValue1(ssa.OpCtz16, types.Types[TINT], args[0])
},
- sys.AMD64)
+ sys.AMD64, sys.ARM, sys.ARM64, sys.Wasm)
addF("math/bits", "TrailingZeros16",
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
x := s.newValue1(ssa.OpZeroExt16to64, types.Types[TUINT64], args[0])
@@ -3292,7 +3372,7 @@ func init() {
y := s.newValue2(ssa.OpOr64, types.Types[TUINT64], x, c)
return s.newValue1(ssa.OpCtz64, types.Types[TINT], y)
},
- sys.ARM64, sys.S390X, sys.PPC64)
+ sys.S390X, sys.PPC64)
addF("math/bits", "TrailingZeros8",
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
x := s.newValue1(ssa.OpZeroExt8to32, types.Types[TUINT32], args[0])
@@ -3300,12 +3380,12 @@ func init() {
y := s.newValue2(ssa.OpOr32, types.Types[TUINT32], x, c)
return s.newValue1(ssa.OpCtz32, types.Types[TINT], y)
},
- sys.ARM, sys.MIPS)
+ sys.MIPS)
addF("math/bits", "TrailingZeros8",
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return s.newValue1(ssa.OpCtz8, types.Types[TINT], args[0])
},
- sys.AMD64)
+ sys.AMD64, sys.ARM, sys.ARM64, sys.Wasm)
addF("math/bits", "TrailingZeros8",
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
x := s.newValue1(ssa.OpZeroExt8to64, types.Types[TUINT64], args[0])
@@ -3313,7 +3393,7 @@ func init() {
y := s.newValue2(ssa.OpOr64, types.Types[TUINT64], x, c)
return s.newValue1(ssa.OpCtz64, types.Types[TINT], y)
},
- sys.ARM64, sys.S390X)
+ sys.S390X)
alias("math/bits", "ReverseBytes64", "runtime/internal/sys", "Bswap64", all...)
alias("math/bits", "ReverseBytes32", "runtime/internal/sys", "Bswap32", all...)
// ReverseBytes inlines correctly, no need to intrinsify it.
@@ -3322,12 +3402,12 @@ func init() {
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return s.newValue1(ssa.OpBitLen64, types.Types[TINT], args[0])
},
- sys.AMD64, sys.ARM64, sys.ARM, sys.S390X, sys.MIPS, sys.PPC64)
+ sys.AMD64, sys.ARM64, sys.ARM, sys.S390X, sys.MIPS, sys.PPC64, sys.Wasm)
addF("math/bits", "Len32",
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return s.newValue1(ssa.OpBitLen32, types.Types[TINT], args[0])
},
- sys.AMD64)
+ sys.AMD64, sys.ARM64)
addF("math/bits", "Len32",
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
if s.config.PtrSize == 4 {
@@ -3336,7 +3416,7 @@ func init() {
x := s.newValue1(ssa.OpZeroExt32to64, types.Types[TUINT64], args[0])
return s.newValue1(ssa.OpBitLen64, types.Types[TINT], x)
},
- sys.ARM64, sys.ARM, sys.S390X, sys.MIPS, sys.PPC64)
+ sys.ARM, sys.S390X, sys.MIPS, sys.PPC64, sys.Wasm)
addF("math/bits", "Len16",
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
if s.config.PtrSize == 4 {
@@ -3346,7 +3426,7 @@ func init() {
x := s.newValue1(ssa.OpZeroExt16to64, types.Types[TUINT64], args[0])
return s.newValue1(ssa.OpBitLen64, types.Types[TINT], x)
},
- sys.ARM64, sys.ARM, sys.S390X, sys.MIPS, sys.PPC64)
+ sys.ARM64, sys.ARM, sys.S390X, sys.MIPS, sys.PPC64, sys.Wasm)
addF("math/bits", "Len16",
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return s.newValue1(ssa.OpBitLen16, types.Types[TINT], args[0])
@@ -3361,7 +3441,7 @@ func init() {
x := s.newValue1(ssa.OpZeroExt8to64, types.Types[TUINT64], args[0])
return s.newValue1(ssa.OpBitLen64, types.Types[TINT], x)
},
- sys.ARM64, sys.ARM, sys.S390X, sys.MIPS, sys.PPC64)
+ sys.ARM64, sys.ARM, sys.S390X, sys.MIPS, sys.PPC64, sys.Wasm)
addF("math/bits", "Len8",
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return s.newValue1(ssa.OpBitLen8, types.Types[TINT], args[0])
@@ -3374,7 +3454,7 @@ func init() {
}
return s.newValue1(ssa.OpBitLen64, types.Types[TINT], args[0])
},
- sys.AMD64, sys.ARM64, sys.ARM, sys.S390X, sys.MIPS, sys.PPC64)
+ sys.AMD64, sys.ARM64, sys.ARM, sys.S390X, sys.MIPS, sys.PPC64, sys.Wasm)
// LeadingZeros is handled because it trivially calls Len.
addF("math/bits", "Reverse64",
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
@@ -3418,12 +3498,12 @@ func init() {
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return s.newValue2(ssa.OpRotateLeft32, types.Types[TUINT32], args[0], args[1])
},
- sys.AMD64, sys.ARM64, sys.S390X)
+ sys.AMD64, sys.ARM64, sys.S390X, sys.PPC64)
addF("math/bits", "RotateLeft64",
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return s.newValue2(ssa.OpRotateLeft64, types.Types[TUINT64], args[0], args[1])
},
- sys.AMD64, sys.ARM64, sys.S390X)
+ sys.AMD64, sys.ARM64, sys.S390X, sys.PPC64, sys.Wasm)
alias("math/bits", "RotateLeft", "math/bits", "RotateLeft64", p8...)
makeOnesCountAMD64 := func(op64 ssa.Op, op32 ssa.Op) func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
@@ -3467,7 +3547,7 @@ func init() {
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return s.newValue1(ssa.OpPopCount64, types.Types[TINT], args[0])
},
- sys.PPC64, sys.ARM64, sys.S390X)
+ sys.PPC64, sys.ARM64, sys.S390X, sys.Wasm)
addF("math/bits", "OnesCount32",
makeOnesCountAMD64(ssa.OpPopCount32, ssa.OpPopCount32),
sys.AMD64)
@@ -3475,7 +3555,7 @@ func init() {
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return s.newValue1(ssa.OpPopCount32, types.Types[TINT], args[0])
},
- sys.PPC64, sys.ARM64, sys.S390X)
+ sys.PPC64, sys.ARM64, sys.S390X, sys.Wasm)
addF("math/bits", "OnesCount16",
makeOnesCountAMD64(ssa.OpPopCount16, ssa.OpPopCount16),
sys.AMD64)
@@ -3483,12 +3563,12 @@ func init() {
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return s.newValue1(ssa.OpPopCount16, types.Types[TINT], args[0])
},
- sys.ARM64, sys.S390X, sys.PPC64)
+ sys.ARM64, sys.S390X, sys.PPC64, sys.Wasm)
addF("math/bits", "OnesCount8",
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return s.newValue1(ssa.OpPopCount8, types.Types[TINT], args[0])
},
- sys.S390X, sys.PPC64)
+ sys.S390X, sys.PPC64, sys.Wasm)
addF("math/bits", "OnesCount",
makeOnesCountAMD64(ssa.OpPopCount64, ssa.OpPopCount32),
sys.AMD64)
@@ -3502,14 +3582,14 @@ func init() {
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return s.newValue3(ssa.OpAdd64carry, types.NewTuple(types.Types[TUINT64], types.Types[TUINT64]), args[0], args[1], args[2])
},
- sys.AMD64)
- alias("math/bits", "Add", "math/bits", "Add64", sys.ArchAMD64)
+ sys.AMD64, sys.ARM64, sys.PPC64, sys.S390X)
+ alias("math/bits", "Add", "math/bits", "Add64", sys.ArchAMD64, sys.ArchARM64, sys.ArchPPC64, sys.ArchS390X)
addF("math/bits", "Sub64",
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
return s.newValue3(ssa.OpSub64borrow, types.NewTuple(types.Types[TUINT64], types.Types[TUINT64]), args[0], args[1], args[2])
},
- sys.AMD64)
- alias("math/bits", "Sub", "math/bits", "Sub64", sys.ArchAMD64)
+ sys.AMD64, sys.ARM64, sys.S390X)
+ alias("math/bits", "Sub", "math/bits", "Sub64", sys.ArchAMD64, sys.ArchARM64, sys.ArchS390X)
addF("math/bits", "Div64",
func(s *state, n *Node, args []*ssa.Value) *ssa.Value {
// check for divide-by-zero/overflow and panic with appropriate message
@@ -3823,6 +3903,11 @@ func etypesign(e types.EType) int8 {
// If bounded is true then this address does not require a nil check for its operand
// even if that would otherwise be implied.
func (s *state) addr(n *Node, bounded bool) *ssa.Value {
+ if n.Op != ONAME {
+ s.pushLine(n.Pos)
+ defer s.popLine()
+ }
+
t := types.NewPtr(n.Type)
switch n.Op {
case ONAME:
@@ -3858,29 +3943,22 @@ func (s *state) addr(n *Node, bounded bool) *ssa.Value {
s.Fatalf("variable address class %v not implemented", n.Class())
return nil
}
- case OINDREGSP:
- // indirect off REGSP
- // used for storing/loading arguments/returns to/from callees
+ case ORESULT:
+ // load return from callee
return s.constOffPtrSP(t, n.Xoffset)
case OINDEX:
if n.Left.Type.IsSlice() {
a := s.expr(n.Left)
i := s.expr(n.Right)
- i = s.extendIndex(i, panicindex)
len := s.newValue1(ssa.OpSliceLen, types.Types[TINT], a)
- if !n.Bounded() {
- s.boundsCheck(i, len)
- }
+ i = s.boundsCheck(i, len, ssa.BoundsIndex, n.Bounded())
p := s.newValue1(ssa.OpSlicePtr, t, a)
return s.newValue2(ssa.OpPtrIndex, t, p, i)
} else { // array
a := s.addr(n.Left, bounded)
i := s.expr(n.Right)
- i = s.extendIndex(i, panicindex)
len := s.constInt(types.Types[TINT], n.Left.Type.NumElem())
- if !n.Bounded() {
- s.boundsCheck(i, len)
- }
+ i = s.boundsCheck(i, len, ssa.BoundsIndex, n.Bounded())
return s.newValue2(ssa.OpPtrIndex, types.NewPtr(n.Left.Type.Elem()), a, i)
}
case ODEREF:
@@ -4019,51 +4097,70 @@ func (s *state) nilCheck(ptr *ssa.Value) {
s.newValue2(ssa.OpNilCheck, types.TypeVoid, ptr, s.mem())
}
-// boundsCheck generates bounds checking code. Checks if 0 <= idx < len, branches to exit if not.
+// boundsCheck generates bounds checking code. Checks if 0 <= idx <[=] len, branches to exit if not.
// Starts a new block on return.
-// idx is already converted to full int width.
-func (s *state) boundsCheck(idx, len *ssa.Value) {
- if Debug['B'] != 0 {
- return
+// On input, len must be converted to full int width and be nonnegative.
+// Returns idx converted to full int width.
+// If bounded is true then caller guarantees the index is not out of bounds
+// (but boundsCheck will still extend the index to full int width).
+func (s *state) boundsCheck(idx, len *ssa.Value, kind ssa.BoundsKind, bounded bool) *ssa.Value {
+ idx = s.extendIndex(idx, len, kind, bounded)
+
+ if bounded || Debug['B'] != 0 {
+ // If bounded or bounds checking is flag-disabled, then no check necessary,
+ // just return the extended index.
+ return idx
}
- // bounds check
- cmp := s.newValue2(ssa.OpIsInBounds, types.Types[TBOOL], idx, len)
- s.check(cmp, panicindex)
-}
+ bNext := s.f.NewBlock(ssa.BlockPlain)
+ bPanic := s.f.NewBlock(ssa.BlockExit)
-func couldBeNegative(v *ssa.Value) bool {
- switch v.Op {
- case ssa.OpSliceLen, ssa.OpSliceCap, ssa.OpStringLen:
- return false
- case ssa.OpConst64:
- return v.AuxInt < 0
- case ssa.OpConst32:
- return int32(v.AuxInt) < 0
- }
- return true
-}
-
-// sliceBoundsCheck generates slice bounds checking code. Checks if 0 <= idx <= len, branches to exit if not.
-// Starts a new block on return.
-// idx and len are already converted to full int width.
-func (s *state) sliceBoundsCheck(idx, len *ssa.Value) {
- if Debug['B'] != 0 {
- return
- }
- if couldBeNegative(len) {
- // OpIsSliceInBounds requires second arg not negative; if it's not obviously true, must check.
- cmpop := ssa.OpGeq64
- if len.Type.Size() == 4 {
- cmpop = ssa.OpGeq32
+ if !idx.Type.IsSigned() {
+ switch kind {
+ case ssa.BoundsIndex:
+ kind = ssa.BoundsIndexU
+ case ssa.BoundsSliceAlen:
+ kind = ssa.BoundsSliceAlenU
+ case ssa.BoundsSliceAcap:
+ kind = ssa.BoundsSliceAcapU
+ case ssa.BoundsSliceB:
+ kind = ssa.BoundsSliceBU
+ case ssa.BoundsSlice3Alen:
+ kind = ssa.BoundsSlice3AlenU
+ case ssa.BoundsSlice3Acap:
+ kind = ssa.BoundsSlice3AcapU
+ case ssa.BoundsSlice3B:
+ kind = ssa.BoundsSlice3BU
+ case ssa.BoundsSlice3C:
+ kind = ssa.BoundsSlice3CU
}
- cmp := s.newValue2(cmpop, types.Types[TBOOL], len, s.zeroVal(len.Type))
- s.check(cmp, panicslice)
}
- // bounds check
- cmp := s.newValue2(ssa.OpIsSliceInBounds, types.Types[TBOOL], idx, len)
- s.check(cmp, panicslice)
+ var cmp *ssa.Value
+ if kind == ssa.BoundsIndex || kind == ssa.BoundsIndexU {
+ cmp = s.newValue2(ssa.OpIsInBounds, types.Types[TBOOL], idx, len)
+ } else {
+ cmp = s.newValue2(ssa.OpIsSliceInBounds, types.Types[TBOOL], idx, len)
+ }
+ b := s.endBlock()
+ b.Kind = ssa.BlockIf
+ b.SetControl(cmp)
+ b.Likely = ssa.BranchLikely
+ b.AddEdgeTo(bNext)
+ b.AddEdgeTo(bPanic)
+
+ s.startBlock(bPanic)
+ if thearch.LinkArch.Family == sys.Wasm {
+ // TODO(khr): figure out how to do "register" based calling convention for bounds checks.
+ // Should be similar to gcWriteBarrier, but I can't make it work.
+ s.rtcall(BoundsCheckFunc[kind], false, nil, idx, len)
+ } else {
+ mem := s.newValue3I(ssa.OpPanicBounds, types.TypeMem, int64(kind), idx, len, s.mem())
+ s.endBlock().SetControl(mem)
+ }
+ s.startBlock(bNext)
+
+ return idx
}
// If cmp (a bool) is false, panic using the given function.
@@ -4275,35 +4372,25 @@ func (s *state) storeArg(n *Node, t *types.Type, off int64) {
// slice computes the slice v[i:j:k] and returns ptr, len, and cap of result.
// i,j,k may be nil, in which case they are set to their default value.
-// t is a slice, ptr to array, or string type.
-func (s *state) slice(t *types.Type, v, i, j, k *ssa.Value, bounded bool) (p, l, c *ssa.Value) {
- var elemtype *types.Type
- var ptrtype *types.Type
- var ptr *ssa.Value
- var len *ssa.Value
- var cap *ssa.Value
- zero := s.constInt(types.Types[TINT], 0)
+// v may be a slice, string or pointer to an array.
+func (s *state) slice(v, i, j, k *ssa.Value, bounded bool) (p, l, c *ssa.Value) {
+ t := v.Type
+ var ptr, len, cap *ssa.Value
switch {
case t.IsSlice():
- elemtype = t.Elem()
- ptrtype = types.NewPtr(elemtype)
- ptr = s.newValue1(ssa.OpSlicePtr, ptrtype, v)
+ ptr = s.newValue1(ssa.OpSlicePtr, types.NewPtr(t.Elem()), v)
len = s.newValue1(ssa.OpSliceLen, types.Types[TINT], v)
cap = s.newValue1(ssa.OpSliceCap, types.Types[TINT], v)
case t.IsString():
- elemtype = types.Types[TUINT8]
- ptrtype = types.NewPtr(elemtype)
- ptr = s.newValue1(ssa.OpStringPtr, ptrtype, v)
+ ptr = s.newValue1(ssa.OpStringPtr, types.NewPtr(types.Types[TUINT8]), v)
len = s.newValue1(ssa.OpStringLen, types.Types[TINT], v)
cap = len
case t.IsPtr():
if !t.Elem().IsArray() {
s.Fatalf("bad ptr to array in slice %v\n", t)
}
- elemtype = t.Elem().Elem()
- ptrtype = types.NewPtr(elemtype)
s.nilCheck(v)
- ptr = v
+ ptr = s.newValue1(ssa.OpCopy, types.NewPtr(t.Elem().Elem()), v)
len = s.constInt(types.Types[TINT], t.Elem().NumElem())
cap = len
default:
@@ -4312,67 +4399,90 @@ func (s *state) slice(t *types.Type, v, i, j, k *ssa.Value, bounded bool) (p, l,
// Set default values
if i == nil {
- i = zero
+ i = s.constInt(types.Types[TINT], 0)
}
if j == nil {
j = len
}
+ three := true
if k == nil {
+ three = false
k = cap
}
- if !bounded {
- // Panic if slice indices are not in bounds.
- s.sliceBoundsCheck(i, j)
- if j != k {
- s.sliceBoundsCheck(j, k)
- }
+ // Panic if slice indices are not in bounds.
+ // Make sure we check these in reverse order so that we're always
+ // comparing against a value known to be nonnegative. See issue 28797.
+ if three {
if k != cap {
- s.sliceBoundsCheck(k, cap)
+ kind := ssa.BoundsSlice3Alen
+ if t.IsSlice() {
+ kind = ssa.BoundsSlice3Acap
+ }
+ k = s.boundsCheck(k, cap, kind, bounded)
}
+ if j != k {
+ j = s.boundsCheck(j, k, ssa.BoundsSlice3B, bounded)
+ }
+ i = s.boundsCheck(i, j, ssa.BoundsSlice3C, bounded)
+ } else {
+ if j != k {
+ kind := ssa.BoundsSliceAlen
+ if t.IsSlice() {
+ kind = ssa.BoundsSliceAcap
+ }
+ j = s.boundsCheck(j, k, kind, bounded)
+ }
+ i = s.boundsCheck(i, j, ssa.BoundsSliceB, bounded)
}
- // Generate the following code assuming that indexes are in bounds.
- // The masking is to make sure that we don't generate a slice
- // that points to the next object in memory.
- // rlen = j - i
- // rcap = k - i
- // delta = i * elemsize
- // rptr = p + delta&mask(rcap)
- // result = (SliceMake rptr rlen rcap)
- // where mask(x) is 0 if x==0 and -1 if x>0.
+ // Word-sized integer operations.
subOp := s.ssaOp(OSUB, types.Types[TINT])
mulOp := s.ssaOp(OMUL, types.Types[TINT])
andOp := s.ssaOp(OAND, types.Types[TINT])
+
+ // Calculate the length (rlen) and capacity (rcap) of the new slice.
+ // For strings the capacity of the result is unimportant. However,
+ // we use rcap to test if we've generated a zero-length slice.
+ // Use length of strings for that.
rlen := s.newValue2(subOp, types.Types[TINT], j, i)
- var rcap *ssa.Value
- switch {
- case t.IsString():
- // Capacity of the result is unimportant. However, we use
- // rcap to test if we've generated a zero-length slice.
- // Use length of strings for that.
- rcap = rlen
- case j == k:
- rcap = rlen
- default:
+ rcap := rlen
+ if j != k && !t.IsString() {
rcap = s.newValue2(subOp, types.Types[TINT], k, i)
}
- var rptr *ssa.Value
if (i.Op == ssa.OpConst64 || i.Op == ssa.OpConst32) && i.AuxInt == 0 {
// No pointer arithmetic necessary.
- rptr = ptr
- } else {
- // delta = # of bytes to offset pointer by.
- delta := s.newValue2(mulOp, types.Types[TINT], i, s.constInt(types.Types[TINT], elemtype.Width))
- // If we're slicing to the point where the capacity is zero,
- // zero out the delta.
- mask := s.newValue1(ssa.OpSlicemask, types.Types[TINT], rcap)
- delta = s.newValue2(andOp, types.Types[TINT], delta, mask)
- // Compute rptr = ptr + delta
- rptr = s.newValue2(ssa.OpAddPtr, ptrtype, ptr, delta)
+ return ptr, rlen, rcap
}
+ // Calculate the base pointer (rptr) for the new slice.
+ //
+ // Generate the following code assuming that indexes are in bounds.
+ // The masking is to make sure that we don't generate a slice
+ // that points to the next object in memory. We cannot just set
+ // the pointer to nil because then we would create a nil slice or
+ // string.
+ //
+ // rcap = k - i
+ // rlen = j - i
+ // rptr = ptr + (mask(rcap) & (i * stride))
+ //
+ // Where mask(x) is 0 if x==0 and -1 if x>0 and stride is the width
+ // of the element type.
+ stride := s.constInt(types.Types[TINT], ptr.Type.Elem().Width)
+
+ // The delta is the number of bytes to offset ptr by.
+ delta := s.newValue2(mulOp, types.Types[TINT], i, stride)
+
+ // If we're slicing to the point where the capacity is zero,
+ // zero out the delta.
+ mask := s.newValue1(ssa.OpSlicemask, types.Types[TINT], rcap)
+ delta = s.newValue2(andOp, types.Types[TINT], delta, mask)
+
+ // Compute rptr = ptr + delta.
+ rptr := s.newValue2(ssa.OpAddPtr, ptr.Type, ptr, delta)
+
return rptr, rlen, rcap
}
@@ -4594,7 +4704,7 @@ var f32_u64 = f2uCvtTab{
or: ssa.OpOr64,
floatValue: (*state).constFloat32,
intValue: (*state).constInt64,
- cutoff: 9223372036854775808,
+ cutoff: 1 << 63,
}
var f64_u64 = f2uCvtTab{
@@ -4604,7 +4714,7 @@ var f64_u64 = f2uCvtTab{
or: ssa.OpOr64,
floatValue: (*state).constFloat64,
intValue: (*state).constInt64,
- cutoff: 9223372036854775808,
+ cutoff: 1 << 63,
}
var f32_u32 = f2uCvtTab{
@@ -4614,7 +4724,7 @@ var f32_u32 = f2uCvtTab{
or: ssa.OpOr32,
floatValue: (*state).constFloat32,
intValue: func(s *state, t *types.Type, v int64) *ssa.Value { return s.constInt32(t, int32(v)) },
- cutoff: 2147483648,
+ cutoff: 1 << 31,
}
var f64_u32 = f2uCvtTab{
@@ -4624,7 +4734,7 @@ var f64_u32 = f2uCvtTab{
or: ssa.OpOr32,
floatValue: (*state).constFloat64,
intValue: func(s *state, t *types.Type, v int64) *ssa.Value { return s.constInt32(t, int32(v)) },
- cutoff: 2147483648,
+ cutoff: 1 << 31,
}
func (s *state) float32ToUint64(n *Node, x *ssa.Value, ft, tt *types.Type) *ssa.Value {
@@ -5138,6 +5248,16 @@ func genssa(f *ssa.Func, pp *Progs) {
}
}
+ // inlMarks has an entry for each Prog that implements an inline mark.
+ // It maps from that Prog to the global inlining id of the inlined body
+ // which should unwind to this Prog's location.
+ var inlMarks map[*obj.Prog]int32
+ var inlMarkList []*obj.Prog
+
+ // inlMarksByPos maps from a (column 1) source position to the set of
+ // Progs that are in the set above and have that source position.
+ var inlMarksByPos map[src.XPos][]*obj.Prog
+
// Emit basic blocks
for i, b := range f.Blocks {
s.bstart[b.ID] = s.pp.next
@@ -5175,8 +5295,14 @@ func genssa(f *ssa.Func, pp *Progs) {
}
case ssa.OpInlMark:
p := thearch.Ginsnop(s.pp)
- pp.curfn.Func.lsym.Func.AddInlMark(p, v.AuxInt32())
- // TODO: if matching line number, merge somehow with previous instruction?
+ if inlMarks == nil {
+ inlMarks = map[*obj.Prog]int32{}
+ inlMarksByPos = map[src.XPos][]*obj.Prog{}
+ }
+ inlMarks[p] = v.AuxInt32()
+ inlMarkList = append(inlMarkList, p)
+ pos := v.Pos.AtColumn1()
+ inlMarksByPos[pos] = append(inlMarksByPos[pos], p)
default:
// let the backend handle it
@@ -5198,6 +5324,12 @@ func genssa(f *ssa.Func, pp *Progs) {
}
}
}
+ // If this is an empty infinite loop, stick a hardware NOP in there so that debuggers are less confused.
+ if s.bstart[b.ID] == s.pp.next && len(b.Succs) == 1 && b.Succs[0].Block() == b {
+ p := thearch.Ginsnop(s.pp)
+ p.Pos = p.Pos.WithIsStmt()
+ b.Pos = b.Pos.WithBogusLine() // Debuggers are not good about infinite loops, force a change in line number
+ }
// Emit control flow instructions for block
var next *ssa.Block
if i < len(f.Blocks)-1 && Debug['N'] == 0 {
@@ -5216,6 +5348,58 @@ func genssa(f *ssa.Func, pp *Progs) {
}
}
}
+ if f.Blocks[len(f.Blocks)-1].Kind == ssa.BlockExit {
+ // We need the return address of a panic call to
+ // still be inside the function in question. So if
+ // it ends in a call which doesn't return, add a
+ // nop (which will never execute) after the call.
+ thearch.Ginsnop(pp)
+ }
+
+ if inlMarks != nil {
+ // We have some inline marks. Try to find other instructions we're
+ // going to emit anyway, and use those instructions instead of the
+ // inline marks.
+ for p := pp.Text; p != nil; p = p.Link {
+ if p.As == obj.ANOP || p.As == obj.AFUNCDATA || p.As == obj.APCDATA || p.As == obj.ATEXT || p.As == obj.APCALIGN || thearch.LinkArch.Family == sys.Wasm {
+ // Don't use 0-sized instructions as inline marks, because we need
+ // to identify inline mark instructions by pc offset.
+ // (Some of these instructions are sometimes zero-sized, sometimes not.
+ // We must not use anything that even might be zero-sized.)
+ // TODO: are there others?
+ continue
+ }
+ if _, ok := inlMarks[p]; ok {
+ // Don't use inline marks themselves. We don't know
+ // whether they will be zero-sized or not yet.
+ continue
+ }
+ pos := p.Pos.AtColumn1()
+ s := inlMarksByPos[pos]
+ if len(s) == 0 {
+ continue
+ }
+ for _, m := range s {
+ // We found an instruction with the same source position as
+ // some of the inline marks.
+ // Use this instruction instead.
+ p.Pos = p.Pos.WithIsStmt() // promote position to a statement
+ pp.curfn.Func.lsym.Func.AddInlMark(p, inlMarks[m])
+ // Make the inline mark a real nop, so it doesn't generate any code.
+ m.As = obj.ANOP
+ m.Pos = src.NoXPos
+ m.From = obj.Addr{}
+ m.To = obj.Addr{}
+ }
+ delete(inlMarksByPos, pos)
+ }
+ // Any unmatched inline marks now need to be added to the inlining tree (and will generate a nop instruction).
+ for _, p := range inlMarkList {
+ if p.As != obj.ANOP {
+ pp.curfn.Func.lsym.Func.AddInlMark(p, inlMarks[p])
+ }
+ }
+ }
if Ctxt.Flag_locationlists {
e.curfn.Func.DebugInfo = ssa.BuildFuncDebug(Ctxt, f, Debug_locationlist > 1, stackOffset)
@@ -5244,7 +5428,10 @@ func genssa(f *ssa.Func, pp *Progs) {
br.P.To.Val = s.bstart[br.B.ID]
if br.P.Pos.IsStmt() != src.PosIsStmt {
br.P.Pos = br.P.Pos.WithNotStmt()
+ } else if v0 := br.B.FirstPossibleStmtValue(); v0 != nil && v0.Pos.Line() == br.P.Pos.Line() && v0.Pos.IsStmt() == src.PosIsStmt {
+ br.P.Pos = br.P.Pos.WithNotStmt()
}
+
}
if e.log { // spew to stdout
@@ -5437,26 +5624,66 @@ func AddAux2(a *obj.Addr, v *ssa.Value, offset int64) {
}
// extendIndex extends v to a full int width.
-// panic using the given function if v does not fit in an int (only on 32-bit archs).
-func (s *state) extendIndex(v *ssa.Value, panicfn *obj.LSym) *ssa.Value {
- size := v.Type.Size()
+// panic with the given kind if v does not fit in an int (only on 32-bit archs).
+func (s *state) extendIndex(idx, len *ssa.Value, kind ssa.BoundsKind, bounded bool) *ssa.Value {
+ size := idx.Type.Size()
if size == s.config.PtrSize {
- return v
+ return idx
}
if size > s.config.PtrSize {
// truncate 64-bit indexes on 32-bit pointer archs. Test the
// high word and branch to out-of-bounds failure if it is not 0.
- if Debug['B'] == 0 {
- hi := s.newValue1(ssa.OpInt64Hi, types.Types[TUINT32], v)
- cmp := s.newValue2(ssa.OpEq32, types.Types[TBOOL], hi, s.constInt32(types.Types[TUINT32], 0))
- s.check(cmp, panicfn)
+ var lo *ssa.Value
+ if idx.Type.IsSigned() {
+ lo = s.newValue1(ssa.OpInt64Lo, types.Types[TINT], idx)
+ } else {
+ lo = s.newValue1(ssa.OpInt64Lo, types.Types[TUINT], idx)
}
- return s.newValue1(ssa.OpTrunc64to32, types.Types[TINT], v)
+ if bounded || Debug['B'] != 0 {
+ return lo
+ }
+ bNext := s.f.NewBlock(ssa.BlockPlain)
+ bPanic := s.f.NewBlock(ssa.BlockExit)
+ hi := s.newValue1(ssa.OpInt64Hi, types.Types[TUINT32], idx)
+ cmp := s.newValue2(ssa.OpEq32, types.Types[TBOOL], hi, s.constInt32(types.Types[TUINT32], 0))
+ if !idx.Type.IsSigned() {
+ switch kind {
+ case ssa.BoundsIndex:
+ kind = ssa.BoundsIndexU
+ case ssa.BoundsSliceAlen:
+ kind = ssa.BoundsSliceAlenU
+ case ssa.BoundsSliceAcap:
+ kind = ssa.BoundsSliceAcapU
+ case ssa.BoundsSliceB:
+ kind = ssa.BoundsSliceBU
+ case ssa.BoundsSlice3Alen:
+ kind = ssa.BoundsSlice3AlenU
+ case ssa.BoundsSlice3Acap:
+ kind = ssa.BoundsSlice3AcapU
+ case ssa.BoundsSlice3B:
+ kind = ssa.BoundsSlice3BU
+ case ssa.BoundsSlice3C:
+ kind = ssa.BoundsSlice3CU
+ }
+ }
+ b := s.endBlock()
+ b.Kind = ssa.BlockIf
+ b.SetControl(cmp)
+ b.Likely = ssa.BranchLikely
+ b.AddEdgeTo(bNext)
+ b.AddEdgeTo(bPanic)
+
+ s.startBlock(bPanic)
+ mem := s.newValue4I(ssa.OpPanicExtend, types.TypeMem, int64(kind), hi, lo, len, s.mem())
+ s.endBlock().SetControl(mem)
+ s.startBlock(bNext)
+
+ return lo
}
// Extend value to the required size
var op ssa.Op
- if v.Type.IsSigned() {
+ if idx.Type.IsSigned() {
switch 10*size + s.config.PtrSize {
case 14:
op = ssa.OpSignExt8to32
@@ -5469,7 +5696,7 @@ func (s *state) extendIndex(v *ssa.Value, panicfn *obj.LSym) *ssa.Value {
case 48:
op = ssa.OpSignExt32to64
default:
- s.Fatalf("bad signed index extension %s", v.Type)
+ s.Fatalf("bad signed index extension %s", idx.Type)
}
} else {
switch 10*size + s.config.PtrSize {
@@ -5484,10 +5711,10 @@ func (s *state) extendIndex(v *ssa.Value, panicfn *obj.LSym) *ssa.Value {
case 48:
op = ssa.OpZeroExt32to64
default:
- s.Fatalf("bad unsigned index extension %s", v.Type)
+ s.Fatalf("bad unsigned index extension %s", idx.Type)
}
}
- return s.newValue1(op, types.Types[TINT], v)
+ return s.newValue1(op, types.Types[TINT], idx)
}
// CheckLoweredPhi checks that regalloc and stackalloc correctly handled phi values.
@@ -5617,6 +5844,14 @@ func (s *SSAGenState) PrepareCall(v *ssa.Value) {
}
}
+// UseArgs records the fact that an instruction needs a certain amount of
+// callee args space for its use.
+func (s *SSAGenState) UseArgs(n int64) {
+ if s.maxarg < n {
+ s.maxarg = n
+ }
+}
+
// fieldIdx finds the index of the field referred to by the ODOT node n.
func fieldIdx(n *Node) int {
t := n.Left.Type
diff --git a/src/cmd/compile/internal/gc/subr.go b/src/cmd/compile/internal/gc/subr.go
index 775147bff7..f3ec21c7cb 100644
--- a/src/cmd/compile/internal/gc/subr.go
+++ b/src/cmd/compile/internal/gc/subr.go
@@ -159,9 +159,7 @@ func yyerror(format string, args ...interface{}) {
}
func Warn(fmt_ string, args ...interface{}) {
- adderr(lineno, fmt_, args...)
-
- hcrash()
+ Warnl(lineno, fmt_, args...)
}
func Warnl(line src.XPos, fmt_ string, args ...interface{}) {
@@ -306,20 +304,20 @@ func nodl(pos src.XPos, op Op, nleft, nright *Node) *Node {
switch op {
case OCLOSURE, ODCLFUNC:
var x struct {
- Node
- Func
+ n Node
+ f Func
}
- n = &x.Node
- n.Func = &x.Func
+ n = &x.n
+ n.Func = &x.f
case ONAME:
Fatalf("use newname instead")
case OLABEL, OPACK:
var x struct {
- Node
- Name
+ n Node
+ m Name
}
- n = &x.Node
- n.Name = &x.Name
+ n = &x.n
+ n.Name = &x.m
default:
n = new(Node)
}
@@ -347,13 +345,13 @@ func newnamel(pos src.XPos, s *types.Sym) *Node {
}
var x struct {
- Node
- Name
- Param
+ n Node
+ m Name
+ p Param
}
- n := &x.Node
- n.Name = &x.Name
- n.Name.Param = &x.Param
+ n := &x.n
+ n.Name = &x.m
+ n.Name.Param = &x.p
n.Op = ONAME
n.Pos = pos
@@ -416,12 +414,6 @@ func nodintconst(v int64) *Node {
return nodlit(Val{u})
}
-func nodfltconst(v *Mpflt) *Node {
- u := newMpflt()
- u.Set(v)
- return nodlit(Val{u})
-}
-
func nodnil() *Node {
return nodlit(Val{new(NilVal)})
}
@@ -435,10 +427,9 @@ func nodstr(s string) *Node {
}
// treecopy recursively copies n, with the exception of
-// ONAME, OLITERAL, OTYPE, and non-iota ONONAME leaves.
-// Copies of iota ONONAME nodes are assigned the current
-// value of iota_. If pos.IsKnown(), it sets the source
-// position of newly allocated nodes to pos.
+// ONAME, OLITERAL, OTYPE, and ONONAME leaves.
+// If pos.IsKnown(), it sets the source position of newly
+// allocated nodes to pos.
func treecopy(n *Node, pos src.XPos) *Node {
if n == nil {
return nil
@@ -1581,7 +1572,7 @@ func genwrapper(rcvr *types.Type, method *types.Field, newnam *types.Sym) {
if rcvr.IsPtr() && rcvr.Elem() == method.Type.Recv().Type && rcvr.Elem().Sym != nil {
inlcalls(fn)
}
- escAnalyze([]*Node{fn}, false)
+ escapeImpl()([]*Node{fn}, false)
Curfn = nil
funccompile(fn)
diff --git a/src/cmd/compile/internal/gc/swt.go b/src/cmd/compile/internal/gc/swt.go
index 70fc66bf57..6a41885954 100644
--- a/src/cmd/compile/internal/gc/swt.go
+++ b/src/cmd/compile/internal/gc/swt.go
@@ -184,18 +184,11 @@ func typecheckswitch(n *Node) {
}
}
- if n.Type == nil || n.Type.IsUntyped() {
- // if the value we're switching on has no type or is untyped,
- // we've already printed an error and don't need to continue
- // typechecking the body
- return
- }
-
if top == Etype {
ll := ncase.List
if ncase.Rlist.Len() != 0 {
nvar := ncase.Rlist.First()
- if ll.Len() == 1 && ll.First().Type != nil && !ll.First().Type.IsKind(TNIL) {
+ if ll.Len() == 1 && (ll.First().Type == nil || !ll.First().Type.IsKind(TNIL)) {
// single entry type switch
nvar.Type = ll.First().Type
} else {
@@ -203,6 +196,13 @@ func typecheckswitch(n *Node) {
nvar.Type = n.Type
}
+ if nvar.Type == nil || nvar.Type.IsUntyped() {
+ // if the value we're switching on has no type or is untyped,
+ // we've already printed an error and don't need to continue
+ // typechecking the body
+ continue
+ }
+
nvar = typecheck(nvar, ctxExpr|ctxAssign)
ncase.Rlist.SetFirst(nvar)
}
diff --git a/src/cmd/compile/internal/gc/syntax.go b/src/cmd/compile/internal/gc/syntax.go
index 5f07c6c52a..12bc9c3ae6 100644
--- a/src/cmd/compile/internal/gc/syntax.go
+++ b/src/cmd/compile/internal/gc/syntax.go
@@ -43,7 +43,7 @@ type Node struct {
// Various. Usually an offset into a struct. For example:
// - ONAME nodes that refer to local variables use it to identify their stack frame position.
- // - ODOT, ODOTPTR, and OINDREGSP use it to indicate offset relative to their base address.
+ // - ODOT, ODOTPTR, and ORESULT use it to indicate offset relative to their base address.
// - OSTRUCTKEY uses it to store the named field's offset.
// - Named OLITERALs use it to store their ambient iota value.
// - OINLMARK stores an index into the inlTree data structure.
@@ -668,7 +668,8 @@ const (
ORSH // Left >> Right
OAND // Left & Right
OANDNOT // Left &^ Right
- ONEW // new(Left)
+ ONEW // new(Left); corresponds to calls to new in source code
+ ONEWOBJ // runtime.newobject(n.Type); introduced by walk; Left is type descriptor
ONOT // !Left
OBITNOT // ^Left
OPLUS // +Left
@@ -750,7 +751,7 @@ const (
OVARDEF // variable is about to be fully initialized
OVARKILL // variable is dead
OVARLIVE // variable is alive
- OINDREGSP // offset plus indirect of REGSP, such as 8(SP).
+ ORESULT // result of a function call; Xoffset is stack offset
OINLMARK // start of an inlined body, with file/line of caller. Xoffset is an index into the inline tree.
// arch-specific opcodes
diff --git a/src/cmd/compile/internal/gc/testdata/arith_test.go b/src/cmd/compile/internal/gc/testdata/arith_test.go
index 728ca56892..158fedc28e 100644
--- a/src/cmd/compile/internal/gc/testdata/arith_test.go
+++ b/src/cmd/compile/internal/gc/testdata/arith_test.go
@@ -7,6 +7,7 @@
package main
import (
+ "math"
"runtime"
"testing"
)
@@ -924,6 +925,8 @@ func TestArithmetic(t *testing.T) {
testShiftRemoval(t)
testShiftedOps(t)
testDivFixUp(t)
+ testDivisibleSignedPow2(t)
+ testDivisibility(t)
}
// testDivFixUp ensures that signed division fix-ups are being generated.
@@ -952,3 +955,500 @@ func testDivFixUp(t *testing.T) {
g64 = z % int64(i)
}
}
+
+//go:noinline
+func divisible_int8_2to1(x int8) bool {
+ return x%(1<<1) == 0
+}
+
+//go:noinline
+func divisible_int8_2to2(x int8) bool {
+ return x%(1<<2) == 0
+}
+
+//go:noinline
+func divisible_int8_2to3(x int8) bool {
+ return x%(1<<3) == 0
+}
+
+//go:noinline
+func divisible_int8_2to4(x int8) bool {
+ return x%(1<<4) == 0
+}
+
+//go:noinline
+func divisible_int8_2to5(x int8) bool {
+ return x%(1<<5) == 0
+}
+
+//go:noinline
+func divisible_int8_2to6(x int8) bool {
+ return x%(1<<6) == 0
+}
+
+//go:noinline
+func divisible_int16_2to1(x int16) bool {
+ return x%(1<<1) == 0
+}
+
+//go:noinline
+func divisible_int16_2to2(x int16) bool {
+ return x%(1<<2) == 0
+}
+
+//go:noinline
+func divisible_int16_2to3(x int16) bool {
+ return x%(1<<3) == 0
+}
+
+//go:noinline
+func divisible_int16_2to4(x int16) bool {
+ return x%(1<<4) == 0
+}
+
+//go:noinline
+func divisible_int16_2to5(x int16) bool {
+ return x%(1<<5) == 0
+}
+
+//go:noinline
+func divisible_int16_2to6(x int16) bool {
+ return x%(1<<6) == 0
+}
+
+//go:noinline
+func divisible_int16_2to7(x int16) bool {
+ return x%(1<<7) == 0
+}
+
+//go:noinline
+func divisible_int16_2to8(x int16) bool {
+ return x%(1<<8) == 0
+}
+
+//go:noinline
+func divisible_int16_2to9(x int16) bool {
+ return x%(1<<9) == 0
+}
+
+//go:noinline
+func divisible_int16_2to10(x int16) bool {
+ return x%(1<<10) == 0
+}
+
+//go:noinline
+func divisible_int16_2to11(x int16) bool {
+ return x%(1<<11) == 0
+}
+
+//go:noinline
+func divisible_int16_2to12(x int16) bool {
+ return x%(1<<12) == 0
+}
+
+//go:noinline
+func divisible_int16_2to13(x int16) bool {
+ return x%(1<<13) == 0
+}
+
+//go:noinline
+func divisible_int16_2to14(x int16) bool {
+ return x%(1<<14) == 0
+}
+
+//go:noinline
+func divisible_int32_2to4(x int32) bool {
+ return x%(1<<4) == 0
+}
+
+//go:noinline
+func divisible_int32_2to15(x int32) bool {
+ return x%(1<<15) == 0
+}
+
+//go:noinline
+func divisible_int32_2to26(x int32) bool {
+ return x%(1<<26) == 0
+}
+
+//go:noinline
+func divisible_int64_2to4(x int64) bool {
+ return x%(1<<4) == 0
+}
+
+//go:noinline
+func divisible_int64_2to15(x int64) bool {
+ return x%(1<<15) == 0
+}
+
+//go:noinline
+func divisible_int64_2to26(x int64) bool {
+ return x%(1<<26) == 0
+}
+
+//go:noinline
+func divisible_int64_2to34(x int64) bool {
+ return x%(1<<34) == 0
+}
+
+//go:noinline
+func divisible_int64_2to48(x int64) bool {
+ return x%(1<<48) == 0
+}
+
+//go:noinline
+func divisible_int64_2to57(x int64) bool {
+ return x%(1<<57) == 0
+}
+
+// testDivisibleSignedPow2 confirms that x%(1<= 0
- switch t.Etype {
- case TSTRING:
- if Isconst(l, CTSTR) {
- res = int64(len(l.Val().U.(string)))
- }
-
- case TARRAY:
- if !callrecv(l) {
- res = t.NumElem()
- }
- }
- if res >= 0 {
- setintconst(n, res)
- }
-
case OREAL, OIMAG:
ok |= ctxExpr
if !onearg(n, "%v", n.Op) {
@@ -1484,83 +1432,26 @@ func typecheck1(n *Node, top int) (res *Node) {
}
n.Type = types.Types[et]
- // if the argument is a constant, the result is a constant
- // (any untyped numeric constant can be represented as a
- // complex number)
- if l.Op == OLITERAL {
- var re, im *Mpflt
- switch consttype(l) {
- case CTINT, CTRUNE:
- re = newMpflt()
- re.SetInt(l.Val().U.(*Mpint))
- // im = 0
- case CTFLT:
- re = l.Val().U.(*Mpflt)
- // im = 0
- case CTCPLX:
- re = &l.Val().U.(*Mpcplx).Real
- im = &l.Val().U.(*Mpcplx).Imag
- default:
- yyerror("invalid argument %L for %v", l, n.Op)
- n.Type = nil
- return n
- }
- if n.Op == OIMAG {
- if im == nil {
- im = newMpflt()
- }
- re = im
- }
- setconst(n, Val{re})
- }
-
case OCOMPLEX:
ok |= ctxExpr
- var r *Node
- var l *Node
- if n.List.Len() == 1 {
- typecheckslice(n.List.Slice(), ctxMultiOK)
- if n.List.First().Op != OCALLFUNC && n.List.First().Op != OCALLMETH {
- yyerror("invalid operation: complex expects two arguments")
- n.Type = nil
- return n
- }
-
- t := n.List.First().Left.Type
- if !t.IsKind(TFUNC) {
- // Bail. This error will be reported elsewhere.
- return n
- }
- if t.NumResults() != 2 {
- yyerror("invalid operation: complex expects two arguments, %v returns %d results", n.List.First(), t.NumResults())
- n.Type = nil
- return n
- }
-
- t = n.List.First().Type
- l = asNode(t.Field(0).Nname)
- r = asNode(t.Field(1).Nname)
- } else {
- if !twoarg(n) {
- n.Type = nil
- return n
- }
- n.Left = typecheck(n.Left, ctxExpr)
- n.Right = typecheck(n.Right, ctxExpr)
- l = n.Left
- r = n.Right
- if l.Type == nil || r.Type == nil {
- n.Type = nil
- return n
- }
- l, r = defaultlit2(l, r, false)
- if l.Type == nil || r.Type == nil {
- n.Type = nil
- return n
- }
- n.Left = l
- n.Right = r
+ typecheckargs(n)
+ if !twoarg(n) {
+ n.Type = nil
+ return n
}
+ l := n.Left
+ r := n.Right
+ if l.Type == nil || r.Type == nil {
+ n.Type = nil
+ return n
+ }
+ l, r = defaultlit2(l, r, false)
+ if l.Type == nil || r.Type == nil {
+ n.Type = nil
+ return n
+ }
+ n.Left = l
+ n.Right = r
if !types.Identical(l.Type, r.Type) {
yyerror("invalid operation: %v (mismatched types %v and %v)", n, l.Type, r.Type)
@@ -1586,14 +1477,6 @@ func typecheck1(n *Node, top int) (res *Node) {
}
n.Type = t
- if l.Op == OLITERAL && r.Op == OLITERAL {
- // make it a complex literal
- c := newMpcmplx()
- c.Real.Set(toflt(l.Val()).U.(*Mpflt))
- c.Imag.Set(toflt(r.Val()).U.(*Mpflt))
- setconst(n, Val{c})
- }
-
case OCLOSE:
if !onearg(n, "%v", n.Op) {
n.Type = nil
@@ -1622,6 +1505,8 @@ func typecheck1(n *Node, top int) (res *Node) {
ok |= ctxStmt
case ODELETE:
+ ok |= ctxStmt
+ typecheckargs(n)
args := n.List
if args.Len() == 0 {
yyerror("missing arguments to delete")
@@ -1641,8 +1526,6 @@ func typecheck1(n *Node, top int) (res *Node) {
return n
}
- ok |= ctxStmt
- typecheckslice(args.Slice(), ctxExpr)
l := args.First()
r := args.Second()
if l.Type != nil && !l.Type.IsMap() {
@@ -1655,6 +1538,7 @@ func typecheck1(n *Node, top int) (res *Node) {
case OAPPEND:
ok |= ctxExpr
+ typecheckargs(n)
args := n.List
if args.Len() == 0 {
yyerror("missing arguments to append")
@@ -1662,25 +1546,12 @@ func typecheck1(n *Node, top int) (res *Node) {
return n
}
- if args.Len() == 1 && !n.IsDDD() {
- args.SetFirst(typecheck(args.First(), ctxExpr|ctxMultiOK))
- } else {
- typecheckslice(args.Slice(), ctxExpr)
- }
-
t := args.First().Type
if t == nil {
n.Type = nil
return n
}
- // Unpack multiple-return result before type-checking.
- var funarg *types.Type
- if t.IsFuncArgStruct() {
- funarg = t
- t = t.Field(0).Type
- }
-
n.Type = t
if !t.IsSlice() {
if Isconst(args.First(), CTNIL) {
@@ -1716,44 +1587,23 @@ func typecheck1(n *Node, top int) (res *Node) {
break
}
- if funarg != nil {
- for _, t := range funarg.FieldSlice()[1:] {
- if assignop(t.Type, n.Type.Elem(), nil) == 0 {
- yyerror("cannot append %v value to []%v", t.Type, n.Type.Elem())
- }
- }
- } else {
- as := args.Slice()[1:]
- for i, n := range as {
- if n.Type == nil {
- continue
- }
- as[i] = assignconv(n, t.Elem(), "append")
- checkwidth(as[i].Type) // ensure width is calculated for backend
+ as := args.Slice()[1:]
+ for i, n := range as {
+ if n.Type == nil {
+ continue
}
+ as[i] = assignconv(n, t.Elem(), "append")
+ checkwidth(as[i].Type) // ensure width is calculated for backend
}
case OCOPY:
ok |= ctxStmt | ctxExpr
- args := n.List
- if args.Len() < 2 {
- yyerror("missing arguments to copy")
+ typecheckargs(n)
+ if !twoarg(n) {
n.Type = nil
return n
}
-
- if args.Len() > 2 {
- yyerror("too many arguments to copy")
- n.Type = nil
- return n
- }
-
- n.Left = args.First()
- n.Right = args.Second()
- n.List.Set(nil)
n.Type = types.Types[TINT]
- n.Left = typecheck(n.Left, ctxExpr)
- n.Right = typecheck(n.Right, ctxExpr)
if n.Left.Type == nil || n.Right.Type == nil {
n.Type = nil
return n
@@ -1817,10 +1667,7 @@ func typecheck1(n *Node, top int) (res *Node) {
switch n.Op {
case OCONVNOP:
- if n.Left.Op == OLITERAL && n.isGoConst() {
- n.Op = OCONV // set so n.Orig gets OCONV instead of OCONVNOP
- setconst(n, n.Left.Val()) // convert n to OLITERAL with the given value
- } else if t.Etype == n.Type.Etype {
+ if t.Etype == n.Type.Etype {
switch t.Etype {
case TFLOAT32, TFLOAT64, TCOMPLEX64, TCOMPLEX128:
// Floating point casts imply rounding and
@@ -2149,11 +1996,7 @@ func typecheck1(n *Node, top int) (res *Node) {
case ORETURN:
ok |= ctxStmt
- if n.List.Len() == 1 {
- typecheckslice(n.List.Slice(), ctxExpr|ctxMultiOK)
- } else {
- typecheckslice(n.List.Slice(), ctxExpr)
- }
+ typecheckargs(n)
if Curfn == nil {
yyerror("return outside function")
n.Type = nil
@@ -2257,6 +2100,51 @@ func typecheck1(n *Node, top int) (res *Node) {
return n
}
+func typecheckargs(n *Node) {
+ if n.List.Len() != 1 || n.IsDDD() {
+ typecheckslice(n.List.Slice(), ctxExpr)
+ return
+ }
+
+ typecheckslice(n.List.Slice(), ctxExpr|ctxMultiOK)
+ t := n.List.First().Type
+ if t == nil || !t.IsFuncArgStruct() {
+ return
+ }
+
+ // Rewrite f(g()) into t1, t2, ... = g(); f(t1, t2, ...).
+
+ // Save n as n.Orig for fmt.go.
+ if n.Orig == n {
+ n.Orig = n.sepcopy()
+ }
+
+ as := nod(OAS2, nil, nil)
+ as.Rlist.AppendNodes(&n.List)
+
+ // If we're outside of function context, then this call will
+ // be executed during the generated init function. However,
+ // init.go hasn't yet created it. Instead, associate the
+ // temporary variables with dummyInitFn for now, and init.go
+ // will reassociate them later when it's appropriate.
+ static := Curfn == nil
+ if static {
+ Curfn = dummyInitFn
+ }
+ for _, f := range t.FieldSlice() {
+ t := temp(f.Type)
+ as.Ninit.Append(nod(ODCL, t, nil))
+ as.List.Append(t)
+ n.List.Append(t)
+ }
+ if static {
+ Curfn = nil
+ }
+
+ as = typecheck(as, ctxStmt)
+ n.Ninit.Append(as)
+}
+
func checksliceindex(l *Node, r *Node, tp *types.Type) bool {
t := r.Type
if t == nil {
@@ -2396,24 +2284,15 @@ func twoarg(n *Node) bool {
if n.Left != nil {
return true
}
- if n.List.Len() == 0 {
- yyerror("missing argument to %v - %v", n.Op, n)
+ if n.List.Len() != 2 {
+ if n.List.Len() < 2 {
+ yyerror("not enough arguments in call to %v", n)
+ } else {
+ yyerror("too many arguments in call to %v", n)
+ }
return false
}
-
n.Left = n.List.First()
- if n.List.Len() == 1 {
- yyerror("missing argument to %v - %v", n.Op, n)
- n.List.Set(nil)
- return false
- }
-
- if n.List.Len() > 2 {
- yyerror("too many arguments to %v - %v", n.Op, n)
- n.List.Set(nil)
- return false
- }
-
n.Right = n.List.Second()
n.List.Set(nil)
return true
@@ -2673,8 +2552,6 @@ func hasddd(t *types.Type) bool {
// typecheck assignment: type list = expression list
func typecheckaste(op Op, call *Node, isddd bool, tstruct *types.Type, nl Nodes, desc func() string) {
var t *types.Type
- var n1 int
- var n2 int
var i int
lno := lineno
@@ -2687,57 +2564,10 @@ func typecheckaste(op Op, call *Node, isddd bool, tstruct *types.Type, nl Nodes,
var n *Node
if nl.Len() == 1 {
n = nl.First()
- if n.Type != nil && n.Type.IsFuncArgStruct() {
- if !hasddd(tstruct) {
- n1 := tstruct.NumFields()
- n2 := n.Type.NumFields()
- if n2 > n1 {
- goto toomany
- }
- if n2 < n1 {
- goto notenough
- }
- }
-
- lfs := tstruct.FieldSlice()
- rfs := n.Type.FieldSlice()
- var why string
- for i, tl := range lfs {
- if tl.IsDDD() {
- for _, tn := range rfs[i:] {
- if assignop(tn.Type, tl.Type.Elem(), &why) == 0 {
- if call != nil {
- yyerror("cannot use %v as type %v in argument to %v%s", tn.Type, tl.Type.Elem(), call, why)
- } else {
- yyerror("cannot use %v as type %v in %s%s", tn.Type, tl.Type.Elem(), desc(), why)
- }
- }
- }
- return
- }
-
- if i >= len(rfs) {
- goto notenough
- }
- tn := rfs[i]
- if assignop(tn.Type, tl.Type, &why) == 0 {
- if call != nil {
- yyerror("cannot use %v as type %v in argument to %v%s", tn.Type, tl.Type, call, why)
- } else {
- yyerror("cannot use %v as type %v in %s%s", tn.Type, tl.Type, desc(), why)
- }
- }
- }
-
- if len(rfs) > len(lfs) {
- goto toomany
- }
- return
- }
}
- n1 = tstruct.NumFields()
- n2 = nl.Len()
+ n1 := tstruct.NumFields()
+ n2 := nl.Len()
if !hasddd(tstruct) {
if n2 > n1 {
goto toomany
@@ -2779,6 +2609,7 @@ func typecheckaste(op Op, call *Node, isddd bool, tstruct *types.Type, nl Nodes,
return
}
+ // TODO(mdempsky): Make into ... call with implicit slice.
for ; i < nl.Len(); i++ {
n = nl.Index(i)
setlineno(n)
@@ -2886,14 +2717,8 @@ func (nl Nodes) retsigerr(isddd bool) string {
}
var typeStrings []string
- if nl.Len() == 1 && nl.First().Type != nil && nl.First().Type.IsFuncArgStruct() {
- for _, f := range nl.First().Type.Fields().Slice() {
- typeStrings = append(typeStrings, sigrepr(f.Type))
- }
- } else {
- for _, n := range nl.Slice() {
- typeStrings = append(typeStrings, sigrepr(n.Type))
- }
+ for _, n := range nl.Slice() {
+ typeStrings = append(typeStrings, sigrepr(n.Type))
}
ddd := ""
@@ -3765,17 +3590,18 @@ func typecheckdef(n *Node) {
}
e = typecheck(e, ctxExpr)
- if Isconst(e, CTNIL) {
- yyerrorl(n.Pos, "const initializer cannot be nil")
+ if e.Type == nil {
goto ret
}
-
- if e.Type != nil && e.Op != OLITERAL || !e.isGoConst() {
+ if !e.isGoConst() {
if !e.Diag() {
- yyerrorl(n.Pos, "const initializer %v is not a constant", e)
+ if Isconst(e, CTNIL) {
+ yyerrorl(n.Pos, "const initializer cannot be nil")
+ } else {
+ yyerrorl(n.Pos, "const initializer %v is not a constant", e)
+ }
e.SetDiag(true)
}
-
goto ret
}
diff --git a/src/cmd/compile/internal/gc/walk.go b/src/cmd/compile/internal/gc/walk.go
index 1d6321212e..679c86fab6 100644
--- a/src/cmd/compile/internal/gc/walk.go
+++ b/src/cmd/compile/internal/gc/walk.go
@@ -398,10 +398,14 @@ func convFuncName(from, to *types.Type) (fnname string, needsaddr bool) {
return "convT32", false
case from.Size() == 8 && from.Align == types.Types[TUINT64].Align && !types.Haspointers(from):
return "convT64", false
- case from.IsString():
- return "convTstring", false
- case from.IsSlice():
- return "convTslice", false
+ }
+ if sc := from.SoleComponent(); sc != nil {
+ switch {
+ case sc.IsString():
+ return "convTstring", false
+ case sc.IsSlice():
+ return "convTslice", false
+ }
}
switch tkind {
@@ -477,7 +481,7 @@ opswitch:
Dump("walk", n)
Fatalf("walkexpr: switch 1 unknown op %+S", n)
- case ONONAME, OINDREGSP, OEMPTY, OGETG:
+ case ONONAME, OEMPTY, OGETG, ONEWOBJ:
case OTYPE, ONAME, OLITERAL:
// TODO(mdempsky): Just return n; see discussion on CL 38655.
@@ -1206,7 +1210,7 @@ opswitch:
// Allocate one bucket pointed to by hmap.buckets on stack if hint
// is not larger than BUCKETSIZE. In case hint is larger than
// BUCKETSIZE runtime.makemap will allocate the buckets on the heap.
- // Maximum key and value size is 128 bytes, larger objects
+ // Maximum key and elem size is 128 bytes, larger objects
// are stored with an indirection. So max bucket size is 2048+eps.
if !Isconst(hint, CTINT) ||
hint.Val().U.(*Mpint).CmpInt64(BUCKETSIZE) <= 0 {
@@ -1351,50 +1355,36 @@ opswitch:
a := nodnil()
if n.Esc == EscNone {
t := types.NewArray(types.Types[TUINT8], 4)
- var_ := temp(t)
- a = nod(OADDR, var_, nil)
+ a = nod(OADDR, temp(t), nil)
}
-
// intstring(*[4]byte, rune)
n = mkcall("intstring", n.Type, init, a, conv(n.Left, types.Types[TINT64]))
- case OBYTES2STR:
+ case OBYTES2STR, ORUNES2STR:
a := nodnil()
if n.Esc == EscNone {
// Create temporary buffer for string on stack.
t := types.NewArray(types.Types[TUINT8], tmpstringbufsize)
-
a = nod(OADDR, temp(t), nil)
}
+ fn := "slicebytetostring"
+ if n.Op == ORUNES2STR {
+ fn = "slicerunetostring"
+ }
+ // slicebytetostring(*[32]byte, []byte) string
+ // slicerunetostring(*[32]byte, []rune) string
+ n = mkcall(fn, n.Type, init, a, n.Left)
- // slicebytetostring(*[32]byte, []byte) string;
- n = mkcall("slicebytetostring", n.Type, init, a, n.Left)
-
- // slicebytetostringtmp([]byte) string;
case OBYTES2STRTMP:
n.Left = walkexpr(n.Left, init)
-
if !instrumenting {
// Let the backend handle OBYTES2STRTMP directly
// to avoid a function call to slicebytetostringtmp.
break
}
-
+ // slicebytetostringtmp([]byte) string
n = mkcall("slicebytetostringtmp", n.Type, init, n.Left)
- // slicerunetostring(*[32]byte, []rune) string;
- case ORUNES2STR:
- a := nodnil()
-
- if n.Esc == EscNone {
- // Create temporary buffer for string on stack.
- t := types.NewArray(types.Types[TUINT8], tmpstringbufsize)
-
- a = nod(OADDR, temp(t), nil)
- }
-
- n = mkcall("slicerunetostring", n.Type, init, a, n.Left)
-
case OSTR2BYTES:
s := n.Left
if Isconst(s, CTSTR) {
@@ -1427,16 +1417,14 @@ opswitch:
n = walkexpr(n, init)
break
}
- a := nodnil()
+ a := nodnil()
if n.Esc == EscNone {
// Create temporary buffer for slice on stack.
t := types.NewArray(types.Types[TUINT8], tmpstringbufsize)
-
a = nod(OADDR, temp(t), nil)
}
-
- // stringtoslicebyte(*32[byte], string) []byte;
+ // stringtoslicebyte(*32[byte], string) []byte
n = mkcall("stringtoslicebyte", n.Type, init, a, conv(s, types.Types[TSTRING]))
case OSTR2BYTESTMP:
@@ -1449,17 +1437,14 @@ opswitch:
// for i, c := range []byte(string)
n.Left = walkexpr(n.Left, init)
- // stringtoslicerune(*[32]rune, string) []rune
case OSTR2RUNES:
a := nodnil()
-
if n.Esc == EscNone {
// Create temporary buffer for slice on stack.
t := types.NewArray(types.Types[TINT32], tmpstringbufsize)
-
a = nod(OADDR, temp(t), nil)
}
-
+ // stringtoslicerune(*[32]rune, string) []rune
n = mkcall("stringtoslicerune", n.Type, init, a, conv(n.Left, types.Types[TSTRING]))
case OARRAYLIT, OSLICELIT, OMAPLIT, OSTRUCTLIT, OPTRLIT:
@@ -1670,7 +1655,12 @@ func ascompatet(nl Nodes, nr *types.Type) []*Node {
l = tmp
}
- a := nod(OAS, l, nodarg(r))
+ res := nod(ORESULT, nil, nil)
+ res.Xoffset = Ctxt.FixedFrameSize() + r.Offset
+ res.Type = r.Type
+ res.SetTypecheck(1)
+
+ a := nod(OAS, l, res)
a = convas(a, &nn)
updateHasCall(a)
if a.HasCall() {
@@ -1683,32 +1673,6 @@ func ascompatet(nl Nodes, nr *types.Type) []*Node {
return append(nn.Slice(), mm.Slice()...)
}
-// nodarg returns a Node for the function argument f.
-// f is a *types.Field within a struct *types.Type.
-//
-// The node is for use by a caller invoking the given
-// function, preparing the arguments before the call
-// or retrieving the results after the call.
-// In this case, the node will correspond to an outgoing argument
-// slot like 8(SP).
-func nodarg(f *types.Field) *Node {
- // Build fake name for individual variable.
- n := newname(lookup("__"))
- n.Type = f.Type
- if f.Offset == BADWIDTH {
- Fatalf("nodarg: offset not computed for %v", f)
- }
- n.Xoffset = f.Offset
- n.Orig = asNode(f.Nname)
-
- // preparing arguments for call
- n.Op = OINDREGSP
- n.Xoffset += Ctxt.FixedFrameSize()
- n.SetTypecheck(1)
- n.SetAddrtaken(true) // keep optimizers at bay
- return n
-}
-
// package all the arguments that match a ... T parameter into a []T.
func mkdotargslice(typ *types.Type, args []*Node, init *Nodes, ddd *Node) *Node {
esc := uint16(EscUnknown)
@@ -1940,21 +1904,11 @@ func callnew(t *types.Type) *Node {
yyerror("%v is go:notinheap; heap allocation disallowed", t)
}
dowidth(t)
-
- if t.Size() == 0 {
- // Return &runtime.zerobase if we know that the requested size is 0.
- // This is what runtime.mallocgc would return.
- z := newname(Runtimepkg.Lookup("zerobase"))
- z.SetClass(PEXTERN)
- z.Type = t
- return typecheck(nod(OADDR, z, nil), ctxExpr)
- }
-
- fn := syslook("newobject")
- fn = substArgTypes(fn, t)
- v := mkcall1(fn, types.NewPtr(t), nil, typename(t))
- v.SetNonNil(true)
- return v
+ n := nod(ONEWOBJ, typename(t), nil)
+ n.Type = types.NewPtr(t)
+ n.SetTypecheck(1)
+ n.SetNonNil(true)
+ return n
}
// isReflectHeaderDataField reports whether l is an expression p.Data
@@ -2508,7 +2462,7 @@ var mapassign = mkmapnames("mapassign", "ptr")
var mapdelete = mkmapnames("mapdelete", "")
func mapfast(t *types.Type) int {
- // Check runtime/map.go:maxValueSize before changing.
+ // Check runtime/map.go:maxElemSize before changing.
if t.Elem().Width > 128 {
return mapslow
}
@@ -2563,7 +2517,6 @@ func addstr(n *Node, init *Nodes) *Node {
if sz < tmpstringbufsize {
// Create temporary buffer for result string on stack.
t := types.NewArray(types.Types[TUINT8], tmpstringbufsize)
-
buf = nod(OADDR, temp(t), nil)
}
}
@@ -3112,11 +3065,9 @@ func walkcompare(n *Node, init *Nodes) *Node {
if l != nil {
// Handle both == and !=.
eq := n.Op
- var andor Op
+ andor := OOROR
if eq == OEQ {
andor = OANDAND
- } else {
- andor = OOROR
}
// Check for types equal.
// For empty interface, this is:
diff --git a/src/cmd/compile/internal/mips/ssa.go b/src/cmd/compile/internal/mips/ssa.go
index 97a9b20537..19b7c95bfd 100644
--- a/src/cmd/compile/internal/mips/ssa.go
+++ b/src/cmd/compile/internal/mips/ssa.go
@@ -485,6 +485,18 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p.To.Type = obj.TYPE_MEM
p.To.Name = obj.NAME_EXTERN
p.To.Sym = v.Aux.(*obj.LSym)
+ case ssa.OpMIPSLoweredPanicBoundsA, ssa.OpMIPSLoweredPanicBoundsB, ssa.OpMIPSLoweredPanicBoundsC:
+ p := s.Prog(obj.ACALL)
+ p.To.Type = obj.TYPE_MEM
+ p.To.Name = obj.NAME_EXTERN
+ p.To.Sym = gc.BoundsCheckFunc[v.AuxInt]
+ s.UseArgs(8) // space used in callee args area by assembly stubs
+ case ssa.OpMIPSLoweredPanicExtendA, ssa.OpMIPSLoweredPanicExtendB, ssa.OpMIPSLoweredPanicExtendC:
+ p := s.Prog(obj.ACALL)
+ p.To.Type = obj.TYPE_MEM
+ p.To.Name = obj.NAME_EXTERN
+ p.To.Sym = gc.ExtendCheckFunc[v.AuxInt]
+ s.UseArgs(12) // space used in callee args area by assembly stubs
case ssa.OpMIPSLoweredAtomicLoad:
s.Prog(mips.ASYNC)
@@ -816,7 +828,6 @@ func ssaGenBlock(s *gc.SSAGenState, b, next *ssa.Block) {
s.Branches = append(s.Branches, gc.Branch{P: p, B: b.Succs[0].Block()})
}
case ssa.BlockExit:
- s.Prog(obj.AUNDEF) // tell plive.go that we never reach here
case ssa.BlockRet:
s.Prog(obj.ARET)
case ssa.BlockRetJmp:
diff --git a/src/cmd/compile/internal/mips64/ssa.go b/src/cmd/compile/internal/mips64/ssa.go
index 8a2d2b0f7a..68eff97dfa 100644
--- a/src/cmd/compile/internal/mips64/ssa.go
+++ b/src/cmd/compile/internal/mips64/ssa.go
@@ -489,9 +489,18 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p.To.Type = obj.TYPE_MEM
p.To.Name = obj.NAME_EXTERN
p.To.Sym = v.Aux.(*obj.LSym)
- case ssa.OpMIPS64LoweredAtomicLoad32, ssa.OpMIPS64LoweredAtomicLoad64:
+ case ssa.OpMIPS64LoweredPanicBoundsA, ssa.OpMIPS64LoweredPanicBoundsB, ssa.OpMIPS64LoweredPanicBoundsC:
+ p := s.Prog(obj.ACALL)
+ p.To.Type = obj.TYPE_MEM
+ p.To.Name = obj.NAME_EXTERN
+ p.To.Sym = gc.BoundsCheckFunc[v.AuxInt]
+ s.UseArgs(16) // space used in callee args area by assembly stubs
+ case ssa.OpMIPS64LoweredAtomicLoad8, ssa.OpMIPS64LoweredAtomicLoad32, ssa.OpMIPS64LoweredAtomicLoad64:
as := mips.AMOVV
- if v.Op == ssa.OpMIPS64LoweredAtomicLoad32 {
+ switch v.Op {
+ case ssa.OpMIPS64LoweredAtomicLoad8:
+ as = mips.AMOVB
+ case ssa.OpMIPS64LoweredAtomicLoad32:
as = mips.AMOVW
}
s.Prog(mips.ASYNC)
@@ -787,7 +796,6 @@ func ssaGenBlock(s *gc.SSAGenState, b, next *ssa.Block) {
s.Branches = append(s.Branches, gc.Branch{P: p, B: b.Succs[0].Block()})
}
case ssa.BlockExit:
- s.Prog(obj.AUNDEF) // tell plive.go that we never reach here
case ssa.BlockRet:
s.Prog(obj.ARET)
case ssa.BlockRetJmp:
diff --git a/src/cmd/compile/internal/ppc64/galign.go b/src/cmd/compile/internal/ppc64/galign.go
index 8ad3084410..c6866e65e7 100644
--- a/src/cmd/compile/internal/ppc64/galign.go
+++ b/src/cmd/compile/internal/ppc64/galign.go
@@ -21,7 +21,7 @@ func Init(arch *gc.Arch) {
arch.ZeroRange = zerorange
arch.ZeroAuto = zeroAuto
arch.Ginsnop = ginsnop
- arch.Ginsnopdefer = ginsnop2
+ arch.Ginsnopdefer = ginsnopdefer
arch.SSAMarkMoves = ssaMarkMoves
arch.SSAGenValue = ssaGenValue
diff --git a/src/cmd/compile/internal/ppc64/ggen.go b/src/cmd/compile/internal/ppc64/ggen.go
index ea66baa007..a63a0f0f77 100644
--- a/src/cmd/compile/internal/ppc64/ggen.go
+++ b/src/cmd/compile/internal/ppc64/ggen.go
@@ -67,8 +67,9 @@ func ginsnop(pp *gc.Progs) *obj.Prog {
return p
}
-func ginsnop2(pp *gc.Progs) *obj.Prog {
- // PPC64 is unusual because TWO nops are required
+func ginsnopdefer(pp *gc.Progs) *obj.Prog {
+ // On PPC64 two nops are required in the defer case.
+ //
// (see gc/cgen.go, gc/plive.go -- copy of comment below)
//
// On ppc64, when compiling Go into position
diff --git a/src/cmd/compile/internal/ppc64/ssa.go b/src/cmd/compile/internal/ppc64/ssa.go
index 3b37c797a9..cbe233f054 100644
--- a/src/cmd/compile/internal/ppc64/ssa.go
+++ b/src/cmd/compile/internal/ppc64/ssa.go
@@ -25,16 +25,16 @@ type iselOp struct {
var iselRegs = [2]int16{ppc64.REG_R0, ppc64.REGTMP}
var iselOps = map[ssa.Op]iselOp{
- ssa.OpPPC64Equal: iselOp{cond: ppc64.C_COND_EQ, valueIfCond: 1},
- ssa.OpPPC64NotEqual: iselOp{cond: ppc64.C_COND_EQ, valueIfCond: 0},
- ssa.OpPPC64LessThan: iselOp{cond: ppc64.C_COND_LT, valueIfCond: 1},
- ssa.OpPPC64GreaterEqual: iselOp{cond: ppc64.C_COND_LT, valueIfCond: 0},
- ssa.OpPPC64GreaterThan: iselOp{cond: ppc64.C_COND_GT, valueIfCond: 1},
- ssa.OpPPC64LessEqual: iselOp{cond: ppc64.C_COND_GT, valueIfCond: 0},
- ssa.OpPPC64FLessThan: iselOp{cond: ppc64.C_COND_LT, valueIfCond: 1},
- ssa.OpPPC64FGreaterThan: iselOp{cond: ppc64.C_COND_GT, valueIfCond: 1},
- ssa.OpPPC64FLessEqual: iselOp{cond: ppc64.C_COND_LT, valueIfCond: 1}, // 2 comparisons, 2nd is EQ
- ssa.OpPPC64FGreaterEqual: iselOp{cond: ppc64.C_COND_GT, valueIfCond: 1}, // 2 comparisons, 2nd is EQ
+ ssa.OpPPC64Equal: {cond: ppc64.C_COND_EQ, valueIfCond: 1},
+ ssa.OpPPC64NotEqual: {cond: ppc64.C_COND_EQ, valueIfCond: 0},
+ ssa.OpPPC64LessThan: {cond: ppc64.C_COND_LT, valueIfCond: 1},
+ ssa.OpPPC64GreaterEqual: {cond: ppc64.C_COND_LT, valueIfCond: 0},
+ ssa.OpPPC64GreaterThan: {cond: ppc64.C_COND_GT, valueIfCond: 1},
+ ssa.OpPPC64LessEqual: {cond: ppc64.C_COND_GT, valueIfCond: 0},
+ ssa.OpPPC64FLessThan: {cond: ppc64.C_COND_LT, valueIfCond: 1},
+ ssa.OpPPC64FGreaterThan: {cond: ppc64.C_COND_GT, valueIfCond: 1},
+ ssa.OpPPC64FLessEqual: {cond: ppc64.C_COND_LT, valueIfCond: 1}, // 2 comparisons, 2nd is EQ
+ ssa.OpPPC64FGreaterEqual: {cond: ppc64.C_COND_GT, valueIfCond: 1}, // 2 comparisons, 2nd is EQ
}
// markMoves marks any MOVXconst ops that need to avoid clobbering flags.
@@ -172,6 +172,31 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p1.To.Type = obj.TYPE_REG
p1.To.Reg = v.Reg1()
+ case ssa.OpPPC64LoweredAdd64Carry:
+ // ADDC Rarg2, -1, Rtmp
+ // ADDE Rarg1, Rarg0, Reg0
+ // ADDZE Rzero, Reg1
+ r0 := v.Args[0].Reg()
+ r1 := v.Args[1].Reg()
+ r2 := v.Args[2].Reg()
+ p := s.Prog(ppc64.AADDC)
+ p.From.Type = obj.TYPE_CONST
+ p.From.Offset = -1
+ p.Reg = r2
+ p.To.Type = obj.TYPE_REG
+ p.To.Reg = ppc64.REGTMP
+ p1 := s.Prog(ppc64.AADDE)
+ p1.From.Type = obj.TYPE_REG
+ p1.From.Reg = r1
+ p1.Reg = r0
+ p1.To.Type = obj.TYPE_REG
+ p1.To.Reg = v.Reg0()
+ p2 := s.Prog(ppc64.AADDZE)
+ p2.From.Type = obj.TYPE_REG
+ p2.From.Reg = ppc64.REGZERO
+ p2.To.Type = obj.TYPE_REG
+ p2.To.Reg = v.Reg1()
+
case ssa.OpPPC64LoweredAtomicAnd8,
ssa.OpPPC64LoweredAtomicOr8:
// LWSYNC
@@ -298,18 +323,22 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
pisync := s.Prog(ppc64.AISYNC)
pisync.To.Type = obj.TYPE_NONE
- case ssa.OpPPC64LoweredAtomicLoad32,
+ case ssa.OpPPC64LoweredAtomicLoad8,
+ ssa.OpPPC64LoweredAtomicLoad32,
ssa.OpPPC64LoweredAtomicLoad64,
ssa.OpPPC64LoweredAtomicLoadPtr:
// SYNC
- // MOVD/MOVW (Rarg0), Rout
+ // MOVB/MOVD/MOVW (Rarg0), Rout
// CMP Rout,Rout
// BNE 1(PC)
// ISYNC
ld := ppc64.AMOVD
cmp := ppc64.ACMP
- if v.Op == ssa.OpPPC64LoweredAtomicLoad32 {
- ld = ppc64.AMOVW
+ switch v.Op {
+ case ssa.OpPPC64LoweredAtomicLoad8:
+ ld = ppc64.AMOVBZ
+ case ssa.OpPPC64LoweredAtomicLoad32:
+ ld = ppc64.AMOVWZ
cmp = ppc64.ACMPW
}
arg0 := v.Args[0].Reg()
@@ -620,7 +649,10 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p.To.Type = obj.TYPE_REG
p.To.Reg = ppc64.REGTMP // Ignored; this is for the carry effect.
- case ssa.OpPPC64NEG, ssa.OpPPC64FNEG, ssa.OpPPC64FSQRT, ssa.OpPPC64FSQRTS, ssa.OpPPC64FFLOOR, ssa.OpPPC64FTRUNC, ssa.OpPPC64FCEIL, ssa.OpPPC64FCTIDZ, ssa.OpPPC64FCTIWZ, ssa.OpPPC64FCFID, ssa.OpPPC64FCFIDS, ssa.OpPPC64FRSP, ssa.OpPPC64CNTLZD, ssa.OpPPC64CNTLZW, ssa.OpPPC64POPCNTD, ssa.OpPPC64POPCNTW, ssa.OpPPC64POPCNTB, ssa.OpPPC64MFVSRD, ssa.OpPPC64MTVSRD, ssa.OpPPC64FABS, ssa.OpPPC64FNABS, ssa.OpPPC64FROUND:
+ case ssa.OpPPC64NEG, ssa.OpPPC64FNEG, ssa.OpPPC64FSQRT, ssa.OpPPC64FSQRTS, ssa.OpPPC64FFLOOR, ssa.OpPPC64FTRUNC, ssa.OpPPC64FCEIL,
+ ssa.OpPPC64FCTIDZ, ssa.OpPPC64FCTIWZ, ssa.OpPPC64FCFID, ssa.OpPPC64FCFIDS, ssa.OpPPC64FRSP, ssa.OpPPC64CNTLZD, ssa.OpPPC64CNTLZW,
+ ssa.OpPPC64POPCNTD, ssa.OpPPC64POPCNTW, ssa.OpPPC64POPCNTB, ssa.OpPPC64MFVSRD, ssa.OpPPC64MTVSRD, ssa.OpPPC64FABS, ssa.OpPPC64FNABS,
+ ssa.OpPPC64FROUND, ssa.OpPPC64CNTTZW, ssa.OpPPC64CNTTZD:
r := v.Reg()
p := s.Prog(v.Op.Asm())
p.To.Type = obj.TYPE_REG
@@ -1183,6 +1215,13 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p.To.Name = obj.NAME_EXTERN
p.To.Sym = v.Aux.(*obj.LSym)
+ case ssa.OpPPC64LoweredPanicBoundsA, ssa.OpPPC64LoweredPanicBoundsB, ssa.OpPPC64LoweredPanicBoundsC:
+ p := s.Prog(obj.ACALL)
+ p.To.Type = obj.TYPE_MEM
+ p.To.Name = obj.NAME_EXTERN
+ p.To.Sym = gc.BoundsCheckFunc[v.AuxInt]
+ s.UseArgs(16) // space used in callee args area by assembly stubs
+
case ssa.OpPPC64LoweredNilCheck:
if objabi.GOOS == "aix" {
// CMP Rarg0, R0
@@ -1284,7 +1323,6 @@ func ssaGenBlock(s *gc.SSAGenState, b, next *ssa.Block) {
s.Branches = append(s.Branches, gc.Branch{P: p, B: b.Succs[0].Block()})
}
case ssa.BlockExit:
- s.Prog(obj.AUNDEF) // tell plive.go that we never reach here
case ssa.BlockRet:
s.Prog(obj.ARET)
case ssa.BlockRetJmp:
diff --git a/src/cmd/compile/internal/s390x/ssa.go b/src/cmd/compile/internal/s390x/ssa.go
index be48e1b23e..7a897ae754 100644
--- a/src/cmd/compile/internal/s390x/ssa.go
+++ b/src/cmd/compile/internal/s390x/ssa.go
@@ -184,6 +184,37 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
if r != r1 {
p.Reg = r1
}
+ case ssa.OpS390XADDC:
+ r1 := v.Reg0()
+ r2 := v.Args[0].Reg()
+ r3 := v.Args[1].Reg()
+ if r1 == r2 {
+ r2, r3 = r3, r2
+ }
+ p := opregreg(s, v.Op.Asm(), r1, r2)
+ if r3 != r1 {
+ p.Reg = r3
+ }
+ case ssa.OpS390XSUBC:
+ r1 := v.Reg0()
+ r2 := v.Args[0].Reg()
+ r3 := v.Args[1].Reg()
+ p := opregreg(s, v.Op.Asm(), r1, r3)
+ if r1 != r2 {
+ p.Reg = r2
+ }
+ case ssa.OpS390XADDE, ssa.OpS390XSUBE:
+ r1 := v.Reg0()
+ if r1 != v.Args[0].Reg() {
+ v.Fatalf("input[0] and output not in same register %s", v.LongString())
+ }
+ r2 := v.Args[1].Reg()
+ opregreg(s, v.Op.Asm(), r1, r2)
+ case ssa.OpS390XADDCconst:
+ r1 := v.Reg0()
+ r3 := v.Args[0].Reg()
+ i2 := int64(int16(v.AuxInt))
+ opregregimm(s, v.Op.Asm(), r1, r3, i2)
// 2-address opcode arithmetic
case ssa.OpS390XMULLD, ssa.OpS390XMULLW,
ssa.OpS390XMULHD, ssa.OpS390XMULHDU,
@@ -514,6 +545,12 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p.To.Type = obj.TYPE_MEM
p.To.Name = obj.NAME_EXTERN
p.To.Sym = v.Aux.(*obj.LSym)
+ case ssa.OpS390XLoweredPanicBoundsA, ssa.OpS390XLoweredPanicBoundsB, ssa.OpS390XLoweredPanicBoundsC:
+ p := s.Prog(obj.ACALL)
+ p.To.Type = obj.TYPE_MEM
+ p.To.Name = obj.NAME_EXTERN
+ p.To.Sym = gc.BoundsCheckFunc[v.AuxInt]
+ s.UseArgs(16) // space used in callee args area by assembly stubs
case ssa.OpS390XFLOGR, ssa.OpS390XPOPCNT,
ssa.OpS390XNEG, ssa.OpS390XNEGW,
ssa.OpS390XMOVWBR, ssa.OpS390XMOVDBR:
@@ -547,7 +584,7 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p.To.Reg = v.Reg()
case ssa.OpS390XInvertFlags:
v.Fatalf("InvertFlags should never make it to codegen %v", v.LongString())
- case ssa.OpS390XFlagEQ, ssa.OpS390XFlagLT, ssa.OpS390XFlagGT:
+ case ssa.OpS390XFlagEQ, ssa.OpS390XFlagLT, ssa.OpS390XFlagGT, ssa.OpS390XFlagOV:
v.Fatalf("Flag* ops should never make it to codegen %v", v.LongString())
case ssa.OpS390XAddTupleFirst32, ssa.OpS390XAddTupleFirst64:
v.Fatalf("AddTupleFirst* should never make it to codegen %v", v.LongString())
@@ -676,7 +713,7 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
clear.To.Type = obj.TYPE_MEM
clear.To.Reg = v.Args[0].Reg()
}
- case ssa.OpS390XMOVWZatomicload, ssa.OpS390XMOVDatomicload:
+ case ssa.OpS390XMOVBZatomicload, ssa.OpS390XMOVWZatomicload, ssa.OpS390XMOVDatomicload:
p := s.Prog(v.Op.Asm())
p.From.Type = obj.TYPE_MEM
p.From.Reg = v.Args[0].Reg()
@@ -809,7 +846,6 @@ func ssaGenBlock(s *gc.SSAGenState, b, next *ssa.Block) {
s.Branches = append(s.Branches, gc.Branch{P: p, B: b.Succs[0].Block()})
}
case ssa.BlockExit:
- s.Prog(obj.AUNDEF) // tell plive.go that we never reach here
case ssa.BlockRet:
s.Prog(obj.ARET)
case ssa.BlockRetJmp:
diff --git a/src/cmd/compile/internal/ssa/biasedsparsemap.go b/src/cmd/compile/internal/ssa/biasedsparsemap.go
index f9d3afa745..0d35154454 100644
--- a/src/cmd/compile/internal/ssa/biasedsparsemap.go
+++ b/src/cmd/compile/internal/ssa/biasedsparsemap.go
@@ -29,7 +29,7 @@ func newBiasedSparseMap(first, last int) *biasedSparseMap {
// cap returns one more than the largest key valid for s
func (s *biasedSparseMap) cap() int {
- if s.s == nil {
+ if s == nil || s.s == nil {
return 0
}
return s.s.cap() + int(s.first)
@@ -37,7 +37,7 @@ func (s *biasedSparseMap) cap() int {
// size returns the number of entries stored in s
func (s *biasedSparseMap) size() int {
- if s.s == nil {
+ if s == nil || s.s == nil {
return 0
}
return s.s.size()
@@ -45,7 +45,7 @@ func (s *biasedSparseMap) size() int {
// contains reports whether x is a key in s
func (s *biasedSparseMap) contains(x uint) bool {
- if s.s == nil {
+ if s == nil || s.s == nil {
return false
}
if int(x) < s.first {
@@ -60,7 +60,7 @@ func (s *biasedSparseMap) contains(x uint) bool {
// get returns the value s maps for key x, or -1 if
// x is not mapped or is out of range for s.
func (s *biasedSparseMap) get(x uint) int32 {
- if s.s == nil {
+ if s == nil || s.s == nil {
return -1
}
if int(x) < s.first {
diff --git a/src/cmd/compile/internal/ssa/branchelim.go b/src/cmd/compile/internal/ssa/branchelim.go
index 55430e8afc..c543686b3d 100644
--- a/src/cmd/compile/internal/ssa/branchelim.go
+++ b/src/cmd/compile/internal/ssa/branchelim.go
@@ -33,7 +33,7 @@ func branchelim(f *Func) {
for _, b := range f.Blocks {
for _, v := range b.Values {
switch v.Op {
- case OpLoad, OpAtomicLoad32, OpAtomicLoad64, OpAtomicLoadPtr, OpAtomicLoadAcq32:
+ case OpLoad, OpAtomicLoad8, OpAtomicLoad32, OpAtomicLoad64, OpAtomicLoadPtr, OpAtomicLoadAcq32:
loadAddr.add(v.Args[0].ID)
case OpMove:
loadAddr.add(v.Args[1].ID)
diff --git a/src/cmd/compile/internal/ssa/cache.go b/src/cmd/compile/internal/ssa/cache.go
index 7438a81b72..dbec2e139c 100644
--- a/src/cmd/compile/internal/ssa/cache.go
+++ b/src/cmd/compile/internal/ssa/cache.go
@@ -25,6 +25,15 @@ type Cache struct {
scrSparseSet []*sparseSet // scratch sparse sets to be re-used.
scrSparseMap []*sparseMap // scratch sparse maps to be re-used.
scrPoset []*poset // scratch poset to be reused
+ // deadcode contains reusable slices specifically for the deadcode pass.
+ // It gets special treatment because of the frequency with which it is run.
+ deadcode struct {
+ liveOrderStmts []*Value
+ live []bool
+ q []*Value
+ }
+ // Reusable regalloc state.
+ regallocValues []valState
ValueToProgAfter []*obj.Prog
debugState debugState
@@ -49,4 +58,24 @@ func (c *Cache) Reset() {
xl[i] = nil
}
+ // regalloc sets the length of c.regallocValues to whatever it may use,
+ // so clear according to length.
+ for i := range c.regallocValues {
+ c.regallocValues[i] = valState{}
+ }
+
+ // liveOrderStmts gets used multiple times during compilation of a function.
+ // We don't know where the high water mark was, so reslice to cap and search.
+ c.deadcode.liveOrderStmts = c.deadcode.liveOrderStmts[:cap(c.deadcode.liveOrderStmts)]
+ no := sort.Search(len(c.deadcode.liveOrderStmts), func(i int) bool { return c.deadcode.liveOrderStmts[i] == nil })
+ xo := c.deadcode.liveOrderStmts[:no]
+ for i := range xo {
+ xo[i] = nil
+ }
+ c.deadcode.q = c.deadcode.q[:cap(c.deadcode.q)]
+ nq := sort.Search(len(c.deadcode.q), func(i int) bool { return c.deadcode.q[i] == nil })
+ xq := c.deadcode.q[:nq]
+ for i := range xq {
+ xq[i] = nil
+ }
}
diff --git a/src/cmd/compile/internal/ssa/compile.go b/src/cmd/compile/internal/ssa/compile.go
index 38f12abf18..937e0223b3 100644
--- a/src/cmd/compile/internal/ssa/compile.go
+++ b/src/cmd/compile/internal/ssa/compile.go
@@ -5,6 +5,7 @@
package ssa
import (
+ "bytes"
"cmd/internal/objabi"
"cmd/internal/src"
"fmt"
@@ -14,6 +15,7 @@ import (
"os"
"regexp"
"runtime"
+ "sort"
"strings"
"time"
)
@@ -133,6 +135,21 @@ func Compile(f *Func) {
}
}
+ if f.ruleMatches != nil {
+ var keys []string
+ for key := range f.ruleMatches {
+ keys = append(keys, key)
+ }
+ sort.Strings(keys)
+ buf := new(bytes.Buffer)
+ fmt.Fprintf(buf, "%s: ", f.Name)
+ for _, key := range keys {
+ fmt.Fprintf(buf, "%s=%d ", key, f.ruleMatches[key])
+ }
+ fmt.Fprint(buf, "\n")
+ fmt.Print(buf.String())
+ }
+
// Squash error printing defer
phaseName = ""
}
@@ -386,7 +403,7 @@ var passes = [...]pass{
{name: "short circuit", fn: shortcircuit},
{name: "decompose args", fn: decomposeArgs, required: true},
{name: "decompose user", fn: decomposeUser, required: true},
- {name: "opt", fn: opt, required: true}, // TODO: split required rules and optimizing rules
+ {name: "opt", fn: opt, required: true}, // NB: some generic rules know the name of the opt pass. TODO: split required rules and optimizing rules
{name: "zero arg cse", fn: zcse, required: true}, // required to merge OpSB values
{name: "opt deadcode", fn: deadcode, required: true}, // remove any blocks orphaned during opt
{name: "generic cse", fn: cse},
@@ -414,9 +431,9 @@ var passes = [...]pass{
{name: "late phielim", fn: phielim},
{name: "late copyelim", fn: copyelim},
{name: "tighten", fn: tighten}, // move values closer to their uses
- {name: "phi tighten", fn: phiTighten},
{name: "late deadcode", fn: deadcode},
{name: "critical", fn: critical, required: true}, // remove critical edges
+ {name: "phi tighten", fn: phiTighten}, // place rematerializable phi args near uses to reduce value lifetimes
{name: "likelyadjust", fn: likelyadjust},
{name: "layout", fn: layout, required: true}, // schedule blocks
{name: "schedule", fn: schedule, required: true}, // schedule values
@@ -467,6 +484,8 @@ var passOrder = [...]constraint{
{"decompose builtin", "late opt"},
// decompose builtin is the last pass that may introduce new float ops, so run softfloat after it
{"decompose builtin", "softfloat"},
+ // remove critical edges before phi tighten, so that phi args get better placement
+ {"critical", "phi tighten"},
// don't layout blocks until critical edges have been removed
{"critical", "layout"},
// regalloc requires the removal of all critical edges
diff --git a/src/cmd/compile/internal/ssa/config.go b/src/cmd/compile/internal/ssa/config.go
index 5d7504392c..e46d937e42 100644
--- a/src/cmd/compile/internal/ssa/config.go
+++ b/src/cmd/compile/internal/ssa/config.go
@@ -21,6 +21,7 @@ type Config struct {
Types Types
lowerBlock blockRewriter // lowering function
lowerValue valueRewriter // lowering function
+ splitLoad valueRewriter // function for splitting merged load ops; only used on some architectures
registers []Register // machine registers
gpRegMask regMask // general purpose integer register mask
fpRegMask regMask // floating point register mask
@@ -201,6 +202,7 @@ func NewConfig(arch string, types Types, ctxt *obj.Link, optimize bool) *Config
c.RegSize = 8
c.lowerBlock = rewriteBlockAMD64
c.lowerValue = rewriteValueAMD64
+ c.splitLoad = rewriteValueAMD64splitload
c.registers = registersAMD64[:]
c.gpRegMask = gpRegMaskAMD64
c.fpRegMask = fpRegMaskAMD64
@@ -212,6 +214,7 @@ func NewConfig(arch string, types Types, ctxt *obj.Link, optimize bool) *Config
c.RegSize = 8
c.lowerBlock = rewriteBlockAMD64
c.lowerValue = rewriteValueAMD64
+ c.splitLoad = rewriteValueAMD64splitload
c.registers = registersAMD64[:]
c.gpRegMask = gpRegMaskAMD64
c.fpRegMask = fpRegMaskAMD64
@@ -224,6 +227,7 @@ func NewConfig(arch string, types Types, ctxt *obj.Link, optimize bool) *Config
c.RegSize = 4
c.lowerBlock = rewriteBlock386
c.lowerValue = rewriteValue386
+ c.splitLoad = rewriteValue386splitload
c.registers = registers386[:]
c.gpRegMask = gpRegMask386
c.fpRegMask = fpRegMask386
diff --git a/src/cmd/compile/internal/ssa/deadcode.go b/src/cmd/compile/internal/ssa/deadcode.go
index 72cce448ce..24d1d88165 100644
--- a/src/cmd/compile/internal/ssa/deadcode.go
+++ b/src/cmd/compile/internal/ssa/deadcode.go
@@ -9,9 +9,12 @@ import (
)
// findlive returns the reachable blocks and live values in f.
+// The caller should call f.retDeadcodeLive(live) when it is done with it.
func findlive(f *Func) (reachable []bool, live []bool) {
reachable = ReachableBlocks(f)
- live, _ = liveValues(f, reachable)
+ var order []*Value
+ live, order = liveValues(f, reachable)
+ f.retDeadcodeLiveOrderStmts(order)
return
}
@@ -48,8 +51,21 @@ func ReachableBlocks(f *Func) []bool {
// to be statements in reversed data flow order.
// The second result is used to help conserve statement boundaries for debugging.
// reachable is a map from block ID to whether the block is reachable.
+// The caller should call f.retDeadcodeLive(live) and f.retDeadcodeLiveOrderStmts(liveOrderStmts)
+// when they are done with the return values.
func liveValues(f *Func, reachable []bool) (live []bool, liveOrderStmts []*Value) {
- live = make([]bool, f.NumValues())
+ live = f.newDeadcodeLive()
+ if cap(live) < f.NumValues() {
+ live = make([]bool, f.NumValues())
+ } else {
+ live = live[:f.NumValues()]
+ for i := range live {
+ live[i] = false
+ }
+ }
+
+ liveOrderStmts = f.newDeadcodeLiveOrderStmts()
+ liveOrderStmts = liveOrderStmts[:0]
// After regalloc, consider all values to be live.
// See the comment at the top of regalloc.go and in deadcode for details.
@@ -60,8 +76,33 @@ func liveValues(f *Func, reachable []bool) (live []bool, liveOrderStmts []*Value
return
}
+ // Record all the inline indexes we need
+ var liveInlIdx map[int]bool
+ pt := f.Config.ctxt.PosTable
+ for _, b := range f.Blocks {
+ for _, v := range b.Values {
+ i := pt.Pos(v.Pos).Base().InliningIndex()
+ if i < 0 {
+ continue
+ }
+ if liveInlIdx == nil {
+ liveInlIdx = map[int]bool{}
+ }
+ liveInlIdx[i] = true
+ }
+ i := pt.Pos(b.Pos).Base().InliningIndex()
+ if i < 0 {
+ continue
+ }
+ if liveInlIdx == nil {
+ liveInlIdx = map[int]bool{}
+ }
+ liveInlIdx[i] = true
+ }
+
// Find all live values
- q := make([]*Value, 0, 64) // stack-like worklist of unscanned values
+ q := f.Cache.deadcode.q[:0]
+ defer func() { f.Cache.deadcode.q = q }()
// Starting set: all control values of reachable blocks are live.
// Calls are live (because callee can observe the memory state).
@@ -86,6 +127,13 @@ func liveValues(f *Func, reachable []bool) (live []bool, liveOrderStmts []*Value
}
if v.Type.IsVoid() && !live[v.ID] {
// The only Void ops are nil checks and inline marks. We must keep these.
+ if v.Op == OpInlMark && !liveInlIdx[int(v.AuxInt)] {
+ // We don't need marks for bodies that
+ // have been completely optimized away.
+ // TODO: save marks only for bodies which
+ // have a faulting instruction or a call?
+ continue
+ }
live[v.ID] = true
q = append(q, v)
if v.Pos.IsStmt() != src.PosNotStmt {
@@ -163,6 +211,8 @@ func deadcode(f *Func) {
// Find live values.
live, order := liveValues(f, reachable)
+ defer f.retDeadcodeLive(live)
+ defer f.retDeadcodeLiveOrderStmts(order)
// Remove dead & duplicate entries from namedValues map.
s := f.newSparseSet(f.NumValues())
@@ -208,7 +258,7 @@ func deadcode(f *Func) {
if !live[v.ID] {
v.resetArgs()
if v.Pos.IsStmt() == src.PosIsStmt && reachable[b.ID] {
- pendingLines.set(v.Pos.Line(), int32(i)) // TODO could be more than one pos for a line
+ pendingLines.set(v.Pos, int32(i)) // TODO could be more than one pos for a line
}
}
}
@@ -217,20 +267,19 @@ func deadcode(f *Func) {
// Find new homes for lost lines -- require earliest in data flow with same line that is also in same block
for i := len(order) - 1; i >= 0; i-- {
w := order[i]
- if j := pendingLines.get(w.Pos.Line()); j > -1 && f.Blocks[j] == w.Block {
+ if j := pendingLines.get(w.Pos); j > -1 && f.Blocks[j] == w.Block {
w.Pos = w.Pos.WithIsStmt()
- pendingLines.remove(w.Pos.Line())
+ pendingLines.remove(w.Pos)
}
}
// Any boundary that failed to match a live value can move to a block end
- for i := 0; i < pendingLines.size(); i++ {
- l, bi := pendingLines.getEntry(i)
+ pendingLines.foreachEntry(func(j int32, l uint, bi int32) {
b := f.Blocks[bi]
- if b.Pos.Line() == l {
+ if b.Pos.Line() == l && b.Pos.FileIndex() == j {
b.Pos = b.Pos.WithIsStmt()
}
- }
+ })
// Remove dead values from blocks' value list. Return dead
// values to the allocator.
diff --git a/src/cmd/compile/internal/ssa/debug.go b/src/cmd/compile/internal/ssa/debug.go
index c2736d837c..13fe67cbca 100644
--- a/src/cmd/compile/internal/ssa/debug.go
+++ b/src/cmd/compile/internal/ssa/debug.go
@@ -1077,6 +1077,12 @@ func (state *debugState) writePendingEntry(varID VarID, endBlock, endValue ID) {
// PutLocationList adds list (a location list in its intermediate representation) to listSym.
func (debugInfo *FuncDebug) PutLocationList(list []byte, ctxt *obj.Link, listSym, startPC *obj.LSym) {
getPC := debugInfo.GetPC
+
+ if ctxt.UseBASEntries {
+ listSym.WriteInt(ctxt, listSym.Size, ctxt.Arch.PtrSize, ^0)
+ listSym.WriteAddr(ctxt, listSym.Size, ctxt.Arch.PtrSize, startPC, 0)
+ }
+
// Re-read list, translating its address from block/value ID to PC.
for i := 0; i < len(list); {
begin := getPC(decodeValue(ctxt, readPtr(ctxt, list[i:])))
@@ -1090,17 +1096,21 @@ func (debugInfo *FuncDebug) PutLocationList(list []byte, ctxt *obj.Link, listSym
end = 1
}
- writePtr(ctxt, list[i:], uint64(begin))
- writePtr(ctxt, list[i+ctxt.Arch.PtrSize:], uint64(end))
+ if ctxt.UseBASEntries {
+ listSym.WriteInt(ctxt, listSym.Size, ctxt.Arch.PtrSize, int64(begin))
+ listSym.WriteInt(ctxt, listSym.Size, ctxt.Arch.PtrSize, int64(end))
+ } else {
+ listSym.WriteCURelativeAddr(ctxt, listSym.Size, startPC, int64(begin))
+ listSym.WriteCURelativeAddr(ctxt, listSym.Size, startPC, int64(end))
+ }
+
i += 2 * ctxt.Arch.PtrSize
- i += 2 + int(ctxt.Arch.ByteOrder.Uint16(list[i:]))
+ datalen := 2 + int(ctxt.Arch.ByteOrder.Uint16(list[i:]))
+ listSym.WriteBytes(ctxt, listSym.Size, list[i:i+datalen]) // copy datalen and location encoding
+ i += datalen
}
- // Base address entry.
- listSym.WriteInt(ctxt, listSym.Size, ctxt.Arch.PtrSize, ^0)
- listSym.WriteAddr(ctxt, listSym.Size, ctxt.Arch.PtrSize, startPC, 0)
// Location list contents, now with real PCs.
- listSym.WriteBytes(ctxt, listSym.Size, list)
// End entry.
listSym.WriteInt(ctxt, listSym.Size, ctxt.Arch.PtrSize, 0)
listSym.WriteInt(ctxt, listSym.Size, ctxt.Arch.PtrSize, 0)
diff --git a/src/cmd/compile/internal/ssa/debug_test.go b/src/cmd/compile/internal/ssa/debug_test.go
index 0a409bec2c..73a0afb82c 100644
--- a/src/cmd/compile/internal/ssa/debug_test.go
+++ b/src/cmd/compile/internal/ssa/debug_test.go
@@ -22,24 +22,27 @@ import (
"time"
)
-var update = flag.Bool("u", false, "update test reference files")
-var verbose = flag.Bool("v", false, "print debugger interactions (very verbose)")
-var dryrun = flag.Bool("n", false, "just print the command line and first debugging bits")
-var useDelve = flag.Bool("d", false, "use Delve (dlv) instead of gdb, use dlv reverence files")
-var force = flag.Bool("f", false, "force run under not linux-amd64; also do not use tempdir")
+var (
+ update = flag.Bool("u", false, "update test reference files")
+ verbose = flag.Bool("v", false, "print debugger interactions (very verbose)")
+ dryrun = flag.Bool("n", false, "just print the command line and first debugging bits")
+ useGdb = flag.Bool("g", false, "use Gdb instead of Delve (dlv), use gdb reference files")
+ force = flag.Bool("f", false, "force run under not linux-amd64; also do not use tempdir")
+ repeats = flag.Bool("r", false, "detect repeats in debug steps and don't ignore them")
+ inlines = flag.Bool("i", false, "do inlining for gdb (makes testing flaky till inlining info is correct)")
+)
-var repeats = flag.Bool("r", false, "detect repeats in debug steps and don't ignore them")
-var inlines = flag.Bool("i", false, "do inlining for gdb (makes testing flaky till inlining info is correct)")
-
-var hexRe = regexp.MustCompile("0x[a-zA-Z0-9]+")
-var numRe = regexp.MustCompile("-?[0-9]+")
-var stringRe = regexp.MustCompile("\"([^\\\"]|(\\.))*\"")
-var leadingDollarNumberRe = regexp.MustCompile("^[$][0-9]+")
-var optOutGdbRe = regexp.MustCompile("[<]optimized out[>]")
-var numberColonRe = regexp.MustCompile("^ *[0-9]+:")
+var (
+ hexRe = regexp.MustCompile("0x[a-zA-Z0-9]+")
+ numRe = regexp.MustCompile("-?[0-9]+")
+ stringRe = regexp.MustCompile("\"([^\\\"]|(\\.))*\"")
+ leadingDollarNumberRe = regexp.MustCompile("^[$][0-9]+")
+ optOutGdbRe = regexp.MustCompile("[<]optimized out[>]")
+ numberColonRe = regexp.MustCompile("^ *[0-9]+:")
+)
var gdb = "gdb" // Might be "ggdb" on Darwin, because gdb no longer part of XCode
-var debugger = "gdb" // For naming files, etc.
+var debugger = "dlv" // For naming files, etc.
var gogcflags = os.Getenv("GO_GCFLAGS")
@@ -98,23 +101,18 @@ func TestNexting(t *testing.T) {
}
testenv.MustHaveGoBuild(t)
- if !*useDelve && !*force && !(runtime.GOOS == "linux" && runtime.GOARCH == "amd64") {
+ if *useGdb && !*force && !(runtime.GOOS == "linux" && runtime.GOARCH == "amd64") {
// Running gdb on OSX/darwin is very flaky.
// Sometimes it is called ggdb, depending on how it is installed.
// It also sometimes requires an admin password typed into a dialog box.
// Various architectures tend to differ slightly sometimes, and keeping them
// all in sync is a pain for people who don't have them all at hand,
// so limit testing to amd64 (for now)
- skipReasons += "not run unless linux-amd64 or -d (delve) or -f (force); "
+ skipReasons += "not run when testing gdb (-g) unless forced (-f) or linux-amd64"
}
- if *useDelve {
- debugger = "dlv"
- _, err := exec.LookPath("dlv")
- if err != nil {
- skipReasons += "not run because dlv (requested by -d option) not on path; "
- }
- } else {
+ if *useGdb {
+ debugger = "gdb"
_, err := exec.LookPath(gdb)
if err != nil {
if runtime.GOOS != "darwin" {
@@ -123,12 +121,18 @@ func TestNexting(t *testing.T) {
// On Darwin, MacPorts installs gdb as "ggdb".
_, err = exec.LookPath("ggdb")
if err != nil {
- skipReasons += "not run because gdb (and also ggdb) not on path; "
+ skipReasons += "not run because gdb (and also ggdb) request by -g option not on path; "
} else {
gdb = "ggdb"
}
}
}
+ } else { // Delve
+ debugger = "dlv"
+ _, err := exec.LookPath("dlv")
+ if err != nil {
+ skipReasons += "not run because dlv not on path; "
+ }
}
if skipReasons != "" {
@@ -137,14 +141,14 @@ func TestNexting(t *testing.T) {
optFlags := "" // Whatever flags are needed to test debugging of optimized code.
dbgFlags := "-N -l"
- if !*useDelve && !*inlines {
+ if *useGdb && !*inlines {
// For gdb (default), disable inlining so that a compiler test does not depend on library code.
- // TODO: Technically not necessary in 1.10, but it causes a largish regression that needs investigation.
+ // TODO: Technically not necessary in 1.10 and later, but it causes a largish regression that needs investigation.
optFlags += " -l"
}
moreargs := []string{}
- if !*useDelve && (runtime.GOOS == "darwin" || runtime.GOOS == "windows") {
+ if *useGdb && (runtime.GOOS == "darwin" || runtime.GOOS == "windows") {
// gdb and lldb on Darwin do not deal with compressed dwarf.
// also, Windows.
moreargs = append(moreargs, "-ldflags=-compressdwarf=false")
@@ -156,33 +160,53 @@ func TestNexting(t *testing.T) {
subTest(t, debugger+"-dbg-race", "i22600", dbgFlags, append(moreargs, "-race")...)
- optSubTest(t, debugger+"-opt", "hist", optFlags, moreargs...)
- optSubTest(t, debugger+"-opt", "scopes", optFlags, moreargs...)
+ optSubTest(t, debugger+"-opt", "hist", optFlags, 1000, moreargs...)
+ optSubTest(t, debugger+"-opt", "scopes", optFlags, 1000, moreargs...)
+
+ // Was optSubtest, this test is observed flaky on Linux in Docker on (busy) macOS, probably because of timing
+ // glitches in this harness.
+ // TODO get rid of timing glitches in this harness.
+ skipSubTest(t, debugger+"-opt", "infloop", optFlags, 10, moreargs...)
+
}
// subTest creates a subtest that compiles basename.go with the specified gcflags and additional compiler arguments,
// then runs the debugger on the resulting binary, with any comment-specified actions matching tag triggered.
func subTest(t *testing.T, tag string, basename string, gcflags string, moreargs ...string) {
t.Run(tag+"-"+basename, func(t *testing.T) {
- testNexting(t, basename, tag, gcflags, moreargs...)
+ if t.Name() == "TestNexting/gdb-dbg-i22558" {
+ testenv.SkipFlaky(t, 31263)
+ }
+ testNexting(t, basename, tag, gcflags, 1000, moreargs...)
+ })
+}
+
+// skipSubTest is the same as subTest except that it skips the test if execution is not forced (-f)
+func skipSubTest(t *testing.T, tag string, basename string, gcflags string, count int, moreargs ...string) {
+ t.Run(tag+"-"+basename, func(t *testing.T) {
+ if *force {
+ testNexting(t, basename, tag, gcflags, count, moreargs...)
+ } else {
+ t.Skip("skipping flaky test becaused not forced (-f)")
+ }
})
}
// optSubTest is the same as subTest except that it skips the test if the runtime and libraries
// were not compiled with optimization turned on. (The skip may not be necessary with Go 1.10 and later)
-func optSubTest(t *testing.T, tag string, basename string, gcflags string, moreargs ...string) {
+func optSubTest(t *testing.T, tag string, basename string, gcflags string, count int, moreargs ...string) {
// If optimized test is run with unoptimized libraries (compiled with -N -l), it is very likely to fail.
// This occurs in the noopt builders (for example).
t.Run(tag+"-"+basename, func(t *testing.T) {
if *force || optimizedLibs {
- testNexting(t, basename, tag, gcflags, moreargs...)
+ testNexting(t, basename, tag, gcflags, count, moreargs...)
} else {
t.Skip("skipping for unoptimized stdlib/runtime")
}
})
}
-func testNexting(t *testing.T, base, tag, gcflags string, moreArgs ...string) {
+func testNexting(t *testing.T, base, tag, gcflags string, count int, moreArgs ...string) {
// (1) In testdata, build sample.go into test-sample.
// (2) Run debugger gathering a history
// (3) Read expected history from testdata/sample..nexts
@@ -214,12 +238,12 @@ func testNexting(t *testing.T, base, tag, gcflags string, moreArgs ...string) {
nextlog := testbase + ".nexts"
tmplog := tmpbase + ".nexts"
var dbg dbgr
- if *useDelve {
- dbg = newDelve(tag, exe)
- } else {
+ if *useGdb {
dbg = newGdb(tag, exe)
+ } else {
+ dbg = newDelve(tag, exe)
}
- h1 := runDbgr(dbg, 1000)
+ h1 := runDbgr(dbg, count)
if *dryrun {
fmt.Printf("# Tag for above is %s\n", dbg.tag())
return
@@ -261,6 +285,7 @@ func runDbgr(dbg dbgr, maxNext int) *nextHist {
break
}
}
+ dbg.quit()
h := dbg.hist()
return h
}
@@ -298,7 +323,7 @@ func (t tstring) String() string {
}
type pos struct {
- line uint16
+ line uint32
file uint8 // Artifact of plans to implement differencing instead of calling out to diff.
}
@@ -386,7 +411,7 @@ func (h *nextHist) add(file, line, text string) bool {
}
}
l := len(h.ps)
- p := pos{line: uint16(li), file: fi}
+ p := pos{line: uint32(li), file: fi}
if l == 0 || *repeats || h.ps[l-1] != p {
h.ps = append(h.ps, p)
@@ -534,7 +559,7 @@ func (s *delveState) start() {
panic(fmt.Sprintf("There was an error [start] running '%s', %v\n", line, err))
}
s.ioState.readExpecting(-1, 5000, "Type 'help' for list of commands.")
- expect("Breakpoint [0-9]+ set at ", s.ioState.writeReadExpect("b main.test\n", "[(]dlv[)] "))
+ s.ioState.writeReadExpect("b main.test\n", "[(]dlv[)] ")
s.stepnext("c")
}
@@ -593,7 +618,7 @@ func (s *gdbState) start() {
line := asCommandLine("", s.cmd)
panic(fmt.Sprintf("There was an error [start] running '%s', %v\n", line, err))
}
- s.ioState.readExpecting(-1, -1, "[(]gdb[)] ")
+ s.ioState.readSimpleExpecting("[(]gdb[)] ")
x := s.ioState.writeReadExpect("b main.test\n", "[(]gdb[)] ")
expect("Breakpoint [0-9]+ at", x)
s.stepnext(run)
@@ -721,6 +746,15 @@ func varsToPrint(line, lookfor string) []string {
func (s *gdbState) quit() {
response := s.ioState.writeRead("q\n")
if strings.Contains(response.o, "Quit anyway? (y or n)") {
+ defer func() {
+ if r := recover(); r != nil {
+ if s, ok := r.(string); !(ok && strings.Contains(s, "'Y\n'")) {
+ // Not the panic that was expected.
+ fmt.Printf("Expected a broken pipe panic, but saw the following panic instead")
+ panic(r)
+ }
+ }
+ }()
s.ioState.writeRead("Y\n")
}
}
@@ -826,7 +860,7 @@ func (s *ioState) writeReadExpect(ss, expectRE string) tstring {
if err != nil {
panic(fmt.Sprintf("There was an error writing '%s', %v\n", ss, err))
}
- return s.readExpecting(-1, -1, expectRE)
+ return s.readSimpleExpecting(expectRE)
}
func (s *ioState) readExpecting(millis, interlineTimeout int, expectedRE string) tstring {
@@ -873,6 +907,40 @@ loop:
return s.last
}
+func (s *ioState) readSimpleExpecting(expectedRE string) tstring {
+ s.last = tstring{}
+ var re *regexp.Regexp
+ if expectedRE != "" {
+ re = regexp.MustCompile(expectedRE)
+ }
+ for {
+ select {
+ case x, ok := <-s.outChan:
+ if !ok {
+ s.outChan = nil
+ }
+ s.last.o += x
+ case x, ok := <-s.errChan:
+ if !ok {
+ s.errChan = nil
+ }
+ s.last.e += x
+ }
+ if re != nil {
+ if re.MatchString(s.last.o) {
+ break
+ }
+ if re.MatchString(s.last.e) {
+ break
+ }
+ }
+ }
+ if *verbose {
+ fmt.Printf("<= %s%s", s.last.o, s.last.e)
+ }
+ return s.last
+}
+
// replaceEnv returns a new environment derived from env
// by removing any existing definition of ev and adding ev=evv.
func replaceEnv(env []string, ev string, evv string) []string {
@@ -934,7 +1002,8 @@ func expect(want string, got tstring) {
if match {
return
}
- match, err = regexp.MatchString(want, got.e)
+ // Ignore error as we have already checked for it before
+ match, _ = regexp.MatchString(want, got.e)
if match {
return
}
diff --git a/src/cmd/compile/internal/ssa/flagalloc.go b/src/cmd/compile/internal/ssa/flagalloc.go
index 56c12e320a..7a2ecc22dc 100644
--- a/src/cmd/compile/internal/ssa/flagalloc.go
+++ b/src/cmd/compile/internal/ssa/flagalloc.go
@@ -4,30 +4,6 @@
package ssa
-// When breaking up a combined load-compare to separated load and compare operations,
-// opLoad specifies the load operation, and opCmp specifies the compare operation.
-type typeCmdLoadMap struct {
- opLoad Op
- opCmp Op
-}
-
-var opCmpLoadMap = map[Op]typeCmdLoadMap{
- OpAMD64CMPQload: {OpAMD64MOVQload, OpAMD64CMPQ},
- OpAMD64CMPLload: {OpAMD64MOVLload, OpAMD64CMPL},
- OpAMD64CMPWload: {OpAMD64MOVWload, OpAMD64CMPW},
- OpAMD64CMPBload: {OpAMD64MOVBload, OpAMD64CMPB},
- Op386CMPLload: {Op386MOVLload, Op386CMPL},
- Op386CMPWload: {Op386MOVWload, Op386CMPW},
- Op386CMPBload: {Op386MOVBload, Op386CMPB},
- OpAMD64CMPQconstload: {OpAMD64MOVQload, OpAMD64CMPQconst},
- OpAMD64CMPLconstload: {OpAMD64MOVLload, OpAMD64CMPLconst},
- OpAMD64CMPWconstload: {OpAMD64MOVWload, OpAMD64CMPWconst},
- OpAMD64CMPBconstload: {OpAMD64MOVBload, OpAMD64CMPBconst},
- Op386CMPLconstload: {Op386MOVLload, Op386CMPLconst},
- Op386CMPWconstload: {Op386MOVWload, Op386CMPWconst},
- Op386CMPBconstload: {Op386MOVBload, Op386CMPBconst},
-}
-
// flagalloc allocates the flag register among all the flag-generating
// instructions. Flag values are recomputed if they need to be
// spilled/restored.
@@ -142,67 +118,10 @@ func flagalloc(f *Func) {
// If v will be spilled, and v uses memory, then we must split it
// into a load + a flag generator.
- // TODO: figure out how to do this without arch-dependent code.
if spill[v.ID] && v.MemoryArg() != nil {
- switch v.Op {
- case OpAMD64CMPQload:
- load := b.NewValue2IA(v.Pos, opCmpLoadMap[v.Op].opLoad, f.Config.Types.UInt64, v.AuxInt, v.Aux, v.Args[0], v.Args[2])
- v.Op = opCmpLoadMap[v.Op].opCmp
- v.AuxInt = 0
- v.Aux = nil
- v.SetArgs2(load, v.Args[1])
- case OpAMD64CMPLload, Op386CMPLload:
- load := b.NewValue2IA(v.Pos, opCmpLoadMap[v.Op].opLoad, f.Config.Types.UInt32, v.AuxInt, v.Aux, v.Args[0], v.Args[2])
- v.Op = opCmpLoadMap[v.Op].opCmp
- v.AuxInt = 0
- v.Aux = nil
- v.SetArgs2(load, v.Args[1])
- case OpAMD64CMPWload, Op386CMPWload:
- load := b.NewValue2IA(v.Pos, opCmpLoadMap[v.Op].opLoad, f.Config.Types.UInt16, v.AuxInt, v.Aux, v.Args[0], v.Args[2])
- v.Op = opCmpLoadMap[v.Op].opCmp
- v.AuxInt = 0
- v.Aux = nil
- v.SetArgs2(load, v.Args[1])
- case OpAMD64CMPBload, Op386CMPBload:
- load := b.NewValue2IA(v.Pos, opCmpLoadMap[v.Op].opLoad, f.Config.Types.UInt8, v.AuxInt, v.Aux, v.Args[0], v.Args[2])
- v.Op = opCmpLoadMap[v.Op].opCmp
- v.AuxInt = 0
- v.Aux = nil
- v.SetArgs2(load, v.Args[1])
-
- case OpAMD64CMPQconstload:
- vo := v.AuxValAndOff()
- load := b.NewValue2IA(v.Pos, opCmpLoadMap[v.Op].opLoad, f.Config.Types.UInt64, vo.Off(), v.Aux, v.Args[0], v.Args[1])
- v.Op = opCmpLoadMap[v.Op].opCmp
- v.AuxInt = vo.Val()
- v.Aux = nil
- v.SetArgs1(load)
- case OpAMD64CMPLconstload, Op386CMPLconstload:
- vo := v.AuxValAndOff()
- load := b.NewValue2IA(v.Pos, opCmpLoadMap[v.Op].opLoad, f.Config.Types.UInt32, vo.Off(), v.Aux, v.Args[0], v.Args[1])
- v.Op = opCmpLoadMap[v.Op].opCmp
- v.AuxInt = vo.Val()
- v.Aux = nil
- v.SetArgs1(load)
- case OpAMD64CMPWconstload, Op386CMPWconstload:
- vo := v.AuxValAndOff()
- load := b.NewValue2IA(v.Pos, opCmpLoadMap[v.Op].opLoad, f.Config.Types.UInt16, vo.Off(), v.Aux, v.Args[0], v.Args[1])
- v.Op = opCmpLoadMap[v.Op].opCmp
- v.AuxInt = vo.Val()
- v.Aux = nil
- v.SetArgs1(load)
- case OpAMD64CMPBconstload, Op386CMPBconstload:
- vo := v.AuxValAndOff()
- load := b.NewValue2IA(v.Pos, opCmpLoadMap[v.Op].opLoad, f.Config.Types.UInt8, vo.Off(), v.Aux, v.Args[0], v.Args[1])
- v.Op = opCmpLoadMap[v.Op].opCmp
- v.AuxInt = vo.Val()
- v.Aux = nil
- v.SetArgs1(load)
-
- default:
+ if !f.Config.splitLoad(v) {
f.Fatalf("can't split flag generator: %s", v.LongString())
}
-
}
// Make sure any flag arg of v is in the flags register.
diff --git a/src/cmd/compile/internal/ssa/func.go b/src/cmd/compile/internal/ssa/func.go
index 7e7e2042d9..cdd5161913 100644
--- a/src/cmd/compile/internal/ssa/func.go
+++ b/src/cmd/compile/internal/ssa/func.go
@@ -38,9 +38,10 @@ type Func struct {
// Given an environment variable used for debug hash match,
// what file (if any) receives the yes/no logging?
logfiles map[string]writeSyncer
- HTMLWriter *HTMLWriter // html writer, for debugging
- DebugTest bool // default true unless $GOSSAHASH != ""; as a debugging aid, make new code conditional on this and use GOSSAHASH to binary search for failing cases
- PrintOrHtmlSSA bool // true if GOSSAFUNC matches, true even if fe.Log() (spew phase results to stdout) is false.
+ HTMLWriter *HTMLWriter // html writer, for debugging
+ DebugTest bool // default true unless $GOSSAHASH != ""; as a debugging aid, make new code conditional on this and use GOSSAHASH to binary search for failing cases
+ PrintOrHtmlSSA bool // true if GOSSAFUNC matches, true even if fe.Log() (spew phase results to stdout) is false.
+ ruleMatches map[string]int // number of times countRule was called during compilation for any given string
scheduled bool // Values in Blocks are in final order
laidout bool // Blocks are ordered
@@ -64,11 +65,11 @@ type Func struct {
freeValues *Value // free Values linked by argstorage[0]. All other fields except ID are 0/nil.
freeBlocks *Block // free Blocks linked by succstorage[0].b. All other fields except ID are 0/nil.
- cachedPostorder []*Block // cached postorder traversal
- cachedIdom []*Block // cached immediate dominators
- cachedSdom SparseTree // cached dominator tree
- cachedLoopnest *loopnest // cached loop nest information
- cachedLineStarts *biasedSparseMap // cached map/set of line numbers to integers
+ cachedPostorder []*Block // cached postorder traversal
+ cachedIdom []*Block // cached immediate dominators
+ cachedSdom SparseTree // cached dominator tree
+ cachedLoopnest *loopnest // cached loop nest information
+ cachedLineStarts *xposmap // cached map/set of xpos to integers
auxmap auxmap // map from aux values to opaque ids used by CSE
constants map[int64][]*Value // constants cache, keyed by constant value; users must check value's Op and Type
@@ -153,6 +154,33 @@ func (f *Func) retPoset(po *poset) {
f.Cache.scrPoset = append(f.Cache.scrPoset, po)
}
+// newDeadcodeLive returns a slice for the
+// deadcode pass to use to indicate which values are live.
+func (f *Func) newDeadcodeLive() []bool {
+ r := f.Cache.deadcode.live
+ f.Cache.deadcode.live = nil
+ return r
+}
+
+// retDeadcodeLive returns a deadcode live value slice for re-use.
+func (f *Func) retDeadcodeLive(live []bool) {
+ f.Cache.deadcode.live = live
+}
+
+// newDeadcodeLiveOrderStmts returns a slice for the
+// deadcode pass to use to indicate which values
+// need special treatment for statement boundaries.
+func (f *Func) newDeadcodeLiveOrderStmts() []*Value {
+ r := f.Cache.deadcode.liveOrderStmts
+ f.Cache.deadcode.liveOrderStmts = nil
+ return r
+}
+
+// retDeadcodeLiveOrderStmts returns a deadcode liveOrderStmts slice for re-use.
+func (f *Func) retDeadcodeLiveOrderStmts(liveOrderStmts []*Value) {
+ f.Cache.deadcode.liveOrderStmts = liveOrderStmts
+}
+
// newValue allocates a new Value with the given fields and places it at the end of b.Values.
func (f *Func) newValue(op Op, t *types.Type, b *Block, pos src.XPos) *Value {
var v *Value
@@ -485,6 +513,18 @@ func (b *Block) NewValue4(pos src.XPos, op Op, t *types.Type, arg0, arg1, arg2,
return v
}
+// NewValue4I returns a new value in the block with four arguments and and auxint value.
+func (b *Block) NewValue4I(pos src.XPos, op Op, t *types.Type, auxint int64, arg0, arg1, arg2, arg3 *Value) *Value {
+ v := b.Func.newValue(op, t, b, pos)
+ v.AuxInt = auxint
+ v.Args = []*Value{arg0, arg1, arg2, arg3}
+ arg0.Uses++
+ arg1.Uses++
+ arg2.Uses++
+ arg3.Uses++
+ return v
+}
+
// constVal returns a constant value for c.
func (f *Func) constVal(op Op, t *types.Type, c int64, setAuxInt bool) *Value {
if f.constants == nil {
diff --git a/src/cmd/compile/internal/ssa/func_test.go b/src/cmd/compile/internal/ssa/func_test.go
index 74ce62ba7e..5f6f80f72a 100644
--- a/src/cmd/compile/internal/ssa/func_test.go
+++ b/src/cmd/compile/internal/ssa/func_test.go
@@ -152,7 +152,7 @@ func (c *Conf) Fun(entry string, blocs ...bloc) fun {
// But not both.
f.Cache = new(Cache)
f.pass = &emptyPass
- f.cachedLineStarts = newBiasedSparseMap(0, 100)
+ f.cachedLineStarts = newXposmap(map[int]lineRange{0: {0, 100}, 1: {0, 100}, 2: {0, 100}, 3: {0, 100}, 4: {0, 100}})
blocks := make(map[string]*Block)
values := make(map[string]*Value)
diff --git a/src/cmd/compile/internal/ssa/fuse.go b/src/cmd/compile/internal/ssa/fuse.go
index c451904124..73532ee6e5 100644
--- a/src/cmd/compile/internal/ssa/fuse.go
+++ b/src/cmd/compile/internal/ssa/fuse.go
@@ -36,6 +36,9 @@ func fuse(f *Func, typ fuseType) {
changed = fuseBlockPlain(b) || changed
}
}
+ if changed {
+ f.invalidateCFG()
+ }
}
}
@@ -207,7 +210,6 @@ func fuseBlockPlain(b *Block) bool {
if f.Entry == b {
f.Entry = c
}
- f.invalidateCFG()
// trash b, just in case
b.Kind = BlockInvalid
diff --git a/src/cmd/compile/internal/ssa/gen/386.rules b/src/cmd/compile/internal/ssa/gen/386.rules
index 2ee0b2a928..d7cbba1718 100644
--- a/src/cmd/compile/internal/ssa/gen/386.rules
+++ b/src/cmd/compile/internal/ssa/gen/386.rules
@@ -165,6 +165,11 @@
(Rsh16x64 x (Const64 [c])) && uint64(c) >= 16 -> (SARWconst x [15])
(Rsh8x64 x (Const64 [c])) && uint64(c) >= 8 -> (SARBconst x [7])
+// constant rotates
+(RotateLeft32 x (MOVLconst [c])) -> (ROLLconst [c&31] x)
+(RotateLeft16 x (MOVLconst [c])) -> (ROLWconst [c&15] x)
+(RotateLeft8 x (MOVLconst [c])) -> (ROLBconst [c&7] x)
+
// Lowering comparisons
(Less32 x y) -> (SETL (CMPL x y))
(Less16 x y) -> (SETL (CMPW x y))
@@ -385,6 +390,14 @@
// Write barrier.
(WB {fn} destptr srcptr mem) -> (LoweredWB {fn} destptr srcptr mem)
+(PanicBounds [kind] x y mem) && boundsABI(kind) == 0 -> (LoweredPanicBoundsA [kind] x y mem)
+(PanicBounds [kind] x y mem) && boundsABI(kind) == 1 -> (LoweredPanicBoundsB [kind] x y mem)
+(PanicBounds [kind] x y mem) && boundsABI(kind) == 2 -> (LoweredPanicBoundsC [kind] x y mem)
+
+(PanicExtend [kind] hi lo y mem) && boundsABI(kind) == 0 -> (LoweredPanicExtendA [kind] hi lo y mem)
+(PanicExtend [kind] hi lo y mem) && boundsABI(kind) == 1 -> (LoweredPanicExtendB [kind] hi lo y mem)
+(PanicExtend [kind] hi lo y mem) && boundsABI(kind) == 2 -> (LoweredPanicExtendC [kind] hi lo y mem)
+
// ***************************
// Above: lowering rules
// Below: optimizations
diff --git a/src/cmd/compile/internal/ssa/gen/386Ops.go b/src/cmd/compile/internal/ssa/gen/386Ops.go
index fa3e7cd375..2851c4321c 100644
--- a/src/cmd/compile/internal/ssa/gen/386Ops.go
+++ b/src/cmd/compile/internal/ssa/gen/386Ops.go
@@ -86,6 +86,8 @@ func init() {
ax = buildReg("AX")
cx = buildReg("CX")
dx = buildReg("DX")
+ bx = buildReg("BX")
+ si = buildReg("SI")
gp = buildReg("AX CX DX BX BP SI DI")
fp = buildReg("X0 X1 X2 X3 X4 X5 X6 X7")
gpsp = gp | buildReg("SP")
@@ -524,6 +526,17 @@ func init() {
// It saves all GP registers if necessary, but may clobber others.
{name: "LoweredWB", argLength: 3, reg: regInfo{inputs: []regMask{buildReg("DI"), ax}, clobbers: callerSave &^ gp}, clobberFlags: true, aux: "Sym", symEffect: "None"},
+ // There are three of these functions so that they can have three different register inputs.
+ // When we check 0 <= c <= cap (A), then 0 <= b <= c (B), then 0 <= a <= b (C), we want the
+ // default registers to match so we don't need to copy registers around unnecessarily.
+ {name: "LoweredPanicBoundsA", argLength: 3, aux: "Int64", reg: regInfo{inputs: []regMask{dx, bx}}, typ: "Mem"}, // arg0=idx, arg1=len, arg2=mem, returns memory. AuxInt contains report code (see PanicBounds in genericOps.go).
+ {name: "LoweredPanicBoundsB", argLength: 3, aux: "Int64", reg: regInfo{inputs: []regMask{cx, dx}}, typ: "Mem"}, // arg0=idx, arg1=len, arg2=mem, returns memory. AuxInt contains report code (see PanicBounds in genericOps.go).
+ {name: "LoweredPanicBoundsC", argLength: 3, aux: "Int64", reg: regInfo{inputs: []regMask{ax, cx}}, typ: "Mem"}, // arg0=idx, arg1=len, arg2=mem, returns memory. AuxInt contains report code (see PanicBounds in genericOps.go).
+ // Extend ops are the same as Bounds ops except the indexes are 64-bit.
+ {name: "LoweredPanicExtendA", argLength: 4, aux: "Int64", reg: regInfo{inputs: []regMask{si, dx, bx}}, typ: "Mem"}, // arg0=idxHi, arg1=idxLo, arg2=len, arg3=mem, returns memory. AuxInt contains report code (see PanicExtend in genericOps.go).
+ {name: "LoweredPanicExtendB", argLength: 4, aux: "Int64", reg: regInfo{inputs: []regMask{si, cx, dx}}, typ: "Mem"}, // arg0=idxHi, arg1=idxLo, arg2=len, arg3=mem, returns memory. AuxInt contains report code (see PanicExtend in genericOps.go).
+ {name: "LoweredPanicExtendC", argLength: 4, aux: "Int64", reg: regInfo{inputs: []regMask{si, ax, cx}}, typ: "Mem"}, // arg0=idxHi, arg1=idxLo, arg2=len, arg3=mem, returns memory. AuxInt contains report code (see PanicExtend in genericOps.go).
+
// Constant flag values. For any comparison, there are 5 possible
// outcomes: the three from the signed total order (<,==,>) and the
// three from the unsigned total order. The == cases overlap.
diff --git a/src/cmd/compile/internal/ssa/gen/386splitload.rules b/src/cmd/compile/internal/ssa/gen/386splitload.rules
new file mode 100644
index 0000000000..7d24700750
--- /dev/null
+++ b/src/cmd/compile/internal/ssa/gen/386splitload.rules
@@ -0,0 +1,9 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// See the top of AMD64splitload.rules for discussion of these rules.
+
+(CMP(L|W|B)load {sym} [off] ptr x mem) -> (CMP(L|W|B) (MOV(L|W|B)load {sym} [off] ptr mem) x)
+
+(CMP(L|W|B)constload {sym} [vo] ptr mem) -> (CMP(L|W|B)const (MOV(L|W|B)load {sym} [offOnly(vo)] ptr mem) [valOnly(vo)])
diff --git a/src/cmd/compile/internal/ssa/gen/AMD64.rules b/src/cmd/compile/internal/ssa/gen/AMD64.rules
index 6b2d3f77cf..5e59f7def2 100644
--- a/src/cmd/compile/internal/ssa/gen/AMD64.rules
+++ b/src/cmd/compile/internal/ssa/gen/AMD64.rules
@@ -225,7 +225,8 @@
(NeqPtr x y) && config.PtrSize == 4 -> (SETNE (CMPL x y))
(Neq(32|64)F x y) -> (SETNEF (UCOMIS(S|D) x y))
-(Int64Hi x) -> (SHRQconst [32] x) // needed for amd64p32
+(Int64Hi x) -> (SHRQconst [32] x) // needed for amd64p32
+(Int64Lo x) -> x
// Lowering loads
(Load ptr mem) && (is64BitInt(t) || isPtr(t) && config.PtrSize == 8) -> (MOVQload ptr mem)
@@ -526,6 +527,7 @@
(If cond yes no) -> (NE (TESTB cond cond) yes no)
// Atomic loads. Other than preserving their ordering with respect to other loads, nothing special here.
+(AtomicLoad8 ptr mem) -> (MOVBatomicload ptr mem)
(AtomicLoad32 ptr mem) -> (MOVLatomicload ptr mem)
(AtomicLoad64 ptr mem) -> (MOVQatomicload ptr mem)
(AtomicLoadPtr ptr mem) && config.PtrSize == 8 -> (MOVQatomicload ptr mem)
@@ -561,6 +563,15 @@
// Write barrier.
(WB {fn} destptr srcptr mem) -> (LoweredWB {fn} destptr srcptr mem)
+(PanicBounds [kind] x y mem) && boundsABI(kind) == 0 -> (LoweredPanicBoundsA [kind] x y mem)
+(PanicBounds [kind] x y mem) && boundsABI(kind) == 1 -> (LoweredPanicBoundsB [kind] x y mem)
+(PanicBounds [kind] x y mem) && boundsABI(kind) == 2 -> (LoweredPanicBoundsC [kind] x y mem)
+
+// For amd64p32
+(PanicExtend [kind] hi lo y mem) && boundsABI(kind) == 0 -> (LoweredPanicExtendA [kind] hi lo y mem)
+(PanicExtend [kind] hi lo y mem) && boundsABI(kind) == 1 -> (LoweredPanicExtendB [kind] hi lo y mem)
+(PanicExtend [kind] hi lo y mem) && boundsABI(kind) == 2 -> (LoweredPanicExtendC [kind] hi lo y mem)
+
// ***************************
// Above: lowering rules
// Below: optimizations
@@ -1358,65 +1369,65 @@
((SETNE|SETG|SETGE|SETA|SETAE) (FlagGT_UGT)) -> (MOVLconst [1])
((SETEQ|SETL|SETLE|SETB|SETBE) (FlagGT_UGT)) -> (MOVLconst [0])
-(SETEQstore [off] {sym} ptr x:(FlagEQ) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
-(SETEQstore [off] {sym} ptr x:(FlagLT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETEQstore [off] {sym} ptr x:(FlagLT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETEQstore [off] {sym} ptr x:(FlagGT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETEQstore [off] {sym} ptr x:(FlagGT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETEQstore [off] {sym} ptr (FlagEQ) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETEQstore [off] {sym} ptr (FlagLT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETEQstore [off] {sym} ptr (FlagLT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETEQstore [off] {sym} ptr (FlagGT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETEQstore [off] {sym} ptr (FlagGT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETNEstore [off] {sym} ptr x:(FlagEQ) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETNEstore [off] {sym} ptr x:(FlagLT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
-(SETNEstore [off] {sym} ptr x:(FlagLT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
-(SETNEstore [off] {sym} ptr x:(FlagGT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
-(SETNEstore [off] {sym} ptr x:(FlagGT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETNEstore [off] {sym} ptr (FlagEQ) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETNEstore [off] {sym} ptr (FlagLT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETNEstore [off] {sym} ptr (FlagLT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETNEstore [off] {sym} ptr (FlagGT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETNEstore [off] {sym} ptr (FlagGT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
-(SETLstore [off] {sym} ptr x:(FlagEQ) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETLstore [off] {sym} ptr x:(FlagLT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
-(SETLstore [off] {sym} ptr x:(FlagLT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
-(SETLstore [off] {sym} ptr x:(FlagGT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETLstore [off] {sym} ptr x:(FlagGT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETLstore [off] {sym} ptr (FlagEQ) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETLstore [off] {sym} ptr (FlagLT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETLstore [off] {sym} ptr (FlagLT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETLstore [off] {sym} ptr (FlagGT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETLstore [off] {sym} ptr (FlagGT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETLEstore [off] {sym} ptr x:(FlagEQ) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
-(SETLEstore [off] {sym} ptr x:(FlagLT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
-(SETLEstore [off] {sym} ptr x:(FlagLT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
-(SETLEstore [off] {sym} ptr x:(FlagGT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETLEstore [off] {sym} ptr x:(FlagGT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETLEstore [off] {sym} ptr (FlagEQ) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETLEstore [off] {sym} ptr (FlagLT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETLEstore [off] {sym} ptr (FlagLT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETLEstore [off] {sym} ptr (FlagGT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETLEstore [off] {sym} ptr (FlagGT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETGstore [off] {sym} ptr x:(FlagEQ) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETGstore [off] {sym} ptr x:(FlagLT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETGstore [off] {sym} ptr x:(FlagLT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETGstore [off] {sym} ptr x:(FlagGT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
-(SETGstore [off] {sym} ptr x:(FlagGT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETGstore [off] {sym} ptr (FlagEQ) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETGstore [off] {sym} ptr (FlagLT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETGstore [off] {sym} ptr (FlagLT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETGstore [off] {sym} ptr (FlagGT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETGstore [off] {sym} ptr (FlagGT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
-(SETGEstore [off] {sym} ptr x:(FlagEQ) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
-(SETGEstore [off] {sym} ptr x:(FlagLT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETGEstore [off] {sym} ptr x:(FlagLT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETGEstore [off] {sym} ptr x:(FlagGT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
-(SETGEstore [off] {sym} ptr x:(FlagGT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETGEstore [off] {sym} ptr (FlagEQ) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETGEstore [off] {sym} ptr (FlagLT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETGEstore [off] {sym} ptr (FlagLT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETGEstore [off] {sym} ptr (FlagGT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETGEstore [off] {sym} ptr (FlagGT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
-(SETBstore [off] {sym} ptr x:(FlagEQ) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETBstore [off] {sym} ptr x:(FlagLT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
-(SETBstore [off] {sym} ptr x:(FlagLT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETBstore [off] {sym} ptr x:(FlagGT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
-(SETBstore [off] {sym} ptr x:(FlagGT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETBstore [off] {sym} ptr (FlagEQ) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETBstore [off] {sym} ptr (FlagLT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETBstore [off] {sym} ptr (FlagLT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETBstore [off] {sym} ptr (FlagGT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETBstore [off] {sym} ptr (FlagGT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETBEstore [off] {sym} ptr x:(FlagEQ) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
-(SETBEstore [off] {sym} ptr x:(FlagLT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
-(SETBEstore [off] {sym} ptr x:(FlagLT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETBEstore [off] {sym} ptr x:(FlagGT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
-(SETBEstore [off] {sym} ptr x:(FlagGT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETBEstore [off] {sym} ptr (FlagEQ) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETBEstore [off] {sym} ptr (FlagLT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETBEstore [off] {sym} ptr (FlagLT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETBEstore [off] {sym} ptr (FlagGT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETBEstore [off] {sym} ptr (FlagGT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETAstore [off] {sym} ptr x:(FlagEQ) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETAstore [off] {sym} ptr x:(FlagLT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETAstore [off] {sym} ptr x:(FlagLT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
-(SETAstore [off] {sym} ptr x:(FlagGT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETAstore [off] {sym} ptr x:(FlagGT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETAstore [off] {sym} ptr (FlagEQ) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETAstore [off] {sym} ptr (FlagLT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETAstore [off] {sym} ptr (FlagLT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETAstore [off] {sym} ptr (FlagGT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETAstore [off] {sym} ptr (FlagGT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
-(SETAEstore [off] {sym} ptr x:(FlagEQ) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
-(SETAEstore [off] {sym} ptr x:(FlagLT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETAEstore [off] {sym} ptr x:(FlagLT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
-(SETAEstore [off] {sym} ptr x:(FlagGT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
-(SETAEstore [off] {sym} ptr x:(FlagGT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETAEstore [off] {sym} ptr (FlagEQ) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETAEstore [off] {sym} ptr (FlagLT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETAEstore [off] {sym} ptr (FlagLT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
+(SETAEstore [off] {sym} ptr (FlagGT_ULT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [0]) mem)
+(SETAEstore [off] {sym} ptr (FlagGT_UGT) mem) -> (MOVBstore [off] {sym} ptr (MOVLconst [1]) mem)
// Remove redundant *const ops
(ADDQconst [0] x) -> x
@@ -2383,14 +2394,10 @@
((ADD|SUB|AND|OR|XOR|BTC|BTR|BTS)Qmodify [off] {sym} ptr x mem)
// Merge ADDQconst and LEAQ into atomic loads.
-(MOVQatomicload [off1] {sym} (ADDQconst [off2] ptr) mem) && is32Bit(off1+off2) ->
- (MOVQatomicload [off1+off2] {sym} ptr mem)
-(MOVLatomicload [off1] {sym} (ADDQconst [off2] ptr) mem) && is32Bit(off1+off2) ->
- (MOVLatomicload [off1+off2] {sym} ptr mem)
-(MOVQatomicload [off1] {sym1} (LEAQ [off2] {sym2} ptr) mem) && is32Bit(off1+off2) && canMergeSym(sym1, sym2) ->
- (MOVQatomicload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
-(MOVLatomicload [off1] {sym1} (LEAQ [off2] {sym2} ptr) mem) && is32Bit(off1+off2) && canMergeSym(sym1, sym2) ->
- (MOVLatomicload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
+(MOV(Q|L|B)atomicload [off1] {sym} (ADDQconst [off2] ptr) mem) && is32Bit(off1+off2) ->
+ (MOV(Q|L|B)atomicload [off1+off2] {sym} ptr mem)
+(MOV(Q|L|B)atomicload [off1] {sym1} (LEAQ [off2] {sym2} ptr) mem) && is32Bit(off1+off2) && canMergeSym(sym1, sym2) ->
+ (MOV(Q|L|B)atomicload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
// Merge ADDQconst and LEAQ into atomic stores.
(XCHGQ [off1] {sym} val (ADDQconst [off2] ptr) mem) && is32Bit(off1+off2) ->
diff --git a/src/cmd/compile/internal/ssa/gen/AMD64Ops.go b/src/cmd/compile/internal/ssa/gen/AMD64Ops.go
index c2ed0ea1d9..739733cf16 100644
--- a/src/cmd/compile/internal/ssa/gen/AMD64Ops.go
+++ b/src/cmd/compile/internal/ssa/gen/AMD64Ops.go
@@ -93,6 +93,8 @@ func init() {
ax = buildReg("AX")
cx = buildReg("CX")
dx = buildReg("DX")
+ bx = buildReg("BX")
+ si = buildReg("SI")
gp = buildReg("AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15")
fp = buildReg("X0 X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15")
gpsp = gp | buildReg("SP")
@@ -174,17 +176,17 @@ func init() {
{name: "MOVSDload", argLength: 2, reg: fpload, asm: "MOVSD", aux: "SymOff", faultOnNilArg0: true, symEffect: "Read"}, // fp64 load
{name: "MOVSSconst", reg: fp01, asm: "MOVSS", aux: "Float32", rematerializeable: true}, // fp32 constant
{name: "MOVSDconst", reg: fp01, asm: "MOVSD", aux: "Float64", rematerializeable: true}, // fp64 constant
- {name: "MOVSSloadidx1", argLength: 3, reg: fploadidx, asm: "MOVSS", aux: "SymOff", symEffect: "Read"}, // fp32 load indexed by i
- {name: "MOVSSloadidx4", argLength: 3, reg: fploadidx, asm: "MOVSS", aux: "SymOff", symEffect: "Read"}, // fp32 load indexed by 4*i
- {name: "MOVSDloadidx1", argLength: 3, reg: fploadidx, asm: "MOVSD", aux: "SymOff", symEffect: "Read"}, // fp64 load indexed by i
- {name: "MOVSDloadidx8", argLength: 3, reg: fploadidx, asm: "MOVSD", aux: "SymOff", symEffect: "Read"}, // fp64 load indexed by 8*i
+ {name: "MOVSSloadidx1", argLength: 3, reg: fploadidx, asm: "MOVSS", scale: 1, aux: "SymOff", symEffect: "Read"}, // fp32 load indexed by i
+ {name: "MOVSSloadidx4", argLength: 3, reg: fploadidx, asm: "MOVSS", scale: 4, aux: "SymOff", symEffect: "Read"}, // fp32 load indexed by 4*i
+ {name: "MOVSDloadidx1", argLength: 3, reg: fploadidx, asm: "MOVSD", scale: 1, aux: "SymOff", symEffect: "Read"}, // fp64 load indexed by i
+ {name: "MOVSDloadidx8", argLength: 3, reg: fploadidx, asm: "MOVSD", scale: 8, aux: "SymOff", symEffect: "Read"}, // fp64 load indexed by 8*i
{name: "MOVSSstore", argLength: 3, reg: fpstore, asm: "MOVSS", aux: "SymOff", faultOnNilArg0: true, symEffect: "Write"}, // fp32 store
{name: "MOVSDstore", argLength: 3, reg: fpstore, asm: "MOVSD", aux: "SymOff", faultOnNilArg0: true, symEffect: "Write"}, // fp64 store
- {name: "MOVSSstoreidx1", argLength: 4, reg: fpstoreidx, asm: "MOVSS", aux: "SymOff", symEffect: "Write"}, // fp32 indexed by i store
- {name: "MOVSSstoreidx4", argLength: 4, reg: fpstoreidx, asm: "MOVSS", aux: "SymOff", symEffect: "Write"}, // fp32 indexed by 4i store
- {name: "MOVSDstoreidx1", argLength: 4, reg: fpstoreidx, asm: "MOVSD", aux: "SymOff", symEffect: "Write"}, // fp64 indexed by i store
- {name: "MOVSDstoreidx8", argLength: 4, reg: fpstoreidx, asm: "MOVSD", aux: "SymOff", symEffect: "Write"}, // fp64 indexed by 8i store
+ {name: "MOVSSstoreidx1", argLength: 4, reg: fpstoreidx, asm: "MOVSS", scale: 1, aux: "SymOff", symEffect: "Write"}, // fp32 indexed by i store
+ {name: "MOVSSstoreidx4", argLength: 4, reg: fpstoreidx, asm: "MOVSS", scale: 4, aux: "SymOff", symEffect: "Write"}, // fp32 indexed by 4i store
+ {name: "MOVSDstoreidx1", argLength: 4, reg: fpstoreidx, asm: "MOVSD", scale: 1, aux: "SymOff", symEffect: "Write"}, // fp64 indexed by i store
+ {name: "MOVSDstoreidx8", argLength: 4, reg: fpstoreidx, asm: "MOVSD", scale: 8, aux: "SymOff", symEffect: "Write"}, // fp64 indexed by 8i store
{name: "ADDSSload", argLength: 3, reg: fp21load, asm: "ADDSS", aux: "SymOff", resultInArg0: true, faultOnNilArg1: true, symEffect: "Read"}, // fp32 arg0 + tmp, tmp loaded from arg1+auxint+aux, arg2 = mem
{name: "ADDSDload", argLength: 3, reg: fp21load, asm: "ADDSD", aux: "SymOff", resultInArg0: true, faultOnNilArg1: true, symEffect: "Read"}, // fp64 arg0 + tmp, tmp loaded from arg1+auxint+aux, arg2 = mem
@@ -544,21 +546,21 @@ func init() {
{name: "PXOR", argLength: 2, reg: fp21, asm: "PXOR", commutative: true, resultInArg0: true}, // exclusive or, applied to X regs for float negation.
- {name: "LEAQ", argLength: 1, reg: gp11sb, asm: "LEAQ", aux: "SymOff", rematerializeable: true, symEffect: "Addr"}, // arg0 + auxint + offset encoded in aux
- {name: "LEAL", argLength: 1, reg: gp11sb, asm: "LEAL", aux: "SymOff", rematerializeable: true, symEffect: "Addr"}, // arg0 + auxint + offset encoded in aux
- {name: "LEAW", argLength: 1, reg: gp11sb, asm: "LEAW", aux: "SymOff", rematerializeable: true, symEffect: "Addr"}, // arg0 + auxint + offset encoded in aux
- {name: "LEAQ1", argLength: 2, reg: gp21sb, asm: "LEAQ", commutative: true, aux: "SymOff", symEffect: "Addr"}, // arg0 + arg1 + auxint + aux
- {name: "LEAL1", argLength: 2, reg: gp21sb, asm: "LEAL", commutative: true, aux: "SymOff", symEffect: "Addr"}, // arg0 + arg1 + auxint + aux
- {name: "LEAW1", argLength: 2, reg: gp21sb, asm: "LEAW", commutative: true, aux: "SymOff", symEffect: "Addr"}, // arg0 + arg1 + auxint + aux
- {name: "LEAQ2", argLength: 2, reg: gp21sb, asm: "LEAQ", aux: "SymOff", symEffect: "Addr"}, // arg0 + 2*arg1 + auxint + aux
- {name: "LEAL2", argLength: 2, reg: gp21sb, asm: "LEAL", aux: "SymOff", symEffect: "Addr"}, // arg0 + 2*arg1 + auxint + aux
- {name: "LEAW2", argLength: 2, reg: gp21sb, asm: "LEAW", aux: "SymOff", symEffect: "Addr"}, // arg0 + 2*arg1 + auxint + aux
- {name: "LEAQ4", argLength: 2, reg: gp21sb, asm: "LEAQ", aux: "SymOff", symEffect: "Addr"}, // arg0 + 4*arg1 + auxint + aux
- {name: "LEAL4", argLength: 2, reg: gp21sb, asm: "LEAL", aux: "SymOff", symEffect: "Addr"}, // arg0 + 4*arg1 + auxint + aux
- {name: "LEAW4", argLength: 2, reg: gp21sb, asm: "LEAW", aux: "SymOff", symEffect: "Addr"}, // arg0 + 4*arg1 + auxint + aux
- {name: "LEAQ8", argLength: 2, reg: gp21sb, asm: "LEAQ", aux: "SymOff", symEffect: "Addr"}, // arg0 + 8*arg1 + auxint + aux
- {name: "LEAL8", argLength: 2, reg: gp21sb, asm: "LEAL", aux: "SymOff", symEffect: "Addr"}, // arg0 + 8*arg1 + auxint + aux
- {name: "LEAW8", argLength: 2, reg: gp21sb, asm: "LEAW", aux: "SymOff", symEffect: "Addr"}, // arg0 + 8*arg1 + auxint + aux
+ {name: "LEAQ", argLength: 1, reg: gp11sb, asm: "LEAQ", aux: "SymOff", rematerializeable: true, symEffect: "Addr"}, // arg0 + auxint + offset encoded in aux
+ {name: "LEAL", argLength: 1, reg: gp11sb, asm: "LEAL", aux: "SymOff", rematerializeable: true, symEffect: "Addr"}, // arg0 + auxint + offset encoded in aux
+ {name: "LEAW", argLength: 1, reg: gp11sb, asm: "LEAW", aux: "SymOff", rematerializeable: true, symEffect: "Addr"}, // arg0 + auxint + offset encoded in aux
+ {name: "LEAQ1", argLength: 2, reg: gp21sb, asm: "LEAQ", scale: 1, commutative: true, aux: "SymOff", symEffect: "Addr"}, // arg0 + arg1 + auxint + aux
+ {name: "LEAL1", argLength: 2, reg: gp21sb, asm: "LEAL", scale: 1, commutative: true, aux: "SymOff", symEffect: "Addr"}, // arg0 + arg1 + auxint + aux
+ {name: "LEAW1", argLength: 2, reg: gp21sb, asm: "LEAW", scale: 1, commutative: true, aux: "SymOff", symEffect: "Addr"}, // arg0 + arg1 + auxint + aux
+ {name: "LEAQ2", argLength: 2, reg: gp21sb, asm: "LEAQ", scale: 2, aux: "SymOff", symEffect: "Addr"}, // arg0 + 2*arg1 + auxint + aux
+ {name: "LEAL2", argLength: 2, reg: gp21sb, asm: "LEAL", scale: 2, aux: "SymOff", symEffect: "Addr"}, // arg0 + 2*arg1 + auxint + aux
+ {name: "LEAW2", argLength: 2, reg: gp21sb, asm: "LEAW", scale: 2, aux: "SymOff", symEffect: "Addr"}, // arg0 + 2*arg1 + auxint + aux
+ {name: "LEAQ4", argLength: 2, reg: gp21sb, asm: "LEAQ", scale: 4, aux: "SymOff", symEffect: "Addr"}, // arg0 + 4*arg1 + auxint + aux
+ {name: "LEAL4", argLength: 2, reg: gp21sb, asm: "LEAL", scale: 4, aux: "SymOff", symEffect: "Addr"}, // arg0 + 4*arg1 + auxint + aux
+ {name: "LEAW4", argLength: 2, reg: gp21sb, asm: "LEAW", scale: 4, aux: "SymOff", symEffect: "Addr"}, // arg0 + 4*arg1 + auxint + aux
+ {name: "LEAQ8", argLength: 2, reg: gp21sb, asm: "LEAQ", scale: 8, aux: "SymOff", symEffect: "Addr"}, // arg0 + 8*arg1 + auxint + aux
+ {name: "LEAL8", argLength: 2, reg: gp21sb, asm: "LEAL", scale: 8, aux: "SymOff", symEffect: "Addr"}, // arg0 + 8*arg1 + auxint + aux
+ {name: "LEAW8", argLength: 2, reg: gp21sb, asm: "LEAW", scale: 8, aux: "SymOff", symEffect: "Addr"}, // arg0 + 8*arg1 + auxint + aux
// Note: LEAx{1,2,4,8} must not have OpSB as either argument.
// auxint+aux == add auxint and the offset of the symbol in aux (if any) to the effective address
@@ -577,24 +579,24 @@ func init() {
{name: "MOVOstore", argLength: 3, reg: fpstore, asm: "MOVUPS", aux: "SymOff", typ: "Mem", faultOnNilArg0: true, symEffect: "Write"}, // store 16 bytes in arg1 to arg0+auxint+aux. arg2=mem
// indexed loads/stores
- {name: "MOVBloadidx1", argLength: 3, reg: gploadidx, commutative: true, asm: "MOVBLZX", aux: "SymOff", typ: "UInt8", symEffect: "Read"}, // load a byte from arg0+arg1+auxint+aux. arg2=mem
- {name: "MOVWloadidx1", argLength: 3, reg: gploadidx, commutative: true, asm: "MOVWLZX", aux: "SymOff", typ: "UInt16", symEffect: "Read"}, // load 2 bytes from arg0+arg1+auxint+aux. arg2=mem
- {name: "MOVWloadidx2", argLength: 3, reg: gploadidx, asm: "MOVWLZX", aux: "SymOff", typ: "UInt16", symEffect: "Read"}, // load 2 bytes from arg0+2*arg1+auxint+aux. arg2=mem
- {name: "MOVLloadidx1", argLength: 3, reg: gploadidx, commutative: true, asm: "MOVL", aux: "SymOff", typ: "UInt32", symEffect: "Read"}, // load 4 bytes from arg0+arg1+auxint+aux. arg2=mem
- {name: "MOVLloadidx4", argLength: 3, reg: gploadidx, asm: "MOVL", aux: "SymOff", typ: "UInt32", symEffect: "Read"}, // load 4 bytes from arg0+4*arg1+auxint+aux. arg2=mem
- {name: "MOVLloadidx8", argLength: 3, reg: gploadidx, asm: "MOVL", aux: "SymOff", typ: "UInt32", symEffect: "Read"}, // load 4 bytes from arg0+8*arg1+auxint+aux. arg2=mem
- {name: "MOVQloadidx1", argLength: 3, reg: gploadidx, commutative: true, asm: "MOVQ", aux: "SymOff", typ: "UInt64", symEffect: "Read"}, // load 8 bytes from arg0+arg1+auxint+aux. arg2=mem
- {name: "MOVQloadidx8", argLength: 3, reg: gploadidx, asm: "MOVQ", aux: "SymOff", typ: "UInt64", symEffect: "Read"}, // load 8 bytes from arg0+8*arg1+auxint+aux. arg2=mem
+ {name: "MOVBloadidx1", argLength: 3, reg: gploadidx, commutative: true, asm: "MOVBLZX", scale: 1, aux: "SymOff", typ: "UInt8", symEffect: "Read"}, // load a byte from arg0+arg1+auxint+aux. arg2=mem
+ {name: "MOVWloadidx1", argLength: 3, reg: gploadidx, commutative: true, asm: "MOVWLZX", scale: 1, aux: "SymOff", typ: "UInt16", symEffect: "Read"}, // load 2 bytes from arg0+arg1+auxint+aux. arg2=mem
+ {name: "MOVWloadidx2", argLength: 3, reg: gploadidx, asm: "MOVWLZX", scale: 2, aux: "SymOff", typ: "UInt16", symEffect: "Read"}, // load 2 bytes from arg0+2*arg1+auxint+aux. arg2=mem
+ {name: "MOVLloadidx1", argLength: 3, reg: gploadidx, commutative: true, asm: "MOVL", scale: 1, aux: "SymOff", typ: "UInt32", symEffect: "Read"}, // load 4 bytes from arg0+arg1+auxint+aux. arg2=mem
+ {name: "MOVLloadidx4", argLength: 3, reg: gploadidx, asm: "MOVL", scale: 4, aux: "SymOff", typ: "UInt32", symEffect: "Read"}, // load 4 bytes from arg0+4*arg1+auxint+aux. arg2=mem
+ {name: "MOVLloadidx8", argLength: 3, reg: gploadidx, asm: "MOVL", scale: 8, aux: "SymOff", typ: "UInt32", symEffect: "Read"}, // load 4 bytes from arg0+8*arg1+auxint+aux. arg2=mem
+ {name: "MOVQloadidx1", argLength: 3, reg: gploadidx, commutative: true, asm: "MOVQ", scale: 1, aux: "SymOff", typ: "UInt64", symEffect: "Read"}, // load 8 bytes from arg0+arg1+auxint+aux. arg2=mem
+ {name: "MOVQloadidx8", argLength: 3, reg: gploadidx, asm: "MOVQ", scale: 8, aux: "SymOff", typ: "UInt64", symEffect: "Read"}, // load 8 bytes from arg0+8*arg1+auxint+aux. arg2=mem
// TODO: sign-extending indexed loads
// TODO: mark the MOVXstoreidx1 ops as commutative. Generates too many rewrite rules at the moment.
- {name: "MOVBstoreidx1", argLength: 4, reg: gpstoreidx, asm: "MOVB", aux: "SymOff", symEffect: "Write"}, // store byte in arg2 to arg0+arg1+auxint+aux. arg3=mem
- {name: "MOVWstoreidx1", argLength: 4, reg: gpstoreidx, asm: "MOVW", aux: "SymOff", symEffect: "Write"}, // store 2 bytes in arg2 to arg0+arg1+auxint+aux. arg3=mem
- {name: "MOVWstoreidx2", argLength: 4, reg: gpstoreidx, asm: "MOVW", aux: "SymOff", symEffect: "Write"}, // store 2 bytes in arg2 to arg0+2*arg1+auxint+aux. arg3=mem
- {name: "MOVLstoreidx1", argLength: 4, reg: gpstoreidx, asm: "MOVL", aux: "SymOff", symEffect: "Write"}, // store 4 bytes in arg2 to arg0+arg1+auxint+aux. arg3=mem
- {name: "MOVLstoreidx4", argLength: 4, reg: gpstoreidx, asm: "MOVL", aux: "SymOff", symEffect: "Write"}, // store 4 bytes in arg2 to arg0+4*arg1+auxint+aux. arg3=mem
- {name: "MOVLstoreidx8", argLength: 4, reg: gpstoreidx, asm: "MOVL", aux: "SymOff", symEffect: "Write"}, // store 4 bytes in arg2 to arg0+8*arg1+auxint+aux. arg3=mem
- {name: "MOVQstoreidx1", argLength: 4, reg: gpstoreidx, asm: "MOVQ", aux: "SymOff", symEffect: "Write"}, // store 8 bytes in arg2 to arg0+arg1+auxint+aux. arg3=mem
- {name: "MOVQstoreidx8", argLength: 4, reg: gpstoreidx, asm: "MOVQ", aux: "SymOff", symEffect: "Write"}, // store 8 bytes in arg2 to arg0+8*arg1+auxint+aux. arg3=mem
+ {name: "MOVBstoreidx1", argLength: 4, reg: gpstoreidx, asm: "MOVB", scale: 1, aux: "SymOff", symEffect: "Write"}, // store byte in arg2 to arg0+arg1+auxint+aux. arg3=mem
+ {name: "MOVWstoreidx1", argLength: 4, reg: gpstoreidx, asm: "MOVW", scale: 1, aux: "SymOff", symEffect: "Write"}, // store 2 bytes in arg2 to arg0+arg1+auxint+aux. arg3=mem
+ {name: "MOVWstoreidx2", argLength: 4, reg: gpstoreidx, asm: "MOVW", scale: 2, aux: "SymOff", symEffect: "Write"}, // store 2 bytes in arg2 to arg0+2*arg1+auxint+aux. arg3=mem
+ {name: "MOVLstoreidx1", argLength: 4, reg: gpstoreidx, asm: "MOVL", scale: 1, aux: "SymOff", symEffect: "Write"}, // store 4 bytes in arg2 to arg0+arg1+auxint+aux. arg3=mem
+ {name: "MOVLstoreidx4", argLength: 4, reg: gpstoreidx, asm: "MOVL", scale: 4, aux: "SymOff", symEffect: "Write"}, // store 4 bytes in arg2 to arg0+4*arg1+auxint+aux. arg3=mem
+ {name: "MOVLstoreidx8", argLength: 4, reg: gpstoreidx, asm: "MOVL", scale: 8, aux: "SymOff", symEffect: "Write"}, // store 4 bytes in arg2 to arg0+8*arg1+auxint+aux. arg3=mem
+ {name: "MOVQstoreidx1", argLength: 4, reg: gpstoreidx, asm: "MOVQ", scale: 1, aux: "SymOff", symEffect: "Write"}, // store 8 bytes in arg2 to arg0+arg1+auxint+aux. arg3=mem
+ {name: "MOVQstoreidx8", argLength: 4, reg: gpstoreidx, asm: "MOVQ", scale: 8, aux: "SymOff", symEffect: "Write"}, // store 8 bytes in arg2 to arg0+8*arg1+auxint+aux. arg3=mem
// TODO: add size-mismatched indexed loads, like MOVBstoreidx4.
// For storeconst ops, the AuxInt field encodes both
@@ -605,13 +607,13 @@ func init() {
{name: "MOVLstoreconst", argLength: 2, reg: gpstoreconst, asm: "MOVL", aux: "SymValAndOff", typ: "Mem", faultOnNilArg0: true, symEffect: "Write"}, // store low 4 bytes of ...
{name: "MOVQstoreconst", argLength: 2, reg: gpstoreconst, asm: "MOVQ", aux: "SymValAndOff", typ: "Mem", faultOnNilArg0: true, symEffect: "Write"}, // store 8 bytes of ...
- {name: "MOVBstoreconstidx1", argLength: 3, reg: gpstoreconstidx, asm: "MOVB", aux: "SymValAndOff", typ: "Mem", symEffect: "Write"}, // store low byte of ValAndOff(AuxInt).Val() to arg0+1*arg1+ValAndOff(AuxInt).Off()+aux. arg2=mem
- {name: "MOVWstoreconstidx1", argLength: 3, reg: gpstoreconstidx, asm: "MOVW", aux: "SymValAndOff", typ: "Mem", symEffect: "Write"}, // store low 2 bytes of ... arg1 ...
- {name: "MOVWstoreconstidx2", argLength: 3, reg: gpstoreconstidx, asm: "MOVW", aux: "SymValAndOff", typ: "Mem", symEffect: "Write"}, // store low 2 bytes of ... 2*arg1 ...
- {name: "MOVLstoreconstidx1", argLength: 3, reg: gpstoreconstidx, asm: "MOVL", aux: "SymValAndOff", typ: "Mem", symEffect: "Write"}, // store low 4 bytes of ... arg1 ...
- {name: "MOVLstoreconstidx4", argLength: 3, reg: gpstoreconstidx, asm: "MOVL", aux: "SymValAndOff", typ: "Mem", symEffect: "Write"}, // store low 4 bytes of ... 4*arg1 ...
- {name: "MOVQstoreconstidx1", argLength: 3, reg: gpstoreconstidx, asm: "MOVQ", aux: "SymValAndOff", typ: "Mem", symEffect: "Write"}, // store 8 bytes of ... arg1 ...
- {name: "MOVQstoreconstidx8", argLength: 3, reg: gpstoreconstidx, asm: "MOVQ", aux: "SymValAndOff", typ: "Mem", symEffect: "Write"}, // store 8 bytes of ... 8*arg1 ...
+ {name: "MOVBstoreconstidx1", argLength: 3, reg: gpstoreconstidx, asm: "MOVB", scale: 1, aux: "SymValAndOff", typ: "Mem", symEffect: "Write"}, // store low byte of ValAndOff(AuxInt).Val() to arg0+1*arg1+ValAndOff(AuxInt).Off()+aux. arg2=mem
+ {name: "MOVWstoreconstidx1", argLength: 3, reg: gpstoreconstidx, asm: "MOVW", scale: 1, aux: "SymValAndOff", typ: "Mem", symEffect: "Write"}, // store low 2 bytes of ... arg1 ...
+ {name: "MOVWstoreconstidx2", argLength: 3, reg: gpstoreconstidx, asm: "MOVW", scale: 2, aux: "SymValAndOff", typ: "Mem", symEffect: "Write"}, // store low 2 bytes of ... 2*arg1 ...
+ {name: "MOVLstoreconstidx1", argLength: 3, reg: gpstoreconstidx, asm: "MOVL", scale: 1, aux: "SymValAndOff", typ: "Mem", symEffect: "Write"}, // store low 4 bytes of ... arg1 ...
+ {name: "MOVLstoreconstidx4", argLength: 3, reg: gpstoreconstidx, asm: "MOVL", scale: 4, aux: "SymValAndOff", typ: "Mem", symEffect: "Write"}, // store low 4 bytes of ... 4*arg1 ...
+ {name: "MOVQstoreconstidx1", argLength: 3, reg: gpstoreconstidx, asm: "MOVQ", scale: 1, aux: "SymValAndOff", typ: "Mem", symEffect: "Write"}, // store 8 bytes of ... arg1 ...
+ {name: "MOVQstoreconstidx8", argLength: 3, reg: gpstoreconstidx, asm: "MOVQ", scale: 8, aux: "SymValAndOff", typ: "Mem", symEffect: "Write"}, // store 8 bytes of ... 8*arg1 ...
// arg0 = pointer to start of memory to zero
// arg1 = value to store (will always be zero)
@@ -709,6 +711,19 @@ func init() {
// It saves all GP registers if necessary, but may clobber others.
{name: "LoweredWB", argLength: 3, reg: regInfo{inputs: []regMask{buildReg("DI"), ax}, clobbers: callerSave &^ gp}, clobberFlags: true, aux: "Sym", symEffect: "None"},
+ // There are three of these functions so that they can have three different register inputs.
+ // When we check 0 <= c <= cap (A), then 0 <= b <= c (B), then 0 <= a <= b (C), we want the
+ // default registers to match so we don't need to copy registers around unnecessarily.
+ {name: "LoweredPanicBoundsA", argLength: 3, aux: "Int64", reg: regInfo{inputs: []regMask{dx, bx}}, typ: "Mem"}, // arg0=idx, arg1=len, arg2=mem, returns memory. AuxInt contains report code (see PanicBounds in generic.go).
+ {name: "LoweredPanicBoundsB", argLength: 3, aux: "Int64", reg: regInfo{inputs: []regMask{cx, dx}}, typ: "Mem"}, // arg0=idx, arg1=len, arg2=mem, returns memory. AuxInt contains report code (see PanicBounds in generic.go).
+ {name: "LoweredPanicBoundsC", argLength: 3, aux: "Int64", reg: regInfo{inputs: []regMask{ax, cx}}, typ: "Mem"}, // arg0=idx, arg1=len, arg2=mem, returns memory. AuxInt contains report code (see PanicBounds in generic.go).
+
+ // amd64p32 only: PanicBounds ops take 32-bit indexes.
+ // The Extend ops are the same as the Bounds ops except the indexes are 64-bit.
+ {name: "LoweredPanicExtendA", argLength: 4, aux: "Int64", reg: regInfo{inputs: []regMask{si, dx, bx}}, typ: "Mem"}, // arg0=idxHi, arg1=idxLo, arg2=len, arg3=mem, returns memory. AuxInt contains report code (see PanicExtend in genericOps.go).
+ {name: "LoweredPanicExtendB", argLength: 4, aux: "Int64", reg: regInfo{inputs: []regMask{si, cx, dx}}, typ: "Mem"}, // arg0=idxHi, arg1=idxLo, arg2=len, arg3=mem, returns memory. AuxInt contains report code (see PanicExtend in genericOps.go).
+ {name: "LoweredPanicExtendC", argLength: 4, aux: "Int64", reg: regInfo{inputs: []regMask{si, ax, cx}}, typ: "Mem"}, // arg0=idxHi, arg1=idxLo, arg2=len, arg3=mem, returns memory. AuxInt contains report code (see PanicExtend in genericOps.go).
+
// Constant flag values. For any comparison, there are 5 possible
// outcomes: the three from the signed total order (<,==,>) and the
// three from the unsigned total order. The == cases overlap.
@@ -725,6 +740,7 @@ func init() {
// Atomic loads. These are just normal loads but return tuples
// so they can be properly ordered with other loads.
// load from arg0+auxint+aux. arg1=mem.
+ {name: "MOVBatomicload", argLength: 2, reg: gpload, asm: "MOVB", aux: "SymOff", faultOnNilArg0: true, symEffect: "Read"},
{name: "MOVLatomicload", argLength: 2, reg: gpload, asm: "MOVL", aux: "SymOff", faultOnNilArg0: true, symEffect: "Read"},
{name: "MOVQatomicload", argLength: 2, reg: gpload, asm: "MOVQ", aux: "SymOff", faultOnNilArg0: true, symEffect: "Read"},
diff --git a/src/cmd/compile/internal/ssa/gen/AMD64splitload.rules b/src/cmd/compile/internal/ssa/gen/AMD64splitload.rules
new file mode 100644
index 0000000000..e8e1b4d258
--- /dev/null
+++ b/src/cmd/compile/internal/ssa/gen/AMD64splitload.rules
@@ -0,0 +1,16 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This file contains rules used by flagalloc to split
+// a flag-generating merged load op into separate load and op.
+// Unlike with the other rules files, not all of these
+// rules will be applied to all values.
+// Rather, flagalloc will request for rules to be applied
+// to a particular problematic value.
+// These are often the exact inverse of rules in AMD64.rules,
+// only with the conditions removed.
+
+(CMP(Q|L|W|B)load {sym} [off] ptr x mem) -> (CMP(Q|L|W|B) (MOV(Q|L|W|B)load {sym} [off] ptr mem) x)
+
+(CMP(Q|L|W|B)constload {sym} [vo] ptr mem) -> (CMP(Q|L|W|B)const (MOV(Q|L|W|B)load {sym} [offOnly(vo)] ptr mem) [valOnly(vo)])
diff --git a/src/cmd/compile/internal/ssa/gen/ARM.rules b/src/cmd/compile/internal/ssa/gen/ARM.rules
index 8b0e82f154..798611446d 100644
--- a/src/cmd/compile/internal/ssa/gen/ARM.rules
+++ b/src/cmd/compile/internal/ssa/gen/ARM.rules
@@ -59,13 +59,22 @@
// TODO: optimize this for ARMv5 and ARMv6
(Ctz32NonZero x) -> (Ctz32 x)
+(Ctz16NonZero x) -> (Ctz32 x)
+(Ctz8NonZero x) -> (Ctz32 x)
// count trailing zero for ARMv5 and ARMv6
// 32 - CLZ(x&-x - 1)
-(Ctz32 x) && objabi.GOARM<=6 -> (RSBconst [32] (CLZ (SUBconst (AND x (RSBconst [0] x)) [1])))
+(Ctz32 x) && objabi.GOARM<=6 ->
+ (RSBconst [32] (CLZ (SUBconst (AND x (RSBconst [0] x)) [1])))
+(Ctz16 x) && objabi.GOARM<=6 ->
+ (RSBconst [32] (CLZ (SUBconst (AND (ORconst [0x10000] x) (RSBconst [0] (ORconst [0x10000] x))) [1])))
+(Ctz8 x) && objabi.GOARM<=6 ->
+ (RSBconst [32] (CLZ (SUBconst (AND (ORconst [0x100] x) (RSBconst [0] (ORconst [0x100] x))) [1])))
// count trailing zero for ARMv7
(Ctz32 x) && objabi.GOARM==7 -> (CLZ (RBIT x))
+(Ctz16 x) && objabi.GOARM==7 -> (CLZ (RBIT (ORconst [0x10000] x)))
+(Ctz8 x) && objabi.GOARM==7 -> (CLZ (RBIT (ORconst [0x100] x)))
// bit length
(BitLen32 x) -> (RSBconst [32] (CLZ x))
@@ -397,6 +406,14 @@
// Write barrier.
(WB {fn} destptr srcptr mem) -> (LoweredWB {fn} destptr srcptr mem)
+(PanicBounds [kind] x y mem) && boundsABI(kind) == 0 -> (LoweredPanicBoundsA [kind] x y mem)
+(PanicBounds [kind] x y mem) && boundsABI(kind) == 1 -> (LoweredPanicBoundsB [kind] x y mem)
+(PanicBounds [kind] x y mem) && boundsABI(kind) == 2 -> (LoweredPanicBoundsC [kind] x y mem)
+
+(PanicExtend [kind] hi lo y mem) && boundsABI(kind) == 0 -> (LoweredPanicExtendA [kind] hi lo y mem)
+(PanicExtend [kind] hi lo y mem) && boundsABI(kind) == 1 -> (LoweredPanicExtendB [kind] hi lo y mem)
+(PanicExtend [kind] hi lo y mem) && boundsABI(kind) == 2 -> (LoweredPanicExtendC [kind] hi lo y mem)
+
// Optimizations
// fold offset into address
@@ -1216,6 +1233,16 @@
( ORshiftRL [c] (SLLconst x [32-c]) x) -> (SRRconst [ c] x)
(XORshiftRL [c] (SLLconst x [32-c]) x) -> (SRRconst [ c] x)
+(RotateLeft32 x (MOVWconst [c])) -> (SRRconst [-c&31] x)
+(RotateLeft16 x (MOVWconst [c])) -> (Or16 (Lsh16x32 x (MOVWconst [c&15])) (Rsh16Ux32 x (MOVWconst [-c&15])))
+(RotateLeft8 x (MOVWconst [c])) -> (Or8 (Lsh8x32 x (MOVWconst [c&7])) (Rsh8Ux32 x (MOVWconst [-c&7])))
+
+// ((x>>8) | (x<<8)) -> (REV16 x), the type of x is uint16, "|" can also be "^" or "+".
+// UBFX instruction is supported by ARMv6T2, ARMv7 and above versions, REV16 is supported by
+// ARMv6 and above versions. So for ARMv6, we need to match SLLconst, SRLconst and ORshiftLL.
+((ADDshiftLL|ORshiftLL|XORshiftLL) [8] (BFXU [armBFAuxInt(8, 8)] x) x) -> (REV16 x)
+((ADDshiftLL|ORshiftLL|XORshiftLL) [8] (SRLconst [24] (SLLconst [16] x)) x) && objabi.GOARM>=6 -> (REV16 x)
+
// use indexed loads and stores
(MOVWload [0] {sym} (ADD ptr idx) mem) && sym == nil && !config.nacl -> (MOVWloadidx ptr idx mem)
(MOVWstore [0] {sym} (ADD ptr idx) val mem) && sym == nil && !config.nacl -> (MOVWstoreidx ptr idx val mem)
diff --git a/src/cmd/compile/internal/ssa/gen/ARM64.rules b/src/cmd/compile/internal/ssa/gen/ARM64.rules
index 1efce66016..d4b47bfb0b 100644
--- a/src/cmd/compile/internal/ssa/gen/ARM64.rules
+++ b/src/cmd/compile/internal/ssa/gen/ARM64.rules
@@ -92,14 +92,20 @@
(Trunc x) -> (FRINTZD x)
// lowering rotates
+(RotateLeft8 x (MOVDconst [c])) -> (Or8 (Lsh8x64 x (MOVDconst [c&7])) (Rsh8Ux64 x (MOVDconst [-c&7])))
+(RotateLeft16 x (MOVDconst [c])) -> (Or16 (Lsh16x64 x (MOVDconst [c&15])) (Rsh16Ux64 x (MOVDconst [-c&15])))
(RotateLeft32 x y) -> (RORW x (NEG y))
(RotateLeft64 x y) -> (ROR x (NEG y))
(Ctz64NonZero x) -> (Ctz64 x)
(Ctz32NonZero x) -> (Ctz32 x)
+(Ctz16NonZero x) -> (Ctz32 x)
+(Ctz8NonZero x) -> (Ctz32 x)
(Ctz64 x) -> (CLZ (RBIT x))
(Ctz32 x) -> (CLZW (RBITW x))
+(Ctz16 x) -> (CLZW (RBITW (ORconst [0x10000] x)))
+(Ctz8 x) -> (CLZW (RBITW (ORconst [0x100] x)))
(PopCount64 x) -> (FMOVDfpgp (VUADDLV (VCNT (FMOVDgpfp x))))
(PopCount32 x) -> (FMOVDfpgp (VUADDLV (VCNT (FMOVDgpfp (ZeroExt32to64 x)))))
@@ -123,6 +129,7 @@
(FMOVSload [off] {sym} ptr (MOVWstore [off] {sym} ptr val _)) -> (FMOVSgpfp val)
(BitLen64 x) -> (SUB (MOVDconst [64]) (CLZ x))
+(BitLen32 x) -> (SUB (MOVDconst [32]) (CLZW x))
(Bswap64 x) -> (REV x)
(Bswap32 x) -> (REVW x)
@@ -132,6 +139,21 @@
(BitRev16 x) -> (SRLconst [48] (RBIT x))
(BitRev8 x) -> (SRLconst [56] (RBIT x))
+// In fact, UMOD will be translated into UREM instruction, and UREM is originally translated into
+// UDIV and MSUB instructions. But if there is already an identical UDIV instruction just before or
+// after UREM (case like quo, rem := z/y, z%y), then the second UDIV instruction becomes redundant.
+// The purpose of this rule is to have this extra UDIV instruction removed in CSE pass.
+(UMOD x y) -> (MSUB x y (UDIV x y))
+(UMODW x y) -> (MSUBW x y (UDIVW x y))
+
+// 64-bit addition with carry.
+(Select0 (Add64carry x y c)) -> (Select0 (ADCSflags x y (Select1 (ADDSconstflags [-1] c))))
+(Select1 (Add64carry x y c)) -> (ADCzerocarry (Select1 (ADCSflags x y (Select1 (ADDSconstflags [-1] c)))))
+
+// 64-bit subtraction with borrowing.
+(Select0 (Sub64borrow x y bo)) -> (Select0 (SBCSflags x y (Select1 (NEGSflags bo))))
+(Select1 (Sub64borrow x y bo)) -> (NEG (NGCzerocarry (Select1 (SBCSflags x y (Select1 (NEGSflags bo))))))
+
// boolean ops -- booleans are represented with 0=false, 1=true
(AndB x y) -> (AND x y)
(OrB x y) -> (OR x y)
@@ -284,8 +306,14 @@
(Less16 x y) -> (LessThan (CMPW (SignExt16to32 x) (SignExt16to32 y)))
(Less32 x y) -> (LessThan (CMPW x y))
(Less64 x y) -> (LessThan (CMP x y))
-(Less32F x y) -> (GreaterThan (FCMPS y x)) // reverse operands to work around NaN
-(Less64F x y) -> (GreaterThan (FCMPD y x)) // reverse operands to work around NaN
+
+// Set condition flags for floating-point comparisons "x < y"
+// and "x <= y". Because if either or both of the operands are
+// NaNs, all three of (x < y), (x == y) and (x > y) are false,
+// and ARM Manual says FCMP instruction sets PSTATE.
+// of this case to (0, 0, 1, 1).
+(Less32F x y) -> (LessThanF (FCMPS x y))
+(Less64F x y) -> (LessThanF (FCMPD x y))
(Less8U x y) -> (LessThanU (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
(Less16U x y) -> (LessThanU (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
@@ -296,8 +324,10 @@
(Leq16 x y) -> (LessEqual (CMPW (SignExt16to32 x) (SignExt16to32 y)))
(Leq32 x y) -> (LessEqual (CMPW x y))
(Leq64 x y) -> (LessEqual (CMP x y))
-(Leq32F x y) -> (GreaterEqual (FCMPS y x)) // reverse operands to work around NaN
-(Leq64F x y) -> (GreaterEqual (FCMPD y x)) // reverse operands to work around NaN
+
+// Refer to the comments for op Less64F above.
+(Leq32F x y) -> (LessEqualF (FCMPS x y))
+(Leq64F x y) -> (LessEqualF (FCMPD x y))
(Leq8U x y) -> (LessEqualU (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
(Leq16U x y) -> (LessEqualU (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
@@ -308,8 +338,8 @@
(Greater16 x y) -> (GreaterThan (CMPW (SignExt16to32 x) (SignExt16to32 y)))
(Greater32 x y) -> (GreaterThan (CMPW x y))
(Greater64 x y) -> (GreaterThan (CMP x y))
-(Greater32F x y) -> (GreaterThan (FCMPS x y))
-(Greater64F x y) -> (GreaterThan (FCMPD x y))
+(Greater32F x y) -> (GreaterThanF (FCMPS x y))
+(Greater64F x y) -> (GreaterThanF (FCMPD x y))
(Greater8U x y) -> (GreaterThanU (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
(Greater16U x y) -> (GreaterThanU (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
@@ -320,17 +350,23 @@
(Geq16 x y) -> (GreaterEqual (CMPW (SignExt16to32 x) (SignExt16to32 y)))
(Geq32 x y) -> (GreaterEqual (CMPW x y))
(Geq64 x y) -> (GreaterEqual (CMP x y))
-(Geq32F x y) -> (GreaterEqual (FCMPS x y))
-(Geq64F x y) -> (GreaterEqual (FCMPD x y))
+(Geq32F x y) -> (GreaterEqualF (FCMPS x y))
+(Geq64F x y) -> (GreaterEqualF (FCMPD x y))
(Geq8U x y) -> (GreaterEqualU (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
(Geq16U x y) -> (GreaterEqualU (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
(Geq32U x y) -> (GreaterEqualU (CMPW x y))
(Geq64U x y) -> (GreaterEqualU (CMP x y))
+// Optimize comparision between a floating-point value and 0.0 with "FCMP $(0.0), Fn"
+(FCMPS x (FMOVSconst [0])) -> (FCMPS0 x)
+(FCMPS (FMOVSconst [0]) x) -> (InvertFlags (FCMPS0 x))
+(FCMPD x (FMOVDconst [0])) -> (FCMPD0 x)
+(FCMPD (FMOVDconst [0]) x) -> (InvertFlags (FCMPD0 x))
+
// CSEL needs a flag-generating argument. Synthesize a CMPW if necessary.
-(CondSelect x y bool) && flagArg(bool) != nil -> (CSEL {bool.Op} x y flagArg(bool))
-(CondSelect x y bool) && flagArg(bool) == nil -> (CSEL {OpARM64NotEqual} x y (CMPWconst [0] bool))
+(CondSelect x y boolval) && flagArg(boolval) != nil -> (CSEL {boolval.Op} x y flagArg(boolval))
+(CondSelect x y boolval) && flagArg(boolval) == nil -> (CSEL {OpARM64NotEqual} x y (CMPWconst [0] boolval))
(OffPtr [off] ptr:(SP)) -> (MOVDaddr [off] ptr)
(OffPtr [off] ptr) -> (ADDconst [off] ptr)
@@ -538,11 +574,16 @@
(If (GreaterThanU cc) yes no) -> (UGT cc yes no)
(If (GreaterEqual cc) yes no) -> (GE cc yes no)
(If (GreaterEqualU cc) yes no) -> (UGE cc yes no)
+(If (LessThanF cc) yes no) -> (FLT cc yes no)
+(If (LessEqualF cc) yes no) -> (FLE cc yes no)
+(If (GreaterThanF cc) yes no) -> (FGT cc yes no)
+(If (GreaterEqualF cc) yes no) -> (FGE cc yes no)
(If cond yes no) -> (NZ cond yes no)
// atomic intrinsics
// Note: these ops do not accept offset.
+(AtomicLoad8 ptr mem) -> (LDARB ptr mem)
(AtomicLoad32 ptr mem) -> (LDARW ptr mem)
(AtomicLoad64 ptr mem) -> (LDAR ptr mem)
(AtomicLoadPtr ptr mem) -> (LDAR ptr mem)
@@ -570,6 +611,10 @@
// Write barrier.
(WB {fn} destptr srcptr mem) -> (LoweredWB {fn} destptr srcptr mem)
+(PanicBounds [kind] x y mem) && boundsABI(kind) == 0 -> (LoweredPanicBoundsA [kind] x y mem)
+(PanicBounds [kind] x y mem) && boundsABI(kind) == 1 -> (LoweredPanicBoundsB [kind] x y mem)
+(PanicBounds [kind] x y mem) && boundsABI(kind) == 2 -> (LoweredPanicBoundsC [kind] x y mem)
+
// Optimizations
// Absorb boolean tests into block
@@ -583,6 +628,10 @@
(NZ (GreaterThanU cc) yes no) -> (UGT cc yes no)
(NZ (GreaterEqual cc) yes no) -> (GE cc yes no)
(NZ (GreaterEqualU cc) yes no) -> (UGE cc yes no)
+(NZ (LessThanF cc) yes no) -> (FLT cc yes no)
+(NZ (LessEqualF cc) yes no) -> (FLE cc yes no)
+(NZ (GreaterThanF cc) yes no) -> (FGT cc yes no)
+(NZ (GreaterEqualF cc) yes no) -> (FGE cc yes no)
(EQ (CMPWconst [0] x:(ANDconst [c] y)) yes no) && x.Uses == 1 -> (EQ (TSTWconst [c] y) yes no)
(NE (CMPWconst [0] x:(ANDconst [c] y)) yes no) && x.Uses == 1 -> (NE (TSTWconst [c] y) yes no)
@@ -1164,6 +1213,12 @@
(ADD a l:(MNEGW x y)) && a.Type.Size() != 8 && l.Uses==1 && clobber(l) -> (MSUBW a x y)
(SUB a l:(MNEGW x y)) && a.Type.Size() != 8 && l.Uses==1 && clobber(l) -> (MADDW a x y)
+// optimize ADCSflags, SBCSflags and friends
+(ADCSflags x y (Select1 (ADDSconstflags [-1] (ADCzerocarry c)))) -> (ADCSflags x y c)
+(ADCSflags x y (Select1 (ADDSconstflags [-1] (MOVDconst [0])))) -> (ADDSflags x y)
+(SBCSflags x y (Select1 (NEGSflags (NEG (NGCzerocarry bo))))) -> (SBCSflags x y bo)
+(SBCSflags x y (Select1 (NEGSflags (MOVDconst [0])))) -> (SUBSflags x y)
+
// mul by constant
(MUL x (MOVDconst [-1])) -> (NEG x)
(MUL _ (MOVDconst [0])) -> (MOVDconst [0])
@@ -1506,6 +1561,10 @@
(UGE (InvertFlags cmp) yes no) -> (ULE cmp yes no)
(EQ (InvertFlags cmp) yes no) -> (EQ cmp yes no)
(NE (InvertFlags cmp) yes no) -> (NE cmp yes no)
+(FLT (InvertFlags cmp) yes no) -> (FGT cmp yes no)
+(FGT (InvertFlags cmp) yes no) -> (FLT cmp yes no)
+(FLE (InvertFlags cmp) yes no) -> (FGE cmp yes no)
+(FGE (InvertFlags cmp) yes no) -> (FLE cmp yes no)
// absorb InvertFlags into CSEL(0)
(CSEL {cc} x y (InvertFlags cmp)) -> (CSEL {arm64Invert(cc.(Op))} x y cmp)
@@ -1583,6 +1642,10 @@
(LessEqualU (InvertFlags x)) -> (GreaterEqualU x)
(GreaterEqual (InvertFlags x)) -> (LessEqual x)
(GreaterEqualU (InvertFlags x)) -> (LessEqualU x)
+(LessThanF (InvertFlags x)) -> (GreaterThanF x)
+(LessEqualF (InvertFlags x)) -> (GreaterEqualF x)
+(GreaterThanF (InvertFlags x)) -> (LessThanF x)
+(GreaterEqualF (InvertFlags x)) -> (LessEqualF x)
// Boolean-generating instructions always
// zero upper bit of the register; no need to zero-extend
@@ -1595,14 +1658,14 @@
(CSEL0 {cc} _ flag) && ccARM64Eval(cc, flag) < 0 -> (MOVDconst [0])
// absorb flags back into boolean CSEL
-(CSEL {cc} x y (CMPWconst [0] bool)) && cc.(Op) == OpARM64NotEqual && flagArg(bool) != nil ->
- (CSEL {bool.Op} x y flagArg(bool))
-(CSEL {cc} x y (CMPWconst [0] bool)) && cc.(Op) == OpARM64Equal && flagArg(bool) != nil ->
- (CSEL {arm64Negate(bool.Op)} x y flagArg(bool))
-(CSEL0 {cc} x (CMPWconst [0] bool)) && cc.(Op) == OpARM64NotEqual && flagArg(bool) != nil ->
- (CSEL0 {bool.Op} x flagArg(bool))
-(CSEL0 {cc} x (CMPWconst [0] bool)) && cc.(Op) == OpARM64Equal && flagArg(bool) != nil ->
- (CSEL0 {arm64Negate(bool.Op)} x flagArg(bool))
+(CSEL {cc} x y (CMPWconst [0] boolval)) && cc.(Op) == OpARM64NotEqual && flagArg(boolval) != nil ->
+ (CSEL {boolval.Op} x y flagArg(boolval))
+(CSEL {cc} x y (CMPWconst [0] boolval)) && cc.(Op) == OpARM64Equal && flagArg(boolval) != nil ->
+ (CSEL {arm64Negate(boolval.Op)} x y flagArg(boolval))
+(CSEL0 {cc} x (CMPWconst [0] boolval)) && cc.(Op) == OpARM64NotEqual && flagArg(boolval) != nil ->
+ (CSEL0 {boolval.Op} x flagArg(boolval))
+(CSEL0 {cc} x (CMPWconst [0] boolval)) && cc.(Op) == OpARM64Equal && flagArg(boolval) != nil ->
+ (CSEL0 {arm64Negate(boolval.Op)} x flagArg(boolval))
// absorb shifts into ops
(NEG x:(SLLconst [c] y)) && clobberIfDead(x) -> (NEGshiftLL [c] y)
@@ -1743,11 +1806,11 @@
( ORshiftRL [c] (SLLconst x [64-c]) x) -> (RORconst [ c] x)
(XORshiftRL [c] (SLLconst x [64-c]) x) -> (RORconst [ c] x)
-(ADDshiftLL [c] (UBFX [bfc] x) x) && c < 32 && t.Size() == 4 && bfc == arm64BFAuxInt(32-c, c)
+(ADDshiftLL [c] (UBFX [bfc] x) x) && c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
-> (RORWconst [32-c] x)
-( ORshiftLL [c] (UBFX [bfc] x) x) && c < 32 && t.Size() == 4 && bfc == arm64BFAuxInt(32-c, c)
+( ORshiftLL [c] (UBFX [bfc] x) x) && c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
-> (RORWconst [32-c] x)
-(XORshiftLL [c] (UBFX [bfc] x) x) && c < 32 && t.Size() == 4 && bfc == arm64BFAuxInt(32-c, c)
+(XORshiftLL [c] (UBFX [bfc] x) x) && c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
-> (RORWconst [32-c] x)
(ADDshiftRL [c] (SLLconst x [32-c]) (MOVWUreg x)) && c < 32 && t.Size() == 4 -> (RORWconst [c] x)
( ORshiftRL [c] (SLLconst x [32-c]) (MOVWUreg x)) && c < 32 && t.Size() == 4 -> (RORWconst [c] x)
@@ -1785,16 +1848,19 @@
(CMPconst [64] (SUB (MOVDconst [32]) (ANDconst [31] y))))) && cc.(Op) == OpARM64LessThanU
-> (RORW x y)
+// ((x>>8) | (x<<8)) -> (REV16W x), the type of x is uint16, "|" can also be "^" or "+".
+((ADDshiftLL|ORshiftLL|XORshiftLL) [8] (UBFX [armBFAuxInt(8, 8)] x) x) -> (REV16W x)
+
// Extract from reg pair
(ADDshiftLL [c] (SRLconst x [64-c]) x2) -> (EXTRconst [64-c] x2 x)
( ORshiftLL [c] (SRLconst x [64-c]) x2) -> (EXTRconst [64-c] x2 x)
(XORshiftLL [c] (SRLconst x [64-c]) x2) -> (EXTRconst [64-c] x2 x)
-(ADDshiftLL [c] (UBFX [bfc] x) x2) && c < 32 && t.Size() == 4 && bfc == arm64BFAuxInt(32-c, c)
+(ADDshiftLL [c] (UBFX [bfc] x) x2) && c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
-> (EXTRWconst [32-c] x2 x)
-( ORshiftLL [c] (UBFX [bfc] x) x2) && c < 32 && t.Size() == 4 && bfc == arm64BFAuxInt(32-c, c)
+( ORshiftLL [c] (UBFX [bfc] x) x2) && c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
-> (EXTRWconst [32-c] x2 x)
-(XORshiftLL [c] (UBFX [bfc] x) x2) && c < 32 && t.Size() == 4 && bfc == arm64BFAuxInt(32-c, c)
+(XORshiftLL [c] (UBFX [bfc] x) x2) && c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)
-> (EXTRWconst [32-c] x2 x)
// Generic rules rewrite certain AND to a pair of shifts.
@@ -1810,88 +1876,88 @@
// sbfiz
// (x << lc) >> rc
-(SRAconst [rc] (SLLconst [lc] x)) && lc > rc -> (SBFIZ [arm64BFAuxInt(lc-rc, 64-lc)] x)
-(MOVWreg (SLLconst [lc] x)) && lc < 32 -> (SBFIZ [arm64BFAuxInt(lc, 32-lc)] x)
-(MOVHreg (SLLconst [lc] x)) && lc < 16 -> (SBFIZ [arm64BFAuxInt(lc, 16-lc)] x)
-(MOVBreg (SLLconst [lc] x)) && lc < 8 -> (SBFIZ [arm64BFAuxInt(lc, 8-lc)] x)
+(SRAconst [rc] (SLLconst [lc] x)) && lc > rc -> (SBFIZ [armBFAuxInt(lc-rc, 64-lc)] x)
+(MOVWreg (SLLconst [lc] x)) && lc < 32 -> (SBFIZ [armBFAuxInt(lc, 32-lc)] x)
+(MOVHreg (SLLconst [lc] x)) && lc < 16 -> (SBFIZ [armBFAuxInt(lc, 16-lc)] x)
+(MOVBreg (SLLconst [lc] x)) && lc < 8 -> (SBFIZ [armBFAuxInt(lc, 8-lc)] x)
// sbfx
// (x << lc) >> rc
-(SRAconst [rc] (SLLconst [lc] x)) && lc <= rc -> (SBFX [arm64BFAuxInt(rc-lc, 64-rc)] x)
-(SRAconst [rc] (MOVWreg x)) && rc < 32 -> (SBFX [arm64BFAuxInt(rc, 32-rc)] x)
-(SRAconst [rc] (MOVHreg x)) && rc < 16 -> (SBFX [arm64BFAuxInt(rc, 16-rc)] x)
-(SRAconst [rc] (MOVBreg x)) && rc < 8 -> (SBFX [arm64BFAuxInt(rc, 8-rc)] x)
+(SRAconst [rc] (SLLconst [lc] x)) && lc <= rc -> (SBFX [armBFAuxInt(rc-lc, 64-rc)] x)
+(SRAconst [rc] (MOVWreg x)) && rc < 32 -> (SBFX [armBFAuxInt(rc, 32-rc)] x)
+(SRAconst [rc] (MOVHreg x)) && rc < 16 -> (SBFX [armBFAuxInt(rc, 16-rc)] x)
+(SRAconst [rc] (MOVBreg x)) && rc < 8 -> (SBFX [armBFAuxInt(rc, 8-rc)] x)
// sbfiz/sbfx combinations: merge shifts into bitfield ops
(SRAconst [sc] (SBFIZ [bfc] x)) && sc < getARM64BFlsb(bfc)
- -> (SBFIZ [arm64BFAuxInt(getARM64BFlsb(bfc)-sc, getARM64BFwidth(bfc))] x)
+ -> (SBFIZ [armBFAuxInt(getARM64BFlsb(bfc)-sc, getARM64BFwidth(bfc))] x)
(SRAconst [sc] (SBFIZ [bfc] x)) && sc >= getARM64BFlsb(bfc)
&& sc < getARM64BFlsb(bfc)+getARM64BFwidth(bfc)
- -> (SBFX [arm64BFAuxInt(sc-getARM64BFlsb(bfc), getARM64BFlsb(bfc)+getARM64BFwidth(bfc)-sc)] x)
+ -> (SBFX [armBFAuxInt(sc-getARM64BFlsb(bfc), getARM64BFlsb(bfc)+getARM64BFwidth(bfc)-sc)] x)
// ubfiz
// (x & ac) << sc
(SLLconst [sc] (ANDconst [ac] x)) && isARM64BFMask(sc, ac, 0)
- -> (UBFIZ [arm64BFAuxInt(sc, arm64BFWidth(ac, 0))] x)
-(SLLconst [sc] (MOVWUreg x)) && isARM64BFMask(sc, 1<<32-1, 0) -> (UBFIZ [arm64BFAuxInt(sc, 32)] x)
-(SLLconst [sc] (MOVHUreg x)) && isARM64BFMask(sc, 1<<16-1, 0) -> (UBFIZ [arm64BFAuxInt(sc, 16)] x)
-(SLLconst [sc] (MOVBUreg x)) && isARM64BFMask(sc, 1<<8-1, 0) -> (UBFIZ [arm64BFAuxInt(sc, 8)] x)
+ -> (UBFIZ [armBFAuxInt(sc, arm64BFWidth(ac, 0))] x)
+(SLLconst [sc] (MOVWUreg x)) && isARM64BFMask(sc, 1<<32-1, 0) -> (UBFIZ [armBFAuxInt(sc, 32)] x)
+(SLLconst [sc] (MOVHUreg x)) && isARM64BFMask(sc, 1<<16-1, 0) -> (UBFIZ [armBFAuxInt(sc, 16)] x)
+(SLLconst [sc] (MOVBUreg x)) && isARM64BFMask(sc, 1<<8-1, 0) -> (UBFIZ [armBFAuxInt(sc, 8)] x)
// (x << sc) & ac
(ANDconst [ac] (SLLconst [sc] x)) && isARM64BFMask(sc, ac, sc)
- -> (UBFIZ [arm64BFAuxInt(sc, arm64BFWidth(ac, sc))] x)
+ -> (UBFIZ [armBFAuxInt(sc, arm64BFWidth(ac, sc))] x)
(MOVWUreg (SLLconst [sc] x)) && isARM64BFMask(sc, 1<<32-1, sc)
- -> (UBFIZ [arm64BFAuxInt(sc, arm64BFWidth(1<<32-1, sc))] x)
+ -> (UBFIZ [armBFAuxInt(sc, arm64BFWidth(1<<32-1, sc))] x)
(MOVHUreg (SLLconst [sc] x)) && isARM64BFMask(sc, 1<<16-1, sc)
- -> (UBFIZ [arm64BFAuxInt(sc, arm64BFWidth(1<<16-1, sc))] x)
+ -> (UBFIZ [armBFAuxInt(sc, arm64BFWidth(1<<16-1, sc))] x)
(MOVBUreg (SLLconst [sc] x)) && isARM64BFMask(sc, 1<<8-1, sc)
- -> (UBFIZ [arm64BFAuxInt(sc, arm64BFWidth(1<<8-1, sc))] x)
+ -> (UBFIZ [armBFAuxInt(sc, arm64BFWidth(1<<8-1, sc))] x)
// (x << lc) >> rc
-(SRLconst [rc] (SLLconst [lc] x)) && lc > rc -> (UBFIZ [arm64BFAuxInt(lc-rc, 64-lc)] x)
+(SRLconst [rc] (SLLconst [lc] x)) && lc > rc -> (UBFIZ [armBFAuxInt(lc-rc, 64-lc)] x)
// ubfx
// (x >> sc) & ac
(ANDconst [ac] (SRLconst [sc] x)) && isARM64BFMask(sc, ac, 0)
- -> (UBFX [arm64BFAuxInt(sc, arm64BFWidth(ac, 0))] x)
-(MOVWUreg (SRLconst [sc] x)) && isARM64BFMask(sc, 1<<32-1, 0) -> (UBFX [arm64BFAuxInt(sc, 32)] x)
-(MOVHUreg (SRLconst [sc] x)) && isARM64BFMask(sc, 1<<16-1, 0) -> (UBFX [arm64BFAuxInt(sc, 16)] x)
-(MOVBUreg (SRLconst [sc] x)) && isARM64BFMask(sc, 1<<8-1, 0) -> (UBFX [arm64BFAuxInt(sc, 8)] x)
+ -> (UBFX [armBFAuxInt(sc, arm64BFWidth(ac, 0))] x)
+(MOVWUreg (SRLconst [sc] x)) && isARM64BFMask(sc, 1<<32-1, 0) -> (UBFX [armBFAuxInt(sc, 32)] x)
+(MOVHUreg (SRLconst [sc] x)) && isARM64BFMask(sc, 1<<16-1, 0) -> (UBFX [armBFAuxInt(sc, 16)] x)
+(MOVBUreg (SRLconst [sc] x)) && isARM64BFMask(sc, 1<<8-1, 0) -> (UBFX [armBFAuxInt(sc, 8)] x)
// (x & ac) >> sc
(SRLconst [sc] (ANDconst [ac] x)) && isARM64BFMask(sc, ac, sc)
- -> (UBFX [arm64BFAuxInt(sc, arm64BFWidth(ac, sc))] x)
+ -> (UBFX [armBFAuxInt(sc, arm64BFWidth(ac, sc))] x)
(SRLconst [sc] (MOVWUreg x)) && isARM64BFMask(sc, 1<<32-1, sc)
- -> (UBFX [arm64BFAuxInt(sc, arm64BFWidth(1<<32-1, sc))] x)
+ -> (UBFX [armBFAuxInt(sc, arm64BFWidth(1<<32-1, sc))] x)
(SRLconst [sc] (MOVHUreg x)) && isARM64BFMask(sc, 1<<16-1, sc)
- -> (UBFX [arm64BFAuxInt(sc, arm64BFWidth(1<<16-1, sc))] x)
+ -> (UBFX [armBFAuxInt(sc, arm64BFWidth(1<<16-1, sc))] x)
(SRLconst [sc] (MOVBUreg x)) && isARM64BFMask(sc, 1<<8-1, sc)
- -> (UBFX [arm64BFAuxInt(sc, arm64BFWidth(1<<8-1, sc))] x)
+ -> (UBFX [armBFAuxInt(sc, arm64BFWidth(1<<8-1, sc))] x)
// (x << lc) >> rc
-(SRLconst [rc] (SLLconst [lc] x)) && lc < rc -> (UBFX [arm64BFAuxInt(rc-lc, 64-rc)] x)
+(SRLconst [rc] (SLLconst [lc] x)) && lc < rc -> (UBFX [armBFAuxInt(rc-lc, 64-rc)] x)
// ubfiz/ubfx combinations: merge shifts into bitfield ops
(SRLconst [sc] (UBFX [bfc] x)) && sc < getARM64BFwidth(bfc)
- -> (UBFX [arm64BFAuxInt(getARM64BFlsb(bfc)+sc, getARM64BFwidth(bfc)-sc)] x)
+ -> (UBFX [armBFAuxInt(getARM64BFlsb(bfc)+sc, getARM64BFwidth(bfc)-sc)] x)
(UBFX [bfc] (SRLconst [sc] x)) && sc+getARM64BFwidth(bfc)+getARM64BFlsb(bfc) < 64
- -> (UBFX [arm64BFAuxInt(getARM64BFlsb(bfc)+sc, getARM64BFwidth(bfc))] x)
+ -> (UBFX [armBFAuxInt(getARM64BFlsb(bfc)+sc, getARM64BFwidth(bfc))] x)
(SLLconst [sc] (UBFIZ [bfc] x)) && sc+getARM64BFwidth(bfc)+getARM64BFlsb(bfc) < 64
- -> (UBFIZ [arm64BFAuxInt(getARM64BFlsb(bfc)+sc, getARM64BFwidth(bfc))] x)
+ -> (UBFIZ [armBFAuxInt(getARM64BFlsb(bfc)+sc, getARM64BFwidth(bfc))] x)
(UBFIZ [bfc] (SLLconst [sc] x)) && sc < getARM64BFwidth(bfc)
- -> (UBFIZ [arm64BFAuxInt(getARM64BFlsb(bfc)+sc, getARM64BFwidth(bfc)-sc)] x)
+ -> (UBFIZ [armBFAuxInt(getARM64BFlsb(bfc)+sc, getARM64BFwidth(bfc)-sc)] x)
// ((x << c1) >> c2) >> c3
(SRLconst [sc] (UBFIZ [bfc] x)) && sc == getARM64BFlsb(bfc)
-> (ANDconst [1< (UBFIZ [arm64BFAuxInt(getARM64BFlsb(bfc)-sc, getARM64BFwidth(bfc))] x)
+ -> (UBFIZ [armBFAuxInt(getARM64BFlsb(bfc)-sc, getARM64BFwidth(bfc))] x)
(SRLconst [sc] (UBFIZ [bfc] x)) && sc > getARM64BFlsb(bfc)
&& sc < getARM64BFlsb(bfc)+getARM64BFwidth(bfc)
- -> (UBFX [arm64BFAuxInt(sc-getARM64BFlsb(bfc), getARM64BFlsb(bfc)+getARM64BFwidth(bfc)-sc)] x)
+ -> (UBFX [armBFAuxInt(sc-getARM64BFlsb(bfc), getARM64BFlsb(bfc)+getARM64BFwidth(bfc)-sc)] x)
// ((x << c1) << c2) >> c3
(UBFX [bfc] (SLLconst [sc] x)) && sc == getARM64BFlsb(bfc)
-> (ANDconst [1< (UBFX [arm64BFAuxInt(getARM64BFlsb(bfc)-sc, getARM64BFwidth(bfc))] x)
+ -> (UBFX [armBFAuxInt(getARM64BFlsb(bfc)-sc, getARM64BFwidth(bfc))] x)
(UBFX [bfc] (SLLconst [sc] x)) && sc > getARM64BFlsb(bfc)
&& sc < getARM64BFlsb(bfc)+getARM64BFwidth(bfc)
- -> (UBFIZ [arm64BFAuxInt(sc-getARM64BFlsb(bfc), getARM64BFlsb(bfc)+getARM64BFwidth(bfc)-sc)] x)
+ -> (UBFIZ [armBFAuxInt(sc-getARM64BFlsb(bfc), getARM64BFlsb(bfc)+getARM64BFwidth(bfc)-sc)] x)
// bfi
(OR (UBFIZ [bfc] x) (ANDconst [ac] y))
@@ -1899,7 +1965,7 @@
-> (BFI [bfc] y x)
(ORshiftRL [rc] (ANDconst [ac] x) (SLLconst [lc] y))
&& lc > rc && ac == ^((1< (BFI [arm64BFAuxInt(lc-rc, 64-lc)] x y)
+ -> (BFI [armBFAuxInt(lc-rc, 64-lc)] x y)
// bfxil
(OR (UBFX [bfc] x) (ANDconst [ac] y)) && ac == ^(1< (BFXIL [bfc] y x)
@@ -2549,23 +2615,23 @@
&& x.Uses == 1
&& clobber(x)
-> (MOVHstoreidx ptr idx w mem)
-(MOVBstore [i] {s} ptr0 (UBFX [arm64BFAuxInt(8, 8)] w) x:(MOVBstore [i-1] {s} ptr1 w mem))
+(MOVBstore [i] {s} ptr0 (UBFX [armBFAuxInt(8, 8)] w) x:(MOVBstore [i-1] {s} ptr1 w mem))
&& x.Uses == 1
&& isSamePtr(ptr0, ptr1)
&& clobber(x)
-> (MOVHstore [i-1] {s} ptr0 w mem)
-(MOVBstore [1] {s} (ADD ptr0 idx0) (UBFX [arm64BFAuxInt(8, 8)] w) x:(MOVBstoreidx ptr1 idx1 w mem))
+(MOVBstore [1] {s} (ADD ptr0 idx0) (UBFX [armBFAuxInt(8, 8)] w) x:(MOVBstoreidx ptr1 idx1 w mem))
&& x.Uses == 1
&& s == nil
&& (isSamePtr(ptr0, ptr1) && isSamePtr(idx0, idx1) || isSamePtr(ptr0, idx1) && isSamePtr(idx0, ptr1))
&& clobber(x)
-> (MOVHstoreidx ptr1 idx1 w mem)
-(MOVBstore [i] {s} ptr0 (UBFX [arm64BFAuxInt(8, 24)] w) x:(MOVBstore [i-1] {s} ptr1 w mem))
+(MOVBstore [i] {s} ptr0 (UBFX [armBFAuxInt(8, 24)] w) x:(MOVBstore [i-1] {s} ptr1 w mem))
&& x.Uses == 1
&& isSamePtr(ptr0, ptr1)
&& clobber(x)
-> (MOVHstore [i-1] {s} ptr0 w mem)
-(MOVBstore [1] {s} (ADD ptr0 idx0) (UBFX [arm64BFAuxInt(8, 24)] w) x:(MOVBstoreidx ptr1 idx1 w mem))
+(MOVBstore [1] {s} (ADD ptr0 idx0) (UBFX [armBFAuxInt(8, 24)] w) x:(MOVBstoreidx ptr1 idx1 w mem))
&& x.Uses == 1
&& s == nil
&& (isSamePtr(ptr0, ptr1) && isSamePtr(idx0, idx1) || isSamePtr(ptr0, idx1) && isSamePtr(idx0, ptr1))
@@ -2642,18 +2708,18 @@
&& isSamePtr(ptr0, ptr1) && isSamePtr(idx0, idx1)
&& clobber(x)
-> (MOVWstoreidx ptr1 (SLLconst [1] idx1) w mem)
-(MOVHstore [i] {s} ptr0 (UBFX [arm64BFAuxInt(16, 16)] w) x:(MOVHstore [i-2] {s} ptr1 w mem))
+(MOVHstore [i] {s} ptr0 (UBFX [armBFAuxInt(16, 16)] w) x:(MOVHstore [i-2] {s} ptr1 w mem))
&& x.Uses == 1
&& isSamePtr(ptr0, ptr1)
&& clobber(x)
-> (MOVWstore [i-2] {s} ptr0 w mem)
-(MOVHstore [2] {s} (ADD ptr0 idx0) (UBFX [arm64BFAuxInt(16, 16)] w) x:(MOVHstoreidx ptr1 idx1 w mem))
+(MOVHstore [2] {s} (ADD ptr0 idx0) (UBFX [armBFAuxInt(16, 16)] w) x:(MOVHstoreidx ptr1 idx1 w mem))
&& x.Uses == 1
&& s == nil
&& (isSamePtr(ptr0, ptr1) && isSamePtr(idx0, idx1) || isSamePtr(ptr0, idx1) && isSamePtr(idx0, ptr1))
&& clobber(x)
-> (MOVWstoreidx ptr1 idx1 w mem)
-(MOVHstore [2] {s} (ADDshiftLL [1] ptr0 idx0) (UBFX [arm64BFAuxInt(16, 16)] w) x:(MOVHstoreidx2 ptr1 idx1 w mem))
+(MOVHstore [2] {s} (ADDshiftLL [1] ptr0 idx0) (UBFX [armBFAuxInt(16, 16)] w) x:(MOVHstoreidx2 ptr1 idx1 w mem))
&& x.Uses == 1
&& s == nil
&& isSamePtr(ptr0, ptr1) && isSamePtr(idx0, idx1)
@@ -2781,9 +2847,9 @@
&& clobber(x6)
-> (MOVDstoreidx ptr0 idx0 (REV w) mem)
(MOVBstore [i] {s} ptr w
- x0:(MOVBstore [i-1] {s} ptr (UBFX [arm64BFAuxInt(8, 24)] w)
- x1:(MOVBstore [i-2] {s} ptr (UBFX [arm64BFAuxInt(16, 16)] w)
- x2:(MOVBstore [i-3] {s} ptr (UBFX [arm64BFAuxInt(24, 8)] w) mem))))
+ x0:(MOVBstore [i-1] {s} ptr (UBFX [armBFAuxInt(8, 24)] w)
+ x1:(MOVBstore [i-2] {s} ptr (UBFX [armBFAuxInt(16, 16)] w)
+ x2:(MOVBstore [i-3] {s} ptr (UBFX [armBFAuxInt(24, 8)] w) mem))))
&& x0.Uses == 1
&& x1.Uses == 1
&& x2.Uses == 1
@@ -2792,9 +2858,9 @@
&& clobber(x2)
-> (MOVWstore [i-3] {s} ptr (REVW w) mem)
(MOVBstore [3] {s} p w
- x0:(MOVBstore [2] {s} p (UBFX [arm64BFAuxInt(8, 24)] w)
- x1:(MOVBstore [1] {s} p1:(ADD ptr1 idx1) (UBFX [arm64BFAuxInt(16, 16)] w)
- x2:(MOVBstoreidx ptr0 idx0 (UBFX [arm64BFAuxInt(24, 8)] w) mem))))
+ x0:(MOVBstore [2] {s} p (UBFX [armBFAuxInt(8, 24)] w)
+ x1:(MOVBstore [1] {s} p1:(ADD ptr1 idx1) (UBFX [armBFAuxInt(16, 16)] w)
+ x2:(MOVBstoreidx ptr0 idx0 (UBFX [armBFAuxInt(24, 8)] w) mem))))
&& x0.Uses == 1
&& x1.Uses == 1
&& x2.Uses == 1
@@ -2806,9 +2872,9 @@
&& clobber(x2)
-> (MOVWstoreidx ptr0 idx0 (REVW w) mem)
(MOVBstoreidx ptr (ADDconst [3] idx) w
- x0:(MOVBstoreidx ptr (ADDconst [2] idx) (UBFX [arm64BFAuxInt(8, 24)] w)
- x1:(MOVBstoreidx ptr (ADDconst [1] idx) (UBFX [arm64BFAuxInt(16, 16)] w)
- x2:(MOVBstoreidx ptr idx (UBFX [arm64BFAuxInt(24, 8)] w) mem))))
+ x0:(MOVBstoreidx ptr (ADDconst [2] idx) (UBFX [armBFAuxInt(8, 24)] w)
+ x1:(MOVBstoreidx ptr (ADDconst [1] idx) (UBFX [armBFAuxInt(16, 16)] w)
+ x2:(MOVBstoreidx ptr idx (UBFX [armBFAuxInt(24, 8)] w) mem))))
&& x0.Uses == 1
&& x1.Uses == 1
&& x2.Uses == 1
@@ -2817,9 +2883,9 @@
&& clobber(x2)
-> (MOVWstoreidx ptr idx (REVW w) mem)
(MOVBstoreidx ptr idx w
- x0:(MOVBstoreidx ptr (ADDconst [1] idx) (UBFX [arm64BFAuxInt(8, 24)] w)
- x1:(MOVBstoreidx ptr (ADDconst [2] idx) (UBFX [arm64BFAuxInt(16, 16)] w)
- x2:(MOVBstoreidx ptr (ADDconst [3] idx) (UBFX [arm64BFAuxInt(24, 8)] w) mem))))
+ x0:(MOVBstoreidx ptr (ADDconst [1] idx) (UBFX [armBFAuxInt(8, 24)] w)
+ x1:(MOVBstoreidx ptr (ADDconst [2] idx) (UBFX [armBFAuxInt(16, 16)] w)
+ x2:(MOVBstoreidx ptr (ADDconst [3] idx) (UBFX [armBFAuxInt(24, 8)] w) mem))))
&& x0.Uses == 1
&& x1.Uses == 1
&& x2.Uses == 1
@@ -2887,21 +2953,21 @@
&& (isSamePtr(ptr0, ptr1) && isSamePtr(idx0, idx1) || isSamePtr(ptr0, idx1) && isSamePtr(idx0, ptr1))
&& clobber(x)
-> (MOVHstoreidx ptr0 idx0 (REV16W w) mem)
-(MOVBstore [i] {s} ptr w x:(MOVBstore [i-1] {s} ptr (UBFX [arm64BFAuxInt(8, 8)] w) mem))
+(MOVBstore [i] {s} ptr w x:(MOVBstore [i-1] {s} ptr (UBFX [armBFAuxInt(8, 8)] w) mem))
&& x.Uses == 1
&& clobber(x)
-> (MOVHstore [i-1] {s} ptr (REV16W