Optimal code generation for structured assembly language expressions
AssigneeInternational Business Machines Corporation
InventorJoseph Franklin Garvey
Life of this patent
Estimating the term…
Abstract
An optimal code generator for generating structured assembly language expressions is disclosed. Because of the equivalence between unit structured assembly language expressions and the code implementing them, it is possible to represent complex structured assembly language expressions as a vector of unit structured assembly language expressions. A set of rules for systematic manipulation is utilize to allow logical operations on the vector representation of structured assembly language expressions to result in optimal code. Using the equivalence between the code and unit structured assembly language expressions allows the vector representation of a structured assembly language expression to be translated directly into code.
Claims8
An assembler for processing structured assembly language expressions utilized in structured assembly language programming, said assembler comprising:
- program code means for recognizing a structured assembly language expression's mnemonics containing elements arg1 cc arg2, wherein said cc is a condition code, wherein the form of said expression's mnemonics or the nature of one or more of said expression's elements selects a corresponding comparison opcode, wherein said arg1 and said arg2 are valid arguments for said selected comparison opcode;
- program code means for constructing a data structure referencing said arg1, said arg2, said cc, and a branch destination;
- program code means for generating a comparison opcode in response to elements of said data structure;
- program code means for generating a conditional branch based on said condition code in said data structure;
- is program code means for generating a first branch location for execution to proceed at if said structured assembly language expression is true;
- and
- program code means for generating a second branch location for execution to proceed at if said structured assembly language expression is false;
- and
- program code means for generating a third branch location for execution to proceed at to the end of said structured assembly language expression;
- and
- program code means for indicating said branch destination in said data structure is a branch to said first, said second, or said third branch locations.
Dependencies are inferred from the claim text.