mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/internal/obj/loong64: add support for instructions ANDN and ORN
Go asm syntax:
ANDN/ORN RK, RJ, RD
or ANDN/ORN RK, RD
Equivalent platform assembler syntax:
andn/orn rd, rj, rk
or andn/orn rd, rd, rk
Ref: https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html
Change-Id: I6d240ecae8f9443811ca450aed3574f13f0f4a81
Reviewed-on: https://go-review.googlesource.com/c/go/+/610475
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Commit-Queue: abner chenc <chenguoqi@loongson.cn>
Reviewed-by: abner chenc <chenguoqi@loongson.cn>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: abner chenc <chenguoqi@loongson.cn>
This commit is contained in:
parent
501b389efc
commit
db07c8607a
4 changed files with 17 additions and 0 deletions
|
|
@ -1100,6 +1100,8 @@ func buildop(ctxt *obj.Link) {
|
|||
case AAND:
|
||||
opset(AOR, r0)
|
||||
opset(AXOR, r0)
|
||||
opset(AORN, r0)
|
||||
opset(AANDN, r0)
|
||||
|
||||
case ABEQ:
|
||||
opset(ABNE, r0)
|
||||
|
|
@ -1858,6 +1860,10 @@ func (c *ctxt0) oprrr(a obj.As) uint32 {
|
|||
return 0x2a << 15
|
||||
case AXOR:
|
||||
return 0x2b << 15
|
||||
case AORN:
|
||||
return 0x2c << 15 // orn
|
||||
case AANDN:
|
||||
return 0x2d << 15 // andn
|
||||
case ASUB:
|
||||
return 0x22 << 15
|
||||
case ASUBU, ANEGW:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue