METHOD AND APPARATUS FOR COMPILING CODE IN A COMPUTER SYSTEMHAVING A LIMITED NUMBER OF REGISTERS

    公开(公告)号:CA2074615A1

    公开(公告)日:1994-01-25

    申请号:CA2074615

    申请日:1992-07-24

    Applicant: IBM CANADA

    Abstract: AN IMPROVED METHOD AND APPARATUS FOR COMPILING CODE IN A COMPUTER SYSTEM HAVING A LIMITED NUMBER OF REGISTERS Computer software developers have avoided using register oriented linkage conventions in systems having a limited number of registers where the programs to be compiled may include an indeterminate number of parameters of differing types. By creating a formal parameter descriptor with each call being processed that includes an indeterminate number and type of parameters, the program may be compiled using a register oriented linkage convention. The formal parameter descriptor is located in a location accessible to the executing subprogram but unaffected by it. The invention is particularly useful for compiling unprototyped C language programs using processors having limited registers such as the Intel? 80x86 processors.

    RUNTIME CODE MODIFICATION IN A MULTI-THREADED ENVIRONMENT

    公开(公告)号:CA2557343C

    公开(公告)日:2015-09-22

    申请号:CA2557343

    申请日:2006-08-28

    Applicant: IBM CANADA

    Abstract: Methods, computer program products and data processing systems for modifying a code region forming part of a computer program during execution of the computer program by a plurality of threads. In one aspect, identical modification instructions are provided to each thread for modifying a site in the code region having a desirable idempotent atomic modification, and the modification instructions direct each thread to make the desirable idempotent atomic modification. In another aspect, a thread is selected to modify the code region, each thread other than the selected thread is directed to execute an alternative execution path that generates output identical to the output of the code region after the code region has been modified, and, responsive to directing each thread other than the selected thread, the selected thread is directed to modify the code region.

    EFFICIENT VIRTUAL FUNCTION CALL FOR COMPILED/INTERPRETED ENVIRONMENTS

    公开(公告)号:CA2355990A1

    公开(公告)日:2003-02-27

    申请号:CA2355990

    申请日:2001-08-27

    Applicant: IBM CANADA

    Abstract: Virtual function calls in hybrid compiled and interpreted computer programmi ng environments are carried out efficiently by dual virtual function tables. Each class object generated is provided with a compiled virtual function table and an interpreted virtual function table. Each table is symmetrically structured and contiguous with the class object. Calls from an interpreted function access the interpreted virtual function table. Entries in that table point t o function data structures which provide for the interpretation of the called function, or for transfer to execution of a compiled version of the called function. Calls from a compiled function access the compiled virtual function table. Entries in the compiled virtual function table point to either executable code representing the called function, or to transition code for transition to the interpreter to interpret the called function.

    Method and Mechanism for Calling 32-Bit Functions from 16-Bit Functions

    公开(公告)号:CA2093451A1

    公开(公告)日:1994-10-07

    申请号:CA2093451

    申请日:1993-04-06

    Applicant: IBM CANADA

    Abstract: In the field of mixed 16-bit and 32-bit code, a method and mechanism are provided to implement alterations in the dynamic portion of memory containing the data objects used by code in the 16-bit environment so that such data is accessible to code from the 32-bit environment. The code necessary to implement the method is generated automatically by an enhanced compiler on identifying 16-bit linkage in the 32-bit code. Once the data objects in the stack are accesible to the 32-bit code, a function in the 16-bit code can successfully call a function in 32-bit code.

    RUNTIME CODE MODIFICATION IN A MULTI-THREADED ENVIRONMENT

    公开(公告)号:CA2557343A1

    公开(公告)日:2008-02-28

    申请号:CA2557343

    申请日:2006-08-28

    Applicant: IBM CANADA

    Abstract: Methods, computer program products and data processing systems for modifying a code region forming part of a computer program during execution of the computer program by a plurality of threads. In one aspect, identical modification instructions are provided to each thread for modifying a site in the code region having a desirable idempotent atomic modification, and the modification instructions direct each thread to make the desirable idempotent atomic modification. In another aspect, a thread is selected to modify the code region, each thread other than the selected thread is directed to execute an alternative execution path that generates output identical to the output of the code region after the code region has been modified, and, responsive to directing each thread other than the selected thread, the selected thread is directed to modify the code region.

    TRANSFORMING LOCKS IN SOFTWARE LOOPS

    公开(公告)号:CA2442800A1

    公开(公告)日:2005-03-26

    申请号:CA2442800

    申请日:2003-09-26

    Applicant: IBM CANADA

    Abstract: An improved method and system for acquisition and release of locks within a software program is disclosed. In an exemplary embodiment, a lock within a loop is transformed by relocating acquisition and release instructions from within the loop to positions outside the loop. This may significantly decrease unnecessarily lock acquisition and release during execution of the software program. In order to avoid contention problems which may arise from acquiring and keeping a lock on an object over a relatively long period of time, a contention test may be inserted into the loop. Such a contention test may temporarily release the lock if another thread in the software program requires access to the locked object.

    EFFICIENT LOCKING FOR THREAD-SAFE SELF-MODIFYING CODE

    公开(公告)号:CA2346766A1

    公开(公告)日:2002-11-07

    申请号:CA2346766

    申请日:2001-05-07

    Applicant: IBM CANADA

    Abstract: A locking mechanism for use in a multi-thread environment supporting self- modifying code in which modifications to the code are made at runtime. The locking mechanism having associated helper code accessed by a call from the first instruction address in the code block . The helper code calculating the binary encoding for the call instruction and using an atomic compare and exchange instruction to compare the calculated binary encoding with the actual conten ts of the first instruction address. Where there is a match, a self loop instruction is written to the first instruction address to lock the specified code block for subsequent threads. The helper code contai ns instructions to resolve the references in the specified block. The last such instruction is an atomic store operation to replace the self loop instruction at the first instruction address with t he appropriate modified instruction.

    COMPILER GENERATION OF INSTRUCTION SEQUENCES FOR UNRESOLVED STORAGE DEVICES

    公开(公告)号:CA2346762A1

    公开(公告)日:2002-11-07

    申请号:CA2346762

    申请日:2001-05-07

    Applicant: IBM CANADA

    Inventor: STOODLEY KEVIN A

    Abstract: A compiler component for the generation of an optimal instruction sequence, the sequence including a compile-time unresolved reference to be resolved at runtime. The compiler generating a snippet list with entries corresponding to snippets defined for instructions includi ng unresolved compile-time references. A runtime helper routine being defined for resolving references at runtime. For each instruction with an unresolved reference, generating a snippet including dat a for identifying the reference and for permitting resolution of the reference at runtime by the runtime helper routine. The snippet also including a copy of the instruction containing the unresolved reference. The location in the compiled code for the unresolved instruction being written with a cal l instruction to the snippet. The runtime helper being invoked by the snippet at runtime to resol ve the references and to copy the unresolved code copy to the compiled code, with the references resolved.

Patent Agency Ranking