Statistics
| Branch: | Revision:

root / tcg / s390 / tcg-target.c @ f53f81e0

History | View | Annotate | Download (69.6 kB)

# Date Author Comment
c6830cdb 02/01/2014 11:45 am Richard Henderson

tcg/s390: Remove sigill_handler

Commit c9baa30f42a87f61627391698f63fa4d1566d9d8 failed to
delete all of the relevant code, leading to Werrors about
unused symbols.

Signed-off-by: Richard Henderson <>
Signed-off-by: Michael Tokarev <>

c9baa30f 11/29/2013 08:45 pm Richard Henderson

tcg-s390: Use qemu_getauxval in query_facilities

No need to set up a SIGILL signal handler for detection anymore.

Remove a ton of sanity checks that must be true, given that we're
requiring a 64-bit build (the note about 31-bit KVM is satisfied
by configuring with TCI)....

3cf246f0 10/10/2013 09:44 pm Richard Henderson

tcg: Add tcg-be-null.h

This is a no-op backend data implementation, for those targets that
are not currently using the load/store optimization path.

This is prepatory to always requiring these functions in all backends.

Signed-off-by: Richard Henderson <>

a05b5b9b 09/02/2013 07:08 pm Richard Henderson

tcg: Change tcg_out_ld/st offset to intptr_t

Reviewed-by: Aurelien Jarno <>
Signed-off-by: Richard Henderson <>

e58eb534 09/02/2013 07:08 pm Richard Henderson

exec: Split softmmu_defs.h

The _cmmu helpers can be moved to exec-all.h. The helpers that are
used from TCG will shortly need access to tcg_target_long so move
their declarations into tcg.h.

This requires minor include adjustments to all TCG backends.
...

2ba7fae2 09/02/2013 07:08 pm Richard Henderson

tcg: Change relocation offsets to intptr_t

Reviewed-by: Aurelien Jarno <>
Signed-off-by: Richard Henderson <>

56bbc2f9 06/05/2013 03:54 pm Richard Henderson

tcg: Remove redundant tcg_target_init checks

We've got a compile-time check for the condition in exec/cpu-defs.h.

Reviewed-by: Andreas Färber <>
Reviewed-by: liguang <>
Signed-off-by: Richard Henderson <>

b879f308 04/05/2013 09:35 pm Richard Henderson

tcg-s390: Fix merge error in tgen_brcond

When the TCG condition codes were re-organized last year,
we failed to update all of the "old-style" tests for unsigned.

Signed-off-by: Richard Henderson <>

07ff7983 04/05/2013 09:35 pm Richard Henderson

tcg-s390: Remove constraint letters for and

Since we have a free temporary and can always just load the constant, we
ought to do so, rather than spending the same effort constraining the const.

Signed-off-by: Richard Henderson <>

f0bffc27 04/05/2013 09:35 pm Richard Henderson

tcg-s390: Use risbgz for andi

This is immediately usable by the tlb lookup code.

Signed-off-by: Richard Henderson <>

65a62a75 04/05/2013 09:35 pm Richard Henderson

tcg-s390: Cleanup argument shuffling fixme in softmmu code

Signed-off-by: Richard Henderson <>

0db921e6 04/05/2013 09:35 pm Richard Henderson

tcg-s390: Use load-address for addition

Since we're always in 64-bit mode, load address performs a full
64-bit add. Use that for 3-address addition, as well as for
larger constant addends when we lack extended-immediates facility.

Signed-off-by: Richard Henderson <>

78c9f7c5 04/05/2013 09:35 pm Richard Henderson

tcg-s390: Use all 20 bits of the offset in tcg_out_mem

This can save one insn, if the constant has any bits in 32-63 set,
but no bits in 21-31 set. It never results in more insns.

Signed-off-by: Richard Henderson <>

a4924e8b 04/05/2013 09:35 pm Richard Henderson

tcg-s390: Properly allocate a stack frame.

Set TCG_TARGET_CALL_STACK_OFFSET properly for the abi. Allocate the
standard TCG_STATIC_CALL_ARGS_SIZE. And while we're at it, allocate
space for CPU_TEMP_BUF_NLONGS.

Signed-off-by: Richard Henderson <>

a01fc30d 04/05/2013 09:35 pm Richard Henderson

tcg-s390: Remove useless preprocessor conditions

We only support 64-bit code generation for s390x.
Don't clutter the code with ifdefs that suggest otherwise.

Signed-off-by: Richard Henderson <>

3790b918 04/05/2013 09:35 pm Richard Henderson

tcg-s390: Implement add2/sub2 opcodes

Signed-off-by: Richard Henderson <>

36017dc6 04/05/2013 09:35 pm Richard Henderson

tcg-s390: Implement mulu2_i64 opcode

Signed-off-by: Richard Henderson <>

96a9f093 04/05/2013 09:35 pm Richard Henderson

tcg-s390: Implement movcond opcodes

Signed-off-by: Richard Henderson <>

d5690ea4 04/05/2013 09:35 pm Richard Henderson

tcg-s390: Implement deposit opcodes

Signed-off-by: Richard Henderson <>

a22971f9 04/05/2013 09:35 pm Richard Henderson

tcg-s390: Fix movi

The code to load the high 64 bits assumed that the insn used to
load the low 64 bits zero-extended. Enforce that.

022c62cb 12/19/2012 09:31 am Paolo Bonzini

exec: move include files to include/exec/

Signed-off-by: Paolo Bonzini <>

0aed257f 10/06/2012 07:48 pm Richard Henderson

tcg: Add TCG_COND_NEVER, TCG_COND_ALWAYS

There are several cases that can be handled easier inside both
translators and code generators if we have out-of-band values
for conditions. It's easy enough to handle ALWAYS and NEVER in
the natural way inside the tcg middle-end....

bcc66562 10/06/2012 07:48 pm Richard Henderson

tcg: Add is_unsigned_cond

Before we rearrange the TCG_COND enumeration, add a predicate for
the (single) use of comparisons vs TCGCond.

Signed-off-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

626cd050 10/06/2012 07:47 pm Aurelien Jarno

tcg: remove obsolete jmp op

The TCG jmp operation doesn't really make sense in the QEMU context, it
is unused, it is not implemented by some targets, and it is wrongly
implemented by some others.

This patch simply removes it.

Reviewed-by: Richard Henderson <>...

6e17d0c5 09/22/2012 05:52 pm Stefan Weil

tcg: Remove tcg_target_get_call_iarg_regs_count

The TCG targets no longer need individual implementations.

Since commit 6a18ae2d2947532d5c26439548afa0481c4529f9,
'flags' is no longer used in tcg_target_get_call_iarg_regs_count.

The remaining tcg_target_get_call_iarg_regs_count is trivial and only...

89c33337 09/15/2012 08:51 pm Blue Swirl

Remove unused CONFIG_TCG_PASS_AREG0 and dead code

Now that CONFIG_TCG_PASS_AREG0 is enabled for all targets,
remove dead code and support for !CONFIG_TCG_PASS_AREG0 case.

Remove dyngen-exec.h and all references to it. Although included by
hw/spapr_hcall.c, it does not seem to use it....

6845df48 09/10/2012 02:38 pm Aurelien Jarno

tcg/s390: fix ld/st with CONFIG_TCG_PASS_AREG0

The load/store slow path has been broken in e141ab52d:
- We need to move 4 registers for store functions and 3 registers for
load functions and not the reverse.
- According to the s390x calling convention the arguments of a function...

e141ab52 03/18/2012 02:21 pm Blue Swirl

softmmu templates: optionally pass CPUState to memory access functions

Optionally, make memory access helpers take a parameter for CPUState
instead of relying on global env.

On most targets, perform simple moves to reorder registers. On i386,
switch from regparm(3) calling convention to standard stack-based...

9349b4f9 03/14/2012 11:20 pm Andreas Färber

Rename CPUState -> CPUArchState

Scripted conversion:
for file in .[hc] hw/.[hc] hw/kvm/*.[hc] linux-user/*.[hc] linux-user/m68k/*.[hc] bsd-user/*.[hc] darwin-user/*.[hc] tcg/*/*.[hc] target-*/cpu.h; do
sed -i "s/CPUState/CPUArchState/g" $file
done...

dc439de7 10/08/2011 06:21 pm Peter Maydell

tcg/s390: Remove unused tcg_out_addi()

Remove the unused function tcg_out_addi() from the s390 TCG backend;
this brings it into line with other backends.

Signed-off-by: Peter Maydell <>
Acked-by: Richard Henderson <>...

5ddd17b4 09/17/2011 08:55 pm Stefan Weil

tcg/s390: Only one call output register needed for 64 bit hosts

The second register is only needed for 32 bit hosts.

Cc: Alexander Graf <>
Acked-by: Richard Henderson <>
Signed-off-by: Stefan Weil <>
Signed-off-by: Blue Swirl <>

614f104d 06/26/2011 09:25 pm Blue Swirl

Delegate setup of TCG temporaries to targets

Delegate TCG temp_buf setup to targets, so that they can use a stack
frame later instead.

Signed-off-by: Blue Swirl <>

cea5f9a2 06/26/2011 09:25 pm Blue Swirl

cpu-exec.c: avoid AREG0 use

Make functions take a parameter for CPUState instead of relying
on global env. Pass CPUState pointer to TCG prologue, which moves
it to AREG0.

Thanks to Peter Maydell and Laurent Desnogues for the ARM prologue
change.

Revert the hacks to avoid AREG0 use on Sparc hosts....

48bb3750 06/30/2010 12:07 am Richard Henderson

tcg-s390: new TCG Target

Original patch from Ulrich Hecht, further work from Alexander Graf
and Richard Henderson.

Cc: Ulrich Hecht <>
Cc: Alexander Graf <>
Signed-off-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

e4d58b41 06/09/2010 12:18 pm Richard Henderson

tcg: Make some tcg-target.c routines static.

Both tcg_target_init and tcg_target_qemu_prologue
are unused outside of tcg.c.

Signed-off-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

3b6dac34 06/09/2010 12:18 pm Richard Henderson

tcg: Add TYPE parameter to tcg_out_mov.

Mirror tcg_out_movi in having a TYPE parameter. This allows x86_64
to perform the move at the proper width, which may elide a REX prefix.

Introduce a TCG_TYPE_REG enumerator to represent the "native width"
of the host register, and to distinguish the usage from "pointer data"...

a9751609 03/26/2010 10:28 pm Richard Henderson

tcg: Name the opcode enumeration.

Give the enumeration formed from tcg-opc.h a name: TCGOpcode.
Use that enumeration type instead of "int" whereever appropriate.

Signed-off-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

2827822e 12/05/2009 06:36 pm Alexander Graf

S/390 fake TCG implementation

Qemu won't let us run a KVM target without having host TCG support. Well, for
now we don't have any so let's implement a fake target that only stubs out
everything.

I tried to keep the patch as close to Uli's source as possible, so whenever...