操作数与参数
RegDst- absolute GPR destination
SrcL- left absolute GPR source
simm12- 12-bit signed immediate or displacement
CMP.ORI - Combine scalar comparison results with the encoded logical operation.
PTO-SCALAR-CMP-ORIcmp.ori SrcL, simm, ->{t, u, Rd}| 字段 | 位宽 | 有符号性 | 架构角色 | 编码零 |
|---|---|---|---|---|
RegDst | 5 | encoding-defined | absolute GPR destination | Encoded zero names the architectural zero GPR. |
SrcL | 5 | encoding-defined | left absolute GPR source | Encoded zero names the architectural zero GPR. |
simm12 | 12 | signed | 12-bit signed immediate or displacement | Encoded zero supplies numeric zero for the 12-bit signed immediate or displacement. |
Loading WaveDrom diagram… The encoding table and WaveJSON remain available below.
| Decoded item | Bit range | Value |
|---|---|---|
| simm12 | 31:20 | variable |
| SrcL | 19:15 | variable |
| Constant | 14:12 | 3'b011 |
| RegDst | 11:7 | variable |
| Constant | 6:0 | 7'b1010101 |
{
"reg": [
{
"bits": 7,
"name": "7'b1010101"
},
{
"bits": 5,
"name": "RegDst"
},
{
"bits": 3,
"name": "3'b011"
},
{
"bits": 5,
"name": "SrcL"
},
{
"bits": 12,
"name": "simm12"
}
],
"config": {
"bits": 32,
"fontsize": 13,
"hspace": 900,
"lanes": 1,
"offset": 0
}
}cmp.ori SrcL, simm, ->{t, u, Rd}
RegDstSrcLsimm12下面是该指令所有者中的 Operation;页面没有重写这段行为。
readonly func InstructionContractOperation_CMP_ORI() => ScalarOperationbegin return ScalarOperation_CMP_ORI;end;readonly func InstructionContractHandler_CMP_ORI() => ScalarSemanticHandlerbegin return ScalarHandler_ExecuteCompareLogical;end;
pure func InstructionContractCombinesWithOR_CMP_ORI() => booleanbegin return TRUE;end;
pure func InstructionContractCompareLogicalValue_CMP_ORI( left: Word, right: Word) => Wordbegin if InstructionContractCombinesWithOR_CMP_ORI() then return left OR right; end; return left AND right;end;// PTO-INSTRUCTION: {"assembly":["cmp.ori SrcL, simm, ->{t, u, Rd}"],"block":[],"catalog_indices":[70],"catalog_records":[{"asm":"cmp.ori SrcL, simm, ->{t, u, Rd}","constraints":[],"encoding":[{"index":0,"mask":"0x0000707f","match":"0x00003055","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":"simm12","pieces":[{"instruction_lsb":20,"value_lsb":0,"width":12}],"signedness":"signed","width":12}],"form_id":"cmp_ori_32_6d3efbc3d093","length_bits":32,"mnemonic":"CMP.ORI","semantic_family":"BRU","semantic_group":"BRU","semantic_handler":"ExecuteCompareLogical","semantic_summary":"CMP.ORI - Combine scalar comparison results with the encoded logical operation.","status":"accepted"}],"classification":["bru"],"contract":{"block_composition":["none"],"canonical_assembly":["cmp.ori SrcL, simm, ->{t, u, Rd}"],"defaults":["The selected assembly form determines which fields are present; every present field carries its encoded value and no encoded zero means omission."],"encoding_class":"standalone-encoded","examples":["cmp.ori SrcL, simm, ->{t, u, Rd}"],"exceptions":["Reserved field encodings raise Fault_IllegalInstruction before effects; handler-specific arithmetic, memory, control-flow, system-register, and privilege faults follow the embedded normative ASL operation."],"field_contracts":{},"field_zero_meanings":{"RegDst":"Encoded zero names the architectural zero GPR.","SrcL":"Encoded zero names the architectural zero GPR.","simm12":"Encoded zero supplies numeric zero for the 12-bit signed immediate or displacement."},"legality":["Every value in each unconstrained encoded field is assigned; constrained complements are reserved and reject before effects."],"memory_effects":["none"],"operands":[{"field":"RegDst","role":"absolute GPR destination"},{"field":"SrcL","role":"left absolute GPR source"},{"field":"simm12","role":"12-bit signed immediate or displacement"}],"ordering":["none"],"standalone_opcode":true,"state_effects":["CMP.ORI - Combine scalar comparison results with the encoded logical operation.","After decode and legality checks, execute the normative ExecuteCompareLogical ASL handler; no other architectural state is modified."]},"depends_on":["PTO-BLOCK-MODEL-SCHEMA-PROFILE-ENCODING"],"id":"PTO-SCALAR-CMP-ORI","mnemonic":"CMP.ORI","summary":"CMP.ORI - Combine scalar comparison results with the encoded logical operation.","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_CMP_ORI() => ScalarOperationbegin return ScalarOperation_CMP_ORI;end;// DOC-END: decode// DOC-BEGIN: operationreadonly func InstructionContractHandler_CMP_ORI() => ScalarSemanticHandlerbegin return ScalarHandler_ExecuteCompareLogical;end;
pure func InstructionContractCombinesWithOR_CMP_ORI() => booleanbegin return TRUE;end;
pure func InstructionContractCompareLogicalValue_CMP_ORI( left: Word, right: Word) => Wordbegin if InstructionContractCombinesWithOR_CMP_ORI() then return left OR right; end; return left AND right;end;// DOC-END: operation
CMP.ORI 对两个解码标量值执行按位或,并发布组合值是否非零。
两个源会在按位或之前完成快照。
组合 word 为零时结果是 XLEN 零,非零时规范化为 XLEN 一。
RegDst 选择编码指定的目的位置或丢弃行为。SrcL 提供左侧标量源。simm12 提供有符号编码立即数。规范化布尔值先通过编码目的位置发布,随后 TPC 前进 4 字节。
该指令不修改提交状态,也不访问内存或保留状态。
编码、保留字段值和源可用性都会在目的、控制或 TPC 效果前检查。
下面的示例只帮助理解当前所有者,不构成第二份语义定义。
cmp.ori SrcL, simm, ->{t, u, Rd} 在条件为真时发布 XLEN 一,否则发布 XLEN 零。
正文来自 owning ASL。拖拽或按钮只临时改变当前页面显示顺序。
No NDF clause is attached to this unit.
10 matching entries
PTO-AVS-BRU-CMP-ORI-BOUND-001tests/asl/scalar/bru/CMP.ORI/scalar-bound-cmp-ori-fields-001.asl3a2d5bafe864e7a2bd96b7c40e6c2906112f0278f59d96b1fc507068f4442d69PTO-AVS-BRU-CMP-ORI-EXEC-001tests/asl/scalar/bru/CMP.ORI/scalar-exec-cmp-ori-direct-001.asl7c7246caa85d5d4f2d6fe7cf0c2ee162202642c9a71cba5bfba62b2b7f9ce1edPTO-AVS-SCALAR-CMP-ORI-DECODE-001tests/asl/scalar/bru/CMP.ORI/scalar-decode-cmp-ori-canonical-001.aslf06cab2851a2dafb437dddf36dbd49e6a3e443bdab288a2600e339161d493fb3PTO-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-0027…
ADR-0027docs/status/decisions/0027-scalar-bru-totality-and-target-legality.md9289112d250e31f4222dcd27d20bda791be7a1b57764af7ed9b187e767b7acedLoading ADR-0059…
ADR-0059docs/status/decisions/0059-mnemonic-field-encoding-closure.mdf18d13f735cfaf9f2803c754c5818f4af33d1cc42c489f0d9ce060b07bb3a196{
"classification": [
"bru"
],
"documentation": "docs/scalar/bru/CMP.ORI.md",
"id": "PTO-SCALAR-CMP-ORI",
"instruction_contract": {
"artifact": "spec/evidence/instruction-contract-closure.json",
"mnemonic": "CMP.ORI",
"ndf_clause": "PTO-INST-SCALAR-CMP-ORI"
},
"mnemonic": "CMP.ORI",
"readiness_subjects": [
"ADR-0027",
"ADR-0059"
],
"semantic_tests": [
"PTO-AVS-BRU-CMP-ORI-BOUND-001",
"PTO-AVS-BRU-CMP-ORI-EXEC-001"
],
"source": "asl/scalar/bru/CMP.ORI.asl",
"surface": "scalar",
"tests": [
"PTO-AVS-BRU-CMP-ORI-BOUND-001",
"PTO-AVS-BRU-CMP-ORI-EXEC-001",
"PTO-AVS-SCALAR-CMP-ORI-DECODE-001"
]
}0.58.5 · 候选发布7dc8b7e5b121d2b2499a2273bebff29e2cd86812291b5f4a84ea512807630bd070eeed0e00fa5b2a59e3eaf99c2acb82eb8c02e37924617484dad1cd04e80ce756d5f295ef01875700b5928f7eb4b5e86e50e34dasl/scalar/bru/CMP.ORI.aslasl/scalar/bru/CMP.ORI.asl