操作数与参数
RegDst- Reg5 destination or discard
SrcL- left or sole Reg5 source
SrcR- right Reg5 source
SrcType- source carrier selector
FMAX applies the architecture-owned ordered maximum, NaN, and signed-zero rules to selected FP64 or FP32 carriers.
PTO-SCALAR-FMAXfmax.{T} SrcL, SrcR, ->{t, u, Rd}| 字段 | 位宽 | 有符号性 | 架构角色 | 编码零 |
|---|---|---|---|---|
RegDst | 5 | encoding-defined | Reg5 destination or discard | Encoded zero discards the result. |
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 |
|---|---|---|
| Constant | 31:27 | 5'b00000 |
| SrcType | 26:25 | variable |
| SrcR | 24:20 | variable |
| SrcL | 19:15 | variable |
| Constant | 14:12 | 3'b110 |
| RegDst | 11:7 | variable |
| Constant | 6:0 | 7'b1011011 |
{
"reg": [
{
"bits": 7,
"name": "7'b1011011"
},
{
"bits": 5,
"name": "RegDst"
},
{
"bits": 3,
"name": "3'b110"
},
{
"bits": 5,
"name": "SrcL"
},
{
"bits": 5,
"name": "SrcR"
},
{
"bits": 2,
"name": "SrcType"
},
{
"bits": 5,
"name": "5'b00000"
}
],
"config": {
"bits": 32,
"fontsize": 13,
"hspace": 900,
"lanes": 1,
"offset": 0
}
}fmax.{T} SrcL, SrcR, ->{t, u, Rd}
RegDstSrcLSrcRSrcType下面是该指令所有者中的 Operation;页面没有重写这段行为。
readonly func InstructionContractOperation_FMAX() => ScalarOperationbegin return ScalarOperation_FMAX;end;readonly func InstructionContractHandler_FMAX() => ScalarSemanticHandlerbegin return ScalarHandler_FloatingBinary;end;
pure func InstructionContractSourceTypeLegal_FMAX(encoded: bits(2)) => booleanbegin return encoded == '00' || encoded == '01';end;
pure func InstructionContractSourceCarrier_FMAX(encoded: bits(2)) => bits(5)begin assert InstructionContractSourceTypeLegal_FMAX(encoded); return ScalarFPSourceTypeCode(encoded);end;
pure func InstructionContractSourceArity_FMAX() => integer {1..3}begin return 2;end;
pure func InstructionContractUsesProfileFlags_FMAX() => booleanbegin return FALSE;end;
pure func InstructionContractUsesActiveRounding_FMAX() => booleanbegin return FALSE;end;
pure func InstructionContractBinaryOperation_FMAX() => FloatingBinaryOperationbegin return FloatingBinary_MAX;end;// PTO-INSTRUCTION: {"assembly":["fmax.{T} SrcL, SrcR, ->{t, u, Rd}"],"block":[],"catalog_indices":[106],"catalog_records":[{"asm":"fmax.{T} SrcL, SrcR, ->{t, u, Rd}","constraints":[{"field":"SrcType","operator":"one-of","values":[0,1]}],"encoding":[{"index":0,"mask":"0xf800707f","match":"0x0000605b","width_bits":32}],"encoding_kind":"L32","fields":[{"name":"RegDst","pieces":[{"instruction_lsb":7,"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":"fmax_32_eaf3880d7739","length_bits":32,"mnemonic":"FMAX","semantic_family":"FSU","semantic_group":"FSU","semantic_handler":"FloatingBinary","semantic_summary":"FMAX applies the architecture-owned ordered maximum, NaN, and signed-zero rules to selected FP64 or FP32 carriers.","status":"accepted"}],"classification":["fsu"],"contract":{"block_composition":["none"],"canonical_assembly":["fmax.{T} SrcL, SrcR, ->{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":["fmax.fd a0, a1, ->a2","fmax.fs t#1, u#1, ->u"],"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.","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":"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":["FMAX applies the architecture-owned ordered maximum, NaN, and signed-zero rules to selected FP64 or FP32 carriers.","One NaN returns the numeric input; two NaNs return the canonical quiet NaN; a signaling NaN records sticky NV; signed-zero ordering is architecture-owned.","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-FMAX","mnemonic":"FMAX","summary":"FMAX applies the architecture-owned ordered maximum, NaN, and signed-zero rules to selected FP64 or FP32 carriers.","surface":"scalar"}// PTO-REVIEW: {"review_method":"formal-definition-read","outcome":"FORMAL-COMPLETE","reviewed_fields":["assembly","encoding","defaults","operation","state","memory","ordering","faults","reserved"]}// NDF-BEGIN: PTO-FMAX-DECISION-BINDING-001// ndf: kind=contract level=L1 layer=scalar status=accepted// FMAX MUST implement the mnemonic-local canonical assembly, encoded// legality, defaults, state and memory effects, ordering, and fault boundaries// declared in this owner. The operation region below is the executable binding// for every accepted decision that names this mnemonic.// NDF-END: PTO-FMAX-DECISION-BINDING-001// DOC-BEGIN: decodereadonly func InstructionContractOperation_FMAX() => ScalarOperationbegin return ScalarOperation_FMAX;end;// DOC-END: decode// DOC-BEGIN: operationreadonly func InstructionContractHandler_FMAX() => ScalarSemanticHandlerbegin return ScalarHandler_FloatingBinary;end;
pure func InstructionContractSourceTypeLegal_FMAX(encoded: bits(2)) => booleanbegin return encoded == '00' || encoded == '01';end;
pure func InstructionContractSourceCarrier_FMAX(encoded: bits(2)) => bits(5)begin assert InstructionContractSourceTypeLegal_FMAX(encoded); return ScalarFPSourceTypeCode(encoded);end;
pure func InstructionContractSourceArity_FMAX() => integer {1..3}begin return 2;end;
pure func InstructionContractUsesProfileFlags_FMAX() => booleanbegin return FALSE;end;
pure func InstructionContractUsesActiveRounding_FMAX() => booleanbegin return FALSE;end;
pure func InstructionContractBinaryOperation_FMAX() => FloatingBinaryOperationbegin return FloatingBinary_MAX;end;// DOC-END: operation
FMAX 对选定载体应用架构定义的有序最大值、NaN 和有符号零规则。
SrcType=00 选择完整 FP64 载体;SrcType=01 选择零扩展后的低 32 位 FP32 载体。
只有一个 NaN 时选择数值操作数;两个 NaN 时选择对应宽度的规范静默 NaN。信号 NaN 会记录粘滞 NV。
有符号零选择遵循架构定义的 FMAX 规则。
RegDst 选择编码指定的目的位置或丢弃行为。SrcL 提供左侧标量源。SrcR 提供右侧标量源。SrcType 选择源载体宽度。所有显式源都会在数值状态或目的效果前完成快照。
架构产生的 NV 会在目的发布前按位或到粘滞数值状态。
结果完成发布或丢弃后,TPC 前进 4 字节。该指令不产生内存或保留状态效果。
SrcType=10 和 SrcType=11 为保留值。保留类型或不可用 T/U 源会在读取源、调用配置档、更新标志或队列、写入目的以及改变 TPC 前引发 Fault_IllegalInstruction。
数值标志更新本身不会引发同步 PTO 陷阱。
下面的示例只帮助理解当前所有者,不会脱离规范规则或当前配置档另行定义算术。
fmax.fd a0, a1, ->a2 应用架构定义的特殊值规则,在推进 TPC 前发布规范化输出。
正文来自 owning ASL。拖拽或按钮只临时改变当前页面显示顺序。
FMAX MUST implement the mnemonic-local canonical assembly, encoded legality, defaults, state and memory effects, ordering, and fault boundaries declared in this owner. The operation region below is the executable binding for every accepted decision that names this mnemonic.
PTO-FMAX-DECISION-BINDING-001asl/scalar/fsu/FMAX.asle0a10c3ca3d6540ddb3e5ac42d30b0ef8ac4e65d1ad306ce28a3a965230d1a771df634f78d7dd9a55fe79c4be4b0e087a99280cec0357c75880972c700197e2120 matching entries
PTO-AVS-FSU-FMAX-BOUND-001tests/asl/scalar/fsu/FMAX/scalar-bound-fmax-values-001.asl52474dba8991996d65b0e8ce2dc8d1be5b803601bb324acd6bdc347c5f3e7ed5PTO-AVS-FSU-FMAX-DST-001tests/asl/scalar/fsu/FMAX/scalar-exec-fmax-dst-001.asl636074b746c75c6d72c47d2d2809740a9c8cd37aa1aa3b9f86cd4eef25131517PTO-AVS-FSU-FMAX-EXEC-001tests/asl/scalar/fsu/FMAX/scalar-exec-fmax-direct-001.asl1ff52cb1c713cfd50f6e49f6b2de4fc1b2f21da416be4d66e8b2b022b068df7ePTO-AVS-FSU-FMAX-FLAGS-001tests/asl/scalar/fsu/FMAX/scalar-state-fmax-flags-001.asle5ae198f16d5430f6e82fcadb9b90466a1c257f3a399f5d8a446a5703746ea71PTO-AVS-FSU-FMAX-RSVD-001tests/asl/scalar/fsu/FMAX/scalar-fault-fmax-types-001.aslfa5aab1a2156ede5fe18c9d9e0a87bc43ffd6a131cf8b2e27260b982d4618da1PTO-AVS-FSU-FMAX-SNAP-001tests/asl/scalar/fsu/FMAX/scalar-exec-fmax-snap-001.aslde2ec4be541bbd85b4a2e5d32e3556b5b82666871ace66d195190f2164bf7949PTO-AVS-FSU-FMAX-SRC-001tests/asl/scalar/fsu/FMAX/scalar-exec-fmax-src-001.asl828a392e43f1172180c86a87a988a012fe50d5b492dfadd0d937b21b0b1b59e4PTO-AVS-FSU-FMAX-TYPE-001tests/asl/scalar/fsu/FMAX/scalar-bound-fmax-types-001.asl59598414d1774e7f25f09f94c99c513debe93d98f16ec6ffeb1886cbbf93395dPTO-AVS-SCALAR-FMAX-DECODE-001tests/asl/scalar/fsu/FMAX/scalar-decode-fmax-canonical-001.asl39f2183cc9553817fd3455bbd7e8082578359d187bf7cdebd528a857f943b1adPTO-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-0048…
ADR-0048docs/status/decisions/0048-numeric-format-value-classification.mdce3ecd1851e22b5517d07076ab8bd2db36b6b4582111c761db19240275853d9cLoading ADR-0050…
ADR-0050docs/status/decisions/0050-hardware-special-value-checkpoint.md08cfdeb16bf245980c9db849994e181e5079efc53475762cdad1df9f555993b5Loading ADR-0059…
ADR-0059docs/status/decisions/0059-mnemonic-field-encoding-closure.mdf18d13f735cfaf9f2803c754c5818f4af33d1cc42c489f0d9ce060b07bb3a196Loading ADR-0084…
ADR-0084docs/status/decisions/0084-scalar-system-and-queue-operations.mde068992fa81e2c4ac46e492391a2f784141d68e041bf0b9e0586c37217d1e08c{
"classification": [
"fsu"
],
"documentation": "docs/scalar/fsu/FMAX.md",
"id": "PTO-SCALAR-FMAX",
"instruction_contract": {
"artifact": "spec/evidence/instruction-contract-closure.json",
"mnemonic": "FMAX",
"ndf_clause": "PTO-INST-SCALAR-FMAX"
},
"mnemonic": "FMAX",
"readiness_subjects": [
"ADR-0028",
"ADR-0038",
"ADR-0048",
"ADR-0050",
"ADR-0059",
"ADR-0084"
],
"semantic_tests": [
"PTO-AVS-FSU-FMAX-BOUND-001",
"PTO-AVS-FSU-FMAX-DST-001",
"PTO-AVS-FSU-FMAX-EXEC-001",
"PTO-AVS-FSU-FMAX-FLAGS-001",
"PTO-AVS-FSU-FMAX-RSVD-001",
"PTO-AVS-FSU-FMAX-SNAP-001",
"PTO-AVS-FSU-FMAX-SRC-001",
"PTO-AVS-FSU-FMAX-TYPE-001"
],
"source": "asl/scalar/fsu/FMAX.asl",
"surface": "scalar",
"tests": [
"PTO-AVS-FSU-FMAX-BOUND-001",
"PTO-AVS-FSU-FMAX-DST-001",
"PTO-AVS-FSU-FMAX-EXEC-001",
"PTO-AVS-FSU-FMAX-FLAGS-001",
"PTO-AVS-FSU-FMAX-RSVD-001",
"PTO-AVS-FSU-FMAX-SNAP-001",
"PTO-AVS-FSU-FMAX-SRC-001",
"PTO-AVS-FSU-FMAX-TYPE-001",
"PTO-AVS-SCALAR-FMAX-DECODE-001"
]
}0.58.5 · 候选发布7dc8b7e5b121d2b2499a2273bebff29e2cd86812e0a10c3ca3d6540ddb3e5ac42d30b0ef8ac4e65d1ad306ce28a3a965230d1a77a603b089b8848868d5a867a3a1b19dded0e6dd77adb0bda62ca6056c4ab94da5asl/scalar/fsu/FMAX.aslasl/scalar/fsu/FMAX.aslasl/scalar/fsu/FMAX.asl