×

Tracking condition codes in translation code for different machine architectures

  • US 5,598,560 A
  • Filed: 03/07/1991
  • Issued: 01/28/1997
  • Est. Priority Date: 03/07/1991
  • Status: Expired due to Term
First Claim
Patent Images

1. A method of processing input computer code by a computer in a code translator to produce translated code, comprising the steps of:

  • accessing and parsing said code by said computer to generate a flow graph in an intermediate language from said code, the flow graph being a data structure composed of blocks, and the blocks being composed of intermediate-- language elements, where each element represents a single expression in said code, and where each block represents a sequence of one or more elements with no intermediate entry or exit;

    tracing through each said block of elements in a reverse direction from its exit to its entry to detect any elements which read or set condition codes, where said condition codes represent bits set in a status register in a processor executing said computer code;

    producing from those detected elements which read condition codes a first set of condition codes;

    removing from the first set those condition codes which are set by other detected elements to produce a second required set of required condition codes; and

    generating from the required set instructions in said translated code to set the required condition codes to simulate reading and setting of the condition codes.

View all claims
  • 3 Assignments
Timeline View
Assignment View
    ×
    ×