TriCore
®
TC1.6P & TC1.6E
32-bit Unified Processor Core
Instruction Set
V1.0 2013-07
User Manual (Volume 2) 3-88
if (divisor == 0) then {
quotient = 0xffffffff;
remainder = 0x00000000;
} else {
remainder = dividend % divisor
quotient = (dividend - remainder)/divisor
}
E[c][31:0] = quotient;
E[c][63:32] = remainder;
Status Flags
Examples
-
See Also
DIV.F
C Not set by these instructions.
VDIV
if ((D[b] == 0) OR ((D[b] == 32’hFFFFFFFF) AND (D[a] == 32’h80000000))) then overflow = 1 else
overflow = 0;
if overflow then PSW.V = 1 else PSW.V = 0;
DIV.U
if (D[b] == 0) then overflow = 1 else overflow = 0;
if overflow then PSW.V = 1 else PSW.V = 0;
SV if (overflow) then PSW.SV = 1 else PSW.SV = PSW.SV;
AV PSW.AV = 0;
SAV Not set by these instructions.