unicorn/qemu/target
Peter Maydell 96f86f472a
target/arm: Pull Thumb insn word loads up to top level
Refactor the Thumb decode to do the loads of the instruction words at
the top level rather than only loading the second half of a 32-bit
Thumb insn in the middle of the decode.

This is simple apart from the awkward case of Thumb1, where the
BL/BLX prefix and suffix instructions live in what in Thumb2 is the
32-bit insn space. To handle these we decode enough to identify
whether we're looking at a prefix/suffix that we handle as a 16 bit
insn, or a prefix that we're going to merge with the following suffix
to consider as a 32 bit insn. The translation of the 16 bit cases
then moves from disas_thumb2_insn() to disas_thumb_insn().

The refactoring has the benefit that we don't need to pass the
CPUARMState* down into the decoder code any more, but the major
reason for doing this is that some Thumb instructions must be always
unconditional regardless of the IT state bits, so we need to know the
whole insn before we emit the "skip this insn if the IT bits and cond
state tell us to" code. (The always unconditional insns are BKPT,
HLT and SG; the last of these is 32 bits.)

Backports commit 296e5a0a6c393553079a641c50521ae33ff89324 from qemu
2018-03-05 03:43:38 -05:00
..
arm target/arm: Pull Thumb insn word loads up to top level 2018-03-05 03:43:38 -05:00
i386 tcg: remove addr argument from lookup_tb_ptr 2018-03-05 02:16:34 -05:00
m68k target/m68k: Switch fpu_rom from make_floatx80() to make_floatx80_init() 2018-03-04 23:05:01 -05:00
mips tcg: remove addr argument from lookup_tb_ptr 2018-03-05 02:16:34 -05:00
sparc sparc: Fix typedef clash 2018-03-04 23:05:50 -05:00