发明名称 Using condition codes in the presence of non-numeric values
摘要 Systems and methods for compiling programs using condition codes and executing those programs when non-numeric values are present allow for explicit handling of non-numeric values. In addition to the conventional condition code values of positive, negative, and zero, a fourth value may be encoded, not a number (NaN) representing a non-numeric value. New condition tests are defined that explicitly account for condition code values of NaN. A compiler may produce code using the new condition tests to represent if and if-else statements. The code including the new condition tests generates deterministic results during execution when non-numeric values are present.
申请公布号 US9195460(B1) 申请公布日期 2015.11.24
申请号 US200611415781 申请日期 2006.05.02
申请人 NVIDIA CORPORATION 发明人 Glanville Robert Steven;Lindholm John Erik;Siu Ming Y.
分类号 G06F9/45;G06F9/30 主分类号 G06F9/45
代理机构 Artegis Law Group, LLP 代理人 Artegis Law Group, LLP
主权项 1. A computer-implemented method of generating a sequence of commands for explicit handling of non-numeric values, comprising: detecting an if statement including an if condition test and if code for execution when the if condition test is true; inserting, in the sequence of commands, a first comparison operation command that, when executed by a processing unit, compares a first source operand and a second source operand to produce a condition code value; selecting a first condition test from a set of condition tests based on the if condition test, wherein the set of condition tests includes at least one condition test that evaluates to true when at least one of the first source operand or the second source operand is not a number (NaN); and inserting a predicated arithmetic/logic command after the first comparison operation command, wherein the predicated arithmetic/logic command includes an arithmetic/logic operation, the first condition test, and the condition code value and deterministically executes or refrains from executing the arithmetic/logic operation based on the at least one condition test.
地址 Santa Clara CA US