Commit 4e14008f3a1d8418d3d4b0164018df49c34a3a22

Authored by blueswir1
1 parent 4595fca9

Revert the previous patch

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4236 c046a42c-6fe2-441c-8c8c-71466251a162
Makefile.target
... ... @@ -432,9 +432,6 @@ endif
432 432 ifeq ($(TARGET_ARCH), m68k)
433 433 OBJS+= m68k-sim.o m68k-semi.o
434 434 endif
435   -ifeq ($(TARGET_BASE_ARCH), sparc)
436   -OBJS+= sparc_quad_float.o
437   -endif
438 435  
439 436 ifdef CONFIG_GDBSTUB
440 437 OBJS+=gdbstub.o
... ...
linux-user/sparc_quad_float.c deleted 100644 → 0
1   -#include "exec.h"
2   -#include "host-utils.h"
3   -#include "helper.h"
4   -
5   -#define F_HELPER(name, p) void helper_f##name##p(void)
6   -
7   -#define F_BINOP(name) \
8   - F_HELPER(name, q) \
9   - { \
10   - QT0 = float128_ ## name (QT0, QT1, &env->fp_status); \
11   - }
12   -
13   -F_BINOP(add);
14   -F_BINOP(sub);
15   -F_BINOP(mul);
16   -F_BINOP(div);
17   -#undef F_BINOP
18   -
19   -void helper_fdmulq(void)
20   -{
21   - QT0 = float128_mul(float64_to_float128(DT0, &env->fp_status),
22   - float64_to_float128(DT1, &env->fp_status),
23   - &env->fp_status);
24   -}
25   -
26   -F_HELPER(ito, q)
27   -{
28   - QT0 = int32_to_float128(*((int32_t *)&FT1), &env->fp_status);
29   -}
30   -
31   -void helper_fqtos(void)
32   -{
33   - FT0 = float128_to_float32(QT1, &env->fp_status);
34   -}
35   -
36   -void helper_fstoq(void)
37   -{
38   - QT0 = float32_to_float128(FT1, &env->fp_status);
39   -}
40   -
41   -void helper_fqtod(void)
42   -{
43   - DT0 = float128_to_float64(QT1, &env->fp_status);
44   -}
45   -
46   -void helper_fdtoq(void)
47   -{
48   - QT0 = float64_to_float128(DT1, &env->fp_status);
49   -}
50   -
51   -void helper_fqtoi(void)
52   -{
53   - *((int32_t *)&FT0) = float128_to_int32_round_to_zero(QT1, &env->fp_status);
54   -}
55   -
56   -void helper_fsqrtq(void)
57   -{
58   - QT0 = float128_sqrt(QT1, &env->fp_status);
59   -}
60   -
61   -#ifdef TARGET_SPARC64
62   -F_HELPER(neg, q)
63   -{
64   - QT0 = float128_chs(QT1);
65   -}
66   -
67   -F_HELPER(xto, q)
68   -{
69   - QT0 = int64_to_float128(*((int64_t *)&DT1), &env->fp_status);
70   -}
71   -
72   -void helper_fqtox(void)
73   -{
74   - *((int64_t *)&DT0) = float128_to_int64_round_to_zero(QT1, &env->fp_status);
75   -}
76   -
77   -void helper_fabsq(void)
78   -{
79   - QT0 = float128_abs(QT1);
80   -}
81   -#endif
82   -
83   -#define GEN_FCMP(name, size, reg1, reg2, FS, TRAP) \
84   - void glue(helper_, name) (void) \
85   - { \
86   - target_ulong new_fsr; \
87   - \
88   - env->fsr &= ~((FSR_FCC1 | FSR_FCC0) << FS); \
89   - switch (glue(size, _compare) (reg1, reg2, &env->fp_status)) { \
90   - case float_relation_unordered: \
91   - new_fsr = (FSR_FCC1 | FSR_FCC0) << FS; \
92   - if ((env->fsr & FSR_NVM) || TRAP) { \
93   - env->fsr |= new_fsr; \
94   - env->fsr |= FSR_NVC; \
95   - env->fsr |= FSR_FTT_IEEE_EXCP; \
96   - raise_exception(TT_FP_EXCP); \
97   - } else { \
98   - env->fsr |= FSR_NVA; \
99   - } \
100   - break; \
101   - case float_relation_less: \
102   - new_fsr = FSR_FCC0 << FS; \
103   - break; \
104   - case float_relation_greater: \
105   - new_fsr = FSR_FCC1 << FS; \
106   - break; \
107   - default: \
108   - new_fsr = 0; \
109   - break; \
110   - } \
111   - env->fsr |= new_fsr; \
112   - }
113   -
114   -GEN_FCMP(fcmpq, float128, QT0, QT1, 0, 0);
115   -GEN_FCMP(fcmpeq, float128, QT0, QT1, 0, 1);
116   -
117   -#ifdef TARGET_SPARC64
118   -GEN_FCMP(fcmpq_fcc1, float128, QT0, QT1, 22, 0);
119   -GEN_FCMP(fcmpq_fcc2, float128, QT0, QT1, 24, 0);
120   -GEN_FCMP(fcmpq_fcc3, float128, QT0, QT1, 26, 0);
121   -GEN_FCMP(fcmpeq_fcc1, float128, QT0, QT1, 22, 1);
122   -GEN_FCMP(fcmpeq_fcc2, float128, QT0, QT1, 24, 1);
123   -GEN_FCMP(fcmpeq_fcc3, float128, QT0, QT1, 26, 1);
124   -#endif
target-sparc/op_helper.c
... ... @@ -58,6 +58,21 @@ void helper_check_align(target_ulong addr, uint32_t align)
58 58  
59 59 #define F_HELPER(name, p) void helper_f##name##p(void)
60 60  
  61 +#if defined(CONFIG_USER_ONLY)
  62 +#define F_BINOP(name) \
  63 + F_HELPER(name, s) \
  64 + { \
  65 + FT0 = float32_ ## name (FT0, FT1, &env->fp_status); \
  66 + } \
  67 + F_HELPER(name, d) \
  68 + { \
  69 + DT0 = float64_ ## name (DT0, DT1, &env->fp_status); \
  70 + } \
  71 + F_HELPER(name, q) \
  72 + { \
  73 + QT0 = float128_ ## name (QT0, QT1, &env->fp_status); \
  74 + }
  75 +#else
61 76 #define F_BINOP(name) \
62 77 F_HELPER(name, s) \
63 78 { \
... ... @@ -67,6 +82,7 @@ void helper_check_align(target_ulong addr, uint32_t align)
67 82 { \
68 83 DT0 = float64_ ## name (DT0, DT1, &env->fp_status); \
69 84 }
  85 +#endif
70 86  
71 87 F_BINOP(add);
72 88 F_BINOP(sub);
... ... @@ -81,6 +97,15 @@ void helper_fsmuld(void)
81 97 &env->fp_status);
82 98 }
83 99  
  100 +#if defined(CONFIG_USER_ONLY)
  101 +void helper_fdmulq(void)
  102 +{
  103 + QT0 = float128_mul(float64_to_float128(DT0, &env->fp_status),
  104 + float64_to_float128(DT1, &env->fp_status),
  105 + &env->fp_status);
  106 +}
  107 +#endif
  108 +
84 109 F_HELPER(neg, s)
85 110 {
86 111 FT0 = float32_chs(FT1);
... ... @@ -91,6 +116,13 @@ F_HELPER(neg, d)
91 116 {
92 117 DT0 = float64_chs(DT1);
93 118 }
  119 +
  120 +#if defined(CONFIG_USER_ONLY)
  121 +F_HELPER(neg, q)
  122 +{
  123 + QT0 = float128_chs(QT1);
  124 +}
  125 +#endif
94 126 #endif
95 127  
96 128 /* Integer to float conversion. */
... ... @@ -104,6 +136,13 @@ F_HELPER(ito, d)
104 136 DT0 = int32_to_float64(*((int32_t *)&FT1), &env->fp_status);
105 137 }
106 138  
  139 +#if defined(CONFIG_USER_ONLY)
  140 +F_HELPER(ito, q)
  141 +{
  142 + QT0 = int32_to_float128(*((int32_t *)&FT1), &env->fp_status);
  143 +}
  144 +#endif
  145 +
107 146 #ifdef TARGET_SPARC64
108 147 F_HELPER(xto, s)
109 148 {
... ... @@ -114,6 +153,12 @@ F_HELPER(xto, d)
114 153 {
115 154 DT0 = int64_to_float64(*((int64_t *)&DT1), &env->fp_status);
116 155 }
  156 +#if defined(CONFIG_USER_ONLY)
  157 +F_HELPER(xto, q)
  158 +{
  159 + QT0 = int64_to_float128(*((int64_t *)&DT1), &env->fp_status);
  160 +}
  161 +#endif
117 162 #endif
118 163 #undef F_HELPER
119 164  
... ... @@ -128,6 +173,28 @@ void helper_fstod(void)
128 173 DT0 = float32_to_float64(FT1, &env->fp_status);
129 174 }
130 175  
  176 +#if defined(CONFIG_USER_ONLY)
  177 +void helper_fqtos(void)
  178 +{
  179 + FT0 = float128_to_float32(QT1, &env->fp_status);
  180 +}
  181 +
  182 +void helper_fstoq(void)
  183 +{
  184 + QT0 = float32_to_float128(FT1, &env->fp_status);
  185 +}
  186 +
  187 +void helper_fqtod(void)
  188 +{
  189 + DT0 = float128_to_float64(QT1, &env->fp_status);
  190 +}
  191 +
  192 +void helper_fdtoq(void)
  193 +{
  194 + QT0 = float64_to_float128(DT1, &env->fp_status);
  195 +}
  196 +#endif
  197 +
131 198 /* Float to integer conversion. */
132 199 void helper_fstoi(void)
133 200 {
... ... @@ -139,6 +206,13 @@ void helper_fdtoi(void)
139 206 *((int32_t *)&FT0) = float64_to_int32_round_to_zero(DT1, &env->fp_status);
140 207 }
141 208  
  209 +#if defined(CONFIG_USER_ONLY)
  210 +void helper_fqtoi(void)
  211 +{
  212 + *((int32_t *)&FT0) = float128_to_int32_round_to_zero(QT1, &env->fp_status);
  213 +}
  214 +#endif
  215 +
142 216 #ifdef TARGET_SPARC64
143 217 void helper_fstox(void)
144 218 {
... ... @@ -150,6 +224,13 @@ void helper_fdtox(void)
150 224 *((int64_t *)&DT0) = float64_to_int64_round_to_zero(DT1, &env->fp_status);
151 225 }
152 226  
  227 +#if defined(CONFIG_USER_ONLY)
  228 +void helper_fqtox(void)
  229 +{
  230 + *((int64_t *)&DT0) = float128_to_int64_round_to_zero(QT1, &env->fp_status);
  231 +}
  232 +#endif
  233 +
153 234 void helper_faligndata(void)
154 235 {
155 236 uint64_t tmp;
... ... @@ -637,6 +718,13 @@ void helper_fabsd(void)
637 718 {
638 719 DT0 = float64_abs(DT1);
639 720 }
  721 +
  722 +#if defined(CONFIG_USER_ONLY)
  723 +void helper_fabsq(void)
  724 +{
  725 + QT0 = float128_abs(QT1);
  726 +}
  727 +#endif
640 728 #endif
641 729  
642 730 void helper_fsqrts(void)
... ... @@ -649,6 +737,13 @@ void helper_fsqrtd(void)
649 737 DT0 = float64_sqrt(DT1, &env->fp_status);
650 738 }
651 739  
  740 +#if defined(CONFIG_USER_ONLY)
  741 +void helper_fsqrtq(void)
  742 +{
  743 + QT0 = float128_sqrt(QT1, &env->fp_status);
  744 +}
  745 +#endif
  746 +
652 747 #define GEN_FCMP(name, size, reg1, reg2, FS, TRAP) \
653 748 void glue(helper_, name) (void) \
654 749 { \
... ... @@ -686,6 +781,11 @@ GEN_FCMP(fcmpd, float64, DT0, DT1, 0, 0);
686 781 GEN_FCMP(fcmpes, float32, FT0, FT1, 0, 1);
687 782 GEN_FCMP(fcmped, float64, DT0, DT1, 0, 1);
688 783  
  784 +#ifdef CONFIG_USER_ONLY
  785 +GEN_FCMP(fcmpq, float128, QT0, QT1, 0, 0);
  786 +GEN_FCMP(fcmpeq, float128, QT0, QT1, 0, 1);
  787 +#endif
  788 +
689 789 #ifdef TARGET_SPARC64
690 790 GEN_FCMP(fcmps_fcc1, float32, FT0, FT1, 22, 0);
691 791 GEN_FCMP(fcmpd_fcc1, float64, DT0, DT1, 22, 0);
... ... @@ -704,6 +804,14 @@ GEN_FCMP(fcmped_fcc2, float64, DT0, DT1, 24, 1);
704 804  
705 805 GEN_FCMP(fcmpes_fcc3, float32, FT0, FT1, 26, 1);
706 806 GEN_FCMP(fcmped_fcc3, float64, DT0, DT1, 26, 1);
  807 +#ifdef CONFIG_USER_ONLY
  808 +GEN_FCMP(fcmpq_fcc1, float128, QT0, QT1, 22, 0);
  809 +GEN_FCMP(fcmpq_fcc2, float128, QT0, QT1, 24, 0);
  810 +GEN_FCMP(fcmpq_fcc3, float128, QT0, QT1, 26, 0);
  811 +GEN_FCMP(fcmpeq_fcc1, float128, QT0, QT1, 22, 1);
  812 +GEN_FCMP(fcmpeq_fcc2, float128, QT0, QT1, 24, 1);
  813 +GEN_FCMP(fcmpeq_fcc3, float128, QT0, QT1, 26, 1);
  814 +#endif
707 815 #endif
708 816  
709 817 #if !defined(TARGET_SPARC64) && !defined(CONFIG_USER_ONLY) && defined(DEBUG_MXCC)
... ...