~ubuntu-branches/ubuntu/vivid/qemu/vivid

« back to all changes in this revision

Viewing changes to debian/patches/ubuntu/arm64/0133-target-arm-A64-Add-SIMD-three-different-ABDL-instruc.patch

  • Committer: Package Import Robot
  • Author(s): dann frazier
  • Date: 2014-02-11 15:41:53 UTC
  • Revision ID: package-import@ubuntu.com-20140211154153-2d001tf0ium08u81
Tags: 1.7.0+dfsg-3ubuntu2
* Backport changes to enable qemu-user-static support for aarch64
* debian/control: add ppc64el to Architectures
* debian/rules: only install qemu-system-aarch64 on arm64.
  Fixes a FTBFS  when built twice in a row on non-arm64 due to a stale
  debian/qemu-system-aarch64 directory

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From 3526cb5986df2ccbe0cded717f4e27443fd9ef37 Mon Sep 17 00:00:00 2001
 
2
From: Peter Maydell <peter.maydell@linaro.org>
 
3
Date: Fri, 31 Jan 2014 14:47:36 +0000
 
4
Subject: [PATCH 133/158] target-arm: A64: Add SIMD three-different ABDL
 
5
 instructions
 
6
 
 
7
Implement the absolute-difference instructions in the SIMD
 
8
three-different group: SABAL, SABAL2, UABAL, UABAL2, SABDL,
 
9
SABDL2, UABDL, UABDL2.
 
10
 
 
11
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
 
12
Reviewed-by: Richard Henderson <rth@twiddle.net>
 
13
---
 
14
 target-arm/translate-a64.c | 35 +++++++++++++++++++++++++++++++++--
 
15
 1 file changed, 33 insertions(+), 2 deletions(-)
 
16
 
 
17
diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c
 
18
index e8479a5..e098efd 100644
 
19
--- a/target-arm/translate-a64.c
 
20
+++ b/target-arm/translate-a64.c
 
21
@@ -5602,6 +5602,21 @@ static void handle_3rd_widening(DisasContext *s, int is_q, int is_u, int size,
 
22
             }
 
23
 
 
24
             switch (opcode) {
 
25
+            case 5: /* SABAL, SABAL2, UABAL, UABAL2 */
 
26
+            case 7: /* SABDL, SABDL2, UABDL, UABDL2 */
 
27
+            {
 
28
+                TCGv_i64 tcg_tmp1 = tcg_temp_new_i64();
 
29
+                TCGv_i64 tcg_tmp2 = tcg_temp_new_i64();
 
30
+
 
31
+                tcg_gen_sub_i64(tcg_tmp1, tcg_op1, tcg_op2);
 
32
+                tcg_gen_sub_i64(tcg_tmp2, tcg_op2, tcg_op1);
 
33
+                tcg_gen_movcond_i64(is_u ? TCG_COND_GEU : TCG_COND_GE,
 
34
+                                    tcg_passres,
 
35
+                                    tcg_op1, tcg_op2, tcg_tmp1, tcg_tmp2);
 
36
+                tcg_temp_free_i64(tcg_tmp1);
 
37
+                tcg_temp_free_i64(tcg_tmp2);
 
38
+                break;
 
39
+            }
 
40
             case 8: /* SMLAL, SMLAL2, UMLAL, UMLAL2 */
 
41
             case 10: /* SMLSL, SMLSL2, UMLSL, UMLSL2 */
 
42
             case 12: /* UMULL, UMULL2, SMULL, SMULL2 */
 
43
@@ -5640,6 +5655,22 @@ static void handle_3rd_widening(DisasContext *s, int is_q, int is_u, int size,
 
44
             }
 
45
 
 
46
             switch (opcode) {
 
47
+            case 5: /* SABAL, SABAL2, UABAL, UABAL2 */
 
48
+            case 7: /* SABDL, SABDL2, UABDL, UABDL2 */
 
49
+                if (size == 0) {
 
50
+                    if (is_u) {
 
51
+                        gen_helper_neon_abdl_u16(tcg_passres, tcg_op1, tcg_op2);
 
52
+                    } else {
 
53
+                        gen_helper_neon_abdl_s16(tcg_passres, tcg_op1, tcg_op2);
 
54
+                    }
 
55
+                } else {
 
56
+                    if (is_u) {
 
57
+                        gen_helper_neon_abdl_u32(tcg_passres, tcg_op1, tcg_op2);
 
58
+                    } else {
 
59
+                        gen_helper_neon_abdl_s32(tcg_passres, tcg_op1, tcg_op2);
 
60
+                    }
 
61
+                }
 
62
+                break;
 
63
             case 8: /* SMLAL, SMLAL2, UMLAL, UMLAL2 */
 
64
             case 10: /* SMLSL, SMLSL2, UMLSL, UMLSL2 */
 
65
             case 12: /* UMULL, UMULL2, SMULL, SMULL2 */
 
66
@@ -5739,10 +5770,10 @@ static void disas_simd_three_reg_diff(DisasContext *s, uint32_t insn)
 
67
         /* fall through */
 
68
     case 0:
 
69
     case 2:
 
70
-    case 5:
 
71
-    case 7:
 
72
         unsupported_encoding(s, insn);
 
73
         break;
 
74
+    case 5:
 
75
+    case 7:
 
76
     case 8:
 
77
     case 10:
 
78
     case 12:
 
79
-- 
 
80
1.9.rc1
 
81