Skip to content

Commit cb567e7

Browse files
Suzuki K Poulosectmarinas
authored andcommitted
arm64: v8.3: Support for complex number instructions
ARM v8.3 adds support for new instructions to aid floating-point multiplication and addition of complex numbers. Expose the support via HWCAP and MRS emulation Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent c8c3798 commit cb567e7

File tree

5 files changed

+7
-0
lines changed

5 files changed

+7
-0
lines changed

Documentation/arm64/cpu-feature-registers.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ infrastructure:
174174
x--------------------------------------------------x
175175
| Name | bits | visible |
176176
|--------------------------------------------------|
177+
| FCMA | [19-16] | y |
178+
|--------------------------------------------------|
177179
| JSCVT | [15-12] | y |
178180
x--------------------------------------------------x
179181

arch/arm64/include/asm/sysreg.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@
157157
#define ID_AA64ISAR0_AES_SHIFT 4
158158

159159
/* id_aa64isar1 */
160+
#define ID_AA64ISAR1_FCMA_SHIFT 16
160161
#define ID_AA64ISAR1_JSCVT_SHIFT 12
161162

162163
/* id_aa64pfr0 */

arch/arm64/include/uapi/asm/hwcap.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@
3333
#define HWCAP_CPUID (1 << 11)
3434
#define HWCAP_ASIMDRDM (1 << 12)
3535
#define HWCAP_JSCVT (1 << 13)
36+
#define HWCAP_FCMA (1 << 14)
3637

3738
#endif /* _UAPI__ASM_HWCAP_H */

arch/arm64/kernel/cpufeature.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ static const struct arm64_ftr_bits ftr_id_aa64isar0[] = {
9898
};
9999

100100
static const struct arm64_ftr_bits ftr_id_aa64isar1[] = {
101+
ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_EXACT, ID_AA64ISAR1_FCMA_SHIFT, 4, 0),
101102
ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_EXACT, ID_AA64ISAR1_JSCVT_SHIFT, 4, 0),
102103
ARM64_FTR_END,
103104
};
@@ -894,6 +895,7 @@ static const struct arm64_cpu_capabilities arm64_elf_hwcaps[] = {
894895
HWCAP_CAP(SYS_ID_AA64PFR0_EL1, ID_AA64PFR0_ASIMD_SHIFT, FTR_SIGNED, 0, CAP_HWCAP, HWCAP_ASIMD),
895896
HWCAP_CAP(SYS_ID_AA64PFR0_EL1, ID_AA64PFR0_ASIMD_SHIFT, FTR_SIGNED, 1, CAP_HWCAP, HWCAP_ASIMDHP),
896897
HWCAP_CAP(SYS_ID_AA64ISAR1_EL1, ID_AA64ISAR1_JSCVT_SHIFT, FTR_UNSIGNED, 1, CAP_HWCAP, HWCAP_JSCVT),
898+
HWCAP_CAP(SYS_ID_AA64ISAR1_EL1, ID_AA64ISAR1_FCMA_SHIFT, FTR_UNSIGNED, 1, CAP_HWCAP, HWCAP_FCMA),
897899
{},
898900
};
899901

arch/arm64/kernel/cpuinfo.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ static const char *const hwcap_str[] = {
6666
"cpuid",
6767
"asimdrdm",
6868
"jscvt",
69+
"fcma",
6970
NULL
7071
};
7172

0 commit comments

Comments
 (0)