From: Ian Lance Taylor Date: Sun, 2 Aug 2020 21:00:48 +0000 (-0700) Subject: internal/syscall/unix: define copyFileRangeTrap for all architectures X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d8ea6acb5f586aabbde0dc18ca3c2f3aced45a49;p=gcc.git internal/syscall/unix: define copyFileRangeTrap for all architectures Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/246363 --- diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 89d1f3c7623..39849522124 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -2c390ba951e83b547f6387cc9e19436c085b3775 +82a0db12bcb205748a5319b03e070d5502246ba7 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/libgo/go/internal/syscall/unix/getrandom_linux_alpha.go b/libgo/go/internal/syscall/unix/getrandom_linux_alpha.go deleted file mode 100644 index 9587b5aa4ca..00000000000 --- a/libgo/go/internal/syscall/unix/getrandom_linux_alpha.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2016 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 unix - -// Linux getrandom system call number. -// See GetRandom in getrandom_linux.go. -const randomTrap uintptr = 511 diff --git a/libgo/go/internal/syscall/unix/getrandom_linux_amd64p32.go b/libgo/go/internal/syscall/unix/getrandom_linux_amd64p32.go deleted file mode 100644 index 911b6089ff3..00000000000 --- a/libgo/go/internal/syscall/unix/getrandom_linux_amd64p32.go +++ /dev/null @@ -1,9 +0,0 @@ -// 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 unix - -// Linux getrandom system call number. -// See GetRandom in getrandom_linux.go. -const randomTrap uintptr = 0x40000000 + 318 diff --git a/libgo/go/internal/syscall/unix/getrandom_linux_ia64.go b/libgo/go/internal/syscall/unix/getrandom_linux_ia64.go deleted file mode 100644 index d20ba238fcf..00000000000 --- a/libgo/go/internal/syscall/unix/getrandom_linux_ia64.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2016 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 unix - -// Linux getrandom system call number. -// See GetRandom in getrandom_linux.go. -const randomTrap uintptr = 1339 diff --git a/libgo/go/internal/syscall/unix/getrandom_linux_m68k.go b/libgo/go/internal/syscall/unix/getrandom_linux_m68k.go deleted file mode 100644 index 5559d30d331..00000000000 --- a/libgo/go/internal/syscall/unix/getrandom_linux_m68k.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2017 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 unix - -// Linux getrandom system call number. -// See GetRandom in getrandom_linux.go. -const randomTrap uintptr = 352 diff --git a/libgo/go/internal/syscall/unix/getrandom_linux_mips64p32x.go b/libgo/go/internal/syscall/unix/getrandom_linux_mips64p32x.go deleted file mode 100644 index 4d8f6c53a99..00000000000 --- a/libgo/go/internal/syscall/unix/getrandom_linux_mips64p32x.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2016 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 mips64p32 mips64p32le - -package unix - -// Linux getrandom system call number. -// See GetRandom in getrandom_linux.go. -const randomTrap uintptr = 6317 diff --git a/libgo/go/internal/syscall/unix/getrandom_linux_s390.go b/libgo/go/internal/syscall/unix/getrandom_linux_s390.go deleted file mode 100644 index e3bc4ee355c..00000000000 --- a/libgo/go/internal/syscall/unix/getrandom_linux_s390.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2016 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 unix - -// Linux getrandom system call number. -// See GetRandom in getrandom_linux.go. -const randomTrap uintptr = 349 diff --git a/libgo/go/internal/syscall/unix/getrandom_linux_shx.go b/libgo/go/internal/syscall/unix/getrandom_linux_shx.go deleted file mode 100644 index e0e3521a704..00000000000 --- a/libgo/go/internal/syscall/unix/getrandom_linux_shx.go +++ /dev/null @@ -1,11 +0,0 @@ -// 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. - -// +build sh shbe - -package unix - -// Linux getrandom system call number. -// See GetRandom in getrandom_linux.go. -const randomTrap uintptr = 373 diff --git a/libgo/go/internal/syscall/unix/getrandom_linux_sparcx.go b/libgo/go/internal/syscall/unix/getrandom_linux_sparcx.go deleted file mode 100644 index 4874ec1bd86..00000000000 --- a/libgo/go/internal/syscall/unix/getrandom_linux_sparcx.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2016 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 sparc sparc64 - -package unix - -// Linux getrandom system call number. -// See GetRandom in getrandom_linux.go. -const randomTrap uintptr = 347 diff --git a/libgo/go/internal/syscall/unix/sysnum_linux_alpha.go b/libgo/go/internal/syscall/unix/sysnum_linux_alpha.go new file mode 100644 index 00000000000..c40bc848813 --- /dev/null +++ b/libgo/go/internal/syscall/unix/sysnum_linux_alpha.go @@ -0,0 +1,10 @@ +// Copyright 2016 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 unix + +const ( + getrandomTrap uintptr = 511 + copyFileRangeTrap uintptr = 519 +) diff --git a/libgo/go/internal/syscall/unix/sysnum_linux_amd64p32.go b/libgo/go/internal/syscall/unix/sysnum_linux_amd64p32.go new file mode 100644 index 00000000000..3e5fd4583ba --- /dev/null +++ b/libgo/go/internal/syscall/unix/sysnum_linux_amd64p32.go @@ -0,0 +1,10 @@ +// 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 unix + +const ( + getrandomTrap uintptr = 0x40000000 + 318 + copyFileRangeTrap uintptr = 0x40000000 + 326 +) diff --git a/libgo/go/internal/syscall/unix/sysnum_linux_generic.go b/libgo/go/internal/syscall/unix/sysnum_linux_generic.go index f48da40188e..3e00703679a 100644 --- a/libgo/go/internal/syscall/unix/sysnum_linux_generic.go +++ b/libgo/go/internal/syscall/unix/sysnum_linux_generic.go @@ -3,13 +3,13 @@ // license that can be found in the LICENSE file. // +build linux -// +build arm64 riscv64 +// +build arm64 arm64be nios2 riscv riscv64 package unix // This file is named "generic" because at a certain point Linux started // standardizing on system call numbers across architectures. So far this -// means only arm64 and riscv64 use the standard numbers. +// means only arm64, nios2 and riscv use the standard numbers. const ( getrandomTrap uintptr = 278 diff --git a/libgo/go/internal/syscall/unix/sysnum_linux_ia64.go b/libgo/go/internal/syscall/unix/sysnum_linux_ia64.go new file mode 100644 index 00000000000..bb7c363cdc2 --- /dev/null +++ b/libgo/go/internal/syscall/unix/sysnum_linux_ia64.go @@ -0,0 +1,10 @@ +// Copyright 2016 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 unix + +const ( + getrandomTrap uintptr = 315 + copyFileRangeTrap uintptr = 323 +) diff --git a/libgo/go/internal/syscall/unix/sysnum_linux_m68k.go b/libgo/go/internal/syscall/unix/sysnum_linux_m68k.go new file mode 100644 index 00000000000..97fc51215b6 --- /dev/null +++ b/libgo/go/internal/syscall/unix/sysnum_linux_m68k.go @@ -0,0 +1,10 @@ +// Copyright 2017 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 unix + +const ( + getrandomTrap uintptr = 352 + copyFileRangeTrap uintptr = 376 +) diff --git a/libgo/go/internal/syscall/unix/sysnum_linux_mips64p32x.go b/libgo/go/internal/syscall/unix/sysnum_linux_mips64p32x.go new file mode 100644 index 00000000000..b75a618e9cf --- /dev/null +++ b/libgo/go/internal/syscall/unix/sysnum_linux_mips64p32x.go @@ -0,0 +1,12 @@ +// Copyright 2016 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 mips64p32 mips64p32le + +package unix + +const ( + getrandomTrap uintptr = 6317 + copyFileRangeTrap uintptr = 6324 +) diff --git a/libgo/go/internal/syscall/unix/sysnum_linux_s390.go b/libgo/go/internal/syscall/unix/sysnum_linux_s390.go new file mode 100644 index 00000000000..bf2c01e4e16 --- /dev/null +++ b/libgo/go/internal/syscall/unix/sysnum_linux_s390.go @@ -0,0 +1,10 @@ +// Copyright 2016 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 unix + +const ( + getrandomTrap uintptr = 349 + copyFileRangeTrap uintptr = 375 +) diff --git a/libgo/go/internal/syscall/unix/sysnum_linux_shx.go b/libgo/go/internal/syscall/unix/sysnum_linux_shx.go new file mode 100644 index 00000000000..b5e58e4ee3c --- /dev/null +++ b/libgo/go/internal/syscall/unix/sysnum_linux_shx.go @@ -0,0 +1,12 @@ +// 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. + +// +build sh shbe + +package unix + +const ( + getrandomTrap uintptr = 373 + copyFileRangeTrap uintptr = 380 +) diff --git a/libgo/go/internal/syscall/unix/sysnum_linux_sparcx.go b/libgo/go/internal/syscall/unix/sysnum_linux_sparcx.go new file mode 100644 index 00000000000..63db571433b --- /dev/null +++ b/libgo/go/internal/syscall/unix/sysnum_linux_sparcx.go @@ -0,0 +1,12 @@ +// Copyright 2016 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 sparc sparc64 + +package unix + +const ( + getrandomTrap uintptr = 347 + copyFileRangeTrap uintptr = 357 +)