Global processor resource assignment in an assembler
First Claim
1. A method for assembling assembly language code using an assembler, the code including a plurality of code blocks, the plurality of code blocks having a plurality of resource-needs and the plurality of code blocks having a plurality of resources, the method comprising the steps of:
- recognizing a context, the plurality of resource-needs, and the plurality of resources;
automatically assigning at least a portion of the plurality of resources based upon a context, the plurality of resources being defined and managed using a grammar, at least a portion of the plurality of resources being assigned by pairing members of the plurality of resources with the plurality of resource-needs such that no two contexts exist simultaneously at a run time using the same resource;
writing an executable image to a computer-readable medium based on the assembly language code if all of the plurality of resources-needs have been assigned from the plurality of resources;
if any of the plurality of resources cannot be automatically assigned to the plurality of resource-needs, automatically providing an indication, of which of the plurality of resource-needs does not have at least one of the plurality of resources assigned; and
allowing a user to manually free at least a portion of the plurality of resources if all of the plurality of resource-needs have not been assigned, the portion of the plurality of resources being selectable by the user based upon the indication of which of the plurality of resource-needs does not have at least one of the plurality of resources assigned.
2 Assignments
0 Petitions
Accused Products
Abstract
An assembler for assembling code is disclosed. The assembly language code includes a plurality of code blocks associated with resource-needs, such as variables, and resources, such as registers, I/O locations, memory locations, and coprocessors. A technology is provided that allows the global assignment of resource-needs to resources such that run time resource conflicts are avoided. A grammar for allowing resources to be defined and managed, a grammar for allowing the resource-needs to be defined and managed, a grammar providing definition of code blocks, and a grammar for associating resources with code blocks are also provided.
-
Citations
15 Claims
-
1. A method for assembling assembly language code using an assembler, the code including a plurality of code blocks, the plurality of code blocks having a plurality of resource-needs and the plurality of code blocks having a plurality of resources, the method comprising the steps of:
-
recognizing a context, the plurality of resource-needs, and the plurality of resources; automatically assigning at least a portion of the plurality of resources based upon a context, the plurality of resources being defined and managed using a grammar, at least a portion of the plurality of resources being assigned by pairing members of the plurality of resources with the plurality of resource-needs such that no two contexts exist simultaneously at a run time using the same resource; writing an executable image to a computer-readable medium based on the assembly language code if all of the plurality of resources-needs have been assigned from the plurality of resources; if any of the plurality of resources cannot be automatically assigned to the plurality of resource-needs, automatically providing an indication, of which of the plurality of resource-needs does not have at least one of the plurality of resources assigned; and allowing a user to manually free at least a portion of the plurality of resources if all of the plurality of resource-needs have not been assigned, the portion of the plurality of resources being selectable by the user based upon the indication of which of the plurality of resource-needs does not have at least one of the plurality of resources assigned. - View Dependent Claims (2)
-
-
3. A method for assembling assembly language code using an assembler, the code including a plurality of code blocks, the plurality of code blocks having a plurality of resource-needs and the plurality of code blocks having a plurality of resources, the method comprising the steps of:
-
providing a first grammar for specifying a context; providing a second grammar for specifying a plurality of resource-needs associated with the context; providing a third grammar for specifying a plurality of resources associated with the context; providing a fourth grammar for resolving ambiguities in usage of indirect resources or indirect use of resource-needs within the context; providing a fifth grammar for resolving ambiguities in indirect control flow changes within the context; automatically assigning at least portion of the plurality of resources by pairing members of the plurality of resources with the plurality of resource-needs so a portion of the plurality of contexts that exist simultaneously at a run time do not use the same resource; if any of the plurality of resources cannot be automatically assigned to the plurality of resource-needs, automatically providing an indication of which of the plurality of resource-needs does not have at least one of the plurality of the resources assigned; allowing a user to free at least a portion of the plurality of resources if all of the plurality of resource-needs have not been assigned the portion of the plurality of resources being selectable by the user based upon the indication of which of the plurality of resource-needs does not have at least one of the plurality of resources assigned and writing an executable image to a computer-readable medium based on the assembly language code if all of the plurality of resource needs have been assigned from the plurality of resources. - View Dependent Claims (4, 5, 6, 7, 8, 9)
-
-
10. A computer-readable medium containing a program for processing assembly language code, the assembly language code including a plurality of code blocks, the plurality of code blocks using a plurality of resources having a plurality of resource-needs, the program further comprising instructions for:
-
utilizing a parser and lexer for reading the assembly language code, recognizing a context, recognizing declarations and usages of the plurality of resource-needs and recognizing declarations and usages of the plurality of resources; using a resource manager for automatically assigning at least a portion of the plurality of resources based upon a context, the plurality of resources being defined and managed using a grammar, at least a portion of the plurality of resources being assigned by pairing members of the plurality of resources with the plurality of resource-needs such that no two contexts exist simultaneously at a run time using the same resource;
if any of the plurality of resources cannot be automatically assigned to the plurality of resource-needs. automatically providing an indication of which of the plurality of resource-needs does not have at least one of the plurality of resources assigned;allowing a user to manually free at least a portion of the plurality of resources if all of the plurality of resource-needs have not been assigned, the portion of the plurality of resources being selectable by the user based upon the indication of which the plurality of resource-needs does not have at least one of the plurality of sources assigned; and using a code generator to write an executable image to another computer-readable medium based on the code if the plurality of the resource-needs have been assigned. - View Dependent Claims (11, 12, 13, 14, 15)
-
Specification