aboutsummaryrefslogtreecommitdiff
path: root/target-tilegx/simd_helper.c
diff options
context:
space:
mode:
authorChen Gang <gang.chen.5i5j@gmail.com>2015-09-22 06:26:54 +0800
committerRichard Henderson <rth@twiddle.net>2015-10-07 20:03:14 +1100
commit38c949ffe7497b1d833bca5f70b22c87df9bd567 (patch)
tree55f32f691e9918eaa256903fa40a48af3354e122 /target-tilegx/simd_helper.c
parentc6876d7e1c3ff04a9b9f751f6260bf427ab8cf1a (diff)
downloadqemu-arm-38c949ffe7497b1d833bca5f70b22c87df9bd567.tar.gz
target-tilegx: Implement v1multu instruction
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Message-Id: <1442874414-3578-1-git-send-email-gang.chen.5i5j@gmail.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
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;