cpu: also use MRS instruction in getmmfr1

Use the MRS instruction with the corresponding system register instead
of encoding the instructions using a WORD directive. This was missed in
CL 583135.

Change-Id: Ifcbbd81baa903f1da442eae2e49c06284db9c37d
Reviewed-on: https://go-review.googlesource.com/c/sys/+/717681
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Florian Lehner <lehner.florian86@gmail.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
Tobias Klauser
2025-11-04 09:38:28 +01:00
committed by Gopher Robot
parent ed38ca2d41
commit 15129aafc3

View File

@@ -23,8 +23,7 @@ TEXT ·getisar1(SB),NOSPLIT,$0-8
// func getmmfr1() uint64
TEXT ·getmmfr1(SB),NOSPLIT,$0-8
// get Memory Model Feature Register 1 into x0
// mrs x0, ID_AA64MMFR1_EL1 = d5380720
WORD $0xd5380720
MRS ID_AA64MMFR1_EL1, R0
MOVD R0, ret+0(FP)
RET