Accelerator Manual (G06.27+, H06.04+, J06.03+)
Preparing Your Program for the Accelerator
Accelerator Manual—527303-003
3-6
Arithmetic Left-Shift Sign Bit
Arithmetic Left-Shift Sign Bit
In TNS object code (on both TNS and TNS/R processors), arithmetic left-shift
operations preserve the existing sign bit and shift the remaining bits. The operation
discards data shifted out from bit one. An arithmetic left-shift operation loses significant
bits of the arithmetic value if it tries to change the sign bit (bit zero). This loss of
significant bits is a kind of overflow, although the system never traps.
In accelerated object code, an arithmetic left-shift operation does not preserve the sign
bit. Instead, bit zero is included in the bits being shifted. The results might differ from
Figure 3-1. Passing Parameters in Registers
Inherits Registers
Procedure Alpha passes a value in register 7 to procedure Beta. Procedure Beta
assumes that it inherits one register. The Accelerator emits Warning 34 for
procedure Beta. Specify "InheritsR7 Beta" to get a correctly accelerated program.
Returns Registers
Procedure Beta returns a value in register 7 to procedure Alpha. Procedure Alpha
assumes that it inherits one register. The Accelerator emits Warning 34 for
procedure Alpha. Specify "ReturnsR7 Beta" to get a correctly accelerated program.
INT X;
PROC Alpha;
BEGIN
USE A;
A:=4;
CALL Beta;
END;
PROC Beta;
BEGIN
USE B;
X:=B;
END;
VST0301.vdd
4
4
R0
R1
R2
R3
R4
R5
R6
R7
4
R0
R1
R2
R3
R4
R5
R6
R7
INT X;
PROC Alpha;
BEGIN
CALL Beta;
USE A;
X:=A;
END;
PROC Beta;
BEGIN
USE B;
B:=4;
END;