aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/gen/RISCV64.rules
diff options
context:
space:
mode:
authorJoel Sing <joel@sing.id.au>2020-03-03 03:43:02 +1100
committerJoel Sing <joel@sing.id.au>2020-03-15 08:18:17 +0000
commit7b2f0ba5b91b4b2b659fb46638ff56f51be9b2b5 (patch)
tree232eb6b5ac95be4a2325e5790a7ee70fb4981698 /src/cmd/compile/internal/ssa/gen/RISCV64.rules
parent25da2ea72c18a63f5efdb7c506669aa733693bea (diff)
downloadgo-7b2f0ba5b91b4b2b659fb46638ff56f51be9b2b5.tar.gz
go-7b2f0ba5b91b4b2b659fb46638ff56f51be9b2b5.zip
cmd/compile: use NOT pseudo-instruction on riscv64
Change-Id: I24a72c3fb8d72a47cfded4b523c5d7aa2d40419d Reviewed-on: https://go-review.googlesource.com/c/go/+/221690 Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/gen/RISCV64.rules')
-rw-r--r--src/cmd/compile/internal/ssa/gen/RISCV64.rules8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/compile/internal/ssa/gen/RISCV64.rules b/src/cmd/compile/internal/ssa/gen/RISCV64.rules
index 9b88b56871..d6ed61a461 100644
--- a/src/cmd/compile/internal/ssa/gen/RISCV64.rules
+++ b/src/cmd/compile/internal/ssa/gen/RISCV64.rules
@@ -91,10 +91,10 @@
(Neg32F ...) -> (FNEGS ...)
(Neg64F ...) -> (FNEGD ...)
-(Com64 x) -> (XORI [int64(-1)] x)
-(Com32 x) -> (XORI [int64(-1)] x)
-(Com16 x) -> (XORI [int64(-1)] x)
-(Com8 x) -> (XORI [int64(-1)] x)
+(Com64 ...) -> (NOT ...)
+(Com32 ...) -> (NOT ...)
+(Com16 ...) -> (NOT ...)
+(Com8 ...) -> (NOT ...)
(Sqrt ...) -> (FSQRTD ...)