Operands and parameters
RegDst- Reg5 destination or discard
SrcA- fused addend Reg5 source
SrcL- left or sole Reg5 source
SrcR- right Reg5 source
SrcType- source carrier selector
FMADD computes one fused SrcL multiplied by SrcR plus SrcA operation through the active numeric profile.
PTO-SCALAR-FMADDfmadd.{T} SrcL, SrcR, SrcA, ->{t, u, Rd}| Field | Bits | Signedness | Architectural role | Encoded zero |
|---|---|---|---|---|
RegDst | 5 | encoding-defined | Reg5 destination or discard | Encoded zero discards the result. |
SrcA | 5 | encoding-defined | fused addend Reg5 source | Encoded zero reads the architectural zero GPR. |
SrcL | 5 | encoding-defined | left or sole Reg5 source | Encoded zero reads the architectural zero GPR. |
SrcR | 5 | encoding-defined | right Reg5 source | Encoded zero reads the architectural zero GPR. |
SrcType | 2 | encoding-defined | source carrier selector | Encoded zero selects the 64-bit source carrier; it is not omission. |
Loading WaveDrom diagram… The encoding table and WaveJSON remain available below.
| Decoded item | Bit range | Value |
|---|---|---|
| SrcA | 31:27 | variable |
| SrcType | 26:25 | variable |
| SrcR | 24:20 | variable |
| SrcL | 19:15 | variable |
| Constant | 14:12 | 3'b100 |
| RegDst | 11:7 | variable |
| Constant | 6:0 | 7'b1001011 |
{
"reg": [
{
"bits": 7,
"name": "7'b1001011"
},
{
"bits": 5,
"name": "RegDst"
},
{
"bits": 3,
"name": "3'b100"
},
{
"bits": 5,
"name": "SrcL"
},
{
"bits": 5,
"name": "SrcR"
},
{
"bits": 2,
"name": "SrcType"
},
{
"bits": 5,
"name": "SrcA"
}
],
"config": {
"bits": 32,
"fontsize": 13,
"hspace": 900,
"lanes": 1,
"offset": 0
}
}fmadd.{T} SrcL, SrcR, SrcA, ->{t, u, Rd}
RegDstSrcASrcLSrcRSrcTypeThis Operation comes directly from the instruction owner; the page does not rewrite its behavior.
readonly func InstructionContractOperation_FMADD() => ScalarOperationbegin return ScalarOperation_FMADD;end;readonly func InstructionContractHandler_FMADD() => ScalarSemanticHandlerbegin return ScalarHandler_FloatingFused;end;
pure func InstructionContractSourceTypeLegal_FMADD(encoded: bits(2)) => booleanbegin return encoded == '00' || encoded == '01';end;
pure func InstructionContractSourceCarrier_FMADD(encoded: bits(2)) => bits(5)begin assert InstructionContractSourceTypeLegal_FMADD(encoded); return ScalarFPSourceTypeCode(encoded);end;
pure func InstructionContractSourceArity_FMADD() => integer {1..3}begin return 3;end;
pure func InstructionContractUsesProfileFlags_FMADD() => booleanbegin return TRUE;end;
pure func InstructionContractUsesActiveRounding_FMADD() => booleanbegin return TRUE;end;
pure func InstructionContractFusedOperation_FMADD() => FloatingFusedOperationbegin return FloatingFused_MADD;end;// PTO-INSTRUCTION: {"assembly":["fmadd.{T} SrcL, SrcR, SrcA, ->{t, u, Rd}"],"block":[],"catalog_indices":[105],"catalog_records":[{"asm":"fmadd.{T} SrcL, SrcR, SrcA, ->{t, u, Rd}","constraints":[{"field":"SrcType","operator":"one-of","values":[0,1]}],"encoding":[{"index":0,"mask":"0x0000707f","match":"0x0000404b","width_bits":32}],"encoding_kind":"L32","fields":[{"name":"RegDst","pieces":[{"instruction_lsb":7,"value_lsb":0,"width":5}],"signedness":"encoding-defined","width":5},{"name":"SrcA","pieces":[{"instruction_lsb":27,"value_lsb":0,"width":5}],"signedness":"encoding-defined","width":5},{"name":"SrcL","pieces":[{"instruction_lsb":15,"value_lsb":0,"width":5}],"signedness":"encoding-defined","width":5},{"name":"SrcR","pieces":[{"instruction_lsb":20,"value_lsb":0,"width":5}],"signedness":"encoding-defined","width":5},{"name":"SrcType","pieces":[{"instruction_lsb":25,"value_lsb":0,"width":2}],"signedness":"encoding-defined","width":2}],"form_id":"fmadd_32_c616a17bcb12","length_bits":32,"mnemonic":"FMADD","semantic_family":"FSU","semantic_group":"FSU","semantic_handler":"FloatingFused","semantic_summary":"FMADD computes one fused SrcL multiplied by SrcR plus SrcA operation through the active numeric profile.","status":"accepted"}],"classification":["fsu"],"contract":{"block_composition":["none"],"canonical_assembly":["fmadd.{T} SrcL, SrcR, SrcA, ->{t, u, Rd}"],"defaults":["Every displayed operand field is encoded explicitly; encoded zero is a value and never denotes omission.","SrcType=0 selects an FP64 carrier and SrcType=1 selects the zero-extended low-word FP32 carrier. SrcType=2 and SrcType=3 are reserved."],"encoding_class":"standalone-encoded","examples":["fmadd.fd a0, a1, a2, ->a3","fmadd.fs t#1, u#1, a0, ->t"],"exceptions":["A fixed-bit mismatch, reserved SrcType, reserved DstType where present, or unavailable selected T/U source raises Fault_IllegalInstruction before source, profile, destination, flag, queue, or TPC effects.","Numeric profile flags update sticky status and do not themselves raise a synchronous PTO trap."],"field_contracts":{},"field_zero_meanings":{"RegDst":"Encoded zero discards the result.","SrcA":"Encoded zero reads the architectural zero GPR.","SrcL":"Encoded zero reads the architectural zero GPR.","SrcR":"Encoded zero reads the architectural zero GPR.","SrcType":"Encoded zero selects the 64-bit source carrier; it is not omission."},"legality":["Every Reg5 source uses codes 0..23 for absolute GPRs, 24..27 for T#1..T#4, and 28..31 for U#1..U#4 without consumption.","Every Reg5 destination is assigned: codes 1..23 write GPRs, 30 pushes U, 31 pushes T, and 0 plus 24..29 discard only the result.","SrcType codes 0 and 1 are assigned; codes 2 and 3 are reserved."],"memory_effects":["none"],"operands":[{"field":"RegDst","role":"Reg5 destination or discard"},{"field":"SrcA","role":"fused addend Reg5 source"},{"field":"SrcL","role":"left or sole Reg5 source"},{"field":"SrcR","role":"right Reg5 source"},{"field":"SrcType","role":"source carrier selector"}],"ordering":["Validate every encoded type before the first architectural source read or profile call.","Snapshot every explicit source before flag or destination effects; duplicate sources, destination aliases, and same-queue read-then-push observe pre-instruction values.","Accumulate produced flags, publish or discard the destination, and then advance TPC."],"standalone_opcode":true,"state_effects":["FMADD computes one fused SrcL multiplied by SrcR plus SrcA operation through the active numeric profile.","The selected numeric profile returns an exact NV, DZ, OF, UF, NX vector which is ORed into existing sticky CORE_STATE flags.","For pto-v0, compute MultiplyWord(SrcL, SrcR) plus SrcA modulo the selected width and return zero flags. This executable reference behavior is not target floating-point conformance.","Destination codes 1..23 write GPRs, 30 pushes U, 31 pushes T, and 0 plus 24..29 discard the result.","Successful execution advances TPC by four bytes."]},"depends_on":["PTO-SCALAR-MODEL-FSU-PROFILE"],"id":"PTO-SCALAR-FMADD","mnemonic":"FMADD","summary":"FMADD computes one fused SrcL multiplied by SrcR plus SrcA operation through the active numeric profile.","surface":"scalar"}// PTO-REVIEW: {"review_method":"formal-definition-read","outcome":"FORMAL-COMPLETE","reviewed_fields":["assembly","encoding","defaults","operation","state","memory","ordering","faults","reserved"]}// DOC-BEGIN: decodereadonly func InstructionContractOperation_FMADD() => ScalarOperationbegin return ScalarOperation_FMADD;end;// DOC-END: decode// DOC-BEGIN: operationreadonly func InstructionContractHandler_FMADD() => ScalarSemanticHandlerbegin return ScalarHandler_FloatingFused;end;
pure func InstructionContractSourceTypeLegal_FMADD(encoded: bits(2)) => booleanbegin return encoded == '00' || encoded == '01';end;
pure func InstructionContractSourceCarrier_FMADD(encoded: bits(2)) => bits(5)begin assert InstructionContractSourceTypeLegal_FMADD(encoded); return ScalarFPSourceTypeCode(encoded);end;
pure func InstructionContractSourceArity_FMADD() => integer {1..3}begin return 3;end;
pure func InstructionContractUsesProfileFlags_FMADD() => booleanbegin return TRUE;end;
pure func InstructionContractUsesActiveRounding_FMADD() => booleanbegin return TRUE;end;
pure func InstructionContractFusedOperation_FMADD() => FloatingFusedOperationbegin return FloatingFused_MADD;end;// DOC-END: operation
FMADD computes fused left times right plus addend through the active numeric profile.
SrcType=00 selects a complete FP64 carrier; SrcType=01 selects the zero-extended low 32-bit FP32 carrier.
The active profile receives snapshotted operands and the mnemonic-selected operation, then returns a result and exact NV, DZ, OF, UF, NX vector.
In the pto-v0 reference profile, carrier multiplication plus the addend is evaluated modulo the selected width. This deterministic reference rule is not an IEEE-754 or target-hardware claim.
RegDst selects the encoded destination or discard behavior.SrcA supplies the addend source.SrcL supplies the left scalar source.SrcR supplies the right scalar source.SrcType selects the source-carrier width.All explicit sources are snapshotted before numeric-status or destination effects.
All five profile-returned flags are ORed into sticky numeric state; the operation cannot clear an existing flag.
The result is published or discarded, then TPC advances by 4 bytes. The instruction has no memory or reservation effect.
SrcType=10 and SrcType=11 are reserved. Reserved types and unavailable T/U sources raise Fault_IllegalInstruction before source, profile, flag, queue, destination, or TPC effects.
The portable instruction contract owns carrier selection, snapshots, flag accumulation, publication, and fault order; the active named profile owns the numeric result and produced flags.
This example illustrates the current owner and does not define arithmetic independently of the normative rule or active profile.
fmadd.fd a0, a1, a2, ->a3 selects its carriers, snapshots its sources, invokes the active profile, accumulates returned flags, publishes the result, and then advances TPC.
Bodies come from owning ASL. Dragging or buttons change only this page-session view order.
No NDF clause is attached to this unit.
18 matching entries
PTO-AVS-FSU-FMADD-BOUND-001tests/asl/scalar/fsu/FMADD/scalar-bound-fmadd-values-001.asl93713dfad1fb167ae3892d19c16bd937e9d3ec6b7b4cb313fc72c89f4ac9d4cbPTO-AVS-FSU-FMADD-DST-001tests/asl/scalar/fsu/FMADD/scalar-exec-fmadd-dst-001.asl3af9f94d6456f216cbb18002903015303f64e54a92bd498252ee114c596f55b3PTO-AVS-FSU-FMADD-EXEC-001tests/asl/scalar/fsu/FMADD/scalar-exec-fmadd-direct-001.asle20c9df3b4fa496feb6dd870a127f1bcd532534e92e934330a97f65760704741PTO-AVS-FSU-FMADD-FLAGS-001tests/asl/scalar/fsu/FMADD/scalar-state-fmadd-flags-001.asl5c95131b752e923116219ab5422e4600b40360c090f36891f7c70f749b3fd911PTO-AVS-FSU-FMADD-ROUND-001tests/asl/scalar/fsu/FMADD/scalar-bound-fmadd-round-001.asl916cbf0d20293f7a8f8ace65fa1663c77d148e2b29f2c4a72b61f2a197b2d8bePTO-AVS-FSU-FMADD-RSVD-001tests/asl/scalar/fsu/FMADD/scalar-fault-fmadd-types-001.asl7c3dc38b348b737920e0f74383350fb32a5511097212c7bb7e55c1ff4a06afe6PTO-AVS-FSU-FMADD-SNAP-001tests/asl/scalar/fsu/FMADD/scalar-exec-fmadd-snap-001.asl184e12297c0a71794a5228a40ba5776b4fb2a024b86ba071b06b557ff0ecf940PTO-AVS-FSU-FMADD-SRC-001tests/asl/scalar/fsu/FMADD/scalar-exec-fmadd-src-001.aslb2fbd7fdd9158075f543e7e625c3e8341d5ea0c602f01337a437504c8c72b094PTO-AVS-FSU-FMADD-TYPE-001tests/asl/scalar/fsu/FMADD/scalar-bound-fmadd-types-001.aslc5a47e0aec5e2a70cb2f7ddce8b665744e7c0295daf0a1661dc6038281c2b023PTO-AVS-SCALAR-FMADD-DECODE-001tests/asl/scalar/fsu/FMADD/scalar-decode-fmadd-canonical-001.aslb0e42f23c0b9bad3e28fd386a0146ac6648583200808e9ced6a0161aec103ed4PTO-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-0028…
ADR-0028docs/status/decisions/0028-scalar-fsu-totality-and-profile-boundary.md1be39ca1ffda14b703ca03df9654f323d03b9cac620ba37d5cbe6ce8f3f9c486Loading ADR-0038…
ADR-0038docs/status/decisions/0038-scalar-numeric-flag-state-and-ownership.mdeac15c3bee955bb92833482b9af8b9f149fe17c13138e6f2b22f0ed1cf40fc07Loading ADR-0059…
ADR-0059docs/status/decisions/0059-mnemonic-field-encoding-closure.mdf18d13f735cfaf9f2803c754c5818f4af33d1cc42c489f0d9ce060b07bb3a196{
"classification": [
"fsu"
],
"documentation": "docs/scalar/fsu/FMADD.md",
"id": "PTO-SCALAR-FMADD",
"instruction_contract": {
"artifact": "spec/evidence/instruction-contract-closure.json",
"mnemonic": "FMADD",
"ndf_clause": "PTO-INST-SCALAR-FMADD"
},
"mnemonic": "FMADD",
"readiness_subjects": [
"ADR-0028",
"ADR-0038",
"ADR-0059"
],
"semantic_tests": [
"PTO-AVS-FSU-FMADD-BOUND-001",
"PTO-AVS-FSU-FMADD-DST-001",
"PTO-AVS-FSU-FMADD-EXEC-001",
"PTO-AVS-FSU-FMADD-FLAGS-001",
"PTO-AVS-FSU-FMADD-ROUND-001",
"PTO-AVS-FSU-FMADD-RSVD-001",
"PTO-AVS-FSU-FMADD-SNAP-001",
"PTO-AVS-FSU-FMADD-SRC-001",
"PTO-AVS-FSU-FMADD-TYPE-001"
],
"source": "asl/scalar/fsu/FMADD.asl",
"surface": "scalar",
"tests": [
"PTO-AVS-FSU-FMADD-BOUND-001",
"PTO-AVS-FSU-FMADD-DST-001",
"PTO-AVS-FSU-FMADD-EXEC-001",
"PTO-AVS-FSU-FMADD-FLAGS-001",
"PTO-AVS-FSU-FMADD-ROUND-001",
"PTO-AVS-FSU-FMADD-RSVD-001",
"PTO-AVS-FSU-FMADD-SNAP-001",
"PTO-AVS-FSU-FMADD-SRC-001",
"PTO-AVS-FSU-FMADD-TYPE-001",
"PTO-AVS-SCALAR-FMADD-DECODE-001"
]
}0.58.5 · Release candidate7dc8b7e5b121d2b2499a2273bebff29e2cd86812289564cf690217ff0b6c05995e48ae9025277a160beda7937b39e96e1759be9245c0c3a10ed1843fb49c0a61cd8a243109b87cd60e47aec169b1df0ef138ce12asl/scalar/fsu/FMADD.aslasl/scalar/fsu/FMADD.asl