]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix OffPtr with negative offset on wasm
authorRichard Musiol <mail@richard-musiol.de>
Wed, 6 Jun 2018 11:10:16 +0000 (13:10 +0200)
committerCherry Zhang <cherryyz@google.com>
Wed, 6 Jun 2018 14:40:25 +0000 (14:40 +0000)
commit88dc4aee7cf81f78a8da08691349bb394f0ba75c
tree57e14a5a6c03c3e4378e4f3e98cbf88ea5925198
parent6decd3d984dd0bb213837b64ab6870568b33f197
cmd/compile: fix OffPtr with negative offset on wasm

The wasm archtecture was missing a rule to handle OffPtr with a
negative offset. This commit makes it so OffPtr always gets lowered
to I64AddConst.

Fixes #25741

Change-Id: I1d48e2954e3ff31deb8cba9a9bf0cab7c4bab71a
Reviewed-on: https://go-review.googlesource.com/116595
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/ssa/gen/Wasm.rules
src/cmd/compile/internal/ssa/rewriteWasm.go
test/fixedbugs/issue25741.go [new file with mode: 0644]