Browse Prior Art Database

Method for the efficient detection of stack exceptions

IP.com Disclosure Number: IPCOM000008935D
Publication Date: 2002-Jul-24
Document File: 7 page(s) / 54K

Publishing Venue

The IP.com Prior Art Database

Abstract

Disclosed is a method for the efficient detection of stack exceptions. Benefits include improved performance and improved power utilization.

This text was extracted from a Microsoft Word document.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 23% of the total text.

Method for the efficient detection of stack exceptions

Disclosed is a method for the efficient detection of stack exceptions. Benefits include improved performance and improved power utilization.

Background

              A stack is an abstract mechanism equipped with powerful operations, enabling the pushing and popping of elements in a last-in, first-out (LIFO) manner. Given an interface to a finite stack, the implementation of an exception detecting mechanism is required to detect exceptions caused by overflow or underflow of the abstract structure. Such requirements complicate the implementation, resulting in slower code in the case of software implementation. The hardware implementation must employ extra logic and an additional state for handling exceptions.

              The abstract type of finite stacks is widely implemented in both software and hardware. An implementation is required the ability to detect exceptions caused by overflow or underflow of the abstract structure. In software implementations, exceptions are detected using extra code for assertions and error handling. In hardware implementations, stack exceptions are detected using extra logic and specialized resources.

              The mechanism required for detecting exceptions may complicate the implementation, and the additional complexity may impact overall performance, resulting in a slower execution of the program employing the particular implementation. Furthermore, the requirement for detecting and handling exception poses obstacles to any optimizations that are typically applied to any software or hardware mechanism. For example, optimizations may eliminate or simplify code based on specific program information. When more specific run-time data is available, such as in profile-based or dynamic compilation methods, more aggressive optimization could be applied. The requirement is to simplify and minimize the impact of exception detection to enable more optimization and maximize its benefit.

General description

              The disclosed method is applied to a trace cache consisting of optimized traces. Stack relative references are converted into absolute references when the traces are built/optimized. Checks are also performed to determine whether an exception would occur only once when the trace is entered, rather than on any stack reference.

              When a trace is built, all stack relative references are computed as references relative to the stack top at entrance, and the relative ranges are recorded per trace. When the trace is later executed, the range is added to the current stack top value and checked for exception.

              This optimization is important for reordering operations and renaming references within the trace.

Advantages

              The disclosed method provides advantages, including:

·        Improved performance due to efficient detection of exceptions caused by overflow or underflow of the abstract stack

·        Improved performance due to reduction of redundant operations used to detect stack exceptions

·        Improved performance due to the...