Skip to contentSkip to conversation

M68k for 2.12 patches

GIT PULL Applied Laurent Vivier 2 participants 15 messages Mar 13, 2018 – Apr 27, 2018

lore
Share & tools
lore
#0 lore raw

The following changes since commit 59667bb167f773965ce6547352f312eff0d4d523:

Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' into staging (2018-03-13 14:02:47 +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 02f9124ebe26c36f0f7ed58085bd963e4372b2cd:

target/m68k: implement fcosh (2018-03-13 16:35:05 +0100)

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

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

Laurent Vivier (11):
target/m68k: implement ftan
target/m68k: implement fsin
target/m68k: implement fcos
target/m68k: implement fsincos
target/m68k: implement fatan
target/m68k: implement fasin
target/m68k: implement facos
target/m68k: implement fatanh
target/m68k: implement ftanh
target/m68k: implement fsinh
target/m68k: implement fcosh

 target/m68k/fpu_helper.c            |   61 ++
 target/m68k/helper.h                |   11 +
 target/m68k/softfloat.c             | 1637 +++++++++++++++++++++++++++++++++++
 target/m68k/softfloat.h             |   11 +
 target/m68k/softfloat_fpsp_tables.h |  267 ++++++
 target/m68k/translate.c             |   38 +
 6 files changed, 2025 insertions(+)
Signature · 1 line
2.14.3
#1 lore raw

[Qemu-devel] [PULL 07/11] target/m68k: implement facos

Using a local m68k floatx80_acos()
[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  | 70 ++++++++++++++++++++++++++++++++++++++++++++++++
 target/m68k/softfloat.h  |  1 +
 target/m68k/translate.c  |  3 +++
 5 files changed, 80 insertions(+)
target/m68k/fpu_helper.c +5 -0
index 972cc97d96..18ad6999cb 100644
@@ -628,3 +628,8 @@ void HELPER(fasin)(CPUM68KState *env, FPReg *res, FPReg *val)
 {
     res->d = floatx80_asin(val->d, &env->fp_status);
 }
+
+void HELPER(facos)(CPUM68KState *env, FPReg *res, FPReg *val)
+{
+    res->d = floatx80_acos(val->d, &env->fp_status);
+}
target/m68k/helper.h +1 -0
index e1aca375e0..83247a8143 100644
@@ -81,6 +81,7 @@ DEF_HELPER_3(fcos, void, env, fp, fp)
 DEF_HELPER_4(fsincos, void, env, fp, fp, fp)
 DEF_HELPER_3(fatan, void, env, fp, fp)
 DEF_HELPER_3(fasin, void, env, fp, fp)
+DEF_HELPER_3(facos, 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 +70 -0

79 lines not on this page · raw message

target/m68k/softfloat.h +1 -0
index ca0eb674aa..1140491c81 100644
@@ -39,4 +39,5 @@ floatx80 floatx80_sin(floatx80 a, float_status *status);
 floatx80 floatx80_cos(floatx80 a, float_status *status);
 floatx80 floatx80_atan(floatx80 a, float_status *status);
 floatx80 floatx80_asin(floatx80 a, float_status *status);
+floatx80 floatx80_acos(floatx80 a, float_status *status);
 #endif
target/m68k/translate.c +3 -0
index d4169c4533..5fad76c785 100644
@@ -5105,6 +5105,9 @@ DISAS_INSN(fpu)
     case 0x5e: /* fdneg */
         gen_helper_fdneg(cpu_env, cpu_dest, cpu_src);
         break;
+    case 0x1c: /* facos */
+        gen_helper_facos(cpu_env, cpu_dest, cpu_src);
+        break;
     case 0x1d: /* fcos */
         gen_helper_fcos(cpu_env, cpu_dest, cpu_src);
         break;
Signature · 1 line
2.14.3
#2 lore raw

[Qemu-devel] [PULL 09/11] target/m68k: implement ftanh

In reply to Laurent Vivier

Using local m68k floatx80_tanh() and floatx80_etoxm1() [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  | 366 +++++++++++++++++++++++++++++++++++++++++++++++
 target/m68k/softfloat.h  |   2 +
 target/m68k/translate.c  |   3 +
 5 files changed, 377 insertions(+)
target/m68k/fpu_helper.c +5 -0
index 38b663e1d2..7d68879f34 100644
@@ -638,3 +638,8 @@ void HELPER(fatanh)(CPUM68KState *env, FPReg *res, FPReg *val)
 {
     res->d = floatx80_atanh(val->d, &env->fp_status);
 }
+
+void HELPER(ftanh)(CPUM68KState *env, FPReg *res, FPReg *val)
+{
+    res->d = floatx80_tanh(val->d, &env->fp_status);
+}
target/m68k/helper.h +1 -0
index 092baec3d5..f100141367 100644
@@ -83,6 +83,7 @@ DEF_HELPER_3(fatan, void, env, fp, fp)
 DEF_HELPER_3(fasin, void, env, fp, fp)
 DEF_HELPER_3(facos, void, env, fp, fp)
 DEF_HELPER_3(fatanh, void, env, fp, fp)
+DEF_HELPER_3(ftanh, 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 +366 -0

369 lines not on this page · raw message

target/m68k/softfloat.h +2 -0
index e9943aed20..4cdb5a49ca 100644
@@ -41,4 +41,6 @@ floatx80 floatx80_atan(floatx80 a, float_status *status);
 floatx80 floatx80_asin(floatx80 a, float_status *status);
 floatx80 floatx80_acos(floatx80 a, float_status *status);
 floatx80 floatx80_atanh(floatx80 a, float_status *status);
+floatx80 floatx80_etoxm1(floatx80 a, float_status *status);
+floatx80 floatx80_tanh(floatx80 a, float_status *status);
 #endif
target/m68k/translate.c +3 -0
index 2f7caa0ca0..0caae904b5 100644
@@ -5057,6 +5057,9 @@ DISAS_INSN(fpu)
     case 0x06: /* flognp1 */
         gen_helper_flognp1(cpu_env, cpu_dest, cpu_src);
         break;
+    case 0x09: /* ftanh */
+        gen_helper_ftanh(cpu_env, cpu_dest, cpu_src);
+        break;
     case 0x0a: /* fatan */
         gen_helper_fatan(cpu_env, cpu_dest, cpu_src);
         break;
Signature · 1 line
2.14.3
#3 lore raw

[Qemu-devel] [PULL 04/11] target/m68k: implement fsincos

In reply to Laurent Vivier

using floatx80_sin() and floatx80_cos()

Message-Id: <[email protected]>

---
 target/m68k/fpu_helper.c | 11 +++++++++++
 target/m68k/helper.h     |  1 +
 target/m68k/translate.c  |  8 ++++++++
 3 files changed, 20 insertions(+)
target/m68k/fpu_helper.c +11 -0
index 71df19c685..36e34d42a8 100644
@@ -607,3 +607,14 @@ void HELPER(fcos)(CPUM68KState *env, FPReg *res, FPReg *val)
 {
     res->d = floatx80_cos(val->d, &env->fp_status);
 }
+
+void HELPER(fsincos)(CPUM68KState *env, FPReg *res0, FPReg *res1, FPReg *val)
+{
+    floatx80 a = val->d;
+    /* If res0 and res1 specify the same floating-point data register,
+     * the sine result is stored in the register, and the cosine
+     * result is discarded.
+     */
+    res1->d = floatx80_cos(a, &env->fp_status);
+    res0->d = floatx80_sin(a, &env->fp_status);
+}
target/m68k/helper.h +1 -0
index 767baf75a3..a168ffbaea 100644
@@ -78,6 +78,7 @@ DEF_HELPER_3(ftentox, void, env, fp, fp)
 DEF_HELPER_3(ftan, void, env, fp, fp)
 DEF_HELPER_3(fsin, void, env, fp, fp)
 DEF_HELPER_3(fcos, void, env, fp, fp)
+DEF_HELPER_4(fsincos, void, env, fp, fp, fp)
 
 DEF_HELPER_3(mac_move, void, env, i32, i32)
 DEF_HELPER_3(macmulf, i64, env, i32, i32)
target/m68k/translate.c +8 -0
index f47388da4b..a78edd8825 100644
@@ -5159,6 +5159,14 @@ DISAS_INSN(fpu)
     case 0x6c: /* fdsub */
         gen_helper_fdsub(cpu_env, cpu_dest, cpu_src, cpu_dest);
         break;
+    case 0x30: case 0x31: case 0x32:
+    case 0x33: case 0x34: case 0x35:
+    case 0x36: case 0x37: {
+            TCGv_ptr cpu_dest2 = gen_fp_ptr(REG(ext, 0));
+            gen_helper_fsincos(cpu_env, cpu_dest, cpu_dest2, cpu_src);
+            tcg_temp_free_ptr(cpu_dest2);
+        }
+        break;
     case 0x38: /* fcmp */
         gen_helper_fcmp(cpu_env, cpu_src, cpu_dest);
         return;
Signature · 1 line
2.14.3
#4 lore raw

[Qemu-devel] [PULL 05/11] target/m68k: implement fatan

In reply to Laurent Vivier

Using a local m68k floatx80_atan()
[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             | 200 ++++++++++++++++++++++++++++++++++++
 target/m68k/softfloat.h             |   1 +
 target/m68k/softfloat_fpsp_tables.h | 131 +++++++++++++++++++++++
 target/m68k/translate.c             |   3 +
 6 files changed, 341 insertions(+)
target/m68k/fpu_helper.c +5 -0
index 36e34d42a8..47328490ee 100644
@@ -618,3 +618,8 @@ void HELPER(fsincos)(CPUM68KState *env, FPReg *res0, FPReg *res1, FPReg *val)
     res1->d = floatx80_cos(a, &env->fp_status);
     res0->d = floatx80_sin(a, &env->fp_status);
 }
+
+void HELPER(fatan)(CPUM68KState *env, FPReg *res, FPReg *val)
+{
+    res->d = floatx80_atan(val->d, &env->fp_status);
+}
target/m68k/helper.h +1 -0
index a168ffbaea..304569e997 100644
@@ -79,6 +79,7 @@ DEF_HELPER_3(ftan, void, env, fp, fp)
 DEF_HELPER_3(fsin, void, env, fp, fp)
 DEF_HELPER_3(fcos, void, env, fp, fp)
 DEF_HELPER_4(fsincos, void, env, fp, fp, fp)
+DEF_HELPER_3(fatan, 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 +200 -0

209 lines not on this page · raw message

target/m68k/softfloat.h +1 -0
index 4fd5b2c609..eec45f3ffe 100644
@@ -37,4 +37,5 @@ floatx80 floatx80_tentox(floatx80 a, float_status *status);
 floatx80 floatx80_tan(floatx80 a, float_status *status);
 floatx80 floatx80_sin(floatx80 a, float_status *status);
 floatx80 floatx80_cos(floatx80 a, float_status *status);
+floatx80 floatx80_atan(floatx80 a, float_status *status);
 #endif
target/m68k/softfloat_fpsp_tables.h +131 -0

135 lines not on this page · raw message

target/m68k/translate.c +3 -0
index a78edd8825..88015e7ed8 100644
@@ -5057,6 +5057,9 @@ DISAS_INSN(fpu)
     case 0x06: /* flognp1 */
         gen_helper_flognp1(cpu_env, cpu_dest, cpu_src);
         break;
+    case 0x0a: /* fatan */
+        gen_helper_fatan(cpu_env, cpu_dest, cpu_src);
+        break;
     case 0x0e: /* fsin */
         gen_helper_fsin(cpu_env, cpu_dest, cpu_src);
         break;
Signature · 1 line
2.14.3
#5 lore raw

[Qemu-devel] [PULL 08/11] target/m68k: implement fatanh

In reply to Laurent Vivier

Using a local m68k floatx80_atanh()
[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  | 65 ++++++++++++++++++++++++++++++++++++++++++++++++
 target/m68k/softfloat.h  |  1 +
 target/m68k/translate.c  |  3 +++
 5 files changed, 75 insertions(+)
target/m68k/fpu_helper.c +5 -0
index 18ad6999cb..38b663e1d2 100644
@@ -633,3 +633,8 @@ void HELPER(facos)(CPUM68KState *env, FPReg *res, FPReg *val)
 {
     res->d = floatx80_acos(val->d, &env->fp_status);
 }
+
+void HELPER(fatanh)(CPUM68KState *env, FPReg *res, FPReg *val)
+{
+    res->d = floatx80_atanh(val->d, &env->fp_status);
+}
target/m68k/helper.h +1 -0
index 83247a8143..092baec3d5 100644
@@ -82,6 +82,7 @@ DEF_HELPER_4(fsincos, void, env, fp, fp, fp)
 DEF_HELPER_3(fatan, void, env, fp, fp)
 DEF_HELPER_3(fasin, void, env, fp, fp)
 DEF_HELPER_3(facos, void, env, fp, fp)
+DEF_HELPER_3(fatanh, 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 +65 -0

68 lines not on this page · raw message

target/m68k/softfloat.h +1 -0
index 1140491c81..e9943aed20 100644
@@ -40,4 +40,5 @@ floatx80 floatx80_cos(floatx80 a, float_status *status);
 floatx80 floatx80_atan(floatx80 a, float_status *status);
 floatx80 floatx80_asin(floatx80 a, float_status *status);
 floatx80 floatx80_acos(floatx80 a, float_status *status);
+floatx80 floatx80_atanh(floatx80 a, float_status *status);
 #endif
target/m68k/translate.c +3 -0
index 5fad76c785..2f7caa0ca0 100644
@@ -5063,6 +5063,9 @@ DISAS_INSN(fpu)
     case 0x0c: /* fasin */
         gen_helper_fasin(cpu_env, cpu_dest, cpu_src);
         break;
+    case 0x0d: /* fatanh */
+        gen_helper_fatanh(cpu_env, cpu_dest, cpu_src);
+        break;
     case 0x0e: /* fsin */
         gen_helper_fsin(cpu_env, cpu_dest, cpu_src);
         break;
Signature · 1 line
2.14.3
#6 lore raw

[Qemu-devel] [PULL 10/11] target/m68k: implement fsinh

In reply to Laurent Vivier

Using a local m68k floatx80_sinh()
[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  | 89 ++++++++++++++++++++++++++++++++++++++++++++++++
 target/m68k/softfloat.h  |  1 +
 target/m68k/translate.c  |  3 ++
 5 files changed, 99 insertions(+)
target/m68k/fpu_helper.c +5 -0
index 7d68879f34..4c969dfe00 100644
@@ -643,3 +643,8 @@ void HELPER(ftanh)(CPUM68KState *env, FPReg *res, FPReg *val)
 {
     res->d = floatx80_tanh(val->d, &env->fp_status);
 }
+
+void HELPER(fsinh)(CPUM68KState *env, FPReg *res, FPReg *val)
+{
+    res->d = floatx80_sinh(val->d, &env->fp_status);
+}
target/m68k/helper.h +1 -0
index f100141367..acdca1af03 100644
@@ -84,6 +84,7 @@ DEF_HELPER_3(fasin, void, env, fp, fp)
 DEF_HELPER_3(facos, void, env, fp, fp)
 DEF_HELPER_3(fatanh, void, env, fp, fp)
 DEF_HELPER_3(ftanh, void, env, fp, fp)
+DEF_HELPER_3(fsinh, 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 +89 -0

92 lines not on this page · raw message

target/m68k/softfloat.h +1 -0
index 4cdb5a49ca..f033abf9ea 100644
@@ -43,4 +43,5 @@ floatx80 floatx80_acos(floatx80 a, float_status *status);
 floatx80 floatx80_atanh(floatx80 a, float_status *status);
 floatx80 floatx80_etoxm1(floatx80 a, float_status *status);
 floatx80 floatx80_tanh(floatx80 a, float_status *status);
+floatx80 floatx80_sinh(floatx80 a, float_status *status);
 #endif
target/m68k/translate.c +3 -0
index 0caae904b5..7d83aaf91d 100644
@@ -5042,6 +5042,9 @@ DISAS_INSN(fpu)
     case 1: /* fint */
         gen_helper_firound(cpu_env, cpu_dest, cpu_src);
         break;
+    case 2: /* fsinh */
+        gen_helper_fsinh(cpu_env, cpu_dest, cpu_src);
+        break;
     case 3: /* fintrz */
         gen_helper_fitrunc(cpu_env, cpu_dest, cpu_src);
         break;
Signature · 1 line
2.14.3
#7 lore raw

[Qemu-devel] [PULL 03/11] target/m68k: implement fcos

In reply to Laurent Vivier

Using a local m68k floatx80_cos()
[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  | 244 +++++++++++++++++++++++++++++++++++++++++++++++
 target/m68k/softfloat.h  |   1 +
 target/m68k/translate.c  |   3 +
 5 files changed, 254 insertions(+)
target/m68k/fpu_helper.c +5 -0
index a6cfb4db1a..71df19c685 100644
@@ -602,3 +602,8 @@ void HELPER(fsin)(CPUM68KState *env, FPReg *res, FPReg *val)
 {
     res->d = floatx80_sin(val->d, &env->fp_status);
 }
+
+void HELPER(fcos)(CPUM68KState *env, FPReg *res, FPReg *val)
+{
+    res->d = floatx80_cos(val->d, &env->fp_status);
+}
target/m68k/helper.h +1 -0
index 6d8bfaab64..767baf75a3 100644
@@ -77,6 +77,7 @@ DEF_HELPER_3(ftwotox, void, env, fp, fp)
 DEF_HELPER_3(ftentox, void, env, fp, fp)
 DEF_HELPER_3(ftan, void, env, fp, fp)
 DEF_HELPER_3(fsin, void, env, fp, fp)
+DEF_HELPER_3(fcos, 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 +244 -0

247 lines not on this page · raw message

target/m68k/softfloat.h +1 -0
index e8ccf69ba8..4fd5b2c609 100644
@@ -36,4 +36,5 @@ floatx80 floatx80_twotox(floatx80 a, float_status *status);
 floatx80 floatx80_tentox(floatx80 a, float_status *status);
 floatx80 floatx80_tan(floatx80 a, float_status *status);
 floatx80 floatx80_sin(floatx80 a, float_status *status);
+floatx80 floatx80_cos(floatx80 a, float_status *status);
 #endif
target/m68k/translate.c +3 -0
index 05ab75e43f..f47388da4b 100644
@@ -5099,6 +5099,9 @@ DISAS_INSN(fpu)
     case 0x5e: /* fdneg */
         gen_helper_fdneg(cpu_env, cpu_dest, cpu_src);
         break;
+    case 0x1d: /* fcos */
+        gen_helper_fcos(cpu_env, cpu_dest, cpu_src);
+        break;
     case 0x1e: /* fgetexp */
         gen_helper_fgetexp(cpu_env, cpu_dest, cpu_src);
         break;
Signature · 1 line
2.14.3
#8 lore raw

[Qemu-devel] [PULL 06/11] target/m68k: implement fasin

In reply to Laurent Vivier

Using a local m68k floatx80_asin()
[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  | 65 ++++++++++++++++++++++++++++++++++++++++++++++++
 target/m68k/softfloat.h  |  1 +
 target/m68k/translate.c  |  3 +++
 5 files changed, 75 insertions(+)
target/m68k/fpu_helper.c +5 -0
index 47328490ee..972cc97d96 100644
@@ -623,3 +623,8 @@ void HELPER(fatan)(CPUM68KState *env, FPReg *res, FPReg *val)
 {
     res->d = floatx80_atan(val->d, &env->fp_status);
 }
+
+void HELPER(fasin)(CPUM68KState *env, FPReg *res, FPReg *val)
+{
+    res->d = floatx80_asin(val->d, &env->fp_status);
+}
target/m68k/helper.h +1 -0
index 304569e997..e1aca375e0 100644
@@ -80,6 +80,7 @@ DEF_HELPER_3(fsin, void, env, fp, fp)
 DEF_HELPER_3(fcos, void, env, fp, fp)
 DEF_HELPER_4(fsincos, void, env, fp, fp, fp)
 DEF_HELPER_3(fatan, void, env, fp, fp)
+DEF_HELPER_3(fasin, 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 +65 -0

68 lines not on this page · raw message

target/m68k/softfloat.h +1 -0
index eec45f3ffe..ca0eb674aa 100644
@@ -38,4 +38,5 @@ floatx80 floatx80_tan(floatx80 a, float_status *status);
 floatx80 floatx80_sin(floatx80 a, float_status *status);
 floatx80 floatx80_cos(floatx80 a, float_status *status);
 floatx80 floatx80_atan(floatx80 a, float_status *status);
+floatx80 floatx80_asin(floatx80 a, float_status *status);
 #endif
target/m68k/translate.c +3 -0
index 88015e7ed8..d4169c4533 100644
@@ -5060,6 +5060,9 @@ DISAS_INSN(fpu)
     case 0x0a: /* fatan */
         gen_helper_fatan(cpu_env, cpu_dest, cpu_src);
         break;
+    case 0x0c: /* fasin */
+        gen_helper_fasin(cpu_env, cpu_dest, cpu_src);
+        break;
     case 0x0e: /* fsin */
         gen_helper_fsin(cpu_env, cpu_dest, cpu_src);
         break;
Signature · 1 line
2.14.3
#9 lore raw

[Qemu-devel] [PULL 02/11] target/m68k: implement fsin

In reply to Laurent Vivier

Using a local m68k floatx80_sin()
[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  | 247 +++++++++++++++++++++++++++++++++++++++++++++++
 target/m68k/softfloat.h  |   1 +
 target/m68k/translate.c  |   3 +
 5 files changed, 257 insertions(+)
target/m68k/fpu_helper.c +5 -0
index c41115ea05..a6cfb4db1a 100644
@@ -597,3 +597,8 @@ void HELPER(ftan)(CPUM68KState *env, FPReg *res, FPReg *val)
 {
     res->d = floatx80_tan(val->d, &env->fp_status);
 }
+
+void HELPER(fsin)(CPUM68KState *env, FPReg *res, FPReg *val)
+{
+    res->d = floatx80_sin(val->d, &env->fp_status);
+}
target/m68k/helper.h +1 -0
index af9480fe49..6d8bfaab64 100644
@@ -76,6 +76,7 @@ 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(ftan, void, env, fp, fp)
+DEF_HELPER_3(fsin, 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 +247 -0

250 lines not on this page · raw message

target/m68k/softfloat.h +1 -0
index c5ac54d87b..e8ccf69ba8 100644
@@ -35,4 +35,5 @@ floatx80 floatx80_etox(floatx80 a, float_status *status);
 floatx80 floatx80_twotox(floatx80 a, float_status *status);
 floatx80 floatx80_tentox(floatx80 a, float_status *status);
 floatx80 floatx80_tan(floatx80 a, float_status *status);
+floatx80 floatx80_sin(floatx80 a, float_status *status);
 #endif
target/m68k/translate.c +3 -0
index af8cdc2580..05ab75e43f 100644
@@ -5057,6 +5057,9 @@ DISAS_INSN(fpu)
     case 0x06: /* flognp1 */
         gen_helper_flognp1(cpu_env, cpu_dest, cpu_src);
         break;
+    case 0x0e: /* fsin */
+        gen_helper_fsin(cpu_env, cpu_dest, cpu_src);
+        break;
     case 0x0f: /* ftan */
         gen_helper_ftan(cpu_env, cpu_dest, cpu_src);
         break;
Signature · 1 line
2.14.3
#10 lore raw

Re: [Qemu-devel] [PULL 02/11] target/m68k: implement fsin

Quoted 44 lines · Laurent Vivier

Using a local m68k floatx80_sin()
[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  | 247 +++++++++++++++++++++++++++++++++++++++++++++++
 target/m68k/softfloat.h  |   1 +
 target/m68k/translate.c  |   3 +
 5 files changed, 257 insertions(+)
target/m68k/fpu_helper.c +5 -0
index c41115ea05..a6cfb4db1a 100644
@@ -597,3 +597,8 @@ void HELPER(ftan)(CPUM68KState *env, FPReg *res, FPReg *val)
 {
     res->d = floatx80_tan(val->d, &env->fp_status);
 }
+
+void HELPER(fsin)(CPUM68KState *env, FPReg *res, FPReg *val)
+{
+    res->d = floatx80_sin(val->d, &env->fp_status);
+}
target/m68k/helper.h +1 -0
index af9480fe49..6d8bfaab64 100644
@@ -76,6 +76,7 @@ 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(ftan, void, env, fp, fp)
+DEF_HELPER_3(fsin, 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 +0 -0
index 488dbc522b..6fb9665336 100644

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

Quoted 10 lines
target/m68k/softfloat.c +7 -0
@@ -1476,3 +1476,250 @@ floatx80 floatx80_tan(floatx80 a, float_status *status)
         }
     }
 }
+
+/*----------------------------------------------------------------------------
+ | Sine
+ *----------------------------------------------------------------------------*/
+
+floatx80 floatx80_sin(floatx80 a, float_status *status)
+{

Hi; Coverity (CID1390617) points out that there is dead code in this function:

Quoted 18 lines
target/m68k/softfloat.c +18 -0
+    flag aSign, xSign;
+    int32_t aExp, xExp;
+    uint64_t aSig, xSig;
+
+    int8_t user_rnd_mode, user_rnd_prec;
+
+    int32_t compact, l, n, j;
+    floatx80 fp0, fp1, fp2, fp3, fp4, fp5, x, invtwopi, twopi1, twopi2;
+    float32 posneg1, twoto63;
+    flag adjn, endflag;
+
+    aSig = extractFloatx80Frac(a);
+    aExp = extractFloatx80Exp(a);
+    aSign = extractFloatx80Sign(a);
+
+    if (aExp == 0x7FFF) {
+        if ((uint64_t) (aSig << 1)) {
+            return propagateFloatx80NaNOneArg(a, status);

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

Quoted 10 lines
target/m68k/softfloat.c +10 -0
+        }
+        float_raise(float_flag_invalid, status);
+        return floatx80_default_nan(status);
+    }
+
+    if (aExp == 0 && aSig == 0) {
+        return packFloatx80(aSign, 0, 0);
+    }
+
+    adjn = 0;

Here we set adjn == 0...

Quoted 66 lines
target/m68k/softfloat.c +66 -0
+
+    user_rnd_mode = status->float_rounding_mode;
+    user_rnd_prec = status->floatx80_rounding_precision;
+    status->float_rounding_mode = float_round_nearest_even;
+    status->floatx80_rounding_precision = 80;
+
+    compact = floatx80_make_compact(aExp, aSig);
+
+    fp0 = a;
+
+    if (compact < 0x3FD78000 || compact > 0x4004BC7E) {
+        /* 2^(-40) > |X| > 15 PI */
+        if (compact > 0x3FFF8000) { /* |X| >= 15 PI */
+            /* REDUCEX */
+            fp1 = packFloatx80(0, 0, 0);
+            if (compact == 0x7FFEFFFF) {
+                twopi1 = packFloatx80(aSign ^ 1, 0x7FFE,
+                                      LIT64(0xC90FDAA200000000));
+                twopi2 = packFloatx80(aSign ^ 1, 0x7FDC,
+                                      LIT64(0x85A308D300000000));
+                fp0 = floatx80_add(fp0, twopi1, status);
+                fp1 = fp0;
+                fp0 = floatx80_add(fp0, twopi2, status);
+                fp1 = floatx80_sub(fp1, fp0, status);
+                fp1 = floatx80_add(fp1, twopi2, status);
+            }
+        loop:
+            xSign = extractFloatx80Sign(fp0);
+            xExp = extractFloatx80Exp(fp0);
+            xExp -= 0x3FFF;
+            if (xExp <= 28) {
+                l = 0;
+                endflag = 1;
+            } else {
+                l = xExp - 27;
+                endflag = 0;
+            }
+            invtwopi = packFloatx80(0, 0x3FFE - l,
+                                    LIT64(0xA2F9836E4E44152A)); /* INVTWOPI */
+            twopi1 = packFloatx80(0, 0x3FFF + l, LIT64(0xC90FDAA200000000));
+            twopi2 = packFloatx80(0, 0x3FDD + l, LIT64(0x85A308D300000000));
+
+            /* SIGN(INARG)*2^63 IN SGL */
+            twoto63 = packFloat32(xSign, 0xBE, 0);
+
+            fp2 = floatx80_mul(fp0, invtwopi, status);
+            fp2 = floatx80_add(fp2, float32_to_floatx80(twoto63, status),
+                               status); /* THE FRACT PART OF FP2 IS ROUNDED */
+            fp2 = floatx80_sub(fp2, float32_to_floatx80(twoto63, status),
+                               status); /* FP2 is N */
+            fp4 = floatx80_mul(twopi1, fp2, status); /* W = N*P1 */
+            fp5 = floatx80_mul(twopi2, fp2, status); /* w = N*P2 */
+            fp3 = floatx80_add(fp4, fp5, status); /* FP3 is P */
+            fp4 = floatx80_sub(fp4, fp3, status); /* W-P */
+            fp0 = floatx80_sub(fp0, fp3, status); /* FP0 is A := R - P */
+            fp4 = floatx80_add(fp4, fp5, status); /* FP4 is p = (W-P)+w */
+            fp3 = fp0; /* FP3 is A */
+            fp1 = floatx80_sub(fp1, fp4, status); /* FP1 is a := r - p */
+            fp0 = floatx80_add(fp0, fp1, status); /* FP0 is R := A+a */
+
+            if (endflag > 0) {
+                n = floatx80_to_int32(fp2, status);
+                goto sincont;
+            }
+            fp3 = floatx80_sub(fp3, fp0, status); /* A-R */
+            fp1 = floatx80_add(fp1, fp3, status); /* FP1 is r := (A-R)+a */

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

Quoted 10 lines
target/m68k/softfloat.c +10 -0
+            goto loop;
+        } else {
+            /* SINSM */
+            fp0 = float32_to_floatx80(make_float32(0x3F800000),
+                                      status); /* 1 */
+
+            status->float_rounding_mode = user_rnd_mode;
+            status->floatx80_rounding_precision = user_rnd_prec;
+
+            if (adjn) {

...and we never change it before here, so this branch of this 'if' is dead code.

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

Quoted 11 lines
target/m68k/softfloat.c +11 -0
+                /* COSTINY */
+                a = floatx80_sub(fp0, float32_to_floatx80(
+                                 make_float32(0x00800000), status), status);
+            } else {
+                /* SINTINY */
+                a = floatx80_move(a, status);
+            }
+            float_raise(float_flag_inexact, status);
+
+            return a;
+        }

Similarly in floatx80_cos(), we set adjn = 1 at the top of the function, and then later test it.

Should these two functions be sharing code? They do look rather similar...

thanks
-- PMM

#11 lore raw

Re: [Qemu-devel] [PULL 02/11] target/m68k: implement fsin

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

Quoted 180 lines · Laurent Vivier
Quoted 44 lines

Using a local m68k floatx80_sin()
[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  | 247 +++++++++++++++++++++++++++++++++++++++++++++++
 target/m68k/softfloat.h  |   1 +
 target/m68k/translate.c  |   3 +
 5 files changed, 257 insertions(+)
target/m68k/fpu_helper.c +5 -0
index c41115ea05..a6cfb4db1a 100644
@@ -597,3 +597,8 @@ void HELPER(ftan)(CPUM68KState *env, FPReg *res, FPReg *val)
 {
     res->d = floatx80_tan(val->d, &env->fp_status);
 }
+
+void HELPER(fsin)(CPUM68KState *env, FPReg *res, FPReg *val)
+{
+    res->d = floatx80_sin(val->d, &env->fp_status);
+}
target/m68k/helper.h +1 -0
index af9480fe49..6d8bfaab64 100644
@@ -76,6 +76,7 @@ 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(ftan, void, env, fp, fp)
+DEF_HELPER_3(fsin, 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 +0 -0
index 488dbc522b..6fb9665336 100644

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

Quoted 10 lines
target/m68k/softfloat.c +7 -0
@@ -1476,3 +1476,250 @@ floatx80 floatx80_tan(floatx80 a, float_status *status)
         }
     }
 }
+
+/*----------------------------------------------------------------------------
+ | Sine
+ *----------------------------------------------------------------------------*/
+
+floatx80 floatx80_sin(floatx80 a, float_status *status)
+{

Hi; Coverity (CID1390617) points out that there is dead code in this function:

Quoted 18 lines
target/m68k/softfloat.c +18 -0
+    flag aSign, xSign;
+    int32_t aExp, xExp;
+    uint64_t aSig, xSig;
+
+    int8_t user_rnd_mode, user_rnd_prec;
+
+    int32_t compact, l, n, j;
+    floatx80 fp0, fp1, fp2, fp3, fp4, fp5, x, invtwopi, twopi1, twopi2;
+    float32 posneg1, twoto63;
+    flag adjn, endflag;
+
+    aSig = extractFloatx80Frac(a);
+    aExp = extractFloatx80Exp(a);
+    aSign = extractFloatx80Sign(a);
+
+    if (aExp == 0x7FFF) {
+        if ((uint64_t) (aSig << 1)) {
+            return propagateFloatx80NaNOneArg(a, status);

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

Quoted 10 lines
target/m68k/softfloat.c +10 -0
+        }
+        float_raise(float_flag_invalid, status);
+        return floatx80_default_nan(status);
+    }
+
+    if (aExp == 0 && aSig == 0) {
+        return packFloatx80(aSign, 0, 0);
+    }
+
+    adjn = 0;

Here we set adjn == 0...

Quoted 66 lines
target/m68k/softfloat.c +66 -0
+
+    user_rnd_mode = status->float_rounding_mode;
+    user_rnd_prec = status->floatx80_rounding_precision;
+    status->float_rounding_mode = float_round_nearest_even;
+    status->floatx80_rounding_precision = 80;
+
+    compact = floatx80_make_compact(aExp, aSig);
+
+    fp0 = a;
+
+    if (compact < 0x3FD78000 || compact > 0x4004BC7E) {
+        /* 2^(-40) > |X| > 15 PI */
+        if (compact > 0x3FFF8000) { /* |X| >= 15 PI */
+            /* REDUCEX */
+            fp1 = packFloatx80(0, 0, 0);
+            if (compact == 0x7FFEFFFF) {
+                twopi1 = packFloatx80(aSign ^ 1, 0x7FFE,
+                                      LIT64(0xC90FDAA200000000));
+                twopi2 = packFloatx80(aSign ^ 1, 0x7FDC,
+                                      LIT64(0x85A308D300000000));
+                fp0 = floatx80_add(fp0, twopi1, status);
+                fp1 = fp0;
+                fp0 = floatx80_add(fp0, twopi2, status);
+                fp1 = floatx80_sub(fp1, fp0, status);
+                fp1 = floatx80_add(fp1, twopi2, status);
+            }
+        loop:
+            xSign = extractFloatx80Sign(fp0);
+            xExp = extractFloatx80Exp(fp0);
+            xExp -= 0x3FFF;
+            if (xExp <= 28) {
+                l = 0;
+                endflag = 1;
+            } else {
+                l = xExp - 27;
+                endflag = 0;
+            }
+            invtwopi = packFloatx80(0, 0x3FFE - l,
+                                    LIT64(0xA2F9836E4E44152A)); /* INVTWOPI */
+            twopi1 = packFloatx80(0, 0x3FFF + l, LIT64(0xC90FDAA200000000));
+            twopi2 = packFloatx80(0, 0x3FDD + l, LIT64(0x85A308D300000000));
+
+            /* SIGN(INARG)*2^63 IN SGL */
+            twoto63 = packFloat32(xSign, 0xBE, 0);
+
+            fp2 = floatx80_mul(fp0, invtwopi, status);
+            fp2 = floatx80_add(fp2, float32_to_floatx80(twoto63, status),
+                               status); /* THE FRACT PART OF FP2 IS ROUNDED */
+            fp2 = floatx80_sub(fp2, float32_to_floatx80(twoto63, status),
+                               status); /* FP2 is N */
+            fp4 = floatx80_mul(twopi1, fp2, status); /* W = N*P1 */
+            fp5 = floatx80_mul(twopi2, fp2, status); /* w = N*P2 */
+            fp3 = floatx80_add(fp4, fp5, status); /* FP3 is P */
+            fp4 = floatx80_sub(fp4, fp3, status); /* W-P */
+            fp0 = floatx80_sub(fp0, fp3, status); /* FP0 is A := R - P */
+            fp4 = floatx80_add(fp4, fp5, status); /* FP4 is p = (W-P)+w */
+            fp3 = fp0; /* FP3 is A */
+            fp1 = floatx80_sub(fp1, fp4, status); /* FP1 is a := r - p */
+            fp0 = floatx80_add(fp0, fp1, status); /* FP0 is R := A+a */
+
+            if (endflag > 0) {
+                n = floatx80_to_int32(fp2, status);
+                goto sincont;
+            }
+            fp3 = floatx80_sub(fp3, fp0, status); /* A-R */
+            fp1 = floatx80_add(fp1, fp3, status); /* FP1 is r := (A-R)+a */

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

Quoted 10 lines
target/m68k/softfloat.c +10 -0
+            goto loop;
+        } else {
+            /* SINSM */
+            fp0 = float32_to_floatx80(make_float32(0x3F800000),
+                                      status); /* 1 */
+
+            status->float_rounding_mode = user_rnd_mode;
+            status->floatx80_rounding_precision = user_rnd_prec;
+
+            if (adjn) {

...and we never change it before here, so this branch of this 'if' is dead code.

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

Quoted 11 lines
target/m68k/softfloat.c +11 -0
+                /* COSTINY */
+                a = floatx80_sub(fp0, float32_to_floatx80(
+                                 make_float32(0x00800000), status), status);
+            } else {
+                /* SINTINY */
+                a = floatx80_move(a, status);
+            }
+            float_raise(float_flag_inexact, status);
+
+            return a;
+        }
Quoted 5 lines

Similarly in floatx80_cos(), we set adjn = 1 at the top of the function, and then later test it.

Should these two functions be sharing code? They do look rather similar...

yes, I'm aware of these problems, but I let the code as-is to only port functions from "Previous" to QEMU. In fact, the original assembly code uses a sincos() function to compute both of them and then sin() and cos() calls it.

All these function need some cleanup now...

Thanks,
Laurent

#12 lore raw

[Qemu-devel] [PULL 11/11] target/m68k: implement fcosh

In reply to Laurent Vivier

Using a local m68k floatx80_cosh()
[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  | 81 ++++++++++++++++++++++++++++++++++++++++++++++++
 target/m68k/softfloat.h  |  1 +
 target/m68k/translate.c  |  3 ++
 5 files changed, 91 insertions(+)
target/m68k/fpu_helper.c +5 -0
index 4c969dfe00..6eeffdf9bb 100644
@@ -648,3 +648,8 @@ void HELPER(fsinh)(CPUM68KState *env, FPReg *res, FPReg *val)
 {
     res->d = floatx80_sinh(val->d, &env->fp_status);
 }
+
+void HELPER(fcosh)(CPUM68KState *env, FPReg *res, FPReg *val)
+{
+    res->d = floatx80_cosh(val->d, &env->fp_status);
+}
target/m68k/helper.h +1 -0
index acdca1af03..feee7be626 100644
@@ -85,6 +85,7 @@ DEF_HELPER_3(facos, void, env, fp, fp)
 DEF_HELPER_3(fatanh, void, env, fp, fp)
 DEF_HELPER_3(ftanh, void, env, fp, fp)
 DEF_HELPER_3(fsinh, void, env, fp, fp)
+DEF_HELPER_3(fcosh, 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 +81 -0

84 lines not on this page · raw message

target/m68k/softfloat.h +1 -0
index f033abf9ea..602661d5a8 100644
@@ -44,4 +44,5 @@ floatx80 floatx80_atanh(floatx80 a, float_status *status);
 floatx80 floatx80_etoxm1(floatx80 a, float_status *status);
 floatx80 floatx80_tanh(floatx80 a, float_status *status);
 floatx80 floatx80_sinh(floatx80 a, float_status *status);
+floatx80 floatx80_cosh(floatx80 a, float_status *status);
 #endif
target/m68k/translate.c +3 -0
index 7d83aaf91d..cef6f663ad 100644
@@ -5105,6 +5105,9 @@ DISAS_INSN(fpu)
     case 0x5c: /* fdabs */
         gen_helper_fdabs(cpu_env, cpu_dest, cpu_src);
         break;
+    case 0x19: /* fcosh */
+        gen_helper_fcosh(cpu_env, cpu_dest, cpu_src);
+        break;
     case 0x1a: /* fneg */
         gen_helper_fneg(cpu_env, cpu_dest, cpu_src);
         break;
Signature · 1 line
2.14.3
#13 lore raw

[Qemu-devel] [PULL 01/11] target/m68k: implement ftan

In reply to Laurent Vivier

Using a local m68k floatx80_tan()
[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             | 210 ++++++++++++++++++++++++++++++++++++
 target/m68k/softfloat.h             |   1 +
 target/m68k/softfloat_fpsp_tables.h | 136 +++++++++++++++++++++++
 target/m68k/translate.c             |   3 +
 6 files changed, 356 insertions(+)
target/m68k/fpu_helper.c +5 -0
index 62cbb0dff1..c41115ea05 100644
@@ -592,3 +592,8 @@ void HELPER(ftentox)(CPUM68KState *env, FPReg *res, FPReg *val)
 {
     res->d = floatx80_tentox(val->d, &env->fp_status);
 }
+
+void HELPER(ftan)(CPUM68KState *env, FPReg *res, FPReg *val)
+{
+    res->d = floatx80_tan(val->d, &env->fp_status);
+}
target/m68k/helper.h +1 -0
index 9a9734c196..af9480fe49 100644
@@ -75,6 +75,7 @@ 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(ftan, 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 +210 -0

213 lines not on this page · raw message

target/m68k/softfloat.h +1 -0
index d28e49fe9f..c5ac54d87b 100644
@@ -34,4 +34,5 @@ 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);
+floatx80 floatx80_tan(floatx80 a, float_status *status);
 #endif
target/m68k/softfloat_fpsp_tables.h +136 -0

140 lines not on this page · raw message

target/m68k/translate.c +3 -0
index 6d5bde0777..af8cdc2580 100644
@@ -5057,6 +5057,9 @@ DISAS_INSN(fpu)
     case 0x06: /* flognp1 */
         gen_helper_flognp1(cpu_env, cpu_dest, cpu_src);
         break;
+    case 0x0f: /* ftan */
+        gen_helper_ftan(cpu_env, cpu_dest, cpu_src);
+        break;
     case 0x10: /* fetox */
         gen_helper_fetox(cpu_env, cpu_dest, cpu_src);
         break;
Signature · 1 line
2.14.3
#14 lore raw
In reply to Laurent Vivier
Quoted 29 lines · Laurent Vivier

The following changes since commit 59667bb167f773965ce6547352f312eff0d4d523:

Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' into staging (2018-03-13 14:02:47 +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 02f9124ebe26c36f0f7ed58085bd963e4372b2cd:

target/m68k: implement fcosh (2018-03-13 16:35:05 +0100)

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

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

Laurent Vivier (11):
target/m68k: implement ftan
target/m68k: implement fsin
target/m68k: implement fcos
target/m68k: implement fsincos
target/m68k: implement fatan
target/m68k: implement fasin
target/m68k: implement facos
target/m68k: implement fatanh
target/m68k: implement ftanh
target/m68k: implement fsinh
target/m68k: implement fcosh

Quoted 7 lines
 target/m68k/fpu_helper.c            |   61 ++
 target/m68k/helper.h                |   11 +
 target/m68k/softfloat.c             | 1637 +++++++++++++++++++++++++++++++++++
 target/m68k/softfloat.h             |   11 +
 target/m68k/softfloat_fpsp_tables.h |  267 ++++++
 target/m68k/translate.c             |   38 +
 6 files changed, 2025 insertions(+)

Applied, thanks.

-- PMM