Skip to content
Snippets Groups Projects
Commit 11dbbaff authored by Xiaolin Zhao's avatar Xiaolin Zhao Committed by abner chenc
Browse files

cmd/internal/obj/loong64: add support for MOV{GR2FCSR/FCSR2GR/FR2CF/CF2FR} instructions

Go asm syntax example:
	MOVV	R4, FCSR0
	MOVV	FCSR1, R5
	MOVV	F4, FCC0
	MOVV	FCC1, F5

Equivalent platform assembler syntax:
	movgr2fcsr	fcsr0, r4
	movfcsr2gr	r5, fcsr1
	movfr2cf	fcc0, f4
	movcf2fr	f5, fcc1

Ref: https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html

This change also merges the case of floating point move instructions
and add checks for the range of special registers.

Change-Id: Ib08fbce83e7a31dc0ab4857bf9ba959855241d1c
Reviewed-on: https://go-review.googlesource.com/c/go/+/580279


LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: default avatarabner chenc <chenguoqi@loongson.cn>
Reviewed-by: default avatarMichael Knyszek <mknyszek@google.com>
Reviewed-by: default avatarCherry Mui <cherryyz@google.com>
parent 67c3f012
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment