ZHCUAQ1F july 2015 – april 2023
#include <c6x.h>
#include <stdio.h>
__x128_t mpy_four_way_example(__x128_t s, int a, int b, int c, int d)
{
__x128_t t = _ito128(a, b, c, d); // Pack values into a __x128_t
__x128_t results = _qmpy32(s, t); // Perform a four-way SIMD multiply
int lowest32 = _get32_128(results, 0); // Extract lowest reg of __x128_t
int highest32 = _get32_128(results, 3); // Extract highest reg of __x128_t
printf("lowest = %d\n", lowest32);
printf("highest = %d\n", highest32);
return results;
}