Go asm syntax:
FCOPYSG{F/D} FK, FJ, FD
FCLASSF{F/D} FJ, FD
Equivalent platform assembler syntax:
fcopysign.{s/d} fd, fj, fk
fclass.{s/d} fd, fj
Ref: https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html
Change-Id: Ied34b71c9d0b34456ac5782a59d29d2d0229e326
Reviewed-on: https://go-review.googlesource.com/c/go/+/590675
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: abner chenc <chenguoqi@loongson.cn>
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>
FMAXF F4, F5 // a5900801
FMAXD F4, F5, F6 // a6100901
FMAXD F4, F5 // a5100901
+
+ FCOPYSGF F4, F5, F6 // a6901201
+ FCOPYSGD F4, F5, F6 // a6101301
+ FCLASSF F4, F5 // 85341401
+ FCLASSD F4, F5 // 85381401
AFMAXF
AFMAXD
+ // 3.2.1.7
+ AFCOPYSGF
+ AFCOPYSGD
+
+ // 3.2.1.8
+ AFCLASSF
+ AFCLASSD
+
ALAST
// aliases
"FMIND",
"FMAXF",
"FMAXD",
+ "FCOPYSGF",
+ "FCOPYSGD",
+ "FCLASSF",
+ "FCLASSD",
"LAST",
}
opset(ATRUNCFW, r0)
opset(ASQRTF, r0)
opset(ASQRTD, r0)
+ opset(AFCLASSF, r0)
+ opset(AFCLASSD, r0)
case AMOVVF:
opset(AMOVVD, r0)
opset(AFMIND, r0)
opset(AFMAXF, r0)
opset(AFMAXD, r0)
+ opset(AFCOPYSGF, r0)
+ opset(AFCOPYSGD, r0)
case AAND:
opset(AOR, r0)
return 0x211 << 15 // fmax.s
case AFMAXD:
return 0x212 << 15 // fmax.d
+ case AFCOPYSGF:
+ return 0x225 << 15 // fcopysign.s
+ case AFCOPYSGD:
+ return 0x226 << 15 // fcopysign.d
}
if a < 0 {
return 0x4511 << 10
case ASQRTD:
return 0x4512 << 10
+ case AFCLASSF:
+ return 0x450d << 10 // fclass.s
+ case AFCLASSD:
+ return 0x450e << 10 // fclass.d
}
c.ctxt.Diag("bad rr opcode %v", a)