SPRAAK
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
elementary_instr.c File Reference

Additional low-level functions. More...

Functions

int spr_fmsnzb32 (uint32_t val)
 
int spr_fmsnzb32x0 (uint32_t val)
 
int spr_fmsnzb64 (uint64_t val)
 
int spr_fmsnzb64x0 (uint64_t val)
 
int spr_flsnzb32 (uint32_t val)
 
int spr_flsnzb32x0 (uint32_t val)
 
int spr_flsnzb64 (uint64_t val)
 
int spr_flsnzb64x0 (uint64_t val)
 
int spr_popcount16 (uint16_t val)
 Return the number of 1 bits in val. More...
 
int spr_popcount32 (uint32_t val)
 Return the number of 1 bits in val. More...
 
int spr_popcount64 (uint64_t val)
 Return the number of 1 bits in val. More...
 
uint32_t spr_rotl32 (uint32_t val, unsigned int ndx)
 Rotate the value val ndx bits to the left. More...
 
uint32_t spr_rotr32 (uint32_t val, unsigned int ndx)
 Rotate the value val ndx bits to the right. More...
 
uint64_t spr_rotl64 (uint64_t val, unsigned int ndx)
 Rotate the value val ndx bits to the left. More...
 
uint64_t spr_rotr64 (uint64_t val, unsigned int ndx)
 Rotate the value val ndx bits to the right. More...
 
uint64_t spr_wide_umul32 (uint32_t val1, uint32_t val2)
 Double wide unsigned multiplication. More...
 
uint32_t spr_wide_umul32hi (uint32_t val1, uint32_t val2)
 
int64_t spr_wide_smul32 (int32_t val1, int32_t val2)
 Double wide signed multiplication. More...
 
int32_t spr_wide_smul32hi (int32_t val1, int32_t val2)
 
int spr_bittest (const unsigned int *bitarray, int ndx)
 
void spr_bitset (unsigned int *bitarray, int ndx)
 Set the value of bit ndx in bit array bitarray to 1. More...
 
void spr_bitclr (unsigned int *bitarray, int ndx)
 Set the value of bit ndx in bit array bitarray to 0. More...
 
uint16_t spr_bswap16 (uint16_t val)
 
uint32_t spr_bswap32 (uint32_t val)
 
uint64_t spr_bswap64 (uint64_t val)
 

Detailed Description

Additional low-level functions.

Provide a list of low-level functions (i.e. functions that are typically close to assembler code) that cannot be efficiently coded in C.

Note
Most (if not all) of these functions are only available to the developers of SPRAAK; the public interfaces typically do not need these low-level functions.
Author
Kris Demuynck
Date
12/09/2007