Team-Fly
Previous Section Next Section

A.4 Bitwise Operations

int
setbit_l (CLINT a_l,
     unsigned int pos)

test and set the bit of a_l in position pos

int
testbit_l (CLINT a_l,
     unsigned int pos)

test the bit of a_l in position pos

int
clearbit_l (CLINT a_l,
     unsigned int pos)

test and clear the bit of a_l in position pos

void
and_l (CLINT a_l, CLINT b_l,
     CLINT c_l)

bitwise AND of a_l and b_l, output in c_l

void
or_l (CLINT a_l, CLINT b_l,
     CLINT c_l)

bitwise OR of a_l and b_l, output in c_l

void
xor_l (CLINT a_l, CLINT b_l,
     CLINT c_l)

bitwise exclusive OR (XOR) of a_l and b_l, output in c_l

int
shr_l (CLINT a_l)

left shift of a_l by 1 bit

int
shl_l (CLINT a_l)

right shift of a_l by 1 bit

int
shift_l (CLINT a_l,
     long int noofbits)

left/right shift of a_l by noofbits bits


Team-Fly Previous Section Next Section