swar-fcn.c
538 Bytes
/* Assembler needs option --has-swar */
//A: '--has-swar'
#include <stdint.h>
#include "swar.h"
typedef unsigned int s10x3b __attribute__((subword(3)));
#define LEN 5
uint32_t data_a[LEN] = {01234567123,01122334455,07777777777,04444444444,07654765476};
uint32_t data_b[LEN] = {07654321765,02342342342,01234567123,02323232323,00000000000};
uint32_t data_z[LEN] = {0,0,0,0,0};
int main(void)
{
swarctrl(C_COR3b);
for(int i=0;i<LEN;++i) {
data_z[i] = swar(data_a[i], data_b[i]);
}
uint32_t a = swarstat(0);
return 0;
}