Skip to contentSkip to conversation

M68k for 2.12 patches

GIT PULL Laurent Vivier 3 participants 14 messages Mar 9, 2018 – Apr 27, 2018

lore
Share & tools
lore
#0 lore raw

The following changes since commit e1ee9ee139ed7091c2c592d5b784fbb7227bfc0d:

Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.12-20180306' into staging (2018-03-06 10:21:35 +0000)

are available in the Git repository at:

git://github.com/vivier/qemu-m68k.git tags/m68k-for-2.12-pull-request

for you to fetch changes up to 2c7c1717175c9a522746fb43316a63e16a636c7b:

target/m68k: implement ftentox (2018-03-09 15:10:42 +0100)

----------------------------------------------------------------

----------------------------------------------------------------

Laurent Vivier (8):
target/m68k: define floatx80_move()
target/m68k: implement flognp1
target/m68k: implement flogn
target/m68k: implement flog10
target/m68k: implement flog2
target/m68k: implement fetox
target/m68k: implement ftwotox
target/m68k: implement ftentox

 target/m68k/fpu_helper.c            |   35 ++
 target/m68k/helper.h                |    7 +
 target/m68k/softfloat.c             | 1019 +++++++++++++++++++++++++++++++++++
 target/m68k/softfloat.h             |    8 +
 target/m68k/softfloat_fpsp_tables.h |  374 +++++++++++++
 target/m68k/translate.c             |   21 +
 6 files changed, 1464 insertions(+)
 create mode 100755 target/m68k/softfloat_fpsp_tables.h
Signature · 1 line
2.14.3
#1 lore raw

[Qemu-devel] [PULL 1/8] target/m68k: define floatx80_move()

This functions is needed by upcoming m68k softfloat functions.

Source code copied for WinUAE (tag 3500) (The WinUAE file has been copied from QEMU and has the QEMU licensing notice)

Message-Id: <[email protected]>

---
 target/m68k/softfloat.c | 27 +++++++++++++++++++++++++++
 target/m68k/softfloat.h |  1 +
 2 files changed, 28 insertions(+)
target/m68k/softfloat.c +27 -0
index 9cb141900c..55eb7a260a 100644
@@ -247,3 +247,30 @@ floatx80 floatx80_scale(floatx80 a, floatx80 b, float_status *status)
     return roundAndPackFloatx80(status->floatx80_rounding_precision,
                                 aSign, aExp, aSig, 0, status);
 }
+
+floatx80 floatx80_move(floatx80 a, float_status *status)
+{
+    flag aSign;
+    int32_t aExp;
+    uint64_t aSig;
+
+    aSig = extractFloatx80Frac(a);
+    aExp = extractFloatx80Exp(a);
+    aSign = extractFloatx80Sign(a);
+
+    if (aExp == 0x7FFF) {
+        if ((uint64_t)(aSig << 1)) {
+            return propagateFloatx80NaNOneArg(a, status);
+        }
+        return a;
+    }
+    if (aExp == 0) {
+        if (aSig == 0) {
+            return a;
+        }
+        normalizeRoundAndPackFloatx80(status->floatx80_rounding_precision,
+                                      aSign, aExp, aSig, 0, status);
+    }
+    return roundAndPackFloatx80(status->floatx80_rounding_precision, aSign,
+                                aExp, aSig, 0, status);
+}
target/m68k/softfloat.h +1 -0
index 78fbc0cd0c..18561b870d 100644
@@ -26,4 +26,5 @@ floatx80 floatx80_mod(floatx80 a, floatx80 b, float_status *status);
 floatx80 floatx80_getman(floatx80 a, float_status *status);
 floatx80 floatx80_getexp(floatx80 a, float_status *status);
 floatx80 floatx80_scale(floatx80 a, floatx80 b, float_status *status);
+floatx80 floatx80_move(floatx80 a, float_status *status);
 #endif
Signature · 1 line
2.14.3
#2 lore raw

[Qemu-devel] [PULL 5/8] target/m68k: implement flog2

In reply to Laurent Vivier

Using a local m68k floatx80_log2()
[copied from previous:
Written by Andreas Grabher for Previous, NeXT Computer Emulator.]

Message-Id: <[email protected]>

---
 target/m68k/fpu_helper.c |  5 ++++
 target/m68k/helper.h     |  1 +
 target/m68k/softfloat.c  | 67 ++++++++++++++++++++++++++++++++++++++++++++++++
 target/m68k/softfloat.h  |  1 +
 target/m68k/translate.c  |  3 +++
 5 files changed, 77 insertions(+)
target/m68k/fpu_helper.c +5 -0
index 2628534136..97a4501126 100644
@@ -572,3 +572,8 @@ void HELPER(flog10)(CPUM68KState *env, FPReg *res, FPReg *val)
 {
     res->d = floatx80_log10(val->d, &env->fp_status);
 }
+
+void HELPER(flog2)(CPUM68KState *env, FPReg *res, FPReg *val)
+{
+    res->d = floatx80_log2(val->d, &env->fp_status);
+}
target/m68k/helper.h +1 -0
index d1f38f260f..15f63b353f 100644
@@ -71,6 +71,7 @@ DEF_HELPER_4(fscale, void, env, fp, fp, fp)
 DEF_HELPER_3(flognp1, void, env, fp, fp)
 DEF_HELPER_3(flogn, void, env, fp, fp)
 DEF_HELPER_3(flog10, void, env, fp, fp)
+DEF_HELPER_3(flog2, void, env, fp, fp)
 
 DEF_HELPER_3(mac_move, void, env, i32, i32)
 DEF_HELPER_3(macmulf, i64, env, i32, i32)
target/m68k/softfloat.c +67 -0

70 lines not on this page · raw message

target/m68k/softfloat.h +1 -0
index ac29e76189..c0b77cf01b 100644
@@ -30,4 +30,5 @@ floatx80 floatx80_move(floatx80 a, float_status *status);
 floatx80 floatx80_lognp1(floatx80 a, float_status *status);
 floatx80 floatx80_logn(floatx80 a, float_status *status);
 floatx80 floatx80_log10(floatx80 a, float_status *status);
+floatx80 floatx80_log2(floatx80 a, float_status *status);
 #endif
target/m68k/translate.c +3 -0
index f1130df314..189b23d38d 100644
@@ -5063,6 +5063,9 @@ DISAS_INSN(fpu)
     case 0x15: /* flog10 */
         gen_helper_flog10(cpu_env, cpu_dest, cpu_src);
         break;
+    case 0x16: /* flog2 */
+        gen_helper_flog2(cpu_env, cpu_dest, cpu_src);
+        break;
     case 0x18: /* fabs */
         gen_helper_fabs(cpu_env, cpu_dest, cpu_src);
         break;
Signature · 1 line
2.14.3
#3 lore raw

[Qemu-devel] [PULL 3/8] target/m68k: implement flogn

In reply to Laurent Vivier

Using a local m68k floatx80_logn()
[copied from previous:
Written by Andreas Grabher for Previous, NeXT Computer Emulator.]

Message-Id: <[email protected]>

---
 target/m68k/fpu_helper.c |   5 ++
 target/m68k/helper.h     |   1 +
 target/m68k/softfloat.c  | 168 +++++++++++++++++++++++++++++++++++++++++++++++
 target/m68k/softfloat.h  |   1 +
 target/m68k/translate.c  |   3 +
 5 files changed, 178 insertions(+)
target/m68k/fpu_helper.c +5 -0
index 614064612e..cc6d3dfa52 100644
@@ -562,3 +562,8 @@ void HELPER(flognp1)(CPUM68KState *env, FPReg *res, FPReg *val)
 {
     res->d = floatx80_lognp1(val->d, &env->fp_status);
 }
+
+void HELPER(flogn)(CPUM68KState *env, FPReg *res, FPReg *val)
+{
+    res->d = floatx80_logn(val->d, &env->fp_status);
+}
target/m68k/helper.h +1 -0
index f7e6fc8c40..68e5f4c0a7 100644
@@ -69,6 +69,7 @@ DEF_HELPER_3(fgetexp, void, env, fp, fp)
 DEF_HELPER_3(fgetman, void, env, fp, fp)
 DEF_HELPER_4(fscale, void, env, fp, fp, fp)
 DEF_HELPER_3(flognp1, void, env, fp, fp)
+DEF_HELPER_3(flogn, void, env, fp, fp)
 
 DEF_HELPER_3(mac_move, void, env, i32, i32)
 DEF_HELPER_3(macmulf, i64, env, i32, i32)
target/m68k/softfloat.c +168 -0

171 lines not on this page · raw message

target/m68k/softfloat.h +1 -0
index 4d74eaf862..161bd6dff7 100644
@@ -28,4 +28,5 @@ floatx80 floatx80_getexp(floatx80 a, float_status *status);
 floatx80 floatx80_scale(floatx80 a, floatx80 b, float_status *status);
 floatx80 floatx80_move(floatx80 a, float_status *status);
 floatx80 floatx80_lognp1(floatx80 a, float_status *status);
+floatx80 floatx80_logn(floatx80 a, float_status *status);
 #endif
target/m68k/translate.c +3 -0
index 2c3d20154a..705b9b0d5b 100644
@@ -5057,6 +5057,9 @@ DISAS_INSN(fpu)
     case 0x06: /* flognp1 */
         gen_helper_flognp1(cpu_env, cpu_dest, cpu_src);
         break;
+    case 0x14: /* flogn */
+        gen_helper_flogn(cpu_env, cpu_dest, cpu_src);
+        break;
     case 0x18: /* fabs */
         gen_helper_fabs(cpu_env, cpu_dest, cpu_src);
         break;
Signature · 1 line
2.14.3
#4 lore raw

[Qemu-devel] [PULL 4/8] target/m68k: implement flog10

In reply to Laurent Vivier

Using a local m68k floatx80_log10()
[copied from previous:
Written by Andreas Grabher for Previous, NeXT Computer Emulator.]

Message-Id: <[email protected]>

---
 target/m68k/fpu_helper.c |  5 +++++
 target/m68k/helper.h     |  1 +
 target/m68k/softfloat.c  | 57 ++++++++++++++++++++++++++++++++++++++++++++++++
 target/m68k/softfloat.h  |  1 +
 target/m68k/translate.c  |  3 +++
 5 files changed, 67 insertions(+)
target/m68k/fpu_helper.c +5 -0
index cc6d3dfa52..2628534136 100644
@@ -567,3 +567,8 @@ void HELPER(flogn)(CPUM68KState *env, FPReg *res, FPReg *val)
 {
     res->d = floatx80_logn(val->d, &env->fp_status);
 }
+
+void HELPER(flog10)(CPUM68KState *env, FPReg *res, FPReg *val)
+{
+    res->d = floatx80_log10(val->d, &env->fp_status);
+}
target/m68k/helper.h +1 -0
index 68e5f4c0a7..d1f38f260f 100644
@@ -70,6 +70,7 @@ DEF_HELPER_3(fgetman, void, env, fp, fp)
 DEF_HELPER_4(fscale, void, env, fp, fp, fp)
 DEF_HELPER_3(flognp1, void, env, fp, fp)
 DEF_HELPER_3(flogn, void, env, fp, fp)
+DEF_HELPER_3(flog10, void, env, fp, fp)
 
 DEF_HELPER_3(mac_move, void, env, i32, i32)
 DEF_HELPER_3(macmulf, i64, env, i32, i32)
target/m68k/softfloat.c +57 -0

60 lines not on this page · raw message

target/m68k/softfloat.h +1 -0
index 161bd6dff7..ac29e76189 100644
@@ -29,4 +29,5 @@ floatx80 floatx80_scale(floatx80 a, floatx80 b, float_status *status);
 floatx80 floatx80_move(floatx80 a, float_status *status);
 floatx80 floatx80_lognp1(floatx80 a, float_status *status);
 floatx80 floatx80_logn(floatx80 a, float_status *status);
+floatx80 floatx80_log10(floatx80 a, float_status *status);
 #endif
target/m68k/translate.c +3 -0
index 705b9b0d5b..f1130df314 100644
@@ -5060,6 +5060,9 @@ DISAS_INSN(fpu)
     case 0x14: /* flogn */
         gen_helper_flogn(cpu_env, cpu_dest, cpu_src);
         break;
+    case 0x15: /* flog10 */
+        gen_helper_flog10(cpu_env, cpu_dest, cpu_src);
+        break;
     case 0x18: /* fabs */
         gen_helper_fabs(cpu_env, cpu_dest, cpu_src);
         break;
Signature · 1 line
2.14.3
#5 lore raw

[Qemu-devel] [PULL 2/8] target/m68k: implement flognp1

In reply to Laurent Vivier

Using a local m68k floatx80_lognp1()
[copied from previous:
Written by Andreas Grabher for Previous, NeXT Computer Emulator.]

Message-Id: <[email protected]>

---
 target/m68k/fpu_helper.c            |   5 +
 target/m68k/helper.h                |   1 +
 target/m68k/softfloat.c             | 216 ++++++++++++++++++++++++++++++++++++
 target/m68k/softfloat.h             |   1 +
 target/m68k/softfloat_fpsp_tables.h | 154 +++++++++++++++++++++++++
 target/m68k/translate.c             |   3 +
 6 files changed, 380 insertions(+)
 create mode 100755 target/m68k/softfloat_fpsp_tables.h
target/m68k/fpu_helper.c +5 -0
index cdb9b50462..614064612e 100644
@@ -557,3 +557,8 @@ void HELPER(fscale)(CPUM68KState *env, FPReg *res, FPReg *val0, FPReg *val1)
 {
     res->d = floatx80_scale(val1->d, val0->d, &env->fp_status);
 }
+
+void HELPER(flognp1)(CPUM68KState *env, FPReg *res, FPReg *val)
+{
+    res->d = floatx80_lognp1(val->d, &env->fp_status);
+}
target/m68k/helper.h +1 -0
index c348dced3a..f7e6fc8c40 100644
@@ -68,6 +68,7 @@ DEF_HELPER_4(frem, void, env, fp, fp, fp)
 DEF_HELPER_3(fgetexp, void, env, fp, fp)
 DEF_HELPER_3(fgetman, void, env, fp, fp)
 DEF_HELPER_4(fscale, void, env, fp, fp, fp)
+DEF_HELPER_3(flognp1, void, env, fp, fp)
 
 DEF_HELPER_3(mac_move, void, env, i32, i32)
 DEF_HELPER_3(macmulf, i64, env, i32, i32)
target/m68k/softfloat.c +216 -0

225 lines not on this page · raw message

target/m68k/softfloat.h +1 -0
index 18561b870d..4d74eaf862 100644
@@ -27,4 +27,5 @@ floatx80 floatx80_getman(floatx80 a, float_status *status);
 floatx80 floatx80_getexp(floatx80 a, float_status *status);
 floatx80 floatx80_scale(floatx80 a, floatx80 b, float_status *status);
 floatx80 floatx80_move(floatx80 a, float_status *status);
+floatx80 floatx80_lognp1(floatx80 a, float_status *status);
 #endif
target/m68k/softfloat_fpsp_tables.h new file +154 -0

154 lines not on this page · raw message

target/m68k/translate.c +3 -0
index dbb24f8d84..2c3d20154a 100644
@@ -5054,6 +5054,9 @@ DISAS_INSN(fpu)
     case 0x45: /* fdsqrt */
         gen_helper_fdsqrt(cpu_env, cpu_dest, cpu_src);
         break;
+    case 0x06: /* flognp1 */
+        gen_helper_flognp1(cpu_env, cpu_dest, cpu_src);
+        break;
     case 0x18: /* fabs */
         gen_helper_fabs(cpu_env, cpu_dest, cpu_src);
         break;
Signature · 1 line
2.14.3
#6 lore raw

Re: [Qemu-devel] [PULL 2/8] target/m68k: implement flognp1

Quoted 9 lines · Laurent Vivier

Using a local m68k floatx80_lognp1()
[copied from previous:
Written by Andreas Grabher for Previous, NeXT Computer Emulator.]

Message-Id: <[email protected]>

target/m68k/softfloat.c +2 -0
+floatx80 floatx80_lognp1(floatx80 a, float_status *status)
+{

...

target/m68k/softfloat.c floatx80 floatx80_move(floatx80 a, float_status *status) · line 333

Quoted 4 lines
target/m68k/softfloat.c +4 -0
+    if (aSign && aExp >= one_exp) {
+        if (aExp == one_exp && aSig == one_sig) {
+            float_raise(float_flag_divbyzero, status);
+            packFloatx80(aSign, floatx80_infinity.high, floatx80_infinity.low);

Hi; Coverity (CID1390587) points out that packFloatx80 doesn't do anything except return a value which is here being thrown away, making the call useless. Should this be maybe "return packFloatx80(...)" ?

Quoted 1 line

+ }

thanks
-- PMM

#7 lore raw

Re: [Qemu-devel] [PULL 2/8] target/m68k: implement flognp1

Le 27/04/2018 à 15:43, Peter Maydell a écrit :

Quoted 18 lines · Laurent Vivier
Quoted 9 lines

Using a local m68k floatx80_lognp1()
[copied from previous:
Written by Andreas Grabher for Previous, NeXT Computer Emulator.]

Message-Id: <[email protected]>

target/m68k/softfloat.c +2 -0
+floatx80 floatx80_lognp1(floatx80 a, float_status *status)
+{

...

target/m68k/softfloat.c floatx80 floatx80_move(floatx80 a, float_status *status) · line 333

Quoted 4 lines
target/m68k/softfloat.c +4 -0
+    if (aSign && aExp >= one_exp) {
+        if (aExp == one_exp && aSig == one_sig) {
+            float_raise(float_flag_divbyzero, status);
+            packFloatx80(aSign, floatx80_infinity.high, floatx80_infinity.low);
Quoted 4 lines

Hi; Coverity (CID1390587) points out that packFloatx80 doesn't do anything except return a value which is here being thrown away, making the call useless. Should this be maybe "return packFloatx80(...)" ?

Yes, you're right, I didn't correctly port the code from "Previous" here.

Thanks,
Laurent

#8 lore raw

[Qemu-devel] [PULL 6/8] target/m68k: implement fetox

In reply to Laurent Vivier

Using a local m68k floatx80_etox()
[copied from previous:
Written by Andreas Grabher for Previous, NeXT Computer Emulator.]

Message-Id: <[email protected]>

---
 target/m68k/fpu_helper.c            |   5 +
 target/m68k/helper.h                |   1 +
 target/m68k/softfloat.c             | 183 ++++++++++++++++++++++++++++++++++++
 target/m68k/softfloat.h             |   1 +
 target/m68k/softfloat_fpsp_tables.h | 134 ++++++++++++++++++++++++++
 target/m68k/translate.c             |   3 +
 6 files changed, 327 insertions(+)
target/m68k/fpu_helper.c +5 -0
index 97a4501126..154666cbb5 100644
@@ -577,3 +577,8 @@ void HELPER(flog2)(CPUM68KState *env, FPReg *res, FPReg *val)
 {
     res->d = floatx80_log2(val->d, &env->fp_status);
 }
+
+void HELPER(fetox)(CPUM68KState *env, FPReg *res, FPReg *val)
+{
+    res->d = floatx80_etox(val->d, &env->fp_status);
+}
target/m68k/helper.h +1 -0
index 15f63b353f..70aeb2da7c 100644
@@ -72,6 +72,7 @@ DEF_HELPER_3(flognp1, void, env, fp, fp)
 DEF_HELPER_3(flogn, void, env, fp, fp)
 DEF_HELPER_3(flog10, void, env, fp, fp)
 DEF_HELPER_3(flog2, void, env, fp, fp)
+DEF_HELPER_3(fetox, void, env, fp, fp)
 
 DEF_HELPER_3(mac_move, void, env, i32, i32)
 DEF_HELPER_3(macmulf, i64, env, i32, i32)
target/m68k/softfloat.c +183 -0

186 lines not on this page · raw message

target/m68k/softfloat.h +1 -0
index c0b77cf01b..250f0d926f 100644
@@ -31,4 +31,5 @@ floatx80 floatx80_lognp1(floatx80 a, float_status *status);
 floatx80 floatx80_logn(floatx80 a, float_status *status);
 floatx80 floatx80_log10(floatx80 a, float_status *status);
 floatx80 floatx80_log2(floatx80 a, float_status *status);
+floatx80 floatx80_etox(floatx80 a, float_status *status);
 #endif
target/m68k/softfloat_fpsp_tables.h +134 -0

138 lines not on this page · raw message

target/m68k/translate.c +3 -0
index 189b23d38d..4774310ded 100644
@@ -5057,6 +5057,9 @@ DISAS_INSN(fpu)
     case 0x06: /* flognp1 */
         gen_helper_flognp1(cpu_env, cpu_dest, cpu_src);
         break;
+    case 0x10: /* fetox */
+        gen_helper_fetox(cpu_env, cpu_dest, cpu_src);
+        break;
     case 0x14: /* flogn */
         gen_helper_flogn(cpu_env, cpu_dest, cpu_src);
         break;
Signature · 1 line
2.14.3
#9 lore raw

[Qemu-devel] [PULL 7/8] target/m68k: implement ftwotox

In reply to Laurent Vivier

Using a local m68k floatx80_twotox()
[copied from previous:
Written by Andreas Grabher for Previous, NeXT Computer Emulator.]

Message-Id: <[email protected]>

---
 target/m68k/fpu_helper.c            |   5 ++
 target/m68k/helper.h                |   1 +
 target/m68k/softfloat.c             | 148 ++++++++++++++++++++++++++++++++++++
 target/m68k/softfloat.h             |   1 +
 target/m68k/softfloat_fpsp_tables.h |  86 +++++++++++++++++++++
 target/m68k/translate.c             |   3 +
 6 files changed, 244 insertions(+)
target/m68k/fpu_helper.c +5 -0
index 154666cbb5..f488a92ab2 100644
@@ -582,3 +582,8 @@ void HELPER(fetox)(CPUM68KState *env, FPReg *res, FPReg *val)
 {
     res->d = floatx80_etox(val->d, &env->fp_status);
 }
+
+void HELPER(ftwotox)(CPUM68KState *env, FPReg *res, FPReg *val)
+{
+    res->d = floatx80_twotox(val->d, &env->fp_status);
+}
target/m68k/helper.h +1 -0
index 70aeb2da7c..8caa82296d 100644
@@ -73,6 +73,7 @@ DEF_HELPER_3(flogn, void, env, fp, fp)
 DEF_HELPER_3(flog10, void, env, fp, fp)
 DEF_HELPER_3(flog2, void, env, fp, fp)
 DEF_HELPER_3(fetox, void, env, fp, fp)
+DEF_HELPER_3(ftwotox, void, env, fp, fp)
 
 DEF_HELPER_3(mac_move, void, env, i32, i32)
 DEF_HELPER_3(macmulf, i64, env, i32, i32)
target/m68k/softfloat.c +148 -0

151 lines not on this page · raw message

target/m68k/softfloat.h +1 -0
index 250f0d926f..964275d2a5 100644
@@ -32,4 +32,5 @@ floatx80 floatx80_logn(floatx80 a, float_status *status);
 floatx80 floatx80_log10(floatx80 a, float_status *status);
 floatx80 floatx80_log2(floatx80 a, float_status *status);
 floatx80 floatx80_etox(floatx80 a, float_status *status);
+floatx80 floatx80_twotox(floatx80 a, float_status *status);
 #endif
target/m68k/softfloat_fpsp_tables.h +86 -0

90 lines not on this page · raw message

target/m68k/translate.c +3 -0
index 4774310ded..c65c82e258 100644
@@ -5060,6 +5060,9 @@ DISAS_INSN(fpu)
     case 0x10: /* fetox */
         gen_helper_fetox(cpu_env, cpu_dest, cpu_src);
         break;
+    case 0x11: /* ftwotox */
+        gen_helper_ftwotox(cpu_env, cpu_dest, cpu_src);
+        break;
     case 0x14: /* flogn */
         gen_helper_flogn(cpu_env, cpu_dest, cpu_src);
         break;
Signature · 1 line
2.14.3
#10 lore raw

[Qemu-devel] [PULL 8/8] target/m68k: implement ftentox

In reply to Laurent Vivier

Using a local m68k floatx80_tentox()
[copied from previous:
Written by Andreas Grabher for Previous, NeXT Computer Emulator.]

Message-Id: <[email protected]>

---
 target/m68k/fpu_helper.c |   5 ++
 target/m68k/helper.h     |   1 +
 target/m68k/softfloat.c  | 153 +++++++++++++++++++++++++++++++++++++++++++++++
 target/m68k/softfloat.h  |   1 +
 target/m68k/translate.c  |   3 +
 5 files changed, 163 insertions(+)
target/m68k/fpu_helper.c +5 -0
index f488a92ab2..62cbb0dff1 100644
@@ -587,3 +587,8 @@ void HELPER(ftwotox)(CPUM68KState *env, FPReg *res, FPReg *val)
 {
     res->d = floatx80_twotox(val->d, &env->fp_status);
 }
+
+void HELPER(ftentox)(CPUM68KState *env, FPReg *res, FPReg *val)
+{
+    res->d = floatx80_tentox(val->d, &env->fp_status);
+}
target/m68k/helper.h +1 -0
index 8caa82296d..9a9734c196 100644
@@ -74,6 +74,7 @@ DEF_HELPER_3(flog10, void, env, fp, fp)
 DEF_HELPER_3(flog2, void, env, fp, fp)
 DEF_HELPER_3(fetox, void, env, fp, fp)
 DEF_HELPER_3(ftwotox, void, env, fp, fp)
+DEF_HELPER_3(ftentox, void, env, fp, fp)
 
 DEF_HELPER_3(mac_move, void, env, i32, i32)
 DEF_HELPER_3(macmulf, i64, env, i32, i32)
target/m68k/softfloat.c +153 -0

156 lines not on this page · raw message

target/m68k/softfloat.h +1 -0
index 964275d2a5..d28e49fe9f 100644
@@ -33,4 +33,5 @@ floatx80 floatx80_log10(floatx80 a, float_status *status);
 floatx80 floatx80_log2(floatx80 a, float_status *status);
 floatx80 floatx80_etox(floatx80 a, float_status *status);
 floatx80 floatx80_twotox(floatx80 a, float_status *status);
+floatx80 floatx80_tentox(floatx80 a, float_status *status);
 #endif
target/m68k/translate.c +3 -0
index c65c82e258..6d5bde0777 100644
@@ -5063,6 +5063,9 @@ DISAS_INSN(fpu)
     case 0x11: /* ftwotox */
         gen_helper_ftwotox(cpu_env, cpu_dest, cpu_src);
         break;
+    case 0x12: /* ftentox */
+        gen_helper_ftentox(cpu_env, cpu_dest, cpu_src);
+        break;
     case 0x14: /* flogn */
         gen_helper_flogn(cpu_env, cpu_dest, cpu_src);
         break;
Signature · 1 line
2.14.3
#11 lore raw
In reply to Laurent Vivier
This series seems to have some coding style problems. See output below for more information:

Hi,

This series seems to have some coding style problems. See output below for more information:

Type: series
Message-id: [email protected]
Subject: [Qemu-devel] [PULL 0/8] M68k for 2.12 patches

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram

commits="$(git log --format=%H --reverse $BASE..)" for c in $commits; do

    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))

done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
* [new tag] patchew/[email protected] -> patchew/[email protected]
* [new tag] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
5e3764cd71 target/m68k: implement ftentox
129d677ada target/m68k: implement ftwotox
938c4bd99b target/m68k: implement fetox
7364da0f5a target/m68k: implement flog2
7e25fb5a48 target/m68k: implement flog10
e2e2db69d6 target/m68k: implement flogn
a4de7c4950 target/m68k: implement flognp1
cd93226a31 target/m68k: define floatx80_move()

=== OUTPUT BEGIN ===
Checking PATCH 1/8: target/m68k: define floatx80_move()... Checking PATCH 2/8: target/m68k: implement flognp1...
ERROR: do not set execute permissions for source files #281: FILE: target/m68k/softfloat_fpsp_tables.h

total: 1 errors, 0 warnings, 408 lines checked

Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

Checking PATCH 3/8: target/m68k: implement flogn... Checking PATCH 4/8: target/m68k: implement flog10... Checking PATCH 5/8: target/m68k: implement flog2... Checking PATCH 6/8: target/m68k: implement fetox... Checking PATCH 7/8: target/m68k: implement ftwotox... Checking PATCH 8/8: target/m68k: implement ftentox... === OUTPUT END ===

Test command exited with code: 1

---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]

#12 lore raw
Quoted 10 lines · On 9 March 2018 at 14:45, <[email protected]> wrote:

Hi,

This series seems to have some coding style problems. See output below for more information:

Checking PATCH 2/8: target/m68k: implement flognp1...
ERROR: do not set execute permissions for source files #281: FILE: target/m68k/softfloat_fpsp_tables.h

total: 1 errors, 0 warnings, 408 lines checked

Oops. Could you fix the file permissions and resend, please, Laurent ?

(I don't normally worry about checkpatch issues on pull requests, but this one seems significant enough to be worth fixing.)

thanks
-- PMM

#13 lore raw

Le 09/03/2018 à 15:50, Peter Maydell a écrit :

Quoted 6 lines · On 9 March 2018 at 14:45, <[email protected]> wrote:
Quoted 4 lines

Hi,

This series seems to have some coding style problems. See output below for more information:

Quoted 8 lines
Quoted 5 lines

Checking PATCH 2/8: target/m68k: implement flognp1...
ERROR: do not set execute permissions for source files #281: FILE: target/m68k/softfloat_fpsp_tables.h

total: 1 errors, 0 warnings, 408 lines checked

Oops. Could you fix the file permissions and resend, please, Laurent ?

Yes, I'm doing that now.

Thanks,
Laurent