Fix EC field TrappedFP annotation.#63
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates documentation comments for Exception Class (EC) values in the ESR (Exception Syndrome Register) definitions to correctly annotate feature dependencies. The primary change adds the (FEAT_AA32) annotation to the TrappedFP exception class, clarifying that trapping of floating-point/SIMD functionality is only available in AArch32 state.
Key Changes
- Added
(FEAT_AA32)annotation toTrappedFPexception class comments in both ESR_EL1 and ESR_EL2 registers - Added
(FEAT_BTI)annotation toIllegalExecutionStateexception class comment in ESR_EL2 register
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/registers/esr_el1.rs |
Updated TrappedFP documentation to indicate FEAT_AA32 dependency |
src/registers/esr_el2.rs |
Updated TrappedFP documentation to indicate FEAT_AA32 dependency and IllegalExecutionState to indicate FEAT_BTI dependency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/registers/esr_el2.rs
Outdated
| /// Branch Target Exception (FEAT_BTI) | ||
| BranchTarget = 0b00_1101, | ||
| /// Illegal Execution state | ||
| /// Illegal Execution state (FEAT_BTI) |
There was a problem hiding this comment.
The IllegalExecutionState exception (EC=0b001110) is not specific to FEAT_BTI. According to ARM architecture specifications, this exception class is used when an attempt is made to execute in an illegal execution state (e.g., attempting to execute AArch32 code when AArch32 is not supported at the current exception level). This is a general architectural exception that exists independently of FEAT_BTI.
While BranchTarget (EC=0b001101) is correctly annotated with FEAT_BTI, IllegalExecutionState should not have this annotation. Consider removing the (FEAT_BTI) annotation from this line.
| /// Illegal Execution state (FEAT_BTI) | |
| /// Illegal Execution state |
|
@kisum9 I think copilot is right here, FEAT_BTI is not related to IllegalStateException, it's just unfortunate markup errors in the ARM ARM. |
|
@berkus I agree with @thejpster. ESR_EL1 and ESR_EL2 both set FEAT_BTI for IllegalExecutionState,maybe add comment like “With FEAT_BTI implemented, this EC may also be used for BTI-related faults“ |
2c05616 to
704513f
Compare
|
This document might look more usable. |
|
Got it ;) |
Signed-off-by: tanyan <kisumtan93@gmail.com>
704513f to
3282b2a
Compare



TrappedFP also only available for FEAT_AA32.
Originally posted by @thejpster in #60 (comment)
Fixed issue #62