mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: add wasm bulk memory operations
The existing implementation uses loops to implement bulk memory operations such as memcpy and memclr. Now that bulk memory operations have been standardized and are implemented in all major browsers and engines (see https://webassembly.org/roadmap/), we should use them to improve performance. Updates #28360 Change-Id: I28df0e0350287d5e7e1d1c09a4064ea1054e7575 Reviewed-on: https://go-review.googlesource.com/c/go/+/444935 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Keith Randall <khr@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Richard Musiol <neelance@gmail.com> Reviewed-by: David Chase <drchase@google.com> Auto-Submit: Richard Musiol <neelance@gmail.com> Reviewed-by: Richard Musiol <neelance@gmail.com>
This commit is contained in:
parent
599a1e40c6
commit
50557edf10
15 changed files with 59 additions and 347 deletions
|
|
@ -60,8 +60,6 @@ var wasmFuncTypes = map[string]*wasmFuncType{
|
|||
"wasm_export_resume": {Params: []byte{}}, //
|
||||
"wasm_export_getsp": {Results: []byte{I32}}, // sp
|
||||
"wasm_pc_f_loop": {Params: []byte{}}, //
|
||||
"runtime.wasmMove": {Params: []byte{I32, I32, I32}}, // dst, src, len
|
||||
"runtime.wasmZero": {Params: []byte{I32, I32}}, // ptr, len
|
||||
"runtime.wasmDiv": {Params: []byte{I64, I64}, Results: []byte{I64}}, // x, y -> x/y
|
||||
"runtime.wasmTruncS": {Params: []byte{F64}, Results: []byte{I64}}, // x -> int(x)
|
||||
"runtime.wasmTruncU": {Params: []byte{F64}, Results: []byte{I64}}, // x -> uint(x)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue