Purpose and scope
This unit owns the five architecture-visible numeric status flags and the sticky update applied after a successful numeric operation.
PTO-ARCH-STATE-NUMERIC-STATUSThe complete ASL owner is shown directly below.
// PTO-UNIT: {"id":"PTO-ARCH-STATE-NUMERIC-STATUS","surface":"arch","classification":["state","numeric-status"],"depends_on":["PTO-ARCH-SYSTEM-REGISTERS-ADDRESSING"]}// NDF-BEGIN: PTO-NUMERIC-STATUS-STICKY-001// ndf: kind=contract level=L1 layer=architecture status=accepted// Numeric execution flags MUST map to CORE_STATE[36:32] as NV, DZ, OF, UF,// and NX, and a successful numeric operation MUST OR its produced flags into// the existing sticky status without clearing an earlier flag.// NDF-END: PTO-NUMERIC-STATUS-STICKY-001// DOC-BEGIN: statereadonly func NumericStatusFlags() => bits(5)begin return _SystemRegisters.core_state[36:32];end;
func RecordNumericStatusFlags(flags: bits(5))begin _SystemRegisters.core_state[36:32] = NumericStatusFlags() OR flags;end;// DOC-END: state
This unit owns the five architecture-visible numeric status flags and the sticky update applied after a successful numeric operation.
NumericStatusFlags reads CORE_STATE[36:32]. From bit 36 down to bit 32, the five flags are NV, DZ, OF, UF, and NX.
RecordNumericStatusFlags ORs the supplied five-bit value with the current status and writes the result back to CORE_STATE[36:32].
A successful numeric operation can therefore set a flag but cannot clear a flag that was already set by an earlier operation.
This owner defines the status layout and accumulation operation. It does not decide which numeric operation produces NV, DZ, OF, UF, or NX; that decision belongs to the numeric operation's current ASL owner and profile hook where applicable.
If the current five-bit status is 10000 and a later successful operation supplies 00001, the recorded value becomes 10001. Supplying 00000 afterward leaves 10001 unchanged.
core_state storage used here.Bodies come from owning ASL. Dragging or buttons change only this page-session view order.
Numeric execution flags MUST map to CORE_STATE[36:32] as NV, DZ, OF, UF, and NX, and a successful numeric operation MUST OR its produced flags into the existing sticky status without clearing an earlier flag.
PTO-NUMERIC-STATUS-STICKY-001asl/arch/state/numeric-status.asl3d3fe1709c7e2903bca96d50e9671a6a484c442ff08ce4a8340168cdb38ac6d9726594cdc2b4175fe94b32f63471549fab32de6dcf2cf0272ecf2845684ffb778 matching entries
PTO-AVS-ARCH-NUMERIC-STATUS-001tests/asl/arch/state/numeric-status/arch-state-numeric-status-001.asl73c82a0e416a7635964e18f0b52a0330df6edcb3292f9eb65937b9ace7d9948dPTO-AVS-ARCH-STATE-NUMERIC-STATUS-STATIC-001tests/asl/arch/state/numeric-status/arch-static-numeric-status-contract-001.asl98f5b7e8fe831e27ddfd019b142755a3675e04ff9fe7224a881f3f5d28eca221PTO-EVIDENCE-RELEASE-TRACEABILITYPTO-EVIDENCE-RELEASE-TRACEABILITYspec/evidence/release-traceability-readiness.jsonc7327021d39dc67ac5564bc55073b3870a397d79ac8d9648284d56e33bc14a3ePTO-EVIDENCE-INSTRUCTION-CONTRACT-CLOSUREPTO-EVIDENCE-INSTRUCTION-CONTRACT-CLOSUREspec/evidence/instruction-contract-closure.json3ef2bb62421c79dff8fa77a1c7983923b523244b8090812883ef81286ca8106aPTO-EVIDENCE-ARCHITECTURE-READINESSPTO-EVIDENCE-ARCHITECTURE-READINESSspec/evidence/architecture-readiness.json4b0b85199101251bea744e0f3591cc31906909dc80d5ab651c417a936036a004PTO-EVIDENCE-RELEASE-GATE-READINESSPTO-EVIDENCE-RELEASE-GATE-READINESSspec/evidence/release-gate-readiness.jsona0f4d2b6920c08981ea55fd8ef820708a40d4feb5402c5150e8e9ab532d84ce0PTO-EVIDENCE-RELEASE-MANIFESTPTO-EVIDENCE-RELEASE-MANIFESTspec/release-manifest.json1a64c109ed7a90351c41e2a418b3c0ebaf8ad975838986d2101385186b85c0d8Loading ADR-0038…
ADR-0038docs/status/decisions/0038-scalar-numeric-flag-state-and-ownership.mdeac15c3bee955bb92833482b9af8b9f149fe17c13138e6f2b22f0ed1cf40fc07{
"classification": [
"state",
"numeric-status"
],
"documentation": "docs/arch/state/numeric-status.md",
"id": "PTO-ARCH-STATE-NUMERIC-STATUS",
"mnemonic": null,
"readiness_subjects": [
"ADR-0038"
],
"semantic_tests": [
"PTO-AVS-ARCH-NUMERIC-STATUS-001"
],
"source": "asl/arch/state/numeric-status.asl",
"surface": "arch",
"tests": [
"PTO-AVS-ARCH-NUMERIC-STATUS-001",
"PTO-AVS-ARCH-STATE-NUMERIC-STATUS-STATIC-001"
]
}0.58.5 · Release candidate7dc8b7e5b121d2b2499a2273bebff29e2cd868123d3fe1709c7e2903bca96d50e9671a6a484c442ff08ce4a8340168cdb38ac6d9b7b88e800b8fb42ff16164137d45c59c6ecc5cc83143ea0370199d6a06514b49asl/arch/state/numeric-status.aslasl/arch/state/numeric-status.asl