All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] target-arm: Fix IL in syndromes for FP and copro traps
@ 2016-02-05 14:37 Peter Maydell
  2016-02-05 14:37 ` [Qemu-devel] [PATCH 1/3] target-arm: Correct misleading 'is_thumb' syn_* parameter names Peter Maydell
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Peter Maydell @ 2016-02-05 14:37 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-arm, patches

This series corrects a bug I noticed while reading the code.

In syndrome register values, the IL bit indicates the instruction
length, and is 1 for 4-byte instructions and 0 for 2-byte
instructions.  All A64 and A32 instructions are 4-byte, but Thumb
instructions may be either 2 or 4 bytes long.  Unfortunately we named
the parameter to the syn_* functions for constructing syndromes
"is_thumb", which falsely implies that it should be set for all Thumb
instructions, rather than only the 16-bit ones.

Fix the parameter names to a less confusing "is_16bit", and
correct the places where we should be passing in 'false' rather
than 's->thumb' for syndrome construction, which are the
coprocessor, VFP and Neon instruction traps (all these are always
32-bit for Thumb).

The calls to syn_aa32_svc() and syn_aa32_bkpt() correctly still
use s->thumb, because for SVC and BKPT the Thumb encoding is 16
bits but the ARM encoding is 32 bits.


Peter Maydell (3):
  target-arm: Correct misleading 'is_thumb' syn_* parameter names
  target-arm: Fix IL bit reported for Thumb coprocessor traps
  target-arm: Fix IL bit reported for Thumb VFP and Neon traps

 target-arm/internals.h | 28 ++++++++++++++--------------
 target-arm/translate.c | 14 +++++++-------
 2 files changed, 21 insertions(+), 21 deletions(-)

-- 
1.9.1

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

end of thread, other threads:[~2016-02-08 13:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-05 14:37 [Qemu-devel] [PATCH 0/3] target-arm: Fix IL in syndromes for FP and copro traps Peter Maydell
2016-02-05 14:37 ` [Qemu-devel] [PATCH 1/3] target-arm: Correct misleading 'is_thumb' syn_* parameter names Peter Maydell
2016-02-06 18:25   ` [Qemu-devel] [Qemu-arm] " Sergey Fedorov
2016-02-05 14:37 ` [Qemu-devel] [PATCH 2/3] target-arm: Fix IL bit reported for Thumb coprocessor traps Peter Maydell
2016-02-06 18:24   ` Sergey Fedorov
2016-02-05 14:37 ` [Qemu-devel] [PATCH 3/3] target-arm: Fix IL bit reported for Thumb VFP and Neon traps Peter Maydell
2016-02-06 18:25   ` Sergey Fedorov
2016-02-08 13:17 ` [Qemu-devel] [Qemu-arm] [PATCH 0/3] target-arm: Fix IL in syndromes for FP and copro traps Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.