Statistics
| Branch: | Revision:

root / tcg / tcg.c @ feature-archipelago

History | View | Annotate | Download (89.5 kB)

# Date Author Comment
c5d3c498 03/02/2014 03:12 pm Stefan Weil

tcg: Fix typo in comment (dependancies -> dependencies)

Signed-off-by: Stefan Weil <>
Signed-off-by: Michael Tokarev <>

f6aa2f7d 02/16/2014 01:20 am Richard Henderson

TCG: Fix 32-bit host allocation typo

The second half register of a 64-bit temp on a 32-bit host
was allocated with the wrong base_type.

The base_type of the second half register is never checked,
but for consistency it should be the same as the first half....

18d13fa2 01/30/2014 03:25 pm Alexander Graf

TCG: Fix I64-on-32bit-host temporaries

We have cache pools of temporaries that we can reuse later when they've
already been allocated before.

These cache pools differenciate between the target TCG variable type they
contain. So we have one pool for I32 and one pool for I64 variables....

0ec9eabc 12/10/2013 07:23 pm Richard Henderson

tcg: Use bitmaps for free temporaries

We previously allocated 32-bits per temp for the next_free_temp entry.
We now allocate 4 bits per temp across the 4 bitmaps.

Using a linked list meant that if a translator is tweeked, resulting in
temps being freed in a different order, that would have follow-on effects...

f713d6ad 10/10/2013 11:19 pm Richard Henderson

tcg: Add qemu_ld_st_i32/64

Step two in the transition, adding the new ldst opcodes. Keep the old
opcodes around until all backends support the new opcodes.

Signed-off-by: Richard Henderson <>

9ecefc84 10/10/2013 09:44 pm Richard Henderson

tcg: Add tcg-be-ldst.h

Move TCGLabelQemuLdst and related stuff out of tcg.h.

Signed-off-by: Richard Henderson <>

100b5e01 10/10/2013 09:44 pm Richard Henderson

tcg: Put target helper data into an array.

One call inside of a loop to tcg_register_helper instead of hundreds
of sequential calls.

Presumably more icache and branch prediction friendly; resulting binary
size mostly unchanged on x86_64, as we're trading 32-bit rip-relative...

4953ee62 10/10/2013 09:44 pm Richard Henderson

tcg: Add tcg-runtime.c helpers to all_helpers

For the few targets that actually use these, we'd not report
them symbolicly in the tcg opcode logs.

Signed-off-by: Richard Henderson <>

84fd9dd3 10/10/2013 09:44 pm Richard Henderson

tcg: Merge tcg_register_helper into tcg_context_init

Eliminates the repeated checks for having created
the s->helpers hash table.

Signed-off-by: Richard Henderson <>

5cd8f621 10/10/2013 09:43 pm Richard Henderson

tcg: Move helper registration into tcg_context_init

No longer needs to be done on a per-target basis.

Signed-off-by: Richard Henderson <>

6e085f72 10/10/2013 09:41 pm Richard Henderson

tcg: Use a GHashTable for tcg_find_helper

Slightly changes the interface, in that we now return name
instead of a TCGHelperInfo structure, which goes away.

Reviewed-by: Stefan Weil <>
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 <>

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

tcg: Use appropriate types in tcg_reg_alloc_call

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

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

tcg: Fix jit debug for x32

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

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

tcg: Add muluh and mulsh opcodes

Use them in places where mulu2 and muls2 are used.
Optimize mulx2 with dead low part to mulxh.

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

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

tcg: Change flush_icache_range arguments to uintptr_t

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

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

tcg: Change frame pointer offsets to intptr_t

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

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

tcg: Change memory offsets to intptr_t

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

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 <>

48bc6bab 09/02/2013 07:08 pm Richard Henderson

tcg: Use uintptr_t in TCGHelperInfo

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

2bb8656d 08/26/2013 11:31 pm Richard Henderson

tcg: Tidy generated code for tcg_outN

Aliasing was forcing s->code_ptr to be re-read after the store.
Keep the pointer in a local variable to help the compiler.

Signed-off-by: Richard Henderson <>

ac26eb69 08/26/2013 11:31 pm Richard Henderson

tcg-i386: Add and use tcg_out64

No point in splitting the write into 32-bit pieces.

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

45aba097 07/09/2013 05:15 pm Richard Henderson

tcg: Fix high_pc fields in .debug_info

I don't think the debugger actually looks at this for anything,
using the correct .debug_frame contents, but might as well get
it all correct.

Reviewed-by: Peter Maydell <>
Signed-off-by: Richard Henderson <>

497a22eb 07/09/2013 05:15 pm Richard Henderson

tcg: Move the CIE and FDE header definitions to common code

These will necessarily be the same layout for all hosts. This limits
the amount of boilerplate required to implement jit debug for a host.

Reviewed-by: Peter Maydell <>...

c1a61f6c 07/09/2013 05:14 pm Richard Henderson

tcg: Simplify logic using TCG_OPF_NOT_PRESENT

Expand the definition of "not present" to include "should not be present".
This means we can simplify the logic surrounding the generic tcg opcodes
for which the host backend ought not be providing definitions....

d6b64b2b 04/27/2013 03:15 am Richard Henderson

tcg: Log the contents of the prologue with -d out_asm

This makes it easier to verify changes to the code
generating the prologue.

[Aurelien: change the format from %i to %zu]

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

f1fae40c 02/23/2013 07:25 pm Richard Henderson

tcg: Apply life analysis to 64-bit multiword arithmetic ops

Signed-off-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

0b0d3320 02/16/2013 12:40 pm Evgeny Voevodin

TCG: Final globals clean-up

Signed-off-by: Evgeny Voevodin <>
Signed-off-by: Blue Swirl <>

9a8a5ae6 01/02/2013 07:23 pm Stefan Weil

tcg: Remove unneeded assertion

Commit 7f6f0ae5b95adfa76e10eabe2c34424a955fd10c added two assertions.

One of these assertions is not needed:
The pointer ts is never NULL because it is initialized with the
address of an array element.

Reviewed-by: Richard Henderson <>...

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

e5138db5 11/24/2012 02:24 pm Aurelien Jarno

tcg: mark local temps as MEM in dead_temp()

In dead_temp, local temps should always be marked as back to memory,
even if they have not been allocated (i.e. they are discared before
cross a basic block).

It fixes the following assertion in target-xtensa:...

83eeb396 11/17/2012 03:53 pm Evgeny Voevodin

TCG: Remove unused global variables

Signed-off-by: Evgeny Voevodin <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

1ff0a2c5 11/17/2012 03:53 pm Evgeny Voevodin

TCG: Use gen_opparam_buf from context instead of global variable.

Signed-off-by: Evgeny Voevodin <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

92414b31 11/17/2012 03:53 pm Evgeny Voevodin

TCG: Use gen_opc_buf from context instead of global variable.

Signed-off-by: Evgeny Voevodin <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

c4afe5c4 11/17/2012 03:53 pm Evgeny Voevodin

TCG: Use gen_opparam_ptr from context instead of global variable.

Signed-off-by: Evgeny Voevodin <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

efd7f486 11/17/2012 03:53 pm Evgeny Voevodin

TCG: Use gen_opc_ptr from context instead of global variable.

Signed-off-by: Evgeny Voevodin <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

3c5645fa 11/11/2012 05:06 pm Kirill Batuzov

tcg: properly check that op's output needs to be synced to memory

Fix typo introduced in b3a1be87bac3a6aaa59bb88c1410f170dc9b22d5.

Reported-by: Ruslan Savchenko <>
Signed-off-by: Kirill Batuzov <>
Signed-off-by: Aurelien Jarno <>

b76f0d8c 11/03/2012 11:44 am Yeongkyoon Lee

tcg: Optimize qemu_ld/st by generating slow paths at the end of a block

Add optimized TCG qemu_ld/st generation which locates the code of TLB miss
cases at the end of a block after generating the other IRs.
Currently, this optimization supports only i386 and x86_64 hosts....

b3a1be87 10/31/2012 11:20 pm Aurelien Jarno

tcg: don't remove op if output needs to be synced to memory

Commit 9c43b68de628a1e2cba556adfb71c17028eb802e do not correctly check
for dead outputs when they need to be synced to memory in case of
half-dead operations.

Fix that by applying the same pattern than for the default case....

78505279 10/28/2012 03:54 pm Aurelien Jarno

tcg: rework TCG helper flags

The current helper flags, TCG_CALL_CONST and TCG_CALL_PURE might be
confusing and doesn't provide enough granularity for some helpers (FP
helpers for example).

This patch changes them into the following helpers flags:
- TCG_CALL_NO_READ_GLOBALS means that the helper does not read globals,...

c29c1d7e 10/28/2012 03:54 pm Aurelien Jarno

tcg: rewrite tcg_reg_alloc_mov()

Now that the liveness analysis provides more information, rewrite
tcg_reg_alloc_mov(). This changes the behaviour about propagating
constants and memory accesses. We now take the assumption that once
a value is loaded into a register (from memory or from a constant),...

a52ad07e 10/28/2012 03:54 pm Aurelien Jarno

tcg: always mark dead input arguments as dead

Always mark dead input arguments as dead, even if the op is at the basic
block end. This will allow to check that all temps are correctly saved.

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

7dfd8c6a 10/28/2012 03:54 pm Aurelien Jarno

tcg: start with local temps in TEMP_VAL_MEM state

Start with local temps in TEMP_VAL_MEM state, to make possible a later
check that all the temps are correctly saved back to memory.

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

2c0366f0 10/28/2012 03:54 pm Aurelien Jarno

tcg: don't explicitly save globals and temps

The liveness analysis ensures that globals and temps are at the correct
state at a basic block end or with an op with side effects. Avoid
looping on all temps, this can be time consuming on targets with a lot
of globals. Keep an assert in debug mode....

3d5c5f87 10/28/2012 03:54 pm Aurelien Jarno

tcg: synchronize globals for ops with side effects

Operations with side effects (in practice qemu_ld/st ops), only need to
synchronize globals to make sure the CPU state is consistent in case of
exception.

Reviewed-by: Richard Henderson <>...

639368dd 10/28/2012 03:54 pm Aurelien Jarno

tcg: add temp_dead()

A lot of code is duplicated to mark a temporary as dead. Replace it
by temp_dead(), which in addition marks the temp as saved in memory
for globals and local temps, instead of doing this a posteriori in
temp_save().

Reviewed-by: Richard Henderson <>...

7f6ceedf 10/28/2012 03:54 pm Aurelien Jarno

tcg: add tcg_reg_sync()

Add a new function tcg_reg_sync() to synchronize the canonical location
of a temp with the value in the associated register, but without freeing
it. Rewrite tcg_reg_free() to first call tcg_reg_sync() and then to free
the register....

1ad80729 10/28/2012 03:54 pm Aurelien Jarno

tcg: add temp_sync()

Add a new function temp_sync() to synchronize the canonical location
of a temp with the value in the corresponding register, but without
freeing the associated register. Rewrite temp_save() to call
temp_sync() followed by temp_dead()....

ec7a869d 10/28/2012 03:54 pm Aurelien Jarno

tcg: sync output arguments on liveness request

Synchronize an output argument when requested by the liveness analysis.
This is needed so that the temp can be declared dead later.

For that, add a new op_sync_args table in which each bit tells if the
corresponding output argument needs to be synchronized with the memory....

9c43b68d 10/28/2012 03:54 pm Aurelien Jarno

tcg: rework liveness analysis

Rework the liveness analysis by tracking temps that need to go back to
memory in addition to dead temps tracking. This allows to mark output
arguments as "need sync", and to synchronize them back to memory as soon
as they are not written anymore. This way even arguments mapping to...

4c4e1ab2 10/28/2012 03:54 pm Aurelien Jarno

tcg: improve tcg_reg_alloc_movi()

Now that the liveness analysis might mark some output temps as dead, call
temp_dead() if needed.

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

41a05a45 10/19/2012 09:28 pm Aurelien Jarno

Merge branch 'linux-user-for-upstream' of git://git.linaro.org/people/rikuvoipio/qemu

  • 'linux-user-for-upstream' of git://git.linaro.org/people/rikuvoipio/qemu:
    linux-user: register align p{read, write}64
    linux-user: ppc: mark as long long aligned
    tcg: Remove TCG_TARGET_HAS_GUEST_BASE define...
1414968a 10/17/2012 06:51 pm Richard Henderson

tcg: Optimize mulu2

Like add2, do operand ordering, constant folding, and dead operand
elimination. The latter happens about 15% of all mulu2 during an
x86_64 bios boot.

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

1305c451 10/17/2012 06:51 pm Richard Henderson

tcg: Optimize half-dead add2/sub2

When x86_64 guest is not in 64-bit mode, the high-part of the 64-bit
add is dead. When the host is 32-bit, we can simplify to 32-bit
arithmetic.

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

07e10e5d 10/12/2012 02:27 pm Peter Maydell

tcg: Remove TCG_TARGET_HAS_GUEST_BASE define

GUEST_BASE support is now supported by all TCG backends, and is
now mandatory. Drop the now-pointless TCG_TARGET_HAS_GUEST_BASE
define (set by every backend) and the error if it is unset.

Signed-off-by: Peter Maydell <>...

d8382011 10/07/2012 07:36 pm Stefan Weil

tcg: Remove redundant pointer from TCGContext

The pointer entry 'temps' always refers to the array entry 'static_temps'.
Removing the pointer and renaming 'static_temps' to 'temps' reduces the
size of TCGContext (4 or 8 byte) and allows better code generation....

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....

0a209d4b 09/26/2012 01:31 am Richard Henderson

tcg: Sanity check goto_tb input

Checking that we don't try for idx != [01] is trivial. Checking
that we don't issue more than one of any index requires a tad
more data and some ifdefs protecting that new variable.

Signed-off-by: Richard Henderson <>...

04cbbdee 09/22/2012 08:59 pm Blue Swirl

Merge branch 'tcg-sparc' of git://repo.or.cz/qemu/rth

  • 'tcg-sparc' of git://repo.or.cz/qemu/rth:
    tcg-sparc: Preserve branch destinations during retranslation
    tcg-sparc: Fix and enable direct TB chaining.
    tcg-sparc: Add %g/%o registers to alloc_order...
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...

fba3161f 09/22/2012 04:10 pm Aurelien Jarno

tcg: remove #ifdef #endif around TCGOpcode tests

Commit 25c4d9cc changed all TCGOpcode enums to be available, so we don't
need to #ifdef #endif the one that are available only on some targets.
This makes the code easier to read.

Reviewed-by: Richard Henderson <>...

9b9c37c3 09/21/2012 11:02 pm Richard Henderson

tcg-sparc: Assume v9 cpu always, i.e. force v8plus in 32-bit mode.

Current code doesn't actually work in 32-bit mode at all. Since
no one really noticed, drop the complication of v7 and v8 cpus.
Eliminate the --sparc_cpu configure option and standardize macro...

ffc5ea09 09/21/2012 08:53 pm Richard Henderson

tcg: Introduce movcond

Implemented with setcond if the target does not provide
the optional opcode.

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

332864bd 09/19/2012 10:40 pm Aurelien Jarno

tcg: mark set_label with TCG_OPF_BB_END flag

set_label is effectively the end of a basic block, as no optimization
can be made accross it. It was treated as such in the liveness analysis
code, but as a special case.

Mark it with TCG_OPF_BB_END flag so that this information can be used...

c5cc28ff 09/11/2012 07:05 pm Aurelien Jarno

tcg: improve profiler

Now that there are two passes of optimization (optimize.c, liveness)
there is no point of outputing the statistics of the liveness part
only. Update the code to take into account both optimizations.

Reviewed-by: Richard Henderson <>...

eeacee4d 06/21/2012 09:45 pm Blue Swirl

qemu-log: cleanup

Don't use global variables directly but via accessor functions. Rename globals.

Convert macros to functions, add GCC format attributes.

Signed-off-by: Blue Swirl <>

abbb3eae 03/24/2012 09:57 pm Richard Henderson

tcg: Allow ELF_HOST_FLAGS and ELF_OSABI overrides in gdb-jit.

Signed-off-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

5872bbf2 03/24/2012 09:57 pm Richard Henderson

tcg: Add debug_info to JIT ELF image.

This allows us to actually supply a function name in softmmu builds;
gdb doesn't pick up the minimal symbol table otherwise. Also add a
bit of documentation and statically generate more of the ELF image.

Signed-off-by: Richard Henderson <>...

813da627 03/24/2012 03:07 pm Richard Henderson

tcg: Use the GDB JIT debugging interface.

This allows us to generate unwind info for the dynamicly generated
code in the code_gen_buffer. Only i386 is converted at this point.

Signed-off-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

6a18ae2d 03/18/2012 02:21 pm Blue Swirl

i386: Remove REGPARM

Use stack based calling convention (GCC default) for interfacing with
generated code instead of register based convention (regparm(3)).

Signed-off-by: Blue Swirl <>

4055299e 03/17/2012 02:57 pm Kirill Batuzov

Fix large memory chunks allocation with tcg_malloc.

An attempt to allocate a large memory chunk after a small one resulted in
circular links in list of pools. It caused the same memory being
allocated twice for different arrays.

Now pools for large memory chunks are kept in separate list and are...

9d6fca70 03/11/2012 01:28 pm Stefan Weil

tcg: Improve tcg_out_label and fix its usage for w64

tcg_out_label is always called with a third argument of pointer type
which was casted to tcg_target_long.

These casts can be avoided by changing the prototype of tcg_out_label.

There was also a cast to long. For most hosts with...

2aeabc08 03/03/2012 08:10 pm Stefan Weil

w64: fix type casts when calling flush_icache_range

Signed-off-by: Stefan Weil <>
Signed-off-by: Blue Swirl <>

a97e45c8 02/23/2012 10:59 am Stefan Weil

tcg: Remove unneeded include statements

The standard include files are already included in qemu-common.h.

malloc.h and alloca.h were needed for alloca() which was removed
from TCG code some years ago when switching from dyngen to TCG
(see commit 49516bc0d622112caac9df628caf19010fda8b67)....

9814dd27 12/02/2011 12:50 pm Dong Xu Wang

fix spelling in tcg sub directory

Signed-off-by: Dong Xu Wang <>
Signed-off-by: Stefan Hajnoczi <>

2a534aff 11/14/2011 06:47 pm Richard Henderson

tcg: Use TCGReg for standard tcg-target entry points.

Including tcg_out_ld, tcg_out_st, tcg_out_mov, tcg_out_movi.

Signed-off-by: Richard Henderson <>
Reviewed-by: Andreas Färber <>
Reviewed-by: Stefan Weil <>...

2a24374a 10/31/2011 10:52 pm Stefan Weil

tcg: Make ARRAY_SIZE(tcg_op_defs) globally available

tcg_op_defs was already a global array.

The tci disassembler also needs ARRAY_SIZE(tcg_op_defs),
so add a new global constant with this value.

Signed-off-by: Stefan Weil <>

7f6f0ae5 10/01/2011 09:11 am Stefan Weil

tcg: Add some assertions

Signed-off-by: Stefan Weil <>
Signed-off-by: Blue Swirl <>

c0ad3001 10/01/2011 09:11 am Stefan Weil

tcg: Add forward declarations for local functions

These functions are defined in the tcg target specific file
tcg-target.c.

The forward declarations assert that every tcg target uses
the same function prototype.

Signed-off-by: Stefan Weil <>...

f412c762 08/23/2011 10:24 pm Richard Henderson

tcg: Update --enable-debug for TCG_OPF_NOT_PRESENT.

Signed-off-by: Richard Henderson <>
Reviewed-by: Peter Maydell <>
Signed-off-by: Edgar E. Iglesias <>

25c4d9cc 08/21/2011 09:52 pm Richard Henderson

tcg: Always define all of the TCGOpcode enum members.

By always defining these symbols, we can eliminate a lot of ifdefs.

To allow this to be checked reliably, the semantics of the
TCG_TARGET_HAS_* macros must be changed from def/undef to true/false.
This allows even more ifdefs to be removed, converting them into...

8399ad59 08/21/2011 09:52 pm Richard Henderson

tcg: Add and use TCG_OPF_64BIT.

This allows the simplification of the op_bits function from
tcg/optimize.c.

Signed-off-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

8f2e8c07 07/30/2011 01:51 pm Kirill Batuzov

Add TCG optimizations stub

Added file tcg/optimize.c to hold TCG optimizations. Function tcg_optimize
is called from tcg_gen_code_common. It calls other functions performing
specific optimizations. Stub for constant folding was added.

Signed-off-by: Kirill Batuzov <>...

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

TCG/Sparc64: use stack for TCG temps

Use stack instead of temp_buf array in CPUState for TCG temps.

On Sparc64, stack pointer is not aligned but there is a fixed bias of 2047,
so don't try to enforce alignment.

Signed-off-by: Blue Swirl <>

345649c0 06/26/2011 09:25 pm Blue Swirl

TCG: remove broken stack allocation for call arguments

The code for stack allocation for call arguments is way too simplistic
to actually work on targets with non-trivial stack allocation policies,
e.g. ppc64. We've also already allocated TCG_STATIC_CALL_ARGS_SIZE worth...

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

TCG: fix negative frame offset calculations

size_t is unsigned, so the frame offset calculations can be incorrect for
negative offsets.

Signed-off-by: Blue Swirl <>

2b41f10e 06/26/2011 09:25 pm Blue Swirl

Remove exec-all.h include directives

Most exec-all.h include directives are now useless, remove them.

Signed-off-by: Blue Swirl <>

568fffe3 06/03/2011 07:32 pm Christophe Fergeau

tcg: Fix unused-but-set-variable warning

Based on a patch from Hans de Goede <>

This warning is new in gcc 4.6.

Acked-by: Amit Shah <>
Signed-off-by: Christophe Fergeau <>
Signed-off-by: Aurelien Jarno <>

8c11ad25 05/23/2011 11:38 pm Aurelien Jarno

tcg: don't keep dead outputs in registers

If an op with dead outputs is not removed, because it has side effects
or has multiple output and only one dead, mark the registers as dead
instead of saving them. This avoid a few register spills on TCG targets
with low register count, especially with div2 and mul2 ops, or when a...

6b64b624 05/23/2011 11:38 pm Aurelien Jarno

tcg: mark dead output argument in op_dead_args

If an op is not removed and has dead output arguments, mark it
in op_dead_args similarly to what is done for input arguments.

Signed-off-by: Aurelien Jarno <>

866cb6cb 05/23/2011 11:38 pm Aurelien Jarno

tcg: replace op_dead_iargs by op_dead_args

Allow all args to be dead by replacing the input specific op_dead_iargs
variable by op_dead_args. Note this is a purely mechanical change.

Signed-off-by: Aurelien Jarno <>

27bfd83c 03/07/2011 10:26 am Peter Maydell

tcg: Add support for debugging leakage of temporaries

Add support (if CONFIG_DEBUG_TCG is defined) for debugging leakage
of temporary variables. Generally any temporaries created by
a target while it is translating an instruction should be freed
by the end of that instruction; otherwise carefully crafted...

405cf9ff 10/30/2010 11:01 am Stefan Weil

tcg: Use fprintf_function (format checking)

fprintf_function uses format checking with GCC_FMT_ATTR.

Cc: Blue Swirl <>
Signed-off-by: Stefan Weil <>
Signed-off-by: Blue Swirl <>

c3b08d0e 10/20/2010 11:52 pm Stefan Weil

tcg: Fix compiler error (comparison of unsigned expression)

When qemu is configured with --enable-debug-tcg,
gcc throws this warning (or error with -Werror):

tcg/tcg.c:1030: error: comparison of unsigned expression >= 0 is always true

Fix it by removing the >= 0 part....

2bece2c8 06/16/2010 12:29 pm Richard Henderson

tcg: Optionally sign-extend 32-bit arguments for 64-bit hosts.

Some hosts (amd64, ia64) have an ABI that ignores the high bits
of the 64-bit register when passing 32-bit arguments. Others
require the value to be properly sign-extended for the type.
I.e. "int32_t" must be sign-extended and "uint32_t" must be...

0e2029a0 06/11/2010 07:39 pm Aurelien Jarno

tcg: fix DEF macro after commit c61aaf7a388c4ad95d8b546fdb9267dc01183317

Signed-off-by: Aurelien Jarno <>

239fda31 06/09/2010 05:10 pm Aurelien Jarno

tcg: get rid of copy_size in TCGOpDef

copy_size is a left-over from the dyngen era, remove it.

Signed-off-by: Aurelien Jarno <>

c61aaf7a 06/09/2010 05:10 pm Aurelien Jarno

tcg: get rid of DEF2 in tcg-opc.h

Now that tcg-opc.h is only used in TCG code, get rid of DEF2 in
tcg-opc.h.

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 <>