We couldn't use the CNTPOFF_EL2 register because FEAT_ECV was not enabled.
So we used S3_4_C14_C0_6 as a workaround.
According to the Arm specification, FEAT_ECV must be enabled to use CNTPOFF_EL2, so in this PR, i've enabled FEAT_ECV used the correct register name.
This PR emits an warning like below. However, it is better to use the correct target-feature to ensure proper functionality.
$ cargo build
warning: unknown and unstable feature specified for `-Ctarget-feature`: `ecv`
|
= note: it is still passed through to the codegen backend, but use of this feature might be unsound and the behavior of this feature can change in the future
= help: consider filing a feature request
This PR enables
FEAT_ECV
to use CNTPOFF_EL2.We couldn't use the
CNTPOFF_EL2
register becauseFEAT_ECV
was not enabled. So we usedS3_4_C14_C0_6
as a workaround.According to the Arm specification, FEAT_ECV must be enabled to use
CNTPOFF_EL2
, so in this PR, i've enabledFEAT_ECV
used the correct register name.This PR emits an warning like below. However, it is better to use the correct target-feature to ensure proper functionality.
Arm A-Profile Spec
CNTPOFF_EL2, Counter-timer Physical Offset Register
This register is present only when FEAT_ECV is implemented. Otherwise, direct accesses to CNTPOFF_EL2 are UNDEFINED.
LLVM Version (18.1.4)
ref) llvm/lib/Target/AArch64/AArch64SystemOperands.td