aboutsummaryrefslogtreecommitdiff
path: root/target-tilegx/simd_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-tilegx/simd_helper.c')
-rw-r--r--target-tilegx/simd_helper.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/target-tilegx/simd_helper.c b/target-tilegx/simd_helper.c
index 1c59a92216..2cff43c29c 100644
--- a/target-tilegx/simd_helper.c
+++ b/target-tilegx/simd_helper.c
@@ -28,6 +28,19 @@
#define V2(X) (((X) & 0xffff) * 0x0001000100010001ull)
+uint64_t helper_v1multu(uint64_t a, uint64_t b)
+{
+ uint64_t r = 0;
+ int i;
+
+ for (i = 0; i < 64; i += 8) {
+ unsigned ae = extract64(a, i, 8);
+ unsigned be = extract64(b, i, 8);
+ r = deposit64(r, i, 8, ae * be);
+ }
+ return r;
+}
+
uint64_t helper_v1shl(uint64_t a, uint64_t b)
{
uint64_t m;