qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] TriCore bugfixes
@ 2015-05-22 10:15 Bastian Koppelmann
  0 siblings, 0 replies; 5+ messages in thread
From: Bastian Koppelmann @ 2015-05-22 10:15 UTC (permalink / raw)
  To: qemu-devel

Hi,

while testing the new v1.6.1 instructions I found three bugs in the old
instructions.

Cheers,
Bastian 

Bastian Koppelmann (3):
  target-tricore: fix OPC2_32_RR_DVINIT_HU having write before use on
    the result
  target-tricore: fix msub32_q producing the wrong overflow bit
  target-tricore: fix BOL_ST_H_LONGOFF using ld

 target-tricore/translate.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

-- 
2.4.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH 0/3] TriCore bugfixes
@ 2016-03-01 17:15 Bastian Koppelmann
  2016-03-01 17:15 ` [Qemu-devel] [PATCH 1/3] target-tricore: add missing break in insn decode switch stmt Bastian Koppelmann
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Bastian Koppelmann @ 2016-03-01 17:15 UTC (permalink / raw)
  To: qemu-devel

Hi,

this series tackles the bugfixes found during FPU implementation
and are mostly on liners. This includes a missing break in a switch
statement, a forgotten reset of an OVF bit, and psw_read() clearing
too many bits.

Cheers,
Bastian

Bastian Koppelmann (3):
  target-tricore: add missing break in insn decode switch stmt
  target-tricore: Fix helper_msub64_q_ssov not reseting OVF bit
  target-tricore: Fix psw_read() clearing too many bits

 target-tricore/helper.c    | 2 +-
 target-tricore/op_helper.c | 2 ++
 target-tricore/translate.c | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)

-- 
2.7.2

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH 1/3] target-tricore: add missing break in insn decode switch stmt
  2016-03-01 17:15 [Qemu-devel] [PATCH 0/3] TriCore bugfixes Bastian Koppelmann
@ 2016-03-01 17:15 ` Bastian Koppelmann
  2016-03-01 17:15 ` [Qemu-devel] [PATCH 2/3] target-tricore: Fix helper_msub64_q_ssov not reseting OVF bit Bastian Koppelmann
  2016-03-01 17:15 ` [Qemu-devel] [PATCH 3/3] target-tricore: Fix psw_read() clearing too many bits Bastian Koppelmann
  2 siblings, 0 replies; 5+ messages in thread
From: Bastian Koppelmann @ 2016-03-01 17:15 UTC (permalink / raw)
  To: qemu-devel

After decoding/translating a RRR_DIVIDE type instruction we would simply
fall through and would decode/translate another unintended RRR2_MADD
instruction.

Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
---
 target-tricore/translate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target-tricore/translate.c b/target-tricore/translate.c
index 6d7f553..f028fb9 100644
--- a/target-tricore/translate.c
+++ b/target-tricore/translate.c
@@ -8632,6 +8632,7 @@ static void decode_32Bit_opc(CPUTriCoreState *env, DisasContext *ctx)
         break;
     case OPCM_32_RRR_DIVIDE:
         decode_rrr_divide(env, ctx);
+        break;
 /* RRR2 Format */
     case OPCM_32_RRR2_MADD:
         decode_rrr2_madd(env, ctx);
-- 
2.7.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH 2/3] target-tricore: Fix helper_msub64_q_ssov not reseting OVF bit
  2016-03-01 17:15 [Qemu-devel] [PATCH 0/3] TriCore bugfixes Bastian Koppelmann
  2016-03-01 17:15 ` [Qemu-devel] [PATCH 1/3] target-tricore: add missing break in insn decode switch stmt Bastian Koppelmann
@ 2016-03-01 17:15 ` Bastian Koppelmann
  2016-03-01 17:15 ` [Qemu-devel] [PATCH 3/3] target-tricore: Fix psw_read() clearing too many bits Bastian Koppelmann
  2 siblings, 0 replies; 5+ messages in thread
From: Bastian Koppelmann @ 2016-03-01 17:15 UTC (permalink / raw)
  To: qemu-devel

When this instruction does not produce an overflow the corresponding
bit has to be reset.

Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
---
 target-tricore/op_helper.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target-tricore/op_helper.c b/target-tricore/op_helper.c
index 55f6724..40656c3 100644
--- a/target-tricore/op_helper.c
+++ b/target-tricore/op_helper.c
@@ -1045,6 +1045,8 @@ uint64_t helper_msub64_q_ssov(CPUTriCoreState *env, uint64_t r1, uint32_t r2,
             } else {
                result = INT64_MIN;
             }
+        } else {
+            env->PSW_USB_V = 0;
         }
     } else {
         if (ovf < 0) {
-- 
2.7.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH 3/3] target-tricore: Fix psw_read() clearing too many bits
  2016-03-01 17:15 [Qemu-devel] [PATCH 0/3] TriCore bugfixes Bastian Koppelmann
  2016-03-01 17:15 ` [Qemu-devel] [PATCH 1/3] target-tricore: add missing break in insn decode switch stmt Bastian Koppelmann
  2016-03-01 17:15 ` [Qemu-devel] [PATCH 2/3] target-tricore: Fix helper_msub64_q_ssov not reseting OVF bit Bastian Koppelmann
@ 2016-03-01 17:15 ` Bastian Koppelmann
  2 siblings, 0 replies; 5+ messages in thread
From: Bastian Koppelmann @ 2016-03-01 17:15 UTC (permalink / raw)
  To: qemu-devel

psw_read() ought to sync the PSW value with the
cached status bits (C,V,SV,AV,SAV). For this the bits
are cleared in the PSW before they are written from the
cached bits. The clear mask is too big and clears two
additional bits.

Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
---
 target-tricore/helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target-tricore/helper.c b/target-tricore/helper.c
index 7d96dad..adbb6db 100644
--- a/target-tricore/helper.c
+++ b/target-tricore/helper.c
@@ -113,7 +113,7 @@ void tricore_cpu_list(FILE *f, fprintf_function cpu_fprintf)
 uint32_t psw_read(CPUTriCoreState *env)
 {
     /* clear all USB bits */
-    env->PSW &= 0xffffff;
+    env->PSW &= 0x6ffffff;
     /* now set them from the cache */
     env->PSW |= ((env->PSW_USB_C != 0) << 31);
     env->PSW |= ((env->PSW_USB_V   & (1 << 31))  >> 1);
-- 
2.7.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-01 17:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-01 17:15 [Qemu-devel] [PATCH 0/3] TriCore bugfixes Bastian Koppelmann
2016-03-01 17:15 ` [Qemu-devel] [PATCH 1/3] target-tricore: add missing break in insn decode switch stmt Bastian Koppelmann
2016-03-01 17:15 ` [Qemu-devel] [PATCH 2/3] target-tricore: Fix helper_msub64_q_ssov not reseting OVF bit Bastian Koppelmann
2016-03-01 17:15 ` [Qemu-devel] [PATCH 3/3] target-tricore: Fix psw_read() clearing too many bits Bastian Koppelmann
  -- strict thread matches above, loose matches on Subject: below --
2015-05-22 10:15 [Qemu-devel] [PATCH 0/3] TriCore bugfixes Bastian Koppelmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).