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

« back to all changes in this revision

Viewing changes to debian/patches/ubuntu/arm64/0073-linux-user-AArch64-Use-correct-values-for-FPSR-FPCR-.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 0f41976636693c12e28a3bb97b84d6ec07ba2330 Mon Sep 17 00:00:00 2001
 
2
From: Will Newton <will.newton@linaro.org>
 
3
Date: Sat, 4 Jan 2014 22:15:48 +0000
 
4
Subject: [PATCH 073/158] linux-user: AArch64: Use correct values for FPSR/FPCR
 
5
 in sigcontext
 
6
 
 
7
Use the helpers provided for getting the correct FPSR and FPCR
 
8
values for the signal context.
 
9
 
 
10
Signed-off-by: Will Newton <will.newton@linaro.org>
 
11
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
 
12
Reviewed-by: Richard Henderson <rth@twiddle.net>
 
13
---
 
14
 linux-user/signal.c | 10 +++++++---
 
15
 1 file changed, 7 insertions(+), 3 deletions(-)
 
16
 
 
17
diff --git a/linux-user/signal.c b/linux-user/signal.c
 
18
index 4e7148a..6c74b18 100644
 
19
--- a/linux-user/signal.c
 
20
+++ b/linux-user/signal.c
 
21
@@ -1189,8 +1189,8 @@ static int target_setup_sigframe(struct target_rt_sigframe *sf,
 
22
         __put_user(env->vfp.regs[i * 2 + 1], &aux->fpsimd.vregs[i * 2 + 1]);
 
23
 #endif
 
24
     }
 
25
-    __put_user(/*env->fpsr*/0, &aux->fpsimd.fpsr);
 
26
-    __put_user(/*env->fpcr*/0, &aux->fpsimd.fpcr);
 
27
+    __put_user(vfp_get_fpsr(env), &aux->fpsimd.fpsr);
 
28
+    __put_user(vfp_get_fpcr(env), &aux->fpsimd.fpcr);
 
29
     __put_user(TARGET_FPSIMD_MAGIC, &aux->fpsimd.head.magic);
 
30
     __put_user(sizeof(struct target_fpsimd_context),
 
31
             &aux->fpsimd.head.size);
 
32
@@ -1209,7 +1209,7 @@ static int target_restore_sigframe(CPUARMState *env,
 
33
     int i;
 
34
     struct target_aux_context *aux =
 
35
         (struct target_aux_context *)sf->uc.tuc_mcontext.__reserved;
 
36
-    uint32_t magic, size;
 
37
+    uint32_t magic, size, fpsr, fpcr;
 
38
     uint64_t pstate;
 
39
 
 
40
     target_to_host_sigset(&set, &sf->uc.tuc_sigmask);
 
41
@@ -1235,6 +1235,10 @@ static int target_restore_sigframe(CPUARMState *env,
 
42
     for (i = 0; i < 32 * 2; i++) {
 
43
         __get_user(env->vfp.regs[i], &aux->fpsimd.vregs[i]);
 
44
     }
 
45
+    __get_user(fpsr, &aux->fpsimd.fpsr);
 
46
+    vfp_set_fpsr(env, fpsr);
 
47
+    __get_user(fpcr, &aux->fpsimd.fpcr);
 
48
+    vfp_set_fpcr(env, fpcr);
 
49
 
 
50
     return 0;
 
51
 }
 
52
-- 
 
53
1.9.rc1
 
54