History | View | Annotate | Download (67.4 kB)
tcg: Add some assertions
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
tcg: Add forward declarations for local functions
These functions are defined in the tcg target specific filetcg-target.c.
The forward declarations assert that every tcg target usesthe same function prototype.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
tcg: Update --enable-debug for TCG_OPF_NOT_PRESENT.
Signed-off-by: Richard Henderson <rth@twiddle.net>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
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 theTCG_TARGET_HAS_* macros must be changed from def/undef to true/false.This allows even more ifdefs to be removed, converting them into...
tcg: Add and use TCG_OPF_64BIT.
This allows the simplification of the op_bits function fromtcg/optimize.c.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Add TCG optimizations stub
Added file tcg/optimize.c to hold TCG optimizations. Function tcg_optimizeis called from tcg_gen_code_common. It calls other functions performingspecific optimizations. Stub for constant folding was added.
Signed-off-by: Kirill Batuzov <batuzovk@ispras.ru>...
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 <blauwirbel@gmail.com>
TCG: remove broken stack allocation for call arguments
The code for stack allocation for call arguments is way too simplisticto actually work on targets with non-trivial stack allocation policies,e.g. ppc64. We've also already allocated TCG_STATIC_CALL_ARGS_SIZE worth...
TCG: fix negative frame offset calculations
size_t is unsigned, so the frame offset calculations can be incorrect fornegative offsets.
Remove exec-all.h include directives
Most exec-all.h include directives are now useless, remove them.
tcg: Fix unused-but-set-variable warning
Based on a patch from Hans de Goede <hdegoede@redhat.com>
This warning is new in gcc 4.6.
Acked-by: Amit Shah <amit.shah@redhat.com>Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tcg: don't keep dead outputs in registers
If an op with dead outputs is not removed, because it has side effectsor has multiple output and only one dead, mark the registers as deadinstead of saving them. This avoid a few register spills on TCG targetswith low register count, especially with div2 and mul2 ops, or when a...
tcg: mark dead output argument in op_dead_args
If an op is not removed and has dead output arguments, mark itin op_dead_args similarly to what is done for input arguments.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tcg: replace op_dead_iargs by op_dead_args
Allow all args to be dead by replacing the input specific op_dead_iargsvariable by op_dead_args. Note this is a purely mechanical change.
tcg: Add support for debugging leakage of temporaries
Add support (if CONFIG_DEBUG_TCG is defined) for debugging leakageof temporary variables. Generally any temporaries created bya target while it is translating an instruction should be freedby the end of that instruction; otherwise carefully crafted...
tcg: Use fprintf_function (format checking)
fprintf_function uses format checking with GCC_FMT_ATTR.
Cc: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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....
tcg: Optionally sign-extend 32-bit arguments for 64-bit hosts.
Some hosts (amd64, ia64) have an ABI that ignores the high bitsof the 64-bit register when passing 32-bit arguments. Othersrequire the value to be properly sign-extended for the type.I.e. "int32_t" must be sign-extended and "uint32_t" must be...
tcg: fix DEF macro after commit c61aaf7a388c4ad95d8b546fdb9267dc01183317
tcg: get rid of copy_size in TCGOpDef
copy_size is a left-over from the dyngen era, remove it.
tcg: get rid of DEF2 in tcg-opc.h
Now that tcg-opc.h is only used in TCG code, get rid of DEF2 intcg-opc.h.
tcg: Make some tcg-target.c routines static.
Both tcg_target_init and tcg_target_qemu_prologueare unused outside of tcg.c.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tcg: Add TYPE parameter to tcg_out_mov.
Mirror tcg_out_movi in having a TYPE parameter. This allows x86_64to 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"...
tcg: Initialize the prologue after GUEST_BASE is fixed.
This will allow backends to make intelligent choices about howto implement GUEST_BASE.
tcg: Add missing 'static' attribute
tcg_out_reloc is only used locally (in */target.c which isincluded in tcg.c).
Remove dead assignments in various common files, spotted by clang analyzer
Value stored is never read.
Fix --enable-profiler compilation.
There's a header file inclusion ordering problem between cpu-all.hand qemu-timer.h, such that cpu_get_real_ticks is not defined whenwe attempt to use it in profile_getclock.
Signed-off-by: Richard Henderson <rth@twiddle.net>...
tcg: Add missing static qualifier
Build breaks otherwise when USE_LIVENESS_ANALYSIS is not defined.
Signed-off-by: malc <av1474@comtv.ru>
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.
tcg-hppa: Fix 64-bit argument ordering
Fix build with -DNDEBUG in CFLAGS
tcg: Add consistency checks for op definitions
When compiled with CONFIG_DEBUG_TCG, this code looksfor missing, duplicate and wrong entries in theop definitions.
Errors will raise an assertion at program start(all checks are done in the initial phase)....
tcg: generic support for conditional set
Defines setcond_{i32,i64} and setcond2_i32 for 64-on-32-bit.
tcg: improve output log
tcg: allocate s->op_dead_iargs dynamically
Similarly to what is already done in tcg_liveness_analysis() whenUSE_LIVENESS_ANALYSIS is not set.
Revert part of 6692b043198d58a12317009edb98654c6839f043
Committed by accident.
TCG: fix DEF2 macro
rename DEBUG_TCG to CONFIG_DEBUG_TCG
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix CONFIG_PROFILER
Userspace guest address offsetting
Re-implement GUEST_BASE support.Offset guest ddress space by default if the guest binary containsregions below the host mmap_min_addr.Implement support for i386, x86-64 and arm hosts.
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>...
Include assert.h from qemu-common.h
Include assert.h from qemu-common.h and remove other direct uses.cpu-all.h still need to include it because of the dyngen-exec.h hacks
Signed-off-by: Paul Brook <paul@codesourcery.com>
tcg: make sure NDEBUG is defined before including <assert.h>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7122 c046a42c-6fe2-441c-8c8c-71466251a162
Add a --enable-debug-tcg option to configure
This patch allows DEBUG_TCGV to be defined (and also prevents NDEBUGfrom being defined) when passing an option to the configure script.This should help to prevent any accidental changes that enableDEBUG_TCGV in tcg/tcg.h from being committed in future, and may...
tcg: add a CONST flag to TCG helpers
A const function only reads its arguments and does not use TCGglobals variables. Hence a call to such a function does notsave TCG globals variabes back to their canonical location.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>...
TCG: remove obsolete old_op_count profiler field
Since we don't generate any "old op" anymore, the old_op_countis unneeded.
Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6614 c046a42c-6fe2-441c-8c8c-71466251a162
Add "static"
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6588 c046a42c-6fe2-441c-8c8c-71466251a162
global s/loglevel & X/qemu_loglevel_mask(X)/ (Eduardo Habkost)
These are references to 'loglevel' that aren't on a simple 'if (loglevel &X) qemu_log()' statement.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
Convert references to logfile/loglevel to use qemu_log*() macros
This is a large patch that changes all occurrences of logfile/loglevelglobal variables to use the new qemu_log*() macros.
tcg: remove tcg_global_reg2_new_hack()
This patch removes the unused tcg_global_reg2_new_hack() function, whichwas added in r4438 to work around a register shortage problem regardingdyngen. The only ever user of this function was removed in r4577.
Signed-off-by: Stuart Brady <stuart.brady@gmail.com>...
tcg: kill two warnings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6029 c046a42c-6fe2-441c-8c8c-71466251a162
Introduce and use cache-utils.[ch]
Thanks to Segher Boessenkool and Holis Blanchard.
AIX and Darwin cache inquiry:http://gcc.gnu.org/ml/gcc-patches/2007-08/msg00388.html
Auxiliary vectors:http://manugarg.googlepages.com/aboutelfauxiliaryvectors
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5973 c046a42c-6fe2-441c-8c8c-71466251a162
Some cleanups after dyngen removal
1. hostregs_helper.h: fix comment2. translate-all.c: rename dyngen_code(_search_pc) to tcg_gen_code(_search_pc)3. tcg.c: - rename dyngen_table_op_count to tcg_table_op_count - no need to generate a log of dyngen ops generated...
this patch removes some now unused things after dyngen removal.
1. dyngen-exec.h: op_param, op _jmp and some associated macros are now unused;2. Makefile.target: tcg-dyngen is not needed anymore2. tcg/tcg-op.h, tcg/tcg-opc.h: gen-op.h is dead...
Some fixes for TCG debugging
This fixes a few things after Paul's improvements for TCG debugging:
- change TCGv_i64 field name to something different from TCGv_i32 - fix things in tcg that the above change made visible.
Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com>...
Fix alignment of 64bit args
Unbreaks sparc and mips64el. (Reported by Thiemo Seufer)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5815 c046a42c-6fe2-441c-8c8c-71466251a162
Preliminary AIX support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5732 c046a42c-6fe2-441c-8c8c-71466251a162
TCG variable type checking.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5729 c046a42c-6fe2-441c-8c8c-71466251a162
Fix undeclared symbol warnings from sparse
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5539 c046a42c-6fe2-441c-8c8c-71466251a162
TCG: add tcg_const_local_tl()
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5504 c046a42c-6fe2-441c-8c8c-71466251a162
Display TCGCond name in tcg dumper (original patch by Tristan Gingold)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5208 c046a42c-6fe2-441c-8c8c-71466251a162
Fix some warnings that would be generated by gcc -Wmissing-prototypes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5022 c046a42c-6fe2-441c-8c8c-71466251a162
Allocate register pair for 64-bit registers on 32-bit host.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4730 c046a42c-6fe2-441c-8c8c-71466251a162
Allocate a register pair instead of a single register.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4688 c046a42c-6fe2-441c-8c8c-71466251a162
Spelling fixes, by Stefan Weil.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4655 c046a42c-6fe2-441c-8c8c-71466251a162
suppressed unused macro handling
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4580 c046a42c-6fe2-441c-8c8c-71466251a162
added local temporaries
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4576 c046a42c-6fe2-441c-8c8c-71466251a162
added tcg_temp_free() and improved the handling of constants
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4544 c046a42c-6fe2-441c-8c8c-71466251a162
compilation fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4540 c046a42c-6fe2-441c-8c8c-71466251a162
profiler clean up
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4537 c046a42c-6fe2-441c-8c8c-71466251a162
added debug_insn_start debug instruction
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4531 c046a42c-6fe2-441c-8c8c-71466251a162
debug output: write helper names
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4529 c046a42c-6fe2-441c-8c8c-71466251a162
more generic call codegen
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4528 c046a42c-6fe2-441c-8c8c-71466251a162
fixed zero shifts (64 bit case)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4527 c046a42c-6fe2-441c-8c8c-71466251a162
fixed dead global variable update
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4512 c046a42c-6fe2-441c-8c8c-71466251a162
added 'pure' function attribute - fixed indirect function calls
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4469 c046a42c-6fe2-441c-8c8c-71466251a162
temporary hack to handle register shortage with dyngen for qemu_st64()
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4438 c046a42c-6fe2-441c-8c8c-71466251a162
Rename CONFIG_NO_DYNGEN_OP to CONFIG_DYNGEN_OP to avoid double negatives
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4412 c046a42c-6fe2-441c-8c8c-71466251a162
fixed global variable handling with qemu load/stores - initial global prologue/epilogue implementation
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4406 c046a42c-6fe2-441c-8c8c-71466251a162
HPPA (PA-RISC) host support
(Stuart Brady)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4199 c046a42c-6fe2-441c-8c8c-71466251a162
Remove osdep.c/qemu-img code duplication
(Kevin Wolf)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4191 c046a42c-6fe2-441c-8c8c-71466251a162
Prepare for op.c removal and zero legacy ops
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4095 c046a42c-6fe2-441c-8c8c-71466251a162
Fix i32 memory backed variables on 64-bit host
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4044 c046a42c-6fe2-441c-8c8c-71466251a162
Remove blank elements in tcg_target_reg_alloc_order[] (Stuart Brady)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4039 c046a42c-6fe2-441c-8c8c-71466251a162
Add function prologue, fix pointer load on Sparc64 host
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4027 c046a42c-6fe2-441c-8c8c-71466251a162
Fix typo
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3983 c046a42c-6fe2-441c-8c8c-71466251a162
Simplify TCG relocation bugfix.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3974 c046a42c-6fe2-441c-8c8c-71466251a162
Fix TCG relocation bug (exposed by fault after brcond op). Add FIXME forannother potential bug.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3968 c046a42c-6fe2-441c-8c8c-71466251a162
win32: suppress alloca() warning
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3966 c046a42c-6fe2-441c-8c8c-71466251a162
fixed sign extensions - added explicit side effect op flag - added discard instruction
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3963 c046a42c-6fe2-441c-8c8c-71466251a162
Add TCG variable opaque type.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3961 c046a42c-6fe2-441c-8c8c-71466251a162
TCG code generator
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3943 c046a42c-6fe2-441c-8c8c-71466251a162