mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/internal/obj/loong64: add MULW.D.W[U] instructions
Go asm syntax: MULWVW RK, RJ, RD MULWVWU RK, RJ, RD Equivalent platform assembler syntax: mulw.d.w rd, rj, rk mulw.d.wu rd, rj, rk Change-Id: Ie46a21904a4c25d04200b0663f83072c38a76c6f Reviewed-on: https://go-review.googlesource.com/c/go/+/721521 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: abner chenc <chenguoqi@loongson.cn> Reviewed-by: Meidan Li <limeidan@loongson.cn> Reviewed-by: Mark Freeman <markfreeman@google.com> Reviewed-by: Keith Randall <khr@google.com>
This commit is contained in:
parent
a2946f2385
commit
7f2ae21fb4
4 changed files with 18 additions and 0 deletions
|
|
@ -212,6 +212,12 @@ lable2:
|
||||||
SRLV $32, R4, R5 // 85804500
|
SRLV $32, R4, R5 // 85804500
|
||||||
SRLV $32, R4 // 84804500
|
SRLV $32, R4 // 84804500
|
||||||
|
|
||||||
|
// MULW.D.W[U] instructions
|
||||||
|
MULWVW R4, R5 // a5101f00
|
||||||
|
MULWVW R4, R5, R6 // a6101f00
|
||||||
|
MULWVWU R4, R5 // a5901f00
|
||||||
|
MULWVWU R4, R5, R6 // a6901f00
|
||||||
|
|
||||||
MASKEQZ R4, R5, R6 // a6101300
|
MASKEQZ R4, R5, R6 // a6101300
|
||||||
MASKNEZ R4, R5, R6 // a6901300
|
MASKNEZ R4, R5, R6 // a6901300
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -589,6 +589,10 @@ const (
|
||||||
AORN
|
AORN
|
||||||
AANDN
|
AANDN
|
||||||
|
|
||||||
|
// 2.2.1.12
|
||||||
|
AMULWVW
|
||||||
|
AMULWVWU
|
||||||
|
|
||||||
// 2.2.7. Atomic Memory Access Instructions
|
// 2.2.7. Atomic Memory Access Instructions
|
||||||
AAMSWAPB
|
AAMSWAPB
|
||||||
AAMSWAPH
|
AAMSWAPH
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,8 @@ var Anames = []string{
|
||||||
"ALSLV",
|
"ALSLV",
|
||||||
"ORN",
|
"ORN",
|
||||||
"ANDN",
|
"ANDN",
|
||||||
|
"MULWVW",
|
||||||
|
"MULWVWU",
|
||||||
"AMSWAPB",
|
"AMSWAPB",
|
||||||
"AMSWAPH",
|
"AMSWAPH",
|
||||||
"AMSWAPW",
|
"AMSWAPW",
|
||||||
|
|
|
||||||
|
|
@ -1503,6 +1503,8 @@ func buildop(ctxt *obj.Link) {
|
||||||
opset(AREMU, r0)
|
opset(AREMU, r0)
|
||||||
opset(ADIV, r0)
|
opset(ADIV, r0)
|
||||||
opset(ADIVU, r0)
|
opset(ADIVU, r0)
|
||||||
|
opset(AMULWVW, r0)
|
||||||
|
opset(AMULWVWU, r0)
|
||||||
|
|
||||||
case AMULV:
|
case AMULV:
|
||||||
opset(AMULVU, r0)
|
opset(AMULVU, r0)
|
||||||
|
|
@ -3230,6 +3232,10 @@ func (c *ctxt0) oprrr(a obj.As) uint32 {
|
||||||
return 0x3c << 15 // mulh.d
|
return 0x3c << 15 // mulh.d
|
||||||
case AMULHVU:
|
case AMULHVU:
|
||||||
return 0x3d << 15 // mulhu.d
|
return 0x3d << 15 // mulhu.d
|
||||||
|
case AMULWVW:
|
||||||
|
return 0x3e << 15 // mulw.d.w
|
||||||
|
case AMULWVWU:
|
||||||
|
return 0x3f << 15 // mulw.d.wu
|
||||||
case ADIV:
|
case ADIV:
|
||||||
return 0x40 << 15 // div.w
|
return 0x40 << 15 // div.w
|
||||||
case ADIVU:
|
case ADIVU:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue