diff options
| author | Joel Sing <joel@sing.id.au> | 2020-03-03 03:40:37 +1100 |
|---|---|---|
| committer | Joel Sing <joel@sing.id.au> | 2020-03-15 08:14:24 +0000 |
| commit | dc3255391a59474eda08e71eaf8090753b0a84db (patch) | |
| tree | a67d47a6e086df2f58cfc3412eb690d22e9bda3f /src/cmd/asm | |
| parent | 32dbccde78562763b6d5cc847d32c5f94fa6cab4 (diff) | |
| download | go-dc3255391a59474eda08e71eaf8090753b0a84db.tar.xz | |
cmd/internal/obj/riscv: add NOT pseudo-instruction
Add a NOT pseudo-instruction that translates to XORI $-1.
Change-Id: I2be4cfe2939e988cd7f8d30260b704701d78475f
Reviewed-on: https://go-review.googlesource.com/c/go/+/221688
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/cmd/asm')
| -rw-r--r-- | src/cmd/asm/internal/asm/testdata/riscvenc.s | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cmd/asm/internal/asm/testdata/riscvenc.s b/src/cmd/asm/internal/asm/testdata/riscvenc.s index 06158153d8..6ccac42d68 100644 --- a/src/cmd/asm/internal/asm/testdata/riscvenc.s +++ b/src/cmd/asm/internal/asm/testdata/riscvenc.s @@ -305,10 +305,14 @@ start: MOVD F0, 4(X5) // 27b20200 MOVD F0, F1 // d3000022 + // NOT pseudo-instruction + NOT X5 // 93c2f2ff + NOT X5, X6 // 13c3f2ff + // These jumps can get printed as jumps to 2 because they go to the // second instruction in the function (the first instruction is an // invisible stack pointer adjustment). - JMP start // JMP 2 // 6ff09fc6 + JMP start // JMP 2 // 6ff01fc6 JMP (X5) // 67800200 JMP 4(X5) // 67804200 |
