Decode Unit Handling Illegal Jumps to Base Instructions
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The ambiguity in program code due to the use of prefix instructions can lead to unpredictable program behavior and errors, especially in secure or safety-critical applications, where illegal jumps can cause unexpected errors and difficulties in debugging.
Innovation Solution
The proposed solution involves using modifier bits to indicate whether an instruction is subject to modification by another instruction, and implementing methods to fetch and decode both current and preceding or following instructions to identify base instructions and invoke exception handling when illegal jumps occur, thereby reducing ambiguity and ensuring predictable program execution.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If prefix instructions are used to modify base instructions, then code density is improved and instruction richness is enhanced, but program ambiguity increases and reliability deteriorates
Solution Approach 1:
The patent applies preliminary action by checking whether a prefix instruction immediately precedes a base instruction before execution. The decode unit proactively verifies the presence and validity of modifying instructions in advance, identifying illegal jumps to base instructions before they can cause unpredictable behavior. This preventive approach maintains the flexibility of prefix instructions while eliminating reliability issues by ensuring proper instruction sequencing.
2Quantity of substance
If prefix instructions are used to modify base instructions, then code density is improved, but device complexity increases
Solution Approach 1:
The patent applies segmentation by dividing the instruction validation process into distinct functional components within the decode unit. The decode unit is segmented to specifically handle prefix instruction detection and validation as a separate function from base instruction decoding. This modular approach manages complexity by organizing the decoding logic into manageable segments that can be independently implemented and verified.
3Reliability
If modifier bits are added to instructions to indicate base instruction status, then reliability is improved by reducing ambiguity, but instruction length increases
Solution Approach 1:
The patent applies local quality by adding modifier bits only to specific instruction types that require them - specifically to base instructions that can be modified by prefixes. Not all instructions require these additional bits, only those that are subject to prefix modification. This selective approach improves reliability where needed while minimizing the impact on overall instruction length and code density.
Data Source
AI summary
Methods and apparatus are provided for decoding instructions in a computer program wherein the instructions include one or more base instructions that are subject to modification by one or more other instructions. A decoder determines whether a first received instruction was arrived at by a non-incremental change to a program counter (i.e. a jump in the program). If the first instruction was arrived at by a non-incremental change to the program counter the decoder decodes the immediately preceding instruction to determine if the original instruction is a base instruction subject to modification by one or more other instructions. If the preceding instruction indicates that the original instruction is a base instruction an error has occurred and exception handling code is invoked.


