diff options
author | Martin Möhrmann <moehrmann@google.com> | 2017-05-22 07:42:42 +0200 |
---|---|---|
committer | Martin Möhrmann <moehrmann@google.com> | 2017-08-08 06:43:49 +0000 |
commit | 7045e6f6c458908e1d5082381b3506a65059eac3 (patch) | |
tree | e9f930d0d0889cc3152c0e08222182f38f696208 /src/runtime/asm_386.s | |
parent | fd29d03f70238abf460f56209a2ccc76dec6509e (diff) | |
download | go-7045e6f6c458908e1d5082381b3506a65059eac3.tar.gz go-7045e6f6c458908e1d5082381b3506a65059eac3.zip |
runtime: remove unused prefetch functions
The only non test user of the assembler prefetch functions is the
heapBits.prefetch function which is itself unused.
The runtime prefetch functions have no functionality on most platforms
and are not inlineable since they are written in assembler. The function
call overhead eliminates the performance gains that could be achieved with
prefetching and would degrade performance for platforms where the functions
are no-ops.
If prefetch functions are needed back again later they can be improved
by avoiding the function call overhead and implementing them as intrinsics.
Change-Id: I52c553cf3607ffe09f0441c6e7a0a818cb21117d
Reviewed-on: https://go-review.googlesource.com/44370
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/asm_386.s')
-rw-r--r-- | src/runtime/asm_386.s | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/runtime/asm_386.s b/src/runtime/asm_386.s index 5bbf2866f3..19fc601259 100644 --- a/src/runtime/asm_386.s +++ b/src/runtime/asm_386.s @@ -1637,19 +1637,6 @@ TEXT runtime·goexit(SB),NOSPLIT,$0-0 // traceback from goexit1 must hit code range of goexit BYTE $0x90 // NOP -// Prefetching doesn't seem to help. -TEXT runtime·prefetcht0(SB),NOSPLIT,$0-4 - RET - -TEXT runtime·prefetcht1(SB),NOSPLIT,$0-4 - RET - -TEXT runtime·prefetcht2(SB),NOSPLIT,$0-4 - RET - -TEXT runtime·prefetchnta(SB),NOSPLIT,$0-4 - RET - // Add a module's moduledata to the linked list of moduledata objects. This // is called from .init_array by a function generated in the linker and so // follows the platform ABI wrt register preservation -- it only touches AX, |