diff options
| author | Russ Cox <rsc@golang.org> | 2025-10-29 13:37:52 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-10-30 09:55:06 -0700 |
| commit | d32b1f02c3e869b6ddf73d2113477b1fd77d42c8 (patch) | |
| tree | 074df75ed82ee3790fd4a4232a07754ad2693a3b /src/runtime/defs_linux_arm.go | |
| parent | cbbd385cb863e4a0969de9846fdd80227ed91ad0 (diff) | |
| download | go-d32b1f02c3e869b6ddf73d2113477b1fd77d42c8.tar.xz | |
runtime: delete timediv
Now that the compiler handles constant 64-bit divisions
without function calls on 32-bit systems, we no longer need
to maintain and test a bad custom implementation of 64-bit division.
Change-Id: If28807ad4f86507267ae69bc8f0b09ec18e98b66
Reviewed-on: https://go-review.googlesource.com/c/go/+/716463
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
Diffstat (limited to 'src/runtime/defs_linux_arm.go')
| -rw-r--r-- | src/runtime/defs_linux_arm.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/defs_linux_arm.go b/src/runtime/defs_linux_arm.go index ff879fad89..94577fc597 100644 --- a/src/runtime/defs_linux_arm.go +++ b/src/runtime/defs_linux_arm.go @@ -105,7 +105,8 @@ type timespec32 struct { //go:nosplit func (ts *timespec32) setNsec(ns int64) { - ts.tv_sec = timediv(ns, 1e9, &ts.tv_nsec) + ts.tv_sec = int32(ns / 1e9) + ts.tv_nsec = int32(ns % 1e9) } type timespec struct { @@ -115,9 +116,8 @@ type timespec struct { //go:nosplit func (ts *timespec) setNsec(ns int64) { - var newNS int32 - ts.tv_sec = int64(timediv(ns, 1e9, &newNS)) - ts.tv_nsec = int64(newNS) + ts.tv_sec = int64(ns / 1e9) + ts.tv_nsec = int64(ns % 1e9) } type stackt struct { |
