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

« back to all changes in this revision

Viewing changes to debian/patches/ubuntu/arm64/0131-target-arm-Add-AArch32-SIMD-VCVTA-VCVTN-VCVTP-and-VC.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 cb20c043fcf2bb963f9d1bda012fadc9af3e787d Mon Sep 17 00:00:00 2001
 
2
From: Will Newton <will.newton@linaro.org>
 
3
Date: Fri, 31 Jan 2014 14:47:35 +0000
 
4
Subject: [PATCH 131/158] target-arm: Add AArch32 SIMD VCVTA, VCVTN, VCVTP and
 
5
 VCVTM
 
6
 
 
7
Add support for the AArch32 Advanced SIMD VCVTA, VCVTN, VCVTP
 
8
and VCVTM instructions.
 
9
 
 
10
Signed-off-by: Will Newton <will.newton@linaro.org>
 
11
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
 
12
---
 
13
 target-arm/translate.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++-
 
14
 1 file changed, 52 insertions(+), 1 deletion(-)
 
15
 
 
16
diff --git a/target-arm/translate.c b/target-arm/translate.c
 
17
index 327f453..091db1b 100644
 
18
--- a/target-arm/translate.c
 
19
+++ b/target-arm/translate.c
 
20
@@ -4788,6 +4788,14 @@ static const uint8_t neon_3r_sizes[] = {
 
21
 #define NEON_2RM_VRINTM 45
 
22
 #define NEON_2RM_VCVT_F32_F16 46
 
23
 #define NEON_2RM_VRINTP 47
 
24
+#define NEON_2RM_VCVTAU 48
 
25
+#define NEON_2RM_VCVTAS 49
 
26
+#define NEON_2RM_VCVTNU 50
 
27
+#define NEON_2RM_VCVTNS 51
 
28
+#define NEON_2RM_VCVTPU 52
 
29
+#define NEON_2RM_VCVTPS 53
 
30
+#define NEON_2RM_VCVTMU 54
 
31
+#define NEON_2RM_VCVTMS 55
 
32
 #define NEON_2RM_VRECPE 56
 
33
 #define NEON_2RM_VRSQRTE 57
 
34
 #define NEON_2RM_VRECPE_F 58
 
35
@@ -4802,7 +4810,8 @@ static int neon_2rm_is_float_op(int op)
 
36
     /* Return true if this neon 2reg-misc op is float-to-float */
 
37
     return (op == NEON_2RM_VABS_F || op == NEON_2RM_VNEG_F ||
 
38
             (op >= NEON_2RM_VRINTN && op <= NEON_2RM_VRINTZ) ||
 
39
-            op == NEON_2RM_VRINTM || op == NEON_2RM_VRINTP ||
 
40
+            op == NEON_2RM_VRINTM ||
 
41
+            (op >= NEON_2RM_VRINTP && op <= NEON_2RM_VCVTMS) ||
 
42
             op >= NEON_2RM_VRECPE_F);
 
43
 }
 
44
 
 
45
@@ -4853,6 +4862,14 @@ static const uint8_t neon_2rm_sizes[] = {
 
46
     [NEON_2RM_VRINTM] = 0x4,
 
47
     [NEON_2RM_VCVT_F32_F16] = 0x2,
 
48
     [NEON_2RM_VRINTP] = 0x4,
 
49
+    [NEON_2RM_VCVTAU] = 0x4,
 
50
+    [NEON_2RM_VCVTAS] = 0x4,
 
51
+    [NEON_2RM_VCVTNU] = 0x4,
 
52
+    [NEON_2RM_VCVTNS] = 0x4,
 
53
+    [NEON_2RM_VCVTPU] = 0x4,
 
54
+    [NEON_2RM_VCVTPS] = 0x4,
 
55
+    [NEON_2RM_VCVTMU] = 0x4,
 
56
+    [NEON_2RM_VCVTMS] = 0x4,
 
57
     [NEON_2RM_VRECPE] = 0x4,
 
58
     [NEON_2RM_VRSQRTE] = 0x4,
 
59
     [NEON_2RM_VRECPE_F] = 0x4,
 
60
@@ -6574,6 +6591,40 @@ static int disas_neon_data_insn(CPUARMState * env, DisasContext *s, uint32_t ins
 
61
                             tcg_temp_free_ptr(fpstatus);
 
62
                             break;
 
63
                         }
 
64
+                        case NEON_2RM_VCVTAU:
 
65
+                        case NEON_2RM_VCVTAS:
 
66
+                        case NEON_2RM_VCVTNU:
 
67
+                        case NEON_2RM_VCVTNS:
 
68
+                        case NEON_2RM_VCVTPU:
 
69
+                        case NEON_2RM_VCVTPS:
 
70
+                        case NEON_2RM_VCVTMU:
 
71
+                        case NEON_2RM_VCVTMS:
 
72
+                        {
 
73
+                            bool is_signed = !extract32(insn, 7, 1);
 
74
+                            TCGv_ptr fpst = get_fpstatus_ptr(1);
 
75
+                            TCGv_i32 tcg_rmode, tcg_shift;
 
76
+                            int rmode = fp_decode_rm[extract32(insn, 8, 2)];
 
77
+
 
78
+                            tcg_shift = tcg_const_i32(0);
 
79
+                            tcg_rmode = tcg_const_i32(arm_rmode_to_sf(rmode));
 
80
+                            gen_helper_set_neon_rmode(tcg_rmode, tcg_rmode,
 
81
+                                                      cpu_env);
 
82
+
 
83
+                            if (is_signed) {
 
84
+                                gen_helper_vfp_tosls(cpu_F0s, cpu_F0s,
 
85
+                                                     tcg_shift, fpst);
 
86
+                            } else {
 
87
+                                gen_helper_vfp_touls(cpu_F0s, cpu_F0s,
 
88
+                                                     tcg_shift, fpst);
 
89
+                            }
 
90
+
 
91
+                            gen_helper_set_neon_rmode(tcg_rmode, tcg_rmode,
 
92
+                                                      cpu_env);
 
93
+                            tcg_temp_free_i32(tcg_rmode);
 
94
+                            tcg_temp_free_i32(tcg_shift);
 
95
+                            tcg_temp_free_ptr(fpst);
 
96
+                            break;
 
97
+                        }
 
98
                         case NEON_2RM_VRECPE:
 
99
                             gen_helper_recpe_u32(tmp, tmp, cpu_env);
 
100
                             break;
 
101
-- 
 
102
1.9.rc1
 
103