mirror of
https://github.com/golang/go
synced 2024-11-23 11:20:05 -07:00
cmd/internal/obj/loong64: add support for movgr2cf and movcf2gr instructions
Change-Id: I7ff3c8df24ed7990fe104bc2530354c0bd5fe018 Reviewed-on: https://go-review.googlesource.com/c/go/+/475576 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Cherry Mui <cherryyz@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: abner chenc <chenguoqi@loongson.cn> Reviewed-by: xiaodong liu <teaofmoli@gmail.com> Reviewed-by: WANG Xuerui <git@xen0n.name>
This commit is contained in:
parent
6f2ef5ec98
commit
2ef70d9d0f
@ -222,3 +222,6 @@ lable2:
|
||||
RDTIMELW R4, R0 // 80600000
|
||||
RDTIMEHW R4, R0 // 80640000
|
||||
RDTIMED R4, R5 // 85680000
|
||||
|
||||
MOVV FCC0, R4 // 04dc1401
|
||||
MOVV R4, FCC0 // 80d81401
|
||||
|
@ -324,6 +324,9 @@ var optab = []Optab{
|
||||
{AMOVV, C_REG, C_NONE, C_FREG, C_NONE, 47, 4, 0, sys.Loong64, 0},
|
||||
{AMOVV, C_FREG, C_NONE, C_REG, C_NONE, 48, 4, 0, sys.Loong64, 0},
|
||||
|
||||
{AMOVV, C_FCCREG, C_NONE, C_REG, C_NONE, 63, 4, 0, sys.Loong64, 0},
|
||||
{AMOVV, C_REG, C_NONE, C_FCCREG, C_NONE, 64, 4, 0, sys.Loong64, 0},
|
||||
|
||||
{AMOVW, C_ADDCON, C_NONE, C_FREG, C_NONE, 34, 8, 0, sys.Loong64, 0},
|
||||
{AMOVW, C_ANDCON, C_NONE, C_FREG, C_NONE, 34, 8, 0, sys.Loong64, 0},
|
||||
|
||||
@ -1622,6 +1625,14 @@ func (c *ctxt0) asmout(p *obj.Prog, o *Optab, out []uint32) {
|
||||
|
||||
case 62: // rdtimex rd, rj
|
||||
o1 = OP_RR(c.oprr(p.As), uint32(p.To.Reg), uint32(p.RegTo2))
|
||||
|
||||
case 63: // movv c_fcc0, c_reg ==> movcf2gr rd, cj
|
||||
a := OP_TEN(8, 1335)
|
||||
o1 = OP_RR(a, uint32(p.From.Reg), uint32(p.To.Reg))
|
||||
|
||||
case 64: // movv c_reg, c_fcc0 ==> movgr2cf cd, rj
|
||||
a := OP_TEN(8, 1334)
|
||||
o1 = OP_RR(a, uint32(p.From.Reg), uint32(p.To.Reg))
|
||||
}
|
||||
|
||||
out[0] = o1
|
||||
|
Loading…
Reference in New Issue
Block a user