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

« back to all changes in this revision

Viewing changes to debian/patches/ubuntu/arm64/0088-softfloat-Add-16-bit-integer-to-float-conversions.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 312f36883900ec41d012dd75e24a6a693e8834aa Mon Sep 17 00:00:00 2001
 
2
From: Peter Maydell <peter.maydell@linaro.org>
 
3
Date: Tue, 7 Jan 2014 17:17:49 +0000
 
4
Subject: [PATCH 088/158] softfloat: Add 16 bit integer to float conversions
 
5
 
 
6
Add the float to 16 bit integer conversion routines. These can be
 
7
trivially implemented in terms of the int32_to_float* routines, but
 
8
providing them makes our API more symmetrical and can simplify callers.
 
9
 
 
10
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
 
11
Reviewed-by: Richard Henderson <rth@twiddle.net>
 
12
---
 
13
 include/fpu/softfloat.h | 21 +++++++++++++++++++++
 
14
 1 file changed, 21 insertions(+)
 
15
 
 
16
diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h
 
17
index a9b8cd9..926d849 100644
 
18
--- a/include/fpu/softfloat.h
 
19
+++ b/include/fpu/softfloat.h
 
20
@@ -239,6 +239,27 @@ floatx80 int64_to_floatx80( int64 STATUS_PARAM );
 
21
 float128 int64_to_float128( int64 STATUS_PARAM );
 
22
 float128 uint64_to_float128( uint64 STATUS_PARAM );
 
23
 
 
24
+/* We provide the int16 versions for symmetry of API with float-to-int */
 
25
+INLINE float32 int16_to_float32(int16_t v STATUS_PARAM)
 
26
+{
 
27
+    return int32_to_float32(v STATUS_VAR);
 
28
+}
 
29
+
 
30
+INLINE float32 uint16_to_float32(uint16_t v STATUS_PARAM)
 
31
+{
 
32
+    return uint32_to_float32(v STATUS_VAR);
 
33
+}
 
34
+
 
35
+INLINE float64 int16_to_float64(int16_t v STATUS_PARAM)
 
36
+{
 
37
+    return int32_to_float64(v STATUS_VAR);
 
38
+}
 
39
+
 
40
+INLINE float64 uint16_to_float64(uint16_t v STATUS_PARAM)
 
41
+{
 
42
+    return uint32_to_float64(v STATUS_VAR);
 
43
+}
 
44
+
 
45
 /*----------------------------------------------------------------------------
 
46
 | Software half-precision conversion routines.
 
47
 *----------------------------------------------------------------------------*/
 
48
-- 
 
49
1.9.rc1
 
50