摘要 |
PURPOSE:To evade advanced control having a branch as much as possible by converting a part if-then-else-in a source program into a form CALL FUN (r, x, y); .... CONSTITUTION:Hardware instructions FUN r1, OP2, and OP3 which compare the value of an operand OP2 with the value of an operand OP2 and set 1 in a general register r1 when the operand OP2 is larger than the operand OP3 or 0 when not are defined. When a statement ''if (comparision expression) then (variable 1):=(expression 1); else (variable 2):=(expression 2); is compiled, the part of (comparison expression) is analyzed; when it is converted equivalently into x>y, the statement is converted into CALL FUN (r, x, y); (variable 1):=(variable 1)*(1-r)+(expression 1)*r; (variable 2):=(variable 2)*(1-r); and this statement is translated into machine words. |