Statistics
| Branch: | Revision:

root / target-sh4 @ 7a64244f

Name Size
Makefile.objs 83 Bytes
README.sh4 4.8 kB
cpu-qom.h 1.7 kB
cpu.c 2.6 kB
cpu.h 12.4 kB
helper.c 22.6 kB
helper.h 1.8 kB
machine.c 0 Bytes
op_helper.c 14.8 kB
translate.c 64.4 kB

Latest revisions

# Date Author Comment
ad8d25a1 09/21/2012 08:53 pm Aurelien Jarno

target-sh4: implement addv and subv using TCG

addv and subv helpers implementation is directly copied from the SH4
manual and looks quite complex. It is however possible to explain it
without branches, and is therefore possible to implement it with TCG.
...

f16640f4 09/21/2012 08:53 pm Aurelien Jarno

target-sh4: optimize xtrct

The register being 32 bit long, after a shift to the right by 16 bits,
the upper 16 bit are already cleared. There is no need to call ext16u
to clear them.

Signed-off-by: Aurelien Jarno <>

c53b36d2 09/21/2012 08:53 pm Aurelien Jarno

target-sh4: optimize swap.w

It's possible swap the two 16-bit words of a 32-bit register using a
rotation. If the TCG target doesn't implement rotation, the replacement
code is similar to the previously implemented code.

Signed-off-by: Aurelien Jarno <>

ed22e6f3 09/21/2012 08:53 pm Aurelien Jarno

target-sh4: remove gen_clr_t() and gen_set_t()

gen_clr_t() and gen_set_t() have very few callers and can be remplaced
by a single line. Remove them.

Signed-off-by: Aurelien Jarno <>

10127400 09/21/2012 08:53 pm Aurelien Jarno

target-sh4: rework exceptions handling

Since commit fd4bab102 PC is restored in case of exception through code
retranslation. While it is clearly the thing to do in case it is not
not known if an helper is going to trigger an exception or not
(e.g. for load/store, FPU, etc.), it just make things slower when the...

7a64244f 09/21/2012 08:53 pm Aurelien Jarno

target-sh4: cleanup DisasContext

We should avoid accessing env at translation stage, except of course for
static values like the supported features.

Remove variables copied from env in DisasContext and use the TB flags
instead.

Signed-off-by: Aurelien Jarno <>

f8e73439 09/21/2012 08:53 pm Aurelien Jarno

target-sh4: mark a few helpers const and pure

Signed-off-by: Aurelien Jarno <>

ff2086fe 09/21/2012 08:53 pm Aurelien Jarno

target-sh4: use float32_muladd() to implement fmac

There is no need to add a SH4 specific pickNaNMulAdd() to softfloat as
SH4 is always returning a default NaN.

Signed-off-by: Aurelien Jarno <>

22b88fd7 09/21/2012 08:53 pm Aurelien Jarno

target-sh4: implement addc and subc using TCG

Now that setcond is available, the addc and subc can easily be
implemented using TCG.

Signed-off-by: Aurelien Jarno <>

485d0035 09/15/2012 08:44 pm Blue Swirl

target-sh4: switch to AREG0 free mode

Add an explicit CPUState parameter instead of relying on AREG0
and switch to AREG0 free mode.

Acked-by: Aurelien Jarno <>
Signed-off-by: Blue Swirl <>

View revisions

Also available in: Atom