mirror of
https://github.com/golang/go
synced 2024-11-25 14:17:57 -07:00
cmd/internal/obj/loong64: fixed operand assignment error for BFPT/BFPF instructions
The BFPT correspond to BCNEZ instruction of LoongArch64 which structure is: | op-p1 | offs[15:0] | op-p2 | cj | offs[20:16] | The register REG_FCC0 should be assigned to the source operand cj which named rj here. Change-Id: I696d0a46028924da1cd7e240fbb40a1913f1a757 Reviewed-on: https://go-review.googlesource.com/c/go/+/565620 Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: abner chenc <chenguoqi@loongson.cn> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Qiqi Huang <huangqiqi@loongson.cn> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: sophie zhao <zhaoxiaolin@loongson.cn>
This commit is contained in:
parent
950fcf129e
commit
ff0c2d9634
@ -1373,7 +1373,7 @@ func (c *ctxt0) asmout(p *obj.Prog, o *Optab, out []uint32) {
|
|||||||
width = 21
|
width = 21
|
||||||
// FCC0 is the implicit source operand, now that we
|
// FCC0 is the implicit source operand, now that we
|
||||||
// don't register-allocate from the FCC bank.
|
// don't register-allocate from the FCC bank.
|
||||||
rd = REG_FCC0
|
rj = REG_FCC0
|
||||||
case ABEQ, ABNE:
|
case ABEQ, ABNE:
|
||||||
if rd == 0 || rd == REGZERO || rj == REGZERO {
|
if rd == 0 || rd == REGZERO || rj == REGZERO {
|
||||||
// BEQZ/BNEZ can be encoded with 21-bit offsets.
|
// BEQZ/BNEZ can be encoded with 21-bit offsets.
|
||||||
|
Loading…
Reference in New Issue
Block a user