US20070294675A1 - Method and apparatus for handling exceptions during binding to native code - Google Patents
Method and apparatus for handling exceptions during binding to native code Download PDFInfo
- Publication number
- US20070294675A1 US20070294675A1 US11/546,012 US54601206A US2007294675A1 US 20070294675 A1 US20070294675 A1 US 20070294675A1 US 54601206 A US54601206 A US 54601206A US 2007294675 A1 US2007294675 A1 US 2007294675A1
- Authority
- US
- United States
- Prior art keywords
- subject
- code
- target
- state
- execution
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Abandoned
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45504—Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
- G06F9/45516—Runtime code conversion or optimisation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/48—Indexing scheme relating to G06F9/48
- G06F2209/481—Exception handling
Definitions
- the present invention relates generally to the field of computers and computer software and, more particularly, to program code conversion methods and apparatus useful, for example, in code translators, emulators and accelerators which convert program code.
- ISAs Instruction Set Architectures
- CPUs In both embedded and non-embedded CPUs, there are predominant Instruction Set Architectures (ISAs) for which large bodies of software exist that could be “accelerated” for performance, or “translated” to a myriad of capable processors that could present better cost/performance benefits, provided that they could transparently access the relevant software.
- ISAs Instruction Set Architectures
- a subject program usually consists of multiple units of subject code, including a subject executable and a number of subject libraries, some of which may be proprietary and some of which are provided as part of the subject operating system. As the subject program runs, control flow passes between these different units of subject code as function calls are made to the subject libraries. In some circumstances, native versions of certain subject libraries may be available on the target architecture.
- PCT application WO2005/008478 (also published as US2005/0015781A), which is incorporated herein by reference, discloses a native binding technique for inserting calls to native functions during translation of subject code to target code, such that function calls in the subject program to subject code functions are replaced in target code with calls to native equivalents of the same functions. This avoids the overhead of translating the subject versions of those functions.
- the native version may be a much more efficient implementation of the same functionality, as the native version can better exploit architectural features of the target architecture which may not be available on the subject architecture.
- An exception is a condition that changes the normal control flow in a program.
- An exception indicates that a condition has occurred somewhere within the system that requires the attention of the processor, and the exception usually needs to be handled before processing can continue.
- Exceptions can be subdivided into various different types such as interrupts, faults, traps or aborts. The terminology varies between different architectures, and particular types or categories of exceptions may be unique to particular architectures.
- the inventors have developed methods directed at program code conversion, which are particularly useful in connection with a run-time translator that provides dynamic binary translation of subject program code into target code.
- a method of handling exceptions during native binding under program code conversion from subject code executable by a subject computing architecture to target code executable by a target computing architecture Performing native binding executes a portion of native code, usually in place of translating a portion of the subject code into the target code.
- the method comprises saving a target state which represents a current point of execution in the target computing architecture for the native bound code, providing a subject state, and handling the exception with reference to the subject state, such that, upon resuming execution from the exception using the subject state, the saved target state is restored to resume execution of the native bound code.
- the subject state represents a point of execution in the subject computing architecture, which is emulated by the target computing platform.
- the subject state may include a stack pointer to a subject stack data structure in the memory of the target computing platform used to emulate a procedure stack (or control stack) of the subject architecture.
- the target state is saved to the subject stack, such that the subject stack pointer links to the stored target state.
- execution of the native bound code uses the subject stack.
- the subject state includes a modified program counter which is used to redirect execution control when returning from handling the exception.
- a recovery routine is performed which links from the subject state to the saved target state.
- the present invention also extends to a translator apparatus arranged to perform the embodiments of the invention discussed herein. Also, the present invention extends to computer-readable storage medium having recorded thereon instructions which may be implemented by a computer to perform any of the methods defined herein.
- At least some embodiments of the invention may be constructed, partially or wholly, using dedicated hardware.
- the target computing platform is provided as a function-specific dedicated translator apparatus.
- modules may include, but are not limited to, a hardware device, such as a Field Programmable Gate Array (FPGA) or Application Specific Integrated Circuit (ASIC), which performs certain tasks.
- elements of the invention may be configured to reside on an addressable storage medium and be configured to execute on one or more processors.
- functional elements of the invention may in some embodiments include, by way of example, components, such as software components, object-oriented software components, class components and task components, processes, functions, attributes, procedures, subroutines, segments of program code, drivers, firmware, microcode, circuitry, data, databases, data structures, tables, arrays, and variables.
- components such as software components, object-oriented software components, class components and task components, processes, functions, attributes, procedures, subroutines, segments of program code, drivers, firmware, microcode, circuitry, data, databases, data structures, tables, arrays, and variables.
- FIG. 1 is a block diagram illustrative of apparatus wherein embodiments of the invention find application
- FIG. 2 is a schematic diagram illustrating a native binding mechanism as employed in embodiments of the invention.
- FIG. 3 is a schematic diagram showing components which are employed for the handling of exceptions by example embodiments of the present invention.
- FIG. 4 is a schematic diagram showing execution in a subject computing platform when calling a subject library function and when handling an exception during execution of the library function;
- FIG. 5 is a schematic diagram showing execution in a target computing platform when performing native binding and when handling an exception in native bound code, as employed in embodiments of the present invention
- FIG. 6 is a schematic diagram showing a flow of execution control when handling an exception in native bound code, as employed in embodiments of the present invention.
- FIG. 7 is a schematic diagram of a portion of the memory of the target computing platform.
- FIG. 8 is a schematic flow diagram illustrating a method of handling exceptions for native bound code as employed by example embodiments of the present invention.
- FIG. 1 gives an overview of a system and environment where the example embodiments of the present invention may find application, in order to introduce the units, components and elements that will be discussed in more detail below.
- a subject program 17 is intended to execute on a subject computing platform 1 having at least one subject processor 3 .
- a target computing platform 10 is instead used to execute the subject program 17 , through a translator unit 19 which performs program code conversion.
- the translator unit 19 performs code conversion from the subject code 17 to target code 21 , such that the target code 21 is executable on the target computing platform 10 .
- the subject processor 3 has a set of subject registers 5 .
- a subject memory 8 holds, inter alia, the subject code 17 and a subject operating system 2 .
- the example target computing platform 10 in FIG. 1 comprises a target processor 13 having a plurality of target registers 15 , and a memory 18 to store a plurality of operational components including a target operating system 20 , the subject code 17 , the translator code 19 , and the translated target code 21 .
- the target computing platform 10 is typically a microprocessor-based computer or other suitable computer.
- the translator code 19 is an emulator to translate subject code of a subject instruction set architecture (ISA) into translated target code of another ISA, with or without optimisations.
- the translator 19 functions as an accelerator for translating subject code into target code, each of the same ISA, by performing program code optimisations.
- the translator code 19 is suitably a compiled version of source code implementing the translator, and runs in conjunction with the operating system 20 on the target processor 13 . It will be appreciated that the structure illustrated in FIG. 1 is exemplary only and that, for example, embodiments of the invention may be implemented within or beneath the operating system 20 of the target platform.
- the subject code 17 , translator code 19 , operating system 20 , and storage mechanisms of the memory 18 may be any of a wide variety of types, as known to those skilled in the art.
- program code conversion is performed dynamically, at run-time, to execute on the target architecture 10 while the target code 21 is running. That is, the translator 19 runs inline with the translated target code 21 .
- Running the subject program 17 through the translator 19 involves two different types of code that execute in an interleaved manner: the translator code 19 ; and the target code 21 .
- the target code 21 is generated by the translator code 19 , throughout run-time, based on the stored subject code 17 of the program being translated.
- the translator unit 19 emulates relevant portions of the subject architecture 1 such as the subject processor 3 and particularly the subject registers 5 , whilst actually executing the subject program 17 as target code 21 on the target processor 13 .
- at least one global register store 27 is provided (also referred to as the subject register bank 27 or abstract register bank 27 ).
- the subject register bank 27 or abstract register bank 27 optionally more than one abstract register bank 27 is provided according to the architecture of the subject processor.
- a representation of a subject state is provided by components of the translator 19 and the target code 21 . That is, the translator 19 stores the subject state in a variety of explicit programming language devices such as variables and/or objects.
- the translated target code 21 by comparison, provides subject processor state implicitly in the target registers 15 and in memory locations 18 , which are manipulated by the target instructions of the target code 21 .
- a low-level representation of the global register store 27 is simply a region of allocated memory.
- the global register store 27 is a data array or an object which can be accessed and manipulated at a higher level.
- basic block will be familiar to those skilled in the art.
- a basic block is a section of code with exactly one entry point and exactly one exit point, which limits the block code to a single control path. For this reason, basic blocks are a useful fundamental unit of control flow.
- the translator 19 divides the subject code 17 into a plurality of basic blocks, where each basic block is a sequential set of instructions between a first instruction at a single entry point and a last instruction at a single exit point (such as a jump, call or branch instruction).
- the translator 19 may select just one of these basic blocks (block mode) or select a group of the basic blocks (group block mode).
- a group block suitably comprises two or more basic blocks which are to be treated together as a single unit. Further, the translator may form iso blocks representing the same basic block of subject code but under different entry conditions.
- IR trees of Intermediate Representation are generated based on a subject instruction sequence, as part of the process of generating the target code 21 from the original subject program 17 .
- IR trees are abstract representations of the expressions calculated and operations performed by the subject program. Later, the target code 21 is generated based on the IR trees. Collections of IR nodes are actually directed acyclic graphs (DAFs), but are referred to colloquially as “trees”.
- the translator 19 is implemented using an object-oriented programming language such as C++.
- an IR node is implemented as a C++ object, and references to other nodes are implemented as C++references to the C++ objects corresponding to those other nodes.
- An IR tree is therefore implemented as a collection of IR node objects, containing various references to each other.
- IR generation uses a set of abstract register definitions which correspond to specific features of the subject architecture upon which the subject program 17 is intended to run. For example, there is a unique abstract register definition for each physical register on the subject architecture (i.e., the subject registers 5 of FIG. 1 ).
- abstract register definitions in the translator may be implemented as a C++object which contains a reference to an IR node object (i.e., an IR tree).
- the aggregate of all IR trees referred to by the set of abstract register definitions is referred to as the working IR forest (“forest” because it contains multiple abstract register roots, each of which refers to an IR tree).
- These IR trees and other processes suitably form part of the translator 19 .
- FIG. 1 further shows native code 28 in the memory 18 of the target architecture 10 .
- the target code 21 which results from the run-time translation of the subject code 17
- the native code 28 which is written or compiled directly for the target architecture.
- Native code 28 is generated external to the translator 19 , meaning that the translator 19 does not dynamically generate the native code 28 and the translator 19 does have an opportunity to modify or optimize the native code 28 .
- FIG. 2 is a more detailed schematic diagram illustrating a native binding mechanism as employed in embodiments of the present invention.
- Native binding is implemented by the translator 19 when it detects that the subject program's flow of control enters a section of subject code 17 , such as a subject library, for which a native version of the subject code exists. Rather than translating the subject code, the translator 19 instead causes the equivalent native code 28 to be executed on the target processor 13 . In example embodiments, the translator 19 binds generated target code 21 to the native code 28 using a defined interface, such as native code or target code call stubs, as discussed in more detail in WO2005/008478 (and US2005/0015781A) referenced above.
- the subject program 17 usually includes one or more subject executable files 17 a which are translated into target code 21 a .
- the subject executable 17 a may in turn refer to and make use of a number of subject libraries including proprietary libraries and/or system libraries.
- Two example library functions 17 b , 17 c are illustrated.
- the translator 19 uses native binding to replace calls to certain of the subject library functions with calls to equivalent functions in native libraries provided in the native code 28 .
- the translator 19 has translated a first library function A into target code 21 b
- a second library function B is native bound to a native library function in native code 28 .
- These native libraries are typically part of the target operating system 20 , but may also be provided to the target system along with the translator 19 .
- the translator 19 is arranged to perform a MIPS to x86 translation.
- the x86 target system library “libc” defines an advanced native memcpy( ) (memory copy) routine that takes advantage of SSE2 vector operations to perform extremely fast byte copies.
- libc defines an advanced native memcpy( ) (memory copy) routine that takes advantage of SSE2 vector operations to perform extremely fast byte copies.
- calls to a subject memcpy function in the MIPS subject code are bound to the native memcpy( ). This eliminates the cost of translating the subject (MIPS) version of the memcpy( ) function.
- the native ( ⁇ 86) version of the memcpy( ) is adapted to the intricacies of the native hardware, and can achieve the function's desired effect in the most efficient way for that hardware.
- Native binding is primarily applicable to library functions, but may also be implemented for any well-defined section of subject code for which a native code equivalent is available in the target architecture. That is, in addition to target system library calls, native binding may be used for more arbitrary code substitution, such as substituting a natively compiled version of a non-library function. Furthermore, native binding may be used to implement subject system calls on a native architecture, by replacing all calls to subject system functions with substitute native functions that either implement the same functionality as the calls to subject system functions or act as call stubs around target system calls. Native binding may also be applied at arbitrary subject code locations, beyond function call sites, to allow arbitrary code sequences (in either target code or native code) and/or function calls to be inserted or substituted at any well-defined point in the subject program.
- FIG. 3 is a more detailed schematic diagram of the target computing platform 10 of FIG. 1 , showing components which are employed relevant to the handling of exceptions as performed by an example embodiment of the present invention.
- An exception may be generated (“raised”) by hardware or by software.
- Hardware exceptions include signals such as resets, interrupts, or signals from a memory management unit.
- exceptions may be generated by an arithmetic logic unit or floating-point unit for numerical errors such as divide-by-zero, for overflow or underflow, or for instruction decoding errors such as privileged, reserved, trap or undefined instructions.
- Software exceptions occur in many different forms across various software programs and could be applied to any kind of error checking which alters the normal behaviour of the program.
- an instruction in the subject code causes a software exception to be reported if the value of one register is greater than the value of a second register.
- one or more subject exception handlers 170 are provided (registered) to handle exceptions which occur during execution of the subject program 17 .
- An exception handler is special code which is called upon when an exception occurs during the execution of a program. If the subject program does not provide a handler for a given exception, then a default system exception handler may be called. The exception handler will usually try to take corrective action and resume execution, or abort running of the subject program and return an error indication. In the context of program code conversion, it is desirable to accurately model, on the target system, the behaviour of the subject exception handler(s).
- Exception signals are a common mechanism for raising exceptions on many operating systems.
- the POSIX standard which is adhered to by many operating systems, particularly Unix-like systems, specifies how this mechanism should behave so that exception signals are broadly similar across many systems.
- the most common events that trigger exceptions are when a process implemented by a program tries to access an unmapped memory region or manipulate a memory region for which it does not have the correct permissions.
- Other common events that trigger exception signals are the receipt of a signal sent from another process, the execution by a process of an instruction that the process does not have the privilege level to execute, or an I/O event in the hardware.
- FIG. 3 shows a set of subject exception handlers 170 , which may include specific subject exception handlers that are specific to a particular type of exception and one or more default system exception handlers to be employed where a specific exception handler is not registered. Conveniently, the subject exception handlers 170 are made available on the target platform as part of the subject code 17 .
- the translator 19 also provides a corresponding set of translated subject exception handlers 170 ′ in target code 21 to execute on the target processor 13 , which emulate the subject exception handlers 170 .
- the subject exception handlers 170 are dynamically translated into executable target code versions when needed. It will be understood that reference to a subject exception handler 170 in the following description includes, where appropriate, a reference to the translated target code version of the subject exception handler.
- FIG. 4 is a schematic diagram showing execution in the subject computing platform when calling a subject library function and when handling an exception during execution of the library function.
- a current subject state is stored to a predetermined location (e.g. to a stack) and execution control passes to the appropriate subject exception handler 170 .
- the subject exception handler 170 will often use this stored subject state information in order to handle the exception. Also, if the exception handler so determines, the subject state is used to resume execution of the subject program, either at the same point as where the exception occurred, or at some other point in the subject program.
- the subject exception handler may, as part of handling the exception, alter the stored subject state, such as by altering a stored program counter. Hence, in the context of program code conversion, it is desirable to accurately follow the expected behaviour of the subject exception handler 170 .
- a subject stack 81 stores information about the active subroutines or library functions which have been called by the subject program.
- the subject stack 81 is provided in the memory 8 of the subject platform 1 , and many processors provide special hardware to manipulate such stack data structures in memory.
- the main role of the stack 81 is to keep track of the point to which each active function should return when it finishes executing, although the stack may also be used for other purposes such as to pass function parameters and results, and to store local data.
- each function call puts linking information on the stack, including a return address.
- This kind of stack is also known as an execution stack, control stack, or function stack.
- one stack is associated with each running program or with each task of a process. The exact details of the stack depend upon many factors including, for example, the subject hardware, the subject operating system, and the instruction set architecture of the subject platform.
- the subject state S includes information such as the content of at least some of the subject registers.
- the subject state S may include information such as current values of a subject stack pointer (SP_S) and a subject program counter (PC_S), amongst others.
- SP_S subject stack pointer
- PC_S subject program counter
- the caller subject program 17 a calls a subject library function 17 b
- the subject state S is stored by pushing the contents of the subject registers to the subject stack 81 , and the subject stack pointer SP_S is updated to point to the top of the subject stack 81 .
- local data may be stored on the subject stack 81 and a new subject state S′ is formed.
- the new subject state S′ is stored on the stack 81 , and execution passes to the subject execution handler 170 .
- the subject platform will be in a third state S′′.
- the second stored state S′ is recovered from the stack after handling the exception, and execution resumes at the point in the subject library function 17 b where the exception occurred.
- the first stored state S is recovered when execution returns from the library function 17 b to the caller program 17 a.
- FIG. 5 is a schematic diagram showing a state of execution in the target computing platform when performing native binding and when handling an exception in native bound code, as employed in embodiments of the present invention.
- FIG. 5 illustrates an example embodiment of the present invention which allows a useful subject state S′ to be reported to the subject exception handler 170 , and also allows execution to resume in the native bound code 28 .
- the translator 19 provides elements on the target platform 10 which are, in general terms, functionally equivalent to those on the subject platform 1 .
- the translator 19 provides a representation of the subject stack 81 in the target memory 18 , and represents the subject registers 5 using the abstract register bank 27 .
- the translator 19 is able to emulate all of the structures shown in FIG. 4 when the subject code 17 a calls the subject library function 17 b and when a exception is handled in the subject exception handler 170 .
- the translator 19 no longer has close control over the native bound code 28 and the translator 19 cannot maintain a subject state S′ which remains precisely equivalent to the subject state during execution of the subject library function 17 c on the subject platform.
- the embodiments discussed herein allow the translator 19 to provide an appropriate equivalent of the second subject state S′ to the subject exception handler 170 . Further, the embodiments discussed herein allow execution control to return to the native bound code 28 after the exception has been handled.
- the target platform 10 has a target state T which represents information such as a target program counter and a target stack pointer, and the current state of the target registers 15 in the target processor 13 .
- the target state T reflects the execution of target code 21 produced by the translator 19 from the caller subject program 17 a . Execution of the target code 21 causes a subject state S to be provided on the target platform, as discussed above.
- the native binding technique is employed to execute a native code library function B, and the first target state T evolves to a second target state T′ during execution of the native bound code 28 .
- an exception signal is raised (i.e. by the target OS 20 ) and passed to the registered exception handler.
- the target state T′ is saved to an appropriate storage location in the target system, in this case to the subject stack 81 .
- This second target state T′ represents a current point of execution in the target processor 13 for the native bound code 28 , at the point when the exception occurred.
- an exception handler unit 191 of the translator 19 creates and stores a subject state S′, before passing execution control to the subject exception handler 170 .
- the subject execution handler 170 is invoked to handle the exception with reference to the created subject state S′.
- the second subject state S′ comprises at least a subject stack pointer (SP_S) pointing to the subject stack 81 above the saved target state T′.
- SP_S subject stack pointer
- the previously saved subject state S is used as a foundation for the second subject state S′, with a modification to include the required new value of the subject stack pointer (SP_S).
- Execution of the subject exception handler 170 results in a third subject state S′′ and a third target state T′′ (due to the work done on the target platform to handle the exception).
- the subject exception handler 170 is now able to refer to the saved subject state S′ in order to resume execution in the native bound code 28 at the point where the exception occurred. That is, the saved subject state S′ owns the saved target state T′ and resuming execution of the subject code at the saved subject state S′ resumes execution of the native bound code 28 .
- the first and third target states T and T′′ refer to execution of the target code 21 produced by the translator 19 from the relevant subject code 17 .
- execution of the target code 21 uses a target stack (not shown) also provided in the memory of the target platform separately from the subject stack 81 .
- the second target state T′ refers to execution of the native code 28 using the subject stack 81 .
- the second target state T′ is shown to include a stack pointer (here illustrated with an arrow) which points to the subject stack 81 , whilst the first and third target states do not.
- the example embodiments of the present invention use the subject stack 81 for execution of the native bound code 28 .
- the subject stack 81 is a designated area of the memory 18 , which the translator 19 manages on behalf of the subject code 17 as part of the subject code to target code translation.
- Using the subject stack 81 for execution of the native code 28 prevents the native context T′ being lost as a result of servicing an exception during execution of that native bound code.
- the subject stack 81 is preserved when executing the translated version of the subject exception handler 170 .
- using the subject stack 81 for native binding execution allows environment switches in the subject code 17 to be dealt with transparently, such as by executing library calls similar to a “longjmp” function.
- a longjmp function restores a subject stack and subject state previously saved by calling a setjmp. This provides a way to execute a non-local “go to” type instruction and is typically used to pass execution to recovery code from the subject exception handler 170 . Therefore, by using the subject stack 81 for native binding, resources can be reclaimed transparently if the subject code 17 calls a longjmp. As part of the translation of the subject longjmp function, the translated code resets the subject stack pointer SP_S to reclaim stack space allocated by the native binding mechanism.
- execution of the native code 28 may employ a different stack elsewhere in the memory 18 of the target platform 10 , such as a stack of the translator 19 (translator stack) or a separately allocated native stack (not shown), instead of the subject stack 81 .
- FIG. 6 shows a flow of execution control when handling an exception in native bound code, as employed in embodiments of the present invention.
- the caller subject code 17 a (executing as caller target code 21 a ) calls into the native bound code 28 and an appropriate subject state S is saved on the subject stack 81 to allow a return into the caller target code 21 a .
- An exception occurs during the native bound code 28 which, as discussed above, provides a target state T′.
- the native binding mechanism returns control to the translator 19 and the target state T′ is saved.
- the translator 19 generates the second subject state S′.
- the second subject state includes, inter alia, at least a subject program counter PC_S′ which is specially modified by the translator 19 .
- the specially modified subject program counter value PC_S′ passed to the subject exception handler 170 does not correspond to a program address of the subject program 17 .
- the subject exception handler 170 (executing as translated subject exception handler 170 ′) may use this subject program counter PC_S′ as a return address when attempting to restart execution at the point where the exception occurred.
- the translator 19 includes a recovery unit 192 which acts to recover the target state T′ and resume execution in the native bound code.
- the recovery unit is form by providing a reserved location 171 (see FIG. 7 ), such as a memory page within the translator's address space, which the translator 19 will treat as a portion of subject code 17 .
- the reserved location 171 contains subject code instructions which, when translated and executed as target code, cause the target state T′ to be recovered such that the native bound code 28 resumes execution.
- restoring the target state T′ suitably includes filling the target registers with the saved version of their previous contents, such as popping these values from the subject stack 81 .
- the reserved location 171 contains special case instructions which do not fall within the instruction set of the subject architecture. Instead, the translator 19 recognises these special case instructions and in response executes a recovery routine to recover the stored target state T′ and allow the native code 28 to resume.
- the recovery routine is suitably provided as part of the translator code 19 .
- the program counter PC_S′ passed in the subject state S′ is a predetermined notional value (such as 0X000000) which does not correspond to a real location in the memory of the target architecture.
- the translator 19 is configured to recognise this special program counter and, instead of passing control to the identified location, redirects the flow of execution to execute the recovery routine 171 which loads the stored target state T′ and allows the native code 28 to resume. This particular embodiment relies on the translator 19 to detect when the subject program counter is a given predetermined value and to take a different action.
- the first subject state S is employed in creating the second subject state S′.
- the first subject state S is saved when the native code 28 is called, and hence the first subject state S is available to populate the second subject state S′ when an exception occurs. That is, the old subject state S is copied forward to become the new subject state S′, except that the program counter PC_S is modified to the special value PC_S′, and/or the stack pointer is updated to the new head of the subject stack 81 .
- This mechanism provides the subject exception handler 170 with a workable subject state S′ sufficient to handle the exception.
- the subject exception handler 170 may, for example, examine the subject program counter PC_S to determine where within the subject program the exception occurred. The subject handler 170 may then determine how to deal with the exception.
- the subject exception handler 170 is usually written in a manner which makes some assumptions about the program address space of the subject code program 17 and any dynamically allocated memory. However, the subject exception handler 170 usually cannot assume the memory areas where other components of the system, such as library functions, will reside. Where the subject program counter PC_S′ reported to the subject exception handler 170 lies outside the address range allocated to the subject code 17 , the subject exception handler 170 cannot make detailed decisions based on the supposed state of the subject platform and will therefore handle the exception similar to the manner in which it would have been handled on the subject platform.
- FIG. 7 is a schematic diagram of a portion of the memory of the target platform.
- the subject program 17 is allocated a subject program area 175 in the target memory 18 , alongside other components such as the translator code 19 and the target code 21 .
- This subject program area 175 typically comprises a linear range of virtual addresses, which map to one or more sets of physical storage locations as will be familiar to persons skilled in the art.
- the modified program counter PC_S′ passed to the subject exception handler 170 suitably lies outside this subject program area 175 .
- the subject program may have one or more dynamically allocated memory areas 176 such as for working storage, and the modified program counter PC_S′ also suitably falls outside the dynamically allocated subject areas 176 .
- FIG. 8 is a schematic flow diagram illustrating a method of exception handling for native bound code as employed by example embodiments of the present invention.
- an exception occurs during execution of native bound code (step 801 ).
- a current execution state is saved (step 802 ), reflecting execution of the native bound code on the target platform (target state T′).
- a subject state (S′) is created (step 803 ) reflecting an emulated point of execution on the subject platform, as if the exception had occurred whilst executing subject code on the subject platform.
- the created subject state S′ includes a stack pointer SP_S′ to the subject stack, where the target state T′ is conveniently stored.
- the subject state S′ includes a specially modified program counter PC_S′ as discussed above. The exception is handled with reference to the created subject state S′ (step 804 ).
- the subject exception handler 170 will include instructions which determine (step 805 ) whether or not to resume execution at the point where the exception occurred (i.e. return to the previous point of execution, which in this case lies in the native bound code). In some circumstances, execution of the subject program is halted, or control passes to a different portion of the program (step 809 ). However, where it is determined to resume execution at the point where the exception occurred, execution is resumed using the created subject state S′ (step 806 ) which links to the saved target state T′ (step 807 ) to resume execution of the native bound code (step 808 ).
- the mechanisms and embodiments described herein have many advantages, including that exceptions occurring during native bound code are handled reliably and efficiently.
- storing the target state T′ linked by the subject state S′ allows execution of bound native code 28 to be resumed after handling an exception.
- the subject exception handler 170 can return control to the native code 28 by directly or indirectly performing the recovery function 171 which loads the stored target state T′.
- using the subject stack 81 for execution of the native code 28 maintains the subject stack in good order and allows resources to be released efficiently.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Devices For Executing Special Programs (AREA)
- Debugging And Monitoring (AREA)
Abstract
Description
- This application claims benefit of the following Patent Application:
- U.K. Patent Application No. GB0612149.5, filed Jun. 20, 2006, which is hereby incorporated by reference in its entirety.
- The present invention relates generally to the field of computers and computer software and, more particularly, to program code conversion methods and apparatus useful, for example, in code translators, emulators and accelerators which convert program code.
- In both embedded and non-embedded CPUs, there are predominant Instruction Set Architectures (ISAs) for which large bodies of software exist that could be “accelerated” for performance, or “translated” to a myriad of capable processors that could present better cost/performance benefits, provided that they could transparently access the relevant software. One also finds dominant CPU architectures that are locked in time to their ISA, and cannot evolve in performance or market reach. Such CPUs would benefit from a software-oriented processor co architecture.
- PCT application WO00/22521 (also published as US2002/0100030A), which is incorporated herein by reference, discloses program code conversion methods and apparatus to facilitate such acceleration, translation and co-architecture capabilities as may be employed in embodiments of the present invention.
- Performing program code conversion brings overheads in the conversion process, compared with native execution of a subject program on a subject processor. A subject program usually consists of multiple units of subject code, including a subject executable and a number of subject libraries, some of which may be proprietary and some of which are provided as part of the subject operating system. As the subject program runs, control flow passes between these different units of subject code as function calls are made to the subject libraries. In some circumstances, native versions of certain subject libraries may be available on the target architecture.
- PCT application WO2005/008478 (also published as US2005/0015781A), which is incorporated herein by reference, discloses a native binding technique for inserting calls to native functions during translation of subject code to target code, such that function calls in the subject program to subject code functions are replaced in target code with calls to native equivalents of the same functions. This avoids the overhead of translating the subject versions of those functions. In addition, the native version may be a much more efficient implementation of the same functionality, as the native version can better exploit architectural features of the target architecture which may not be available on the subject architecture.
- Although the native binding technique is very useful, the inventors have now identified in that a difficulty arises in relation to exception handling. An exception is a condition that changes the normal control flow in a program. An exception indicates that a condition has occurred somewhere within the system that requires the attention of the processor, and the exception usually needs to be handled before processing can continue. Exceptions can be subdivided into various different types such as interrupts, faults, traps or aborts. The terminology varies between different architectures, and particular types or categories of exceptions may be unique to particular architectures.
- Undertaking the native binding mechanism reduces overhead in the translation process, such as the work of maintaining an accurate subject state. However, the execution of such native code also brings difficulties such as in the reporting of a subject state to a subject exception handler. Further, difficulties have now been identified in relation to resuming execution of the subject program after the exception has been handled, and particularly where it is desired to resume execution of the native code.
- According to the present invention there is provided an apparatus and method as set forth in the appended claims. Preferred features of the invention will be apparent from the dependent claims, and the description which follows.
- The following is a summary of various aspects and advantages realizable according to embodiments of the invention. It is provided as an introduction to assist those skilled in the art to more rapidly assimilate the detailed design discussion that ensues and does not and is not intended in any way to limit the scope of the claims that are appended hereto.
- In particular, the inventors have developed methods directed at program code conversion, which are particularly useful in connection with a run-time translator that provides dynamic binary translation of subject program code into target code.
- In one aspect of the present invention there is provided a method of handling exceptions during native binding under program code conversion from subject code executable by a subject computing architecture to target code executable by a target computing architecture. Performing native binding executes a portion of native code, usually in place of translating a portion of the subject code into the target code. When an exception occurs during execution of the native bound code, the method comprises saving a target state which represents a current point of execution in the target computing architecture for the native bound code, providing a subject state, and handling the exception with reference to the subject state, such that, upon resuming execution from the exception using the subject state, the saved target state is restored to resume execution of the native bound code.
- In the example embodiments, the subject state represents a point of execution in the subject computing architecture, which is emulated by the target computing platform. Particularly, the subject state may include a stack pointer to a subject stack data structure in the memory of the target computing platform used to emulate a procedure stack (or control stack) of the subject architecture. Conveniently, the target state is saved to the subject stack, such that the subject stack pointer links to the stored target state. Further, in the example embodiments, execution of the native bound code uses the subject stack. Further still, in example embodiments the subject state includes a modified program counter which is used to redirect execution control when returning from handling the exception. In some embodiments, a recovery routine is performed which links from the subject state to the saved target state.
- The present invention also extends to a translator apparatus arranged to perform the embodiments of the invention discussed herein. Also, the present invention extends to computer-readable storage medium having recorded thereon instructions which may be implemented by a computer to perform any of the methods defined herein.
- At least some embodiments of the invention may be constructed, partially or wholly, using dedicated hardware. Optionally, the target computing platform is provided as a function-specific dedicated translator apparatus.
- Terms such as ‘module’ or ‘unit’ used herein may include, but are not limited to, a hardware device, such as a Field Programmable Gate Array (FPGA) or Application Specific Integrated Circuit (ASIC), which performs certain tasks. Alternatively, elements of the invention may be configured to reside on an addressable storage medium and be configured to execute on one or more processors. Thus, functional elements of the invention may in some embodiments include, by way of example, components, such as software components, object-oriented software components, class components and task components, processes, functions, attributes, procedures, subroutines, segments of program code, drivers, firmware, microcode, circuitry, data, databases, data structures, tables, arrays, and variables. Further, although the preferred embodiments have been described with reference to the components, modules and units discussed below, such functional elements may be combined into fewer elements or separated into additional elements.
- The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate presently preferred implementations and are described as follows:
-
FIG. 1 is a block diagram illustrative of apparatus wherein embodiments of the invention find application; -
FIG. 2 is a schematic diagram illustrating a native binding mechanism as employed in embodiments of the invention; -
FIG. 3 is a schematic diagram showing components which are employed for the handling of exceptions by example embodiments of the present invention; -
FIG. 4 is a schematic diagram showing execution in a subject computing platform when calling a subject library function and when handling an exception during execution of the library function; -
FIG. 5 is a schematic diagram showing execution in a target computing platform when performing native binding and when handling an exception in native bound code, as employed in embodiments of the present invention; -
FIG. 6 is a schematic diagram showing a flow of execution control when handling an exception in native bound code, as employed in embodiments of the present invention; -
FIG. 7 is a schematic diagram of a portion of the memory of the target computing platform; and -
FIG. 8 is a schematic flow diagram illustrating a method of handling exceptions for native bound code as employed by example embodiments of the present invention. - The following description is provided to enable a person skilled in the art to make and use the invention and sets forth the best modes contemplated by the inventors of carrying out their invention. Various modifications, however, will remain readily apparent to those skilled in the art, since the general principles of the present invention have been defined herein specifically to provide an improved program code conversion method and apparatus.
-
FIG. 1 gives an overview of a system and environment where the example embodiments of the present invention may find application, in order to introduce the units, components and elements that will be discussed in more detail below. Referring toFIG. 1 , asubject program 17 is intended to execute on asubject computing platform 1 having at least onesubject processor 3. However, atarget computing platform 10 is instead used to execute thesubject program 17, through atranslator unit 19 which performs program code conversion. Thetranslator unit 19 performs code conversion from thesubject code 17 to targetcode 21, such that thetarget code 21 is executable on thetarget computing platform 10. - As will be familiar to those skilled in the art, the
subject processor 3 has a set of subject registers 5. Asubject memory 8 holds, inter alia, thesubject code 17 and asubject operating system 2. Similarly, the exampletarget computing platform 10 inFIG. 1 comprises atarget processor 13 having a plurality of target registers 15, and amemory 18 to store a plurality of operational components including atarget operating system 20, thesubject code 17, thetranslator code 19, and the translatedtarget code 21. Thetarget computing platform 10 is typically a microprocessor-based computer or other suitable computer. - In one embodiment, the
translator code 19 is an emulator to translate subject code of a subject instruction set architecture (ISA) into translated target code of another ISA, with or without optimisations. In another embodiment, thetranslator 19 functions as an accelerator for translating subject code into target code, each of the same ISA, by performing program code optimisations. - The
translator code 19 is suitably a compiled version of source code implementing the translator, and runs in conjunction with theoperating system 20 on thetarget processor 13. It will be appreciated that the structure illustrated inFIG. 1 is exemplary only and that, for example, embodiments of the invention may be implemented within or beneath theoperating system 20 of the target platform. Thesubject code 17,translator code 19,operating system 20, and storage mechanisms of thememory 18 may be any of a wide variety of types, as known to those skilled in the art. - In the example apparatus according to
FIG. 1 , program code conversion is performed dynamically, at run-time, to execute on thetarget architecture 10 while thetarget code 21 is running. That is, thetranslator 19 runs inline with the translatedtarget code 21. Running thesubject program 17 through thetranslator 19 involves two different types of code that execute in an interleaved manner: thetranslator code 19; and thetarget code 21. Hence, thetarget code 21 is generated by thetranslator code 19, throughout run-time, based on the storedsubject code 17 of the program being translated. - In one embodiment, the
translator unit 19 emulates relevant portions of thesubject architecture 1 such as thesubject processor 3 and particularly thesubject registers 5, whilst actually executing thesubject program 17 astarget code 21 on thetarget processor 13. In the preferred embodiment, at least oneglobal register store 27 is provided (also referred to as thesubject register bank 27 or abstract register bank 27). In a multiprocessor environment, optionally more than oneabstract register bank 27 is provided according to the architecture of the subject processor. A representation of a subject state is provided by components of thetranslator 19 and thetarget code 21. That is, thetranslator 19 stores the subject state in a variety of explicit programming language devices such as variables and/or objects. The translatedtarget code 21, by comparison, provides subject processor state implicitly in the target registers 15 and inmemory locations 18, which are manipulated by the target instructions of thetarget code 21. For example, a low-level representation of theglobal register store 27 is simply a region of allocated memory. In the source code of thetranslator 19, however, theglobal register store 27 is a data array or an object which can be accessed and manipulated at a higher level. - The term “basic block” will be familiar to those skilled in the art. A basic block is a section of code with exactly one entry point and exactly one exit point, which limits the block code to a single control path. For this reason, basic blocks are a useful fundamental unit of control flow. Suitably, the
translator 19 divides thesubject code 17 into a plurality of basic blocks, where each basic block is a sequential set of instructions between a first instruction at a single entry point and a last instruction at a single exit point (such as a jump, call or branch instruction). Thetranslator 19 may select just one of these basic blocks (block mode) or select a group of the basic blocks (group block mode). A group block suitably comprises two or more basic blocks which are to be treated together as a single unit. Further, the translator may form iso blocks representing the same basic block of subject code but under different entry conditions. - In the preferred embodiments, trees of Intermediate Representation (IR) are generated based on a subject instruction sequence, as part of the process of generating the
target code 21 from theoriginal subject program 17. IR trees are abstract representations of the expressions calculated and operations performed by the subject program. Later, thetarget code 21 is generated based on the IR trees. Collections of IR nodes are actually directed acyclic graphs (DAFs), but are referred to colloquially as “trees”. - As those skilled in the art may appreciate, in one embodiment the
translator 19 is implemented using an object-oriented programming language such as C++. For example, an IR node is implemented as a C++ object, and references to other nodes are implemented as C++references to the C++ objects corresponding to those other nodes. An IR tree is therefore implemented as a collection of IR node objects, containing various references to each other. - Further, in the embodiment under discussion, IR generation uses a set of abstract register definitions which correspond to specific features of the subject architecture upon which the
subject program 17 is intended to run. For example, there is a unique abstract register definition for each physical register on the subject architecture (i.e., thesubject registers 5 ofFIG. 1 ). As such, abstract register definitions in the translator may be implemented as a C++object which contains a reference to an IR node object (i.e., an IR tree). The aggregate of all IR trees referred to by the set of abstract register definitions is referred to as the working IR forest (“forest” because it contains multiple abstract register roots, each of which refers to an IR tree). These IR trees and other processes suitably form part of thetranslator 19. -
FIG. 1 further showsnative code 28 in thememory 18 of thetarget architecture 10. There is a distinction between thetarget code 21, which results from the run-time translation of thesubject code 17, and thenative code 28, which is written or compiled directly for the target architecture.Native code 28 is generated external to thetranslator 19, meaning that thetranslator 19 does not dynamically generate thenative code 28 and thetranslator 19 does have an opportunity to modify or optimize thenative code 28. -
FIG. 2 is a more detailed schematic diagram illustrating a native binding mechanism as employed in embodiments of the present invention. - Native binding is implemented by the
translator 19 when it detects that the subject program's flow of control enters a section ofsubject code 17, such as a subject library, for which a native version of the subject code exists. Rather than translating the subject code, thetranslator 19 instead causes the equivalentnative code 28 to be executed on thetarget processor 13. In example embodiments, thetranslator 19 binds generatedtarget code 21 to thenative code 28 using a defined interface, such as native code or target code call stubs, as discussed in more detail in WO2005/008478 (and US2005/0015781A) referenced above. - The
subject program 17 usually includes one or more subjectexecutable files 17 a which are translated intotarget code 21 a. The subject executable 17 a may in turn refer to and make use of a number of subject libraries including proprietary libraries and/or system libraries. Two example library functions 17 b, 17 c are illustrated. Thetranslator 19 uses native binding to replace calls to certain of the subject library functions with calls to equivalent functions in native libraries provided in thenative code 28. In this example, thetranslator 19 has translated a first library function A intotarget code 21 b, whereas a second library function B is native bound to a native library function innative code 28. These native libraries are typically part of thetarget operating system 20, but may also be provided to the target system along with thetranslator 19. - As an illustrative example, the
translator 19 is arranged to perform a MIPS to x86 translation. Here, the x86 target system library “libc” defines an advanced native memcpy( ) (memory copy) routine that takes advantage of SSE2 vector operations to perform extremely fast byte copies. Using native binding, calls to a subject memcpy function in the MIPS subject code are bound to the native memcpy( ). This eliminates the cost of translating the subject (MIPS) version of the memcpy( ) function. In addition, the native (×86) version of the memcpy( ) is adapted to the intricacies of the native hardware, and can achieve the function's desired effect in the most efficient way for that hardware. - Native binding is primarily applicable to library functions, but may also be implemented for any well-defined section of subject code for which a native code equivalent is available in the target architecture. That is, in addition to target system library calls, native binding may be used for more arbitrary code substitution, such as substituting a natively compiled version of a non-library function. Furthermore, native binding may be used to implement subject system calls on a native architecture, by replacing all calls to subject system functions with substitute native functions that either implement the same functionality as the calls to subject system functions or act as call stubs around target system calls. Native binding may also be applied at arbitrary subject code locations, beyond function call sites, to allow arbitrary code sequences (in either target code or native code) and/or function calls to be inserted or substituted at any well-defined point in the subject program.
-
FIG. 3 is a more detailed schematic diagram of thetarget computing platform 10 ofFIG. 1 , showing components which are employed relevant to the handling of exceptions as performed by an example embodiment of the present invention. - An exception may be generated (“raised”) by hardware or by software. Hardware exceptions include signals such as resets, interrupts, or signals from a memory management unit. As examples, exceptions may be generated by an arithmetic logic unit or floating-point unit for numerical errors such as divide-by-zero, for overflow or underflow, or for instruction decoding errors such as privileged, reserved, trap or undefined instructions. Software exceptions occur in many different forms across various software programs and could be applied to any kind of error checking which alters the normal behaviour of the program. As an illustrative example, an instruction in the subject code causes a software exception to be reported if the value of one register is greater than the value of a second register.
- Typically, one or more
subject exception handlers 170 are provided (registered) to handle exceptions which occur during execution of thesubject program 17. An exception handler is special code which is called upon when an exception occurs during the execution of a program. If the subject program does not provide a handler for a given exception, then a default system exception handler may be called. The exception handler will usually try to take corrective action and resume execution, or abort running of the subject program and return an error indication. In the context of program code conversion, it is desirable to accurately model, on the target system, the behaviour of the subject exception handler(s). - Exception signals are a common mechanism for raising exceptions on many operating systems. The POSIX standard, which is adhered to by many operating systems, particularly Unix-like systems, specifies how this mechanism should behave so that exception signals are broadly similar across many systems. The most common events that trigger exceptions are when a process implemented by a program tries to access an unmapped memory region or manipulate a memory region for which it does not have the correct permissions. Other common events that trigger exception signals are the receipt of a signal sent from another process, the execution by a process of an instruction that the process does not have the privilege level to execute, or an I/O event in the hardware.
-
FIG. 3 shows a set ofsubject exception handlers 170, which may include specific subject exception handlers that are specific to a particular type of exception and one or more default system exception handlers to be employed where a specific exception handler is not registered. Conveniently, thesubject exception handlers 170 are made available on the target platform as part of thesubject code 17. - The
translator 19 also provides a corresponding set of translatedsubject exception handlers 170′ intarget code 21 to execute on thetarget processor 13, which emulate thesubject exception handlers 170. In particular embodiments, thesubject exception handlers 170 are dynamically translated into executable target code versions when needed. It will be understood that reference to asubject exception handler 170 in the following description includes, where appropriate, a reference to the translated target code version of the subject exception handler. -
FIG. 4 is a schematic diagram showing execution in the subject computing platform when calling a subject library function and when handling an exception during execution of the library function. - When an exception occurs, a current subject state is stored to a predetermined location (e.g. to a stack) and execution control passes to the appropriate
subject exception handler 170. Thesubject exception handler 170 will often use this stored subject state information in order to handle the exception. Also, if the exception handler so determines, the subject state is used to resume execution of the subject program, either at the same point as where the exception occurred, or at some other point in the subject program. The subject exception handler may, as part of handling the exception, alter the stored subject state, such as by altering a stored program counter. Hence, in the context of program code conversion, it is desirable to accurately follow the expected behaviour of thesubject exception handler 170. - As will be familiar to persons skilled in the art, in architectures which use a stack for procedure calls, a
subject stack 81 stores information about the active subroutines or library functions which have been called by the subject program. Usually, thesubject stack 81 is provided in thememory 8 of thesubject platform 1, and many processors provide special hardware to manipulate such stack data structures in memory. The main role of thestack 81 is to keep track of the point to which each active function should return when it finishes executing, although the stack may also be used for other purposes such as to pass function parameters and results, and to store local data. Typically, each function call puts linking information on the stack, including a return address. This kind of stack is also known as an execution stack, control stack, or function stack. Usually, one stack is associated with each running program or with each task of a process. The exact details of the stack depend upon many factors including, for example, the subject hardware, the subject operating system, and the instruction set architecture of the subject platform. - In
FIG. 4 , the subject state S includes information such as the content of at least some of the subject registers. In particular, the subject state S may include information such as current values of a subject stack pointer (SP_S) and a subject program counter (PC_S), amongst others. When thecaller subject program 17 a calls asubject library function 17 b, the subject state S is stored by pushing the contents of the subject registers to thesubject stack 81, and the subject stack pointer SP_S is updated to point to the top of thesubject stack 81. During execution of the calledlibrary function 17 b, local data may be stored on thesubject stack 81 and a new subject state S′ is formed. When an exception occurs, the new subject state S′ is stored on thestack 81, and execution passes to thesubject execution handler 170. After handling the exception, the subject platform will be in a third state S″. In this example, the second stored state S′ is recovered from the stack after handling the exception, and execution resumes at the point in thesubject library function 17 b where the exception occurred. Later, the first stored state S is recovered when execution returns from thelibrary function 17 b to thecaller program 17 a. -
FIG. 5 is a schematic diagram showing a state of execution in the target computing platform when performing native binding and when handling an exception in native bound code, as employed in embodiments of the present invention. In particular,FIG. 5 illustrates an example embodiment of the present invention which allows a useful subject state S′ to be reported to thesubject exception handler 170, and also allows execution to resume in the native boundcode 28. - For program code conversion as discussed herein, the
translator 19 provides elements on thetarget platform 10 which are, in general terms, functionally equivalent to those on thesubject platform 1. In this example, thetranslator 19 provides a representation of thesubject stack 81 in thetarget memory 18, and represents thesubject registers 5 using theabstract register bank 27. Hence, thetranslator 19 is able to emulate all of the structures shown inFIG. 4 when thesubject code 17 a calls thesubject library function 17 b and when a exception is handled in thesubject exception handler 170. However, when performing native binding, thetranslator 19 no longer has close control over the native boundcode 28 and thetranslator 19 cannot maintain a subject state S′ which remains precisely equivalent to the subject state during execution of thesubject library function 17 c on the subject platform. However, the embodiments discussed herein allow thetranslator 19 to provide an appropriate equivalent of the second subject state S′ to thesubject exception handler 170. Further, the embodiments discussed herein allow execution control to return to the native boundcode 28 after the exception has been handled. - In
FIG. 5 , thetarget platform 10 has a target state T which represents information such as a target program counter and a target stack pointer, and the current state of the target registers 15 in thetarget processor 13. Initially, the target state T reflects the execution oftarget code 21 produced by thetranslator 19 from thecaller subject program 17 a. Execution of thetarget code 21 causes a subject state S to be provided on the target platform, as discussed above. - The native binding technique is employed to execute a native code library function B, and the first target state T evolves to a second target state T′ during execution of the native bound
code 28. When an exception occurs during execution of the native boundcode 28, an exception signal is raised (i.e. by the target OS 20) and passed to the registered exception handler. As part of handling the exception, the target state T′ is saved to an appropriate storage location in the target system, in this case to thesubject stack 81. This second target state T′ represents a current point of execution in thetarget processor 13 for the native boundcode 28, at the point when the exception occurred. Also, an exception handler unit 191 of thetranslator 19 creates and stores a subject state S′, before passing execution control to thesubject exception handler 170. Thesubject execution handler 170 is invoked to handle the exception with reference to the created subject state S′. Here, the second subject state S′ comprises at least a subject stack pointer (SP_S) pointing to thesubject stack 81 above the saved target state T′. Conveniently, the previously saved subject state S is used as a foundation for the second subject state S′, with a modification to include the required new value of the subject stack pointer (SP_S). - Execution of the
subject exception handler 170 results in a third subject state S″ and a third target state T″ (due to the work done on the target platform to handle the exception). However, thesubject exception handler 170 is now able to refer to the saved subject state S′ in order to resume execution in the native boundcode 28 at the point where the exception occurred. That is, the saved subject state S′ owns the saved target state T′ and resuming execution of the subject code at the saved subject state S′ resumes execution of the native boundcode 28. - It is useful to note that, in this illustrated embodiment, the first and third target states T and T″ refer to execution of the
target code 21 produced by thetranslator 19 from therelevant subject code 17. In this embodiment, execution of thetarget code 21 uses a target stack (not shown) also provided in the memory of the target platform separately from thesubject stack 81. By contrast, the second target state T′ refers to execution of thenative code 28 using thesubject stack 81. Hence, the second target state T′ is shown to include a stack pointer (here illustrated with an arrow) which points to thesubject stack 81, whilst the first and third target states do not. - As shown in
FIG. 5 , the example embodiments of the present invention use thesubject stack 81 for execution of the native boundcode 28. As discussed above, thesubject stack 81 is a designated area of thememory 18, which thetranslator 19 manages on behalf of thesubject code 17 as part of the subject code to target code translation. Using thesubject stack 81 for execution of thenative code 28 prevents the native context T′ being lost as a result of servicing an exception during execution of that native bound code. In particular, thesubject stack 81 is preserved when executing the translated version of thesubject exception handler 170. As a further advantage, using thesubject stack 81 for native binding execution allows environment switches in thesubject code 17 to be dealt with transparently, such as by executing library calls similar to a “longjmp” function. A longjmp function restores a subject stack and subject state previously saved by calling a setjmp. This provides a way to execute a non-local “go to” type instruction and is typically used to pass execution to recovery code from thesubject exception handler 170. Therefore, by using thesubject stack 81 for native binding, resources can be reclaimed transparently if thesubject code 17 calls a longjmp. As part of the translation of the subject longjmp function, the translated code resets the subject stack pointer SP_S to reclaim stack space allocated by the native binding mechanism. - In some alternate embodiments of the present invention, execution of the
native code 28 may employ a different stack elsewhere in thememory 18 of thetarget platform 10, such as a stack of the translator 19 (translator stack) or a separately allocated native stack (not shown), instead of thesubject stack 81. -
FIG. 6 shows a flow of execution control when handling an exception in native bound code, as employed in embodiments of the present invention. - In
FIG. 6 , the callersubject code 17 a (executing ascaller target code 21 a) calls into the native boundcode 28 and an appropriate subject state S is saved on thesubject stack 81 to allow a return into thecaller target code 21 a. An exception occurs during the native boundcode 28 which, as discussed above, provides a target state T′. The native binding mechanism returns control to thetranslator 19 and the target state T′ is saved. - As discussed above, the
translator 19 generates the second subject state S′. In this aspect of the invention, the second subject state includes, inter alia, at least a subject program counter PC_S′ which is specially modified by thetranslator 19. In particular, the specially modified subject program counter value PC_S′ passed to thesubject exception handler 170 does not correspond to a program address of thesubject program 17. However, the subject exception handler 170 (executing as translatedsubject exception handler 170′) may use this subject program counter PC_S′ as a return address when attempting to restart execution at the point where the exception occurred. - In a first example embodiment as shown in
FIG. 6 , thetranslator 19 includes a recovery unit 192 which acts to recover the target state T′ and resume execution in the native bound code. In one embodiment, the recovery unit is form by providing a reserved location 171 (seeFIG. 7 ), such as a memory page within the translator's address space, which thetranslator 19 will treat as a portion ofsubject code 17. Thus, when the translatedsubject exception handler 170′ attempts to pass control to the program location identified by the specially modified subject program counter PC_S′, thetranslator 19 is directed to thereserved location 171. In this first embodiment, thereserved location 171 contains subject code instructions which, when translated and executed as target code, cause the target state T′ to be recovered such that the native boundcode 28 resumes execution. Here, restoring the target state T′ suitably includes filling the target registers with the saved version of their previous contents, such as popping these values from thesubject stack 81. - In a second example embodiment as also illustrated by
FIG. 6 , thereserved location 171 contains special case instructions which do not fall within the instruction set of the subject architecture. Instead, thetranslator 19 recognises these special case instructions and in response executes a recovery routine to recover the stored target state T′ and allow thenative code 28 to resume. Here, the recovery routine is suitably provided as part of thetranslator code 19. - In another example embodiment, the program counter PC_S′ passed in the subject state S′ is a predetermined notional value (such as 0X000000) which does not correspond to a real location in the memory of the target architecture. The
translator 19 is configured to recognise this special program counter and, instead of passing control to the identified location, redirects the flow of execution to execute therecovery routine 171 which loads the stored target state T′ and allows thenative code 28 to resume. This particular embodiment relies on thetranslator 19 to detect when the subject program counter is a given predetermined value and to take a different action. - Referring again to
FIGS. 5 and 6 , in the example embodiments discussed herein the first subject state S is employed in creating the second subject state S′. Suitably, the first subject state S is saved when thenative code 28 is called, and hence the first subject state S is available to populate the second subject state S′ when an exception occurs. That is, the old subject state S is copied forward to become the new subject state S′, except that the program counter PC_S is modified to the special value PC_S′, and/or the stack pointer is updated to the new head of thesubject stack 81. This mechanism provides thesubject exception handler 170 with a workable subject state S′ sufficient to handle the exception. Thesubject exception handler 170 may, for example, examine the subject program counter PC_S to determine where within the subject program the exception occurred. Thesubject handler 170 may then determine how to deal with the exception. Thesubject exception handler 170 is usually written in a manner which makes some assumptions about the program address space of thesubject code program 17 and any dynamically allocated memory. However, thesubject exception handler 170 usually cannot assume the memory areas where other components of the system, such as library functions, will reside. Where the subject program counter PC_S′ reported to thesubject exception handler 170 lies outside the address range allocated to thesubject code 17, thesubject exception handler 170 cannot make detailed decisions based on the supposed state of the subject platform and will therefore handle the exception similar to the manner in which it would have been handled on the subject platform. -
FIG. 7 is a schematic diagram of a portion of the memory of the target platform. As shown inFIG. 7 , thesubject program 17 is allocated asubject program area 175 in thetarget memory 18, alongside other components such as thetranslator code 19 and thetarget code 21. Thissubject program area 175 typically comprises a linear range of virtual addresses, which map to one or more sets of physical storage locations as will be familiar to persons skilled in the art. The modified program counter PC_S′ passed to thesubject exception handler 170 suitably lies outside thissubject program area 175. Further, the subject program may have one or more dynamically allocatedmemory areas 176 such as for working storage, and the modified program counter PC_S′ also suitably falls outside the dynamically allocatedsubject areas 176. -
FIG. 8 is a schematic flow diagram illustrating a method of exception handling for native bound code as employed by example embodiments of the present invention. - As discussed above, an exception occurs during execution of native bound code (step 801). A current execution state is saved (step 802), reflecting execution of the native bound code on the target platform (target state T′). Also, a subject state (S′) is created (step 803) reflecting an emulated point of execution on the subject platform, as if the exception had occurred whilst executing subject code on the subject platform. In particular, the created subject state S′ includes a stack pointer SP_S′ to the subject stack, where the target state T′ is conveniently stored. Also, the subject state S′ includes a specially modified program counter PC_S′ as discussed above. The exception is handled with reference to the created subject state S′ (step 804). The
subject exception handler 170 will include instructions which determine (step 805) whether or not to resume execution at the point where the exception occurred (i.e. return to the previous point of execution, which in this case lies in the native bound code). In some circumstances, execution of the subject program is halted, or control passes to a different portion of the program (step 809). However, where it is determined to resume execution at the point where the exception occurred, execution is resumed using the created subject state S′ (step 806) which links to the saved target state T′ (step 807) to resume execution of the native bound code (step 808). - In summary, the mechanisms and embodiments described herein have many advantages, including that exceptions occurring during native bound code are handled reliably and efficiently. In the example embodiments, storing the target state T′ linked by the subject state S′ allows execution of bound
native code 28 to be resumed after handling an exception. Also, by modifying the subject program counter in the manner described above, thesubject exception handler 170 can return control to thenative code 28 by directly or indirectly performing therecovery function 171 which loads the stored target state T′. Further, using thesubject stack 81 for execution of thenative code 28 maintains the subject stack in good order and allows resources to be released efficiently. These and other features and advantages will be apparent to the skilled person from the above description and/or by practicing the described embodiments of the present invention. - Although a few example embodiments have been shown and described, it will be appreciated by those skilled in the art that various changes and modifications might be made without departing from the scope of the invention, as defined in the appended claims.
- Attention is directed to all papers and documents which are filed concurrently with or previous to this specification in connection with this application and which are open to public inspection with this specification, and the contents of all such papers and documents are incorporated herein by reference.
- All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and/or all of the steps of any method or process so disclosed, may be combined in any combination, except combinations where at least some of such features and/or steps are mutually exclusive.
- Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise. Thus, unless expressly stated otherwise, each feature disclosed is one example only of a generic series of equivalent or similar features.
- The invention is not restricted to the details of the foregoing embodiment(s). The invention extends to any novel one, or any novel combination, of the features disclosed in this specification (including any accompanying claims, abstract and drawings), or to any novel one, or any novel combination, of the steps of any method or process so disclosed.
Claims (33)
Priority Applications (6)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
GB0711837A GB2439443B (en) | 2006-06-20 | 2007-06-19 | Method and apparatus for handling exceptions during binding to native code |
EP07733764A EP2035926B1 (en) | 2006-06-20 | 2007-06-19 | Method and apparatus for handling exceptions during binding to native code |
JP2009515965A JP4954281B2 (en) | 2006-06-20 | 2007-06-19 | Exception handling system, exception handling method, conversion device, and storage medium for handling exceptions during binding to native code |
PCT/GB2007/050343 WO2007148132A1 (en) | 2006-06-20 | 2007-06-19 | Method and apparatus for handling exceptions during binding to native code |
CN200780023140.9A CN101473303B (en) | 2006-06-20 | 2007-06-19 | Method and apparatus for handling exceptions during binding to native code |
TW096122074A TWI427535B (en) | 2006-06-20 | 2007-06-20 | Method and apparatus for handling exceptions during binding to native code |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
GBGB0612149.5 | 2006-06-20 | ||
GBGB0612149.5A GB0612149D0 (en) | 2005-11-14 | 2006-06-20 | Method and apparatus for handling exceptions during binding to native code |
Publications (1)
Publication Number | Publication Date |
---|---|
US20070294675A1 true US20070294675A1 (en) | 2007-12-20 |
Family
ID=38878388
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US11/546,012 Abandoned US20070294675A1 (en) | 2006-06-20 | 2006-10-10 | Method and apparatus for handling exceptions during binding to native code |
US11/820,480 Active 2032-01-18 US8458674B2 (en) | 2006-06-20 | 2007-06-19 | Method and apparatus for handling exceptions during binding to native code |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US11/820,480 Active 2032-01-18 US8458674B2 (en) | 2006-06-20 | 2007-06-19 | Method and apparatus for handling exceptions during binding to native code |
Country Status (7)
Country | Link |
---|---|
US (2) | US20070294675A1 (en) |
EP (1) | EP2035926B1 (en) |
JP (1) | JP4954281B2 (en) |
CN (1) | CN101473303B (en) |
GB (1) | GB2439443B (en) |
TW (1) | TWI427535B (en) |
WO (1) | WO2007148132A1 (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080005724A1 (en) * | 2006-06-20 | 2008-01-03 | Transitive Limited | Method and apparatus for handling exceptions during binding to native code |
US7552405B1 (en) * | 2007-07-24 | 2009-06-23 | Xilinx, Inc. | Methods of implementing embedded processor systems including state machines |
US20110161736A1 (en) * | 2009-12-28 | 2011-06-30 | Ryuji Orita | Debugging module to load error decoding logic from firmware and to execute logic in response to an error |
US20130173887A1 (en) * | 2006-07-06 | 2013-07-04 | Imperas Software Ltd. | Processor simulation environment |
CN109558292A (en) * | 2017-09-26 | 2019-04-02 | 阿里巴巴集团控股有限公司 | A kind of monitoring method and device |
US11010227B2 (en) * | 2017-06-12 | 2021-05-18 | Ping An Technology (Shenzhen) Co., Ltd. | Exception stack information acquisition method and device and computer-readable storage medium |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9229707B2 (en) * | 2008-12-18 | 2016-01-05 | Sap Se | Zero downtime mechanism for software upgrade of a distributed computer system |
US20130054533A1 (en) * | 2011-08-24 | 2013-02-28 | Microsoft Corporation | Verifying a data recovery component using a managed interface |
US9116711B2 (en) * | 2012-02-08 | 2015-08-25 | Arm Limited | Exception handling in a data processing apparatus having a secure domain and a less secure domain |
US8819648B2 (en) * | 2012-07-20 | 2014-08-26 | International Business Machines Corporation | Control flow management for execution of dynamically translated non-native code in a virtual hosting environment |
CN103813366B (en) * | 2012-11-07 | 2017-12-08 | 锐迪科(重庆)微电子科技有限公司 | A kind of abnormal restoration methods of processor and mobile terminal |
CN103077073B (en) * | 2013-01-15 | 2016-12-28 | 华为技术有限公司 | The implementation method of instant functional level emulator and device and emulation processor |
CN104219259B (en) * | 2013-05-30 | 2017-09-12 | 中国电信股份有限公司 | A kind for the treatment of method and apparatus of transmission abnormality event |
FR3012816B1 (en) * | 2013-11-05 | 2017-12-08 | Arkema France | SHOCK RESISTANT THERMOPLASTIC COMPOSITION |
US10754765B2 (en) * | 2017-05-17 | 2020-08-25 | Google Llc | Operating system validation |
CN119576419B (en) * | 2025-02-09 | 2025-04-04 | 北京麟卓信息科技有限公司 | Exception handling conversion optimization method for ARM many-core dynamic instruction conversion |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6314560B1 (en) * | 1998-07-02 | 2001-11-06 | Hewlett-Packard Company | Method and apparatus for a translation system that aggressively optimizes and preserves full synchronous exception state |
US20020032718A1 (en) * | 1996-01-29 | 2002-03-14 | John S. Yates | Method and apparatus for maintaining translated routine stack in a binary translation enviroment |
US20020092002A1 (en) * | 1999-02-17 | 2002-07-11 | Babaian Boris A. | Method and apparatus for preserving precise exceptions in binary translated code |
US20020100030A1 (en) * | 1998-10-10 | 2002-07-25 | Victoria University Of Manchester | Program code conversion |
US20050015781A1 (en) * | 2003-07-15 | 2005-01-20 | Alex Brown | Method and apparatus for performing native binding |
Family Cites Families (23)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6321377B1 (en) * | 1998-12-03 | 2001-11-20 | International Business Machines Corporation | Method and apparatus automatic service of JIT compiler generated errors |
US7111290B1 (en) * | 1999-01-28 | 2006-09-19 | Ati International Srl | Profiling program execution to identify frequently-executed portions and to assist binary translation |
US8065504B2 (en) * | 1999-01-28 | 2011-11-22 | Ati International Srl | Using on-chip and off-chip look-up tables indexed by instruction address to control instruction execution in a processor |
US7065633B1 (en) * | 1999-01-28 | 2006-06-20 | Ati International Srl | System for delivering exception raised in first architecture to operating system coded in second architecture in dual architecture CPU |
US7941647B2 (en) * | 1999-01-28 | 2011-05-10 | Ati Technologies Ulc | Computer for executing two instruction sets and adds a macroinstruction end marker for performing iterations after loop termination |
JP2000322269A (en) | 1999-05-10 | 2000-11-24 | Nec Software Hokuriku Ltd | Emulation system |
US6549959B1 (en) * | 1999-08-30 | 2003-04-15 | Ati International Srl | Detecting modification to computer memory by a DMA device |
US6934832B1 (en) * | 2000-01-18 | 2005-08-23 | Ati International Srl | Exception mechanism for a computer |
US6810476B2 (en) * | 2000-08-09 | 2004-10-26 | Advanced Micro Devices, Inc. | Variable state save formats based on operand size of state save instruction |
US6895579B2 (en) * | 2001-07-31 | 2005-05-17 | Intel Corporation | Method and apparatus for maintaining exception reporting for register promotion |
US6907519B2 (en) * | 2001-11-29 | 2005-06-14 | Hewlett-Packard Development Company, L.P. | Systems and methods for integrating emulated and native code |
GB0225649D0 (en) * | 2002-11-04 | 2002-12-11 | Transitive Technologies Ltd | Incremental validation |
US7536682B2 (en) | 2003-04-22 | 2009-05-19 | International Business Machines Corporation | Method and apparatus for performing interpreter optimizations during program code conversion |
GB2401217B (en) | 2003-05-02 | 2005-11-09 | Transitive Ltd | Improved architecture for generating intermediate representations for program code conversion |
GB0315844D0 (en) * | 2003-07-04 | 2003-08-13 | Transitive Ltd | Method and apparatus for performing adjustable precision exception handling |
US7805710B2 (en) * | 2003-07-15 | 2010-09-28 | International Business Machines Corporation | Shared code caching for program code conversion |
GB0316532D0 (en) * | 2003-07-15 | 2003-08-20 | Transitive Ltd | Method and apparatus for partitioning code in program code conversion |
EP1866759B1 (en) | 2005-03-30 | 2012-06-13 | International Business Machines Corporation | Preparing instruction groups in a processor having multiple issue ports |
GB2425372B (en) * | 2005-04-20 | 2007-06-13 | Transitive Ltd | Method and apparatus for precise handling of exceptions during program code conversion |
GB2427045B (en) * | 2005-06-06 | 2007-11-21 | Transitive Ltd | Method and apparatus for converting program code with access coordination for a shared resource |
US20070294675A1 (en) * | 2006-06-20 | 2007-12-20 | Transitive Limited | Method and apparatus for handling exceptions during binding to native code |
GB2448523B (en) * | 2007-04-19 | 2009-06-17 | Transitive Ltd | Apparatus and method for handling exception signals in a computing system |
GB2457341B (en) * | 2008-02-14 | 2010-07-21 | Transitive Ltd | Multiprocessor computing system with multi-mode memory consistency protection |
-
2006
- 2006-10-10 US US11/546,012 patent/US20070294675A1/en not_active Abandoned
-
2007
- 2007-06-19 GB GB0711837A patent/GB2439443B/en not_active Expired - Fee Related
- 2007-06-19 CN CN200780023140.9A patent/CN101473303B/en active Active
- 2007-06-19 JP JP2009515965A patent/JP4954281B2/en active Active
- 2007-06-19 EP EP07733764A patent/EP2035926B1/en active Active
- 2007-06-19 WO PCT/GB2007/050343 patent/WO2007148132A1/en active Application Filing
- 2007-06-19 US US11/820,480 patent/US8458674B2/en active Active
- 2007-06-20 TW TW096122074A patent/TWI427535B/en active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020032718A1 (en) * | 1996-01-29 | 2002-03-14 | John S. Yates | Method and apparatus for maintaining translated routine stack in a binary translation enviroment |
US6314560B1 (en) * | 1998-07-02 | 2001-11-06 | Hewlett-Packard Company | Method and apparatus for a translation system that aggressively optimizes and preserves full synchronous exception state |
US20020100030A1 (en) * | 1998-10-10 | 2002-07-25 | Victoria University Of Manchester | Program code conversion |
US20020092002A1 (en) * | 1999-02-17 | 2002-07-11 | Babaian Boris A. | Method and apparatus for preserving precise exceptions in binary translated code |
US20050015781A1 (en) * | 2003-07-15 | 2005-01-20 | Alex Brown | Method and apparatus for performing native binding |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080005724A1 (en) * | 2006-06-20 | 2008-01-03 | Transitive Limited | Method and apparatus for handling exceptions during binding to native code |
US8458674B2 (en) * | 2006-06-20 | 2013-06-04 | International Business Machines Corporation | Method and apparatus for handling exceptions during binding to native code |
US20130173887A1 (en) * | 2006-07-06 | 2013-07-04 | Imperas Software Ltd. | Processor simulation environment |
US9658849B2 (en) * | 2006-07-06 | 2017-05-23 | Imperas Software Ltd. | Processor simulation environment |
US7552405B1 (en) * | 2007-07-24 | 2009-06-23 | Xilinx, Inc. | Methods of implementing embedded processor systems including state machines |
US20110161736A1 (en) * | 2009-12-28 | 2011-06-30 | Ryuji Orita | Debugging module to load error decoding logic from firmware and to execute logic in response to an error |
US8504875B2 (en) * | 2009-12-28 | 2013-08-06 | International Business Machines Corporation | Debugging module to load error decoding logic from firmware and to execute logic in response to an error |
US11010227B2 (en) * | 2017-06-12 | 2021-05-18 | Ping An Technology (Shenzhen) Co., Ltd. | Exception stack information acquisition method and device and computer-readable storage medium |
CN109558292A (en) * | 2017-09-26 | 2019-04-02 | 阿里巴巴集团控股有限公司 | A kind of monitoring method and device |
Also Published As
Publication number | Publication date |
---|---|
TW200813838A (en) | 2008-03-16 |
EP2035926B1 (en) | 2013-02-27 |
US8458674B2 (en) | 2013-06-04 |
CN101473303A (en) | 2009-07-01 |
JP2009541834A (en) | 2009-11-26 |
WO2007148132A1 (en) | 2007-12-27 |
JP4954281B2 (en) | 2012-06-13 |
EP2035926A1 (en) | 2009-03-18 |
US20080005724A1 (en) | 2008-01-03 |
GB2439443B (en) | 2008-12-17 |
GB2439443A (en) | 2007-12-27 |
TWI427535B (en) | 2014-02-21 |
CN101473303B (en) | 2012-08-22 |
GB0711837D0 (en) | 2007-07-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20070294675A1 (en) | Method and apparatus for handling exceptions during binding to native code | |
JP5182815B2 (en) | Method for accurately handling exceptions in program code conversion, and apparatus and computer program thereof | |
US7260815B1 (en) | Method and apparatus for managing registers in a binary translator | |
US7962900B2 (en) | Converting program code with access coordination for a shared memory | |
US6314560B1 (en) | Method and apparatus for a translation system that aggressively optimizes and preserves full synchronous exception state | |
EP2165258B1 (en) | Apparatus and method for handling exception signals in a computing system | |
US20080077909A1 (en) | Enabling multiple instruction stream/multiple data stream extensions on microprocessors | |
US7685579B2 (en) | Method and apparatus for performing adjustable precision exception handling | |
US20100017581A1 (en) | Low overhead atomic memory operations | |
US7770169B2 (en) | Thread rendezvous for read-only code in an object-oriented computing environment | |
KR101244069B1 (en) | Method and apparatus for precise handling of exceptions during program code conversion | |
US8286144B2 (en) | Administering a process filesystem with respect to program code conversion | |
US20060253271A1 (en) | Method for facilitating transformation of multi-threaded process-oriented object code to event-based object code | |
WO2002071211A2 (en) | Data processor having multiple operating modes | |
JP2001175487A (en) | Data flow algorithm for symbol arithmetic operation of least upper boundary(lub) type | |
US20090217014A1 (en) | Processor, memory device, processing device, and method for processing instruction | |
Paul et al. | A Generic Operating System Kernel |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AS | Assignment |
Owner name: TRANSITIVE LIMITED, UNITED KINGDOM Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:BARRACLOUGH, GAVIN;WAN, KIT MAN;HUMMAIDA, ABDUL RAHMAN;REEL/FRAME:018639/0062 Effective date: 20061207 |
|
STCB | Information on status: application discontinuation |
Free format text: EXPRESSLY ABANDONED -- DURING EXAMINATION |
|
AS | Assignment |
Owner name: IBM UNITED KINGDOM LIMITED, ENGLAND Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:TRANSITIVE LIMITED;REEL/FRAME:022824/0715 Effective date: 20090529 Owner name: IBM UNITED KINGDOM LIMITED,ENGLAND Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:TRANSITIVE LIMITED;REEL/FRAME:022824/0715 Effective date: 20090529 |
|
AS | Assignment |
Owner name: IBM CORPORATION, NEW YORK Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:IBM UNITED KINGDOM LIMITED;REEL/FRAME:022928/0190 Effective date: 20090626 Owner name: IBM CORPORATION,NEW YORK Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:IBM UNITED KINGDOM LIMITED;REEL/FRAME:022928/0190 Effective date: 20090626 |
|
AS | Assignment |
Owner name: INTERNATIONAL BUSINESS MACHINES CORPORATION, NEW Y Free format text: CORRECTIVE ASSIGNMENT TO CORRECT THE ASSIGNEE NAME PREVIOUSLY RECORDED ON REEL 022928 FRAME 0190. ASSIGNOR(S) HEREBY CONFIRMS THE RECEIVING PARTY;ASSIGNOR:IBM UNITED KINGDOM LIMITED;REEL/FRAME:031085/0824 Effective date: 20090626 |