Module forall
- Definitions available to all occam-pi programs
Definitions available to all occam-pi programs.
The definitions in this module are provided by the compiler or the support library, and are automatically made available for all programs. It is not necessary to explicitly include forall.module
.
Index
- Function
ARGUMENT.REDUCE
- Function
ARGUMENT.REDUCE
-
Function
ASHIFTLEFT
- Arithmetic left shift on a double length quantity -
Function
ASHIFTRIGHT
- Arithmetic right shift on a double length quantity -
Process
ASSERT
- Causes an error if a condition is false -
Process
BIND.MOBILE
- Bind a piece of (virtual) memory to a mobile -
Process
BIND.MOBILE.HW
- Bind a piece of physical memory to a mobile -
Process
CAUSEERROR
- Set the error flag - Function
COPYSIGN
- Function
DARGUMENT.REDUCE
- Function
DARGUMENT.REDUCE
- Function
DCOPYSIGN
-
Process
DECPRI
- Obsolete synonym for - Function
DFLOATING.UNPACK
- Function
DFLOATING.UNPACK
- Function
DIEEECOMPARE
- Function
DLOGB
- Function
DLOGB
-
Function
DMA.CAPABLE
- Test whether a mobile is DMA capable - Function
DNEXTAFTER
- Function
DNEXTAFTER
- Function
DSCALEB
- Function
DSCALEB
- Function
FLOATING.UNPACK
- Function
FLOATING.UNPACK
-
Process
GETAFF
- Get the affinity of the current process -
Process
GETPRI
- Get the priority level of the current process - Function
IEEE32OP
- Function
IEEE32OP
- Function
IEEE32REM
- Function
IEEE32REM
- Function
IEEE32REM
- Function
IEEE64OP
- Function
IEEE64OP
- Function
IEEE64REM
- Function
IEEE64REM
- Function
IEEE64REM
- Function
IEEECOMPARE
-
Process
INCPRI
- Obsolete synonym for - Function
INT16ADD
- Function
INT16BITAND
- Function
INT16BITNOT
- Function
INT16BITOR
- Function
INT16DIV
- Function
INT16EQ
- Function
INT16GT
- Function
INT16LSHIFT
- Function
INT16MINUS
- Function
INT16MUL
- Function
INT16PLUS
- Function
INT16REM
- Function
INT16RSHIFT
- Function
INT16SUB
- Function
INT16TIMES
- Function
INT16TOINT32
- Function
INT16TOINT64
- Function
INT16TOREAL32
- Function
INT16TOREAL64
- Function
INT16XOR
- Function
INT32ADD
- Function
INT32BITAND
- Function
INT32BITNOT
- Function
INT32BITOR
- Function
INT32DIV
- Function
INT32DIVREM
- Function
INT32EQ
- Function
INT32GT
- Function
INT32LSHIFT
- Function
INT32MINUS
- Function
INT32MUL
- Function
INT32PLUS
- Function
INT32REM
- Function
INT32RSHIFT
- Function
INT32SUB
- Function
INT32TIMES
- Function
INT32TOINT16
- Function
INT32TOINT64
- Function
INT32XOR
- Function
INT64ADD
- Function
INT64BITAND
- Function
INT64BITNOT
- Function
INT64BITOR
- Function
INT64DIV
- Function
INT64DIV
- Function
INT64DIVREM
- Function
INT64DIVREM
- Function
INT64EQ
- Function
INT64LSHIFT
- Function
INT64MINUS
- Function
INT64MUL
- Function
INT64MUL
- Function
INT64PLUS
- Function
INT64REM
- Function
INT64REM
- Function
INT64RSHIFT
- Function
INT64SUB
- Function
INT64TIMES
- Function
INT64TOINT16
- Function
INT64TOINT32
- Function
INT64XOR
-
Process
KILLCALL
- Kill a blocking FFI call - Function
LOGB
- Function
LOGB
-
Function
LONGADD
- Signed addition with a carry in -
Function
LONGDIFF
- Unsigned subtraction with a borrow in and a borrow out -
Function
LONGDIV
- Unsigned division of a double length number, producing a single length result -
Function
LONGPROD
- Unsigned multiplication with a carry in, producing a double length result -
Function
LONGSUB
- Signed subtraction with a borrow in -
Function
LONGSUM
- Unsigned addition with a carry in and carry out -
Process
LOWER.PRIORITY
- Lower the priority of the current process by one level -
Process
MAKE.DMA.CAPABLE
- Move a mobile to DMA capable memory -
Process
MEMORY.BARRIER
- Generate a read-write memory barrier - Function
MINUSX
- Process
MPBARRESIGN
- Process
MPBARSYNC
- Process
MPP.CHECKROUTINE
- Process
MPP.DESERIALISE
- Process
MPP.LOADLIBRARY
- Process
MPP.SERIALISE
- Process
MPP.UNLOADLIBRARY
- Function
NEXTAFTER
- Function
NEXTAFTER
-
Function
NORMALISE
- Normalise a double length quantity - Function
NOTFINITE
- Function
QRealIDiv
- Process
QRealIMul
- Process
QUADNORMALISE
- Process
QUADSHIFTLEFT
- Process
QUADSHIFTRIGHT
-
Process
RAISE.PRIORITY
- Raise the priority of the current process by one level -
Process
READ.MEMORY.BARRIER
- Generate a read memory barrier - Function
REAL32EQ
- Function
REAL32EQ
- Function
REAL32EQ
- Function
REAL32GT
- Function
REAL32GT
- Function
REAL32GT
- Function
REAL32OP
- Function
REAL32OP
- Function
REAL32REM
- Function
REAL32REM
- Function
REAL32REM
- Function
REAL32TOINT16
- Function
REAL64EQ
- Function
REAL64EQ
- Function
REAL64EQ
- Function
REAL64GT
- Function
REAL64GT
- Function
REAL64GT
- Function
REAL64OP
- Function
REAL64OP
- Function
REAL64REM
- Function
REAL64REM
- Function
REAL64REM
- Function
REAL64TOINT16
-
Process
RESCHEDULE
- Force rescheduling -
Process
RESIZE.MOBILE.ARRAY.1D
- Resize a 1D mobile array -
Function
ROTATELEFT
- Rotate a word left -
Function
ROTATERIGHT
- Rotate a word right - Function
ROUNDSN
-
Function
RealIDiv
- Perform an unsigned part divide operation - Function
RealIMul
- Function
SCALEB
- Function
SCALEB
-
Process
SETAFF
- Set the affinity of the current process -
Process
SETPRI
- Set the priority level of the current process -
Function
SHIFTLEFT
- Left shift on a double length quantity -
Function
SHIFTRIGHT
- Right shift on a double length quantity -
Function
UNPACKSN
- Unpack a real number in IEEE single precision format -
Function
VSSIZEOF
- Calculate the vectorspace size (in words) of a process -
Process
WAIT.FOR.INTERRUPT
- Wait for a hardware interrupt -
Process
WRITE.MEMORY.BARRIER
- Generate a write memory barrier -
Function
WSSIZEOF
- Calculate the workspace size (in words) of a process
Declarations
r32toi16.occ
:37Function REAL32TOINT16
INT16 FUNCTION REAL32TOINT16 (VAL INT Mode, VAL REAL32 X)
i64mul.occ
:33Function INT64MUL
INT64 FUNCTION INT64MUL (VAL INT64 U, V)
i64mul.occ
:115Function INT64MUL
INT64 FUNCTION INT64MUL (VAL INT64 U, V)
i16mul.occ
:33Function INT16MUL
INT16 FUNCTION INT16MUL (VAL INT16 A, VAL INT16 B)
i32times.occ
:33Function INT32TIMES
INT32 FUNCTION INT32TIMES (VAL INT32 A, VAL INT32 B)
i16eq.occ
:35Function INT16EQ
BOOL FUNCTION INT16EQ (VAL INT16 A, B)
i32rshft.occ
:33Function INT32RSHIFT
INT32 FUNCTION INT32RSHIFT (VAL INT32 A, VAL INT B)
qnorm.occ
:35Process QUADNORMALISE
PROC QUADNORMALISE (INT Places, [4]INT X.out, INT Guard.out, VAL [4]INT X.in, VAL INT Guard.in)
i16sub.occ
:35Function INT16SUB
INT16 FUNCTION INT16SUB (VAL INT16 A, B)
i32toi16.occ
:33Function INT32TOINT16
INT16 FUNCTION INT32TOINT16 (VAL INT32 A)
ie64rem.occ
:33Function IEEE64REM
BOOL, REAL64 FUNCTION IEEE64REM (VAL REAL64 X, VAL REAL64 Y)
ie64rem.occ
:51Function IEEE64REM
BOOL, REAL64 FUNCTION IEEE64REM (VAL REAL64 X, Y)
ie64rem.occ
:278Function IEEE64REM
BOOL, REAL64 FUNCTION IEEE64REM (VAL REAL64 X, Y)
i16tor32.occ
:37Function INT16TOREAL32
REAL32 FUNCTION INT16TOREAL32 (VAL INT16 N)
dcpysign.occ
:31Function DCOPYSIGN
REAL64 FUNCTION DCOPYSIGN (VAL REAL64 Y, Z)
r32rem.occ
:35Function REAL32REM
REAL32 FUNCTION REAL32REM (VAL REAL32 X, Y)
r32rem.occ
:93Function REAL32REM
REAL32 FUNCTION REAL32REM (VAL REAL32 X, Y)
r32rem.occ
:301Function REAL32REM
REAL32 FUNCTION REAL32REM (VAL REAL32 X, Y)
rscaleb.occ
:35Function SCALEB
REAL32 FUNCTION SCALEB (VAL REAL32 Y, VAL INT n)
rscaleb.occ
:89Function SCALEB
REAL32 FUNCTION SCALEB (VAL REAL32 Y, VAL INT n)
i32toi64.occ
:33Function INT32TOINT64
INT64 FUNCTION INT32TOINT64 (VAL INT32 B)
dfunpack.occ
:35Function DFLOATING.UNPACK
INT, REAL64 FUNCTION DFLOATING.UNPACK (VAL REAL64 Y)
dfunpack.occ
:114Function DFLOATING.UNPACK
INT, REAL64 FUNCTION DFLOATING.UNPACK (VAL REAL64 Y)
rminusx.occ
:33Function MINUSX
REAL32 FUNCTION MINUSX (VAL REAL32 Y)
occampi.occ
:43Process MPBARSYNC
PROC MPBARSYNC () SUSPEND
occampi.occ
:111Process MPBARRESIGN
PROC MPBARRESIGN () SUSPEND
occampi.occ
:138Process MPP.SERIALISE
PROC MPP.SERIALISE (MOBILE.PROC p, RESULT MOBILE []BYTE r)
occampi.occ
:147Process MPP.DESERIALISE
PROC MPP.DESERIALISE (MOBILE []BYTE r, RESULT MOBILE.PROC p)
occampi.occ
:157Process MPP.CHECKROUTINE
PROC MPP.CHECKROUTINE (VAL []BYTE n, RESULT BOOL a)
occampi.occ
:167Process MPP.LOADLIBRARY
PROC MPP.LOADLIBRARY (VAL []BYTE l, RESULT BOOL r)
occampi.occ
:176Process MPP.UNLOADLIBRARY
PROC MPP.UNLOADLIBRARY (VAL []BYTE l, RESULT BOOL r)
ie32op.occ
:40Function IEEE32OP
BOOL, REAL32 FUNCTION IEEE32OP (VAL REAL32 X, VAL INT RoundMode, Op, VAL REAL32 Yp)
ie32op.occ
:449Function IEEE32OP
BOOL, REAL32 FUNCTION IEEE32OP (VAL REAL32 X, VAL INT RoundMode, Op, VAL REAL32 Yp)
r32op.occ
:52Function REAL32OP
REAL32 FUNCTION REAL32OP (VAL REAL32 X, VAL INT Op, VAL REAL32 Y)
r32op.occ
:102Function REAL32OP
REAL32 FUNCTION REAL32OP (VAL REAL32 X, VAL INT Op, VAL REAL32 Y)
i16tor64.occ
:37Function INT16TOREAL64
REAL64 FUNCTION INT16TOREAL64 (VAL INT16 N)
i64toi32.occ
:33Function INT64TOINT32
INT32 FUNCTION INT64TOINT32 (VAL INT64 B)
rnxtaftr.occ
:38Function NEXTAFTER
REAL32 FUNCTION NEXTAFTER (VAL REAL32 Y, Z)
rnxtaftr.occ
:129Function NEXTAFTER
REAL32 FUNCTION NEXTAFTER (VAL REAL32 Y, Z)
i32band.occ
:33Function INT32BITAND
INT32 FUNCTION INT32BITAND (VAL INT32 A, VAL INT32 B)
rfunpack.occ
:35Function FLOATING.UNPACK
INT, REAL32 FUNCTION FLOATING.UNPACK (VAL REAL32 Y)
rfunpack.occ
:104Function FLOATING.UNPACK
INT, REAL32 FUNCTION FLOATING.UNPACK (VAL REAL32 Y)
i16band.occ
:36Function INT16BITAND
INT16 FUNCTION INT16BITAND (VAL INT16 A, B)
dnxtaftr.occ
:38Function DNEXTAFTER
REAL64 FUNCTION DNEXTAFTER (VAL REAL64 Y, Z)
dnxtaftr.occ
:152Function DNEXTAFTER
REAL64 FUNCTION DNEXTAFTER (VAL REAL64 Y, Z)
qshiftl.occ
:35Process QUADSHIFTLEFT
PROC QUADSHIFTLEFT ([4]INT X.out, INT Guard.out, VAL [4]INT X.in, VAL INT Guard.in, Places)
r64eq.occ
:35Function REAL64EQ
BOOL FUNCTION REAL64EQ (VAL REAL64 X, Y)
r64eq.occ
:70Function REAL64EQ
BOOL FUNCTION REAL64EQ (VAL REAL64 X, Y)
r64eq.occ
:116Function REAL64EQ
BOOL FUNCTION REAL64EQ (VAL REAL64 X, Y)
i32lshft.occ
:33Function INT32LSHIFT
INT32 FUNCTION INT32LSHIFT (VAL INT32 A, VAL INT B)
i16toi64.occ
:33Function INT16TOINT64
INT64 FUNCTION INT16TOINT64 (VAL INT16 B)
i16plus.occ
:52Function INT16PLUS
INT16 FUNCTION INT16PLUS (VAL INT16 A, B)
i32add.occ
:33Function INT32ADD
INT32 FUNCTION INT32ADD (VAL INT32 A, VAL INT32 B)
i32divrm.occ
:36Function INT32DIVREM
INT32, INT32 FUNCTION INT32DIVREM (VAL INT32 Dvd, VAL INT32 Dvsr)
i32divrm.occ
:232Function INT32DIV
INT32 FUNCTION INT32DIV (VAL INT32 Dvd, VAL INT32 Dvsr)
i32divrm.occ
:259Function INT32REM
INT32 FUNCTION INT32REM (VAL INT32 Dvd, VAL INT32 Dvsr)
i32sub.occ
:33Function INT32SUB
INT32 FUNCTION INT32SUB (VAL INT32 A, VAL INT32 B)
ridiv.occ
:40Function RealIDiv
INT, INT, INT FUNCTION RealIDiv (VAL INT Hi, Lo, Guard, VAL [2]INT Yfrac)
Perform an unsigned part divide operation.
Parameters:
VAL INT |
Hi |
the most significant word of the dividend |
VAL INT |
Lo |
the middle word of the dividend |
VAL INT |
Guard |
the least significant word of the dividend |
VAL [2]INT |
Yfrac |
the two words of the divisor |
Returns:
INT |
the quotient | |
INT |
the most significant word of the remainder | |
INT |
the least significant word of the remainder |
i16rshft.occ
:53Function INT16RSHIFT
INT16 FUNCTION INT16RSHIFT (VAL INT16 A, VAL INT B)
qridiv.occ
:35Function QRealIDiv
INT, INT, INT, INT, INT FUNCTION QRealIDiv (VAL INT Dv3.in, Dv2.in, Dv1.in, Dv0.in, Guard.in, VAL [4]INT Yfrac)
rnotfnte.occ
:35Function NOTFINITE
BOOL FUNCTION NOTFINITE (VAL REAL32 X)
i64bor.occ
:33Function INT64BITOR
INT64 FUNCTION INT64BITOR (VAL INT64 B, C)
dscaleb.occ
:35Function DSCALEB
REAL64 FUNCTION DSCALEB (VAL REAL64 Y, VAL INT n)
dscaleb.occ
:95Function DSCALEB
REAL64 FUNCTION DSCALEB (VAL REAL64 Y, VAL INT n)
i64rshft.occ
:33Function INT64RSHIFT
INT64 FUNCTION INT64RSHIFT (VAL INT64 B, VAL INT Places)
rimul.occ
:31Function RealIMul
INT, INT, INT FUNCTION RealIMul (VAL [2]INT X, Y)
i64minus.occ
:33Function INT64MINUS
INT64 FUNCTION INT64MINUS (VAL INT64 A, B)
r64gt.occ
:35Function REAL64GT
BOOL FUNCTION REAL64GT (VAL REAL64 X, Y)
r64gt.occ
:70Function REAL64GT
BOOL FUNCTION REAL64GT (VAL REAL64 X, Y)
r64gt.occ
:143Function REAL64GT
BOOL FUNCTION REAL64GT (VAL REAL64 X, Y)
rlogb.occ
:35Function LOGB
REAL32 FUNCTION LOGB (VAL REAL32 Y)
rlogb.occ
:77Function LOGB
REAL32 FUNCTION LOGB (VAL REAL32 Y)
i32xor.occ
:33Function INT32XOR
INT32 FUNCTION INT32XOR (VAL INT32 A, VAL INT32 B)
ie32rem.occ
:33Function IEEE32REM
BOOL, REAL32 FUNCTION IEEE32REM (VAL REAL32 X, VAL REAL32 Y)
ie32rem.occ
:51Function IEEE32REM
BOOL, REAL32 FUNCTION IEEE32REM (VAL REAL32 X, Y)
ie32rem.occ
:228Function IEEE32REM
BOOL, REAL32 FUNCTION IEEE32REM (VAL REAL32 X, Y)
i64eq.occ
:33Function INT64EQ
BOOL FUNCTION INT64EQ(VAL INT64 U, V)
i16add.occ
:35Function INT16ADD
INT16 FUNCTION INT16ADD (VAL INT16 A, B)
i16toi32.occ
:33Function INT16TOINT32
INT32 FUNCTION INT16TOINT32 (VAL INT16 A)
rcpysign.occ
:33Function COPYSIGN
REAL32 FUNCTION COPYSIGN (VAL REAL32 Y, Z)
i32eq.occ
:33Function INT32EQ
BOOL FUNCTION INT32EQ (VAL INT32 A, VAL INT32 B)
i32bnot.occ
:33Function INT32BITNOT
INT32 FUNCTION INT32BITNOT (VAL INT32 A)
i16lshft.occ
:52Function INT16LSHIFT
INT16 FUNCTION INT16LSHIFT (VAL INT16 A, VAL INT B)
i16xor.occ
:36Function INT16XOR
INT16 FUNCTION INT16XOR (VAL INT16 A, B)
ie64op.occ
:35Function IEEE64OP
BOOL,REAL64 FUNCTION IEEE64OP (VAL REAL64 X, VAL INT RoundMode, Op, VAL REAL64 Yp)
ie64op.occ
:618Function IEEE64OP
BOOL, REAL64 FUNCTION IEEE64OP (VAL REAL64 X, VAL INT RoundMode, Op, VAL REAL64 Yp)
i64lshft.occ
:33Function INT64LSHIFT
INT64 FUNCTION INT64LSHIFT (VAL INT64 B, VAL INT Places)
dlogb.occ
:35Function DLOGB
REAL64 FUNCTION DLOGB (VAL REAL64 Y)
dlogb.occ
:84Function DLOGB
REAL64 FUNCTION DLOGB (VAL REAL64 Y)
dargred.occ
:35Function DARGUMENT.REDUCE
BOOL, INT32, REAL64 FUNCTION DARGUMENT.REDUCE (VAL REAL64 Y, Z, Z.err)
dargred.occ
:356Function DARGUMENT.REDUCE
BOOL, INT32, REAL64 FUNCTION DARGUMENT.REDUCE (VAL REAL64 Y, Z, Z.err)
i64band.occ
:33Function INT64BITAND
INT64 FUNCTION INT64BITAND (VAL INT64 B, C)
i64divrm.occ
:36Function INT64DIVREM
INT64, INT64 FUNCTION INT64DIVREM (VAL INT64 Dvd, VAL INT64 Dvsr)
i64divrm.occ
:240Function INT64DIV
INT64 FUNCTION INT64DIV (VAL INT64 Dvd, VAL INT64 Dvsr)
i64divrm.occ
:264Function INT64REM
INT64 FUNCTION INT64REM (VAL INT64 Dvd, VAL INT64 Dvsr)
i64divrm.occ
:292Function INT64DIVREM
INT64, INT64 FUNCTION INT64DIVREM (VAL INT64 Dvd, Dvsr)
i64divrm.occ
:642Function INT64DIV
INT64 FUNCTION INT64DIV (VAL INT64 Dvd, VAL INT64 Dvsr)
i64divrm.occ
:666Function INT64REM
INT64 FUNCTION INT64REM (VAL INT64 Dvd, VAL INT64 Dvsr)
i64add.occ
:33Function INT64ADD
INT64 FUNCTION INT64ADD (VAL INT64 A, B)
i32plus.occ
:33Function INT32PLUS
INT32 FUNCTION INT32PLUS (VAL INT32 A, VAL INT32 B)
r64toi16.occ
:37Function REAL64TOINT16
INT16 FUNCTION REAL64TOINT16 (VAL INT Mode, VAL REAL64 X)
r64rem.occ
:35Function REAL64REM
REAL64 FUNCTION REAL64REM (VAL REAL64 X, Y)
r64rem.occ
:94Function REAL64REM
REAL64 FUNCTION REAL64REM (VAL REAL64 X, Y)
r64rem.occ
:333Function REAL64REM
REAL64 FUNCTION REAL64REM (VAL REAL64 X, Y)
qshiftr.occ
:35Process QUADSHIFTRIGHT
PROC QUADSHIFTRIGHT ([4]INT X.out, INT Guard.out, VAL [4]INT X.in, VAL INT Guard.in, Places)
r32eq.occ
:37Function REAL32EQ
BOOL FUNCTION REAL32EQ (VAL REAL32 X, Y)
r32eq.occ
:72Function REAL32EQ
BOOL FUNCTION REAL32EQ (VAL REAL32 X, Y)
r32eq.occ
:124Function REAL32EQ
BOOL FUNCTION REAL32EQ (VAL REAL32 X, Y)
r32gt.occ
:37Function REAL32GT
BOOL FUNCTION REAL32GT (VAL REAL32 X, Y)
r32gt.occ
:74Function REAL32GT
BOOL FUNCTION REAL32GT (VAL REAL32 X, Y)
r32gt.occ
:138Function REAL32GT
BOOL FUNCTION REAL32GT (VAL REAL32 X, Y)
i16times.occ
:52Function INT16TIMES
INT16 FUNCTION INT16TIMES (VAL INT16 A, B)
roundsn.occ
:34Function ROUNDSN
INT FUNCTION ROUNDSN ( VAL INT Yexp, Yfrac, Yguard )
i32mul.occ
:33Function INT32MUL
INT32 FUNCTION INT32MUL (VAL INT32 A, VAL INT32 B)
i64xor.occ
:33Function INT64XOR
INT64 FUNCTION INT64XOR (VAL INT64 B, C)
i32bor.occ
:33Function INT32BITOR
INT32 FUNCTION INT32BITOR (VAL INT32 A, VAL INT32 B)
i64sub.occ
:33Function INT64SUB
INT64 FUNCTION INT64SUB (VAL INT64 A, B)
intrinsics.occ
:44Function LONGADD
INT FUNCTION LONGADD (VAL INT a, b, carry)
Signed addition with a carry in.
(a + b) + carry
Overflow is an error.
Parameters:
VAL INT |
a , b
|
Integers to add. |
VAL INT |
carry |
Carry flag. |
Returns:
INT |
Addition of a and b. |
intrinsics.occ
:55Function LONGSUM
INT, INT FUNCTION LONGSUM (VAL INT a, b, carry)
Unsigned addition with a carry in and carry out.
(a + b) + carry
Parameters:
VAL INT |
a , b
|
Integers to add. |
VAL INT |
carry |
Carry in flag. |
Returns:
INT |
The resulting carry out flag. | |
INT |
The sum of a and b. |
intrinsics.occ
:67Function LONGSUB
INT FUNCTION LONGSUB (VAL INT a, b, borrow)
Signed subtraction with a borrow in.
(b - a) - borrow
Overflow is an error.
Parameters:
VAL INT |
a , b
|
Integers to subtract. |
VAL INT |
borrow |
Borrow flag. |
Returns:
INT |
Subtraction of a and borrow from b. |
intrinsics.occ
:78Function LONGDIFF
INT, INT FUNCTION LONGDIFF (VAL INT a, b, borrow)
Unsigned subtraction with a borrow in and a borrow out.
(b - a) - borrow
Parameters:
VAL INT |
a , b
|
Integers to subtract. |
VAL INT |
borrow |
Borrow in flag. |
Returns:
INT |
Borrow out flag. | |
INT |
Subtraction of a and borrow from b. |
intrinsics.occ
:89Function LONGPROD
INT, INT FUNCTION LONGPROD (VAL INT a, b, carry)
Unsigned multiplication with a carry in, producing a double length result.
(a * b) + carry
Parameters:
VAL INT |
a , b
|
Integers to multiply. |
VAL INT |
carry |
Carry in flag. |
Returns:
INT |
High order word of result. | |
INT |
Low order word of result. |
intrinsics.occ
:103Function LONGDIV
INT, INT FUNCTION LONGDIV (VAL INT u1, u0, v)
Unsigned division of a double length number, producing a single length result.
[u1, u0] / v
Overflow is an error.
Parameters:
VAL INT |
u1 |
High order word of quantity being divided. |
VAL INT |
u0 |
Low order word of quantity being divided. |
VAL INT |
v |
Divisor. |
Returns:
INT |
High order word of result. | |
INT |
Low order word of result. |
intrinsics.occ
:115Function SHIFTRIGHT
INT, INT FUNCTION SHIFTRIGHT (VAL INT a1, a0, shift)
Right shift on a double length quantity.
[a1, a0] >> shift
Parameters:
VAL INT |
a1 |
High order word of quantity being shifted. |
VAL INT |
a0 |
Low order word of quantity being shifted. |
VAL INT |
shift |
Number of bit places to shift right. |
Returns:
INT |
High order word of result. | |
INT |
Low order word of result. |
intrinsics.occ
:127Function SHIFTLEFT
INT, INT FUNCTION SHIFTLEFT (VAL INT a1, a0, shift)
Left shift on a double length quantity.
[a1, a0] << shift
Parameters:
VAL INT |
a1 |
High order word of quantity being shifted. |
VAL INT |
a0 |
Low order word of quantity being shifted. |
VAL INT |
shift |
Number of bit places to shift left. |
Returns:
INT |
High order word of result. | |
INT |
Low order word of result. |
intrinsics.occ
:140Function NORMALISE
INT, INT, INT FUNCTION NORMALISE (VAL INT a1, a0)
Normalise a double length quantity.
Shift the double word quantity left until the most significant bit is one.
Parameters:
VAL INT |
a1 |
High order word of quantity being normalised. |
VAL INT |
a0 |
Low order word of quantity being normalised. |
Returns:
INT |
Number of places shifted. | |
INT |
High order word of result. | |
INT |
Low order word of result. |
intrinsics.occ
:151Function ASHIFTRIGHT
INT FUNCTION ASHIFTRIGHT (VAL INT a, shift)
Arithmetic right shift on a double length quantity.
The operand is expanded to a double length quantity, then arithmetically shifted right, and the low order word returned.
Parameters:
VAL INT |
a |
The integer being shifted. |
VAL INT |
shift |
Number of bit places to shift right. |
intrinsics.occ
:162Function ASHIFTLEFT
INT FUNCTION ASHIFTLEFT (VAL INT a, shift)
Arithmetic left shift on a double length quantity.
The operand is expanded to a double length quantity, then arithmetically shifted left, and the low order word returned.
Parameters:
VAL INT |
a |
The integer being shifted. |
VAL INT |
shift |
Number of bit places to shift left. |
intrinsics.occ
:170Function ROTATERIGHT
INT FUNCTION ROTATERIGHT (VAL INT val, shift)
Rotate a word right.
Parameters:
VAL INT |
val |
The integer being rotated. |
VAL INT |
shift |
Number of bit places to rotate right. |
Returns:
INT |
val rotated shift places to the right. |
intrinsics.occ
:178Function ROTATELEFT
INT FUNCTION ROTATELEFT (VAL INT val, shift)
Rotate a word left.
Parameters:
VAL INT |
val |
The integer being rotated. |
VAL INT |
shift |
Number of bit places to rotate left. |
Returns:
INT |
val rotated shift places to the left. |
intrinsics.occ
:186Process CAUSEERROR
PROC CAUSEERROR ()
Set the error flag.
Sets the runtime error flag, causing either the runtime to error out or the current process to stop, depending on compile-time flags and runtime settings.
intrinsics.occ
:195Process RESCHEDULE
PROC RESCHEDULE ()
Force rescheduling.
This gives the scheduler an opportunity to switch to another process. It may simply return control to the caller if no other process needs to run.
intrinsics.occ
:209Process ASSERT
PROC ASSERT (VAL BOOL condition)
Causes an error if a condition is false.
Asserts that a given condition is true. If the condition is false then the behaviour is that of CAUSEERROR
.
The compiler may detect false assertions at compile time through static analysis.
Parameters:
VAL BOOL |
condition |
The condition to test. |
intrinsics.occ
:219Function WSSIZEOF
INT FUNCTION WSSIZEOF (PROC process)
Calculate the workspace size (in words) of a process.
Parameters:
PROC |
process |
Process for which the workspace size is to be calculated. |
Returns:
INT |
Number of workspace words required by process. |
intrinsics.occ
:227Function VSSIZEOF
INT FUNCTION VSSIZEOF (PROC process)
Calculate the vectorspace size (in words) of a process.
Parameters:
PROC |
process |
Process for which the vectorspace size is to be calculated. |
Returns:
INT |
Number of vectorspace words required by process. |
intrinsics.occ
:251Process GETPRI
PROC GETPRI (RESULT INT pri)
Get the priority level of the current process.
Priority 0 is the highest priority available, and priority 31 is the lowest priority. Priorities are only hints to the scheduler; you must not assume that high-priority processes will always run before low-priority processes.
Parameters:
RESULT INT |
pri |
The priority of the calling process. |
intrinsics.occ
:262Process SETPRI
PROC SETPRI (VAL INT pri)
Set the priority level of the current process.
See GETPRI
for the meanings of priority levels.
Parameters:
VAL INT |
pri |
The requested priority for the calling process. Invalid values will be ignored. |
intrinsics.occ
:270Process INCPRI
PROC INCPRI ()
Obsolete synonym for RAISE.PRIORITY
.
Deprecated: do not use in new code.
intrinsics.occ
:278Process DECPRI
PROC DECPRI ()
Obsolete synonym for LOWER.PRIORITY
.
Deprecated: do not use in new code.
intrinsics.occ
:286Process RAISE.PRIORITY
PROC RAISE.PRIORITY ()
Raise the priority of the current process by one level.
See GETPRI
for the meanings of priority levels.
intrinsics.occ
:294Process LOWER.PRIORITY
PROC LOWER.PRIORITY ()
Lower the priority of the current process by one level.
See GETPRI
for the meanings of priority levels.
intrinsics.occ
:306Process GETAFF
PROC GETAFF (RESULT INT aff)
Get the affinity of the current process.
The affinity is a bitmap of logical execution units on which this process may run. The value -1
means that the process may run on any execution unit.
Parameters:
RESULT INT |
aff |
The affinity of the calling process. |
intrinsics.occ
:317Process SETAFF
PROC SETAFF (VAL INT aff)
Set the affinity of the current process.
See GETAFF
for the meanings of affinity values.
Parameters:
VAL INT |
aff |
The requested affinity for the calling process. Invalid values will be ignored. |
intrinsics.occ
:331Process KILLCALL
PROC KILLCALL (CHAN OF ANY chan, INT res)
Kill a blocking FFI call.
Kill a BX.
blocking foreign-function-interface call associated with a channel.
Parameters:
CHAN OF ANY |
chan |
The channel passed when making the blocking call. |
INT |
res |
0 if termination was successfully initiated; -1 if the call has not yet started; 1 if the call has already terminated. |
intrinsics.occ
:344Process WAIT.FOR.INTERRUPT
PROC WAIT.FOR.INTERRUPT (VAL INT n, mask, RESULT INT count)
Wait for a hardware interrupt.
This call is specific to RMoX, and will not be useful for most occam-pi programs.
Parameters:
VAL INT |
n |
The number of the interrupt to wait for. |
VAL INT |
mask |
CPU or interrupt mask, implementation dependent. |
RESULT INT |
count |
The number of missed interrupts. |
intrinsics.occ
:365Process BIND.MOBILE
PROC BIND.MOBILE (MOBILE.ANY mobile, VAL INT addr)
Bind a piece of (virtual) memory to a mobile.
Associates a piece of memory with a mobile. The memory at the given address becomes the backing store for the mobile. This is intended for use with EMPTY
mobiles.
For example, to associate a mobile with memory address #1000
: MOBILE []BYTE x:
SEQ
x := MOBILE EMPTY [1024]BYTE
BIND.MOBILE (x, #1000)
Parameters:
MOBILE.ANY |
mobile |
The mobile to bind. |
VAL INT |
addr |
The address of the memory. |
intrinsics.occ
:377Process BIND.MOBILE.HW
PROC BIND.MOBILE.HW (MOBILE.ANY mobile, VAL INT hw.addr)
Bind a piece of physical memory to a mobile.
Acts as BIND.MOBILE
, except a physical address is used. This may be converted to a virtual address by the runtime system.
Parameters:
MOBILE.ANY |
mobile |
The mobile to bind. |
VAL INT |
hw.addr |
Hardware address of the memory. |
intrinsics.occ
:389Function DMA.CAPABLE
BOOL FUNCTION DMA.CAPABLE (MOBILE.ANY mobile)
Test whether a mobile is DMA capable.
Test to see if a mobile is backed by DMA-accessible memory. The HWADDROF
operator is only valid on DMA-capable mobiles.
Parameters:
MOBILE.ANY |
mobile |
The mobile to test. |
Returns:
BOOL |
Whether the mobile is DMA accessible by hardware. |
intrinsics.occ
:399Process MAKE.DMA.CAPABLE
PROC MAKE.DMA.CAPABLE (MOBILE.ANY mobile)
Move a mobile to DMA capable memory.
Make a mobile DMA-capable. If necessary, this will reallocate the mobile in DMA-accessible memory and copy the contents over. If the mobile is already DMA-capable, this is has no effect.
Parameters:
MOBILE.ANY |
mobile |
The mobile to upgrade. |
intrinsics.occ
:416Process RESIZE.MOBILE.ARRAY.1D
PROC RESIZE.MOBILE.ARRAY.1D (MOBILE.ANY mobile, VAL INT count)
Resize a 1D mobile array.
Change the size of a one-dimensional mobile array. The memory associated with the mobile may or may not be reallocated by the runtime system depending on its memory allocator.
All data within the bounds of the new size of the array, and present in the old bounds of the array will be preserved.
Parameters:
MOBILE.ANY |
mobile |
Mobile array to resize. |
VAL INT |
count |
The new element count. |
intrinsics.occ
:430Process MEMORY.BARRIER
PROC MEMORY.BARRIER ()
Generate a read-write memory barrier.
A memory barrier is unrelated to occam-pi BARRIER
s; it is a synchronisation point for memory operations within a computer system. After the completion of a memory barrier instruction, the affected memory operations are guaranteed to be visible to peripherals and other processors.
This is equivalent to executing both READ.MEMORY.BARRIER
and WRITE.MEMORY.BARRIER
.
intrinsics.occ
:438Process READ.MEMORY.BARRIER
PROC READ.MEMORY.BARRIER ()
Generate a read memory barrier.
See MEMORY.BARRIER
for the semantics of memory barriers.
intrinsics.occ
:446Process WRITE.MEMORY.BARRIER
PROC WRITE.MEMORY.BARRIER ()
Generate a write memory barrier.
See MEMORY.BARRIER
for the semantics of memory barriers.
i64toi16.occ
:33Function INT64TOINT16
INT16 FUNCTION INT64TOINT16 (VAL INT64 B)
i16rem.occ
:35Function INT16REM
INT16 FUNCTION INT16REM (VAL INT16 A, B)
i64times.occ
:33Function INT64TIMES
INT64 FUNCTION INT64TIMES (VAL INT64 U, V)
i32minus.occ
:33Function INT32MINUS
INT32 FUNCTION INT32MINUS (VAL INT32 A, VAL INT32 B)
i16div.occ
:35Function INT16DIV
INT16 FUNCTION INT16DIV (VAL INT16 A, B)
i16minus.occ
:52Function INT16MINUS
INT16 FUNCTION INT16MINUS (VAL INT16 A, B)
unpacksn.occ
:44Function UNPACKSN
INT, INT, INT FUNCTION UNPACKSN ( VAL INT X )
Unpack a real number in IEEE single precision format
The sign of X is ignored.
Parameters:
VAL INT |
X |
a REAL32 which has been retyped to an INT |
Returns:
INT |
the fractional part with the implicit bit before the binary point restored | |
INT |
the biased exponent, i.e. the actual exponent + 127 | |
INT |
0 if X is zero; 1 if X is a normalised or denormalised number; 2 if X is "infinity"; 3 if X is a Not-a-Number |
i16gt.occ
:35Function INT16GT
BOOL FUNCTION INT16GT (VAL INT16 A, B)
i64plus.occ
:33Function INT64PLUS
INT64 FUNCTION INT64PLUS (VAL INT64 A, B)
i16bor.occ
:36Function INT16BITOR
INT16 FUNCTION INT16BITOR (VAL INT16 A, B)
i64bnot.occ
:33Function INT64BITNOT
INT64 FUNCTION INT64BITNOT (VAL INT64 B)
i32gt.occ
:33Function INT32GT
BOOL FUNCTION INT32GT (VAL INT32 A, VAL INT32 B)
r64op.occ
:35Function REAL64OP
REAL64 FUNCTION REAL64OP (VAL REAL64 X, VAL INT Op, VAL REAL64 Yp)
r64op.occ
:568Function REAL64OP
REAL64 FUNCTION REAL64OP (VAL REAL64 X, VAL INT Op, VAL REAL64 Yp)
i16bnot.occ
:43Function INT16BITNOT
INT16 FUNCTION INT16BITNOT (VAL INT16 A)
qrimul.occ
:35Process QRealIMul
PROC QRealIMul ([4]INT U, INT Guard, VAL INT V3, V2, V1, V0)
ie32comp.occ
:33Function IEEECOMPARE
INT FUNCTION IEEECOMPARE (VAL REAL32 X, Y)
rargred.occ
:37Function ARGUMENT.REDUCE
BOOL, INT32, REAL32 FUNCTION ARGUMENT.REDUCE (VAL REAL32 Y, Z, Z.err)
rargred.occ
:311Function ARGUMENT.REDUCE
BOOL, INT32, REAL32 FUNCTION ARGUMENT.REDUCE (VAL REAL32 Y, Z, Z.err)
ie64comp.occ
:31Function DIEEECOMPARE
INT FUNCTION DIEEECOMPARE (VAL REAL64 X, Y)