Scalar intrinsics

A minimal set of specific intrinsincs, to make the underlying PPU instruction set accessible from the C programming language, have been provided. These intrinsics are declared in the system header file ppu_intrinsics.h.

Table 1. PPE-specific scalar intrinsics
Intrinsic Description
__cctph() Change Thread Priority to High
__cctpl() Change Thread Priority to Low
__cctpm() Change Thread Priority to Medium
d = __cntlz(a) Count Leading Doubleword Zeros
d = __cntlzw(a) Count Leading Word Zeros
__db10cyc() Delay 10 Cycles at Dispatch
__db12cyc() Delay 12 Cycles at Dispatch
__db16cyc() Delay 16 Cycles at Dispatch
__db8cyc() Delay 8 Cycles at Dispatch
__dcbf(pointer) Data Cache Block Flush
__dcbst(pointer) Data Cache Block Store
__dcbt(pointer) Data Cache Block Touch
__dcbt_TH1000(eatrunc, d, ug, id) Start Streaming Data
__dcbt_TH1010(g0, s, unitcnt, t, u, id) Stop Streaming Data
__dcbtst(pointer) Data Cache Block Touch for Store
__dcbz(pointer) Data Cache Block Set to Zero
__eieio() Enforce In-Order Execution of I/O
d = __fabs(a) Double Absolute Value
d = __fabsf(a) Float Absolute Value
d = __fcfid(a) Convert Doubleword to Double
d = __fctid(a) Convert Double to Doubleword
d = __fctidz(a) Convert Double to Doubleword with Round Towards Zero
d = __fctiw(a) Convert Double to Word
d = __fctiwz(a) Convert Double to Word with Round Toward Zero
d = __fmadd(a,b,c) Double Fused Multiply and Add
d = __fmadds(a,b,c) Float Fused Multiply and Add
d = __fmsub(a,b,c) Double Fused Multiply and Subtract
d = __fmsubs(a,b,c) Float Fused Multiply and Subtract
d = __fmul(a,b) Double Mulitply
d = __fmuls(a,b) Float Multiply
d = __fnabs(a) Double Negative Absolute Value
d = __fnabsf(a) Float Negative Absolute Value
d = __fnmadd(a,b,c) Double Fused Negative Multiply and Add
d = __fnmadds(a,b,c) Float Fused Negative Multiply and Add
d = __fnmsub(a,b,c) Double Fused Negative Multiply and Subtract
d = __fnmsubs(a,b,c) Float Fused Negative Multiply and Subtract
d = __fres(a) Float Reciprocal Estimate
d = __frsp(a) Round to Single Precision
d = __fsel(a,b,c) Floating Point Select of Double
d = __fsels(a,b,c) Floating Point Select of Float
d = __fsqrt(a) Double Square Root
d = __fsqrts(a) Float Square Root
__icbi(pointer) Instruction Cache Block Invalidate
__isync() Instruction Sync
d = __ldarx(pointer) Load Doubleword with Reserved
d = __ldbrx(pointer) Load Reversed Doubleword
d = __lhbrx(pointer) Load Reversed Halfword
d = __lwarx(pointer) Load Word with Reserved
d = __lwbrx(pointer) Load Reversed Word
__lwsync() Light Weight Sync
d = __mffs() Move from Floating-Point Status and Control Register
d = __mfspr(spr) Move from Special Purpose Regiser
d = __mftb() Move from Time Base
__mtfsb0(bt) Unset Field of FPSCR
__mtfsb1(bt) Set Field of FPSCR
__mtfsf(flm,b) Set Fields of FPSCR
__mtfsfi(bf,u) Set Field FPSCR from other Field
__mtspr(spr,value) Move to Special Purpose Register
d = __mulhdu(a,b) Multiply Double Unsigned Word, High Part
d = __mulhd(a,b) Multiply Doubleword, High Part
d = __mulhwu(a,b) Multiply Unsigned Word, High Part
d = __mulhw(a,b) Multiply Word, High Part
__nop() No Operation
__protected_stream_count(count,id) Set the Number of Blocks to Stream
__protected_stream_go() Start All Streams
__protected_stream_set(d,addr,id) Set Up a Stream
__protected_stream_stop(id) Stop a Stream
__protected_stream_stop_all() Stop All Streams
__protected_unlimited_stream_set(d,addr,id) Set Up an Unlimited Stream
d = __rldcl(a,b,mb) Rotate Left Doubleword then Clear Left
d = __rldcr(a,b,me) Rotate Left Doubleword then Clear Right
d = __rldic(a,sh,mb) Rotate Left Doubleword Immediate then Clear
d = __rldicl(a,sh,mb) Rotate Left Doubleword Immediate then Clear Left
d = __rldicr(a,sh,me) Rotate Left Doubleword Immediate then Clear Right
d = __rldimi(a,b,sh.mb) Rotate Left Doubleword Immediate then Mask Insert
d = __rlwimi(a,b,sh,mb,me) Rotate Left Word Immediate the Mask Insert
d = __rlwinm(a,sh,mb,me) Rotate Left Word Immediate then AND with Mask
d = __rlwnm(a,v,mb,me) Rotate Left Word then AND with Mask
d = __setflm(a) Save and Set the FPSCR
__stdbrx(pointer,b) Store Reversed Doubleword
d = __stdcx(pointer,b) Store Doubleword Conditional
__sthbrx(pointer,b) Store Reversed Halfword
__stwbrx(pointer,b) Store Reversed Word
d = __stwcx(pointer,b) Store Word Conditional
__sync() Sync