git: 66ba742d2e6c - main - Allow use of the arm64 unnamed register form
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 29 Jun 2022 16:54:39 UTC
The branch main has been updated by andrew:
URL: https://cgit.FreeBSD.org/src/commit/?id=66ba742d2e6c950611fa3d557512133b0216daa7
commit 66ba742d2e6c950611fa3d557512133b0216daa7
Author: Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2022-06-29 16:34:41 +0000
Commit: Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2022-06-29 16:50:04 +0000
Allow use of the arm64 unnamed register form
On arm64 all registers have a name that encodes op0, op1, CRn, CRm, and
op2 that are used to encode the register in the instruction. As some
registers we need to access may not be supportedby older compilers, or
are only supported when specific extensions are enabled support this
alternative form.
Sponsored by: The FreeBSD Foundation
---
sys/arm64/include/armreg.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h
index 02f45d66efde..726248a0916b 100644
--- a/sys/arm64/include/armreg.h
+++ b/sys/arm64/include/armreg.h
@@ -57,6 +57,12 @@
#define MRS_REG(reg) \
__MRS_REG(reg##_op0, reg##_op1, reg##_CRn, reg##_CRm, reg##_op2)
+#define __MRS_REG_ALT_NAME(op0, op1, crn, crm, op2) \
+ S##op0##_##op1##_C##crn##_C##crm##_##op2
+#define _MRS_REG_ALT_NAME(op0, op1, crn, crm, op2) \
+ __MRS_REG_ALT_NAME(op0, op1, crn, crm, op2)
+#define MRS_REG_ALT_NAME(reg) \
+ _MRS_REG_ALT_NAME(reg##_op0, reg##_op1, reg##_CRn, reg##_CRm, reg##_op2)
#define READ_SPECIALREG(reg) \