Commit 0433845a authored by Quey-Liang Kao's avatar Quey-Liang Kao Committed by Joel Sing
Browse files

cmd/asm, cmd/internal/obj/riscv: fix branch pseudo-instructions

Pseudo branch instructions BGT, BGTU, BLE, and BLEU implemented In
CL 226397 were translated inconsistently compared to other ones due
to the inversion of registers. For instance, while "BLT a, b" generates
"jump if a < b", "BLE a, b" generates "jump if b <= a."

This CL fixes the translation in the assembler and the tests.

Change-Id: Ia757be73e848734ca5b3a790e081f7c4f98c30f2
Reviewed-on: https://go-review.googlesource.com/c/go/+/271911


Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
Reviewed-by: default avatarJoel Sing <joel@sing.id.au>
Run-TryBot: Joel Sing <joel@sing.id.au>
parent 73e796cb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment