summaryrefslogtreecommitdiffstats
path: root/target-cris/translate.c
Commit message (Collapse)AuthorAgeFilesLines
* exec: move include files to include/exec/Paolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* build: kill libdis, move disassemblers to disas/Paolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* TCG: Use gen_opc_instr_start from context instead of global variable.Evgeny Voevodin2012-12-081-3/+3
| | | | | Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* TCG: Use gen_opc_icount from context instead of global variable.Evgeny Voevodin2012-12-081-1/+1
| | | | | Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* TCG: Use gen_opc_pc from context instead of global variable.Evgeny Voevodin2012-12-081-3/+3
| | | | | Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* TCG: Use gen_opc_buf from context instead of global variable.Evgeny Voevodin2012-11-171-4/+4
| | | | | | Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* TCG: Use gen_opc_ptr from context instead of global variable.Evgeny Voevodin2012-11-171-5/+5
| | | | | | Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-cris/translate.c: Code style clean-upEvgeny Voevodin2012-11-171-2500/+2540
| | | | | | Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* disas: avoid using cpu_single_envBlue Swirl2012-11-101-1/+1
| | | | | | | | | Pass around CPUArchState instead of using global cpu_single_env. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Acked-by: Richard Henderson <rth@twiddle.net> Acked-by: Aurelien Jarno <aurelien@aurel32.net> Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
* Emit debug_insn for CPU_LOG_TB_OP_OPT as well.Richard Henderson2012-09-271-1/+2
| | | | | | | | | | | For all targets that currently call tcg_gen_debug_insn_start, add CPU_LOG_TB_OP_OPT to the condition that gates it. This is useful for comparing optimization dumps, when the pre-optimization dump is merely noise. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-cris: Switch to AREG0 free modeAurelien Jarno2012-09-151-128/+128
| | | | | | | | | Add an explicit CPUCRISState parameter instead of relying on AREG0, and use cpu_ld* in translation and interrupt handling. Remove AREG0 swapping in tlb_fill(). Switch to AREG0 free mode Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-cris: Avoid AREG0 for helpersAurelien Jarno2012-09-151-21/+23
| | | | | | | Add an explicit CPUCRISState parameter instead of relying on AREG0. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-cris: Fix buffer overflowStefan Weil2012-09-081-1/+1
| | | | | | | | | | | | Report from smatch: target-cris/translate.c:3464 cpu_dump_state(32) error: buffer overflow 'env->sregs' 4 <= 255 sregs is declared 'uint32_t sregs[4][16]', so the first index must be less than 4 or ARRAY_SIZE(env->sregs). Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Kill off cpu_state_reset()Andreas Färber2012-06-041-5/+0
| | | | | | | | | | | | | | | | | In commit 1bba0dc932e8826a7d030df3767daf0bc339f9a2 cpu_reset() was renamed to cpu_state_reset(), to allow introducing a new cpu_reset() that would operate on QOM objects. All callers have been updated except for one in target-mips, so drop all implementations except for the one in target-mips and move the declaration there until MIPSCPU reset can be fully QOM'ified. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael Walle <michael@walle.cc> (for lm32) Acked-by: Max Filippov <jcmvbkbc@gmail.com> (for xtensa) Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> (for mb + cris) Acked-by: Alexander Graf <agraf@suse.de> (for ppc) Acked-by: Blue Swirl <blauwirbel@gmail.com>
* target-cris: Let cpu_cris_init() return CRISCPUAndreas Färber2012-06-041-4/+4
| | | | | | | | Turn cpu_init macro into a static inline function returning CPUCRISState for backwards compatibility. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* target-cris: Reindent cpu_cris_init()Andreas Färber2012-06-041-52/+53
| | | | | | | | Judging by TCG variable initialization it used 8-char tabs; use 4 spaces instead. Also remove trailing whitespace. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* target-cris: Start QOM'ifying CPU initAndreas Färber2012-04-241-1/+1
| | | | | | Move VR-independent code from cpu_cris_init() into an initfn. Signed-off-by: Andreas Färber <afaerber@suse.de>
* target-cris: QOM'ify CPU resetAndreas Färber2012-04-241-20/+2
| | | | | | | Move code from cpu_state_reset() into QOM cris_cpu_reset(). Let CPU init call cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de>
* target-cris: QOM'ify CPUAndreas Färber2012-04-241-1/+3
| | | | | | | | Embed CPUCRISState as first member of QOM CRISCPU. Let CPUClass::reset() call cpu_state_reset() for now. Signed-off-by: Andreas Färber <afaerber@suse.de>
* target-cris: Don't overuse CPUStateAndreas Färber2012-03-141-23/+23
| | | | | | | | | Scripted conversion: sed -i "s/CPUState/CPUCRISState/g" target-cris/*.[hc] sed -i "s/#define CPUCRISState/#define CPUState/" target-cris/cpu.h Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
* Rename cpu_reset() to cpu_state_reset()Andreas Färber2012-03-141-2/+2
| | | | | | | | | | Frees the identifier cpu_reset for QOM CPUs (manual rename). Don't hide the parameter type behind explicit casts, use static functions with strongly typed argument to indirect. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
* target-cris: Clean includesStefan Weil2012-02-281-7/+0
| | | | | | | The change in cpu.h is needed when HOST_LONG_BITS is defined in qemu-common.h. Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Use glib memory allocation and free functionsAnthony Liguori2011-08-201-1/+1
| | | | | | qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Remove exec-all.h include directivesBlue Swirl2011-06-261-1/+0
| | | | | | Most exec-all.h include directives are now useless, remove them. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Remove unused function parameters from gen_pc_load and rename the functionStefan Weil2011-04-201-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Function gen_pc_load was introduced in commit d2856f1ad4c259e5766847c49acbb4e390731bd4. The only reason for parameter searched_pc was a debug statement in target-i386/translate.c. Parameter puc was needed by target-sparc until commit d7da2a10402f1644128b66414ca8f86bdea9ae7c. Remove searched_pc from the debug statement and remove both parameters from the parameter list of gen_pc_load. As the function name gen_pc_load was also misleading, it is now called restore_state_to_opc. This new name was suggested by Peter Maydell, thanks. v2: Remove last parameter, too, and rename the function. v3: Fix [] typo in target-arm/translate.c. Fix wrong SHA1 object name in commit message (copy+paste error). Cc: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
* Fix conversions from pointer to tcg_target_longStefan Weil2011-04-101-1/+1
| | | | | | | | | | | | tcg_gen_exit_tb takes a parameter of type tcg_target_long, so the type casts of pointer to long should be replaced by type casts of pointer to tcg_target_long (suggested by Blue Swirl). These changes are needed for build environments where sizeof(long) != sizeof(void *), especially for w64. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* cris: Replace tcg branch sequence with setcondEdgar E. Iglesias2011-01-251-9/+2
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* cris: Set btaken when storing direct jumpsEdgar E. Iglesias2011-01-131-0/+3
| | | | | | | When storing a direct jmp from translation state into runtime state we should set the btaken flag. Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
* cris: Remove unused orig_flagsEdgar E. Iglesias2011-01-101-2/+2
| | | | | | Based on a patch by Blue Swirl <blauwirbel@gmail.com>. Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
* cris: Allow more TB chaining for crisv10Edgar E. Iglesias2011-01-101-10/+27
| | | | Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
* cris: Allow more TB chaningEdgar E. Iglesias2011-01-071-19/+22
| | | | Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
* cris: Avoid useless tmp in t_gen_cc_jmp()Edgar E. Iglesias2011-01-071-6/+1
| | | | Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
* target-xxx: Use fprintf_function (format checking)Stefan Weil2010-10-301-3/+2
| | | | | | | | | | | | | fprintf_function uses format checking with GCC_FMT_ATTR. Format errors were fixed in * target-i386/helper.c * target-mips/translate.c * target-ppc/translate.c Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-cris: Use %td for ptrdiff_t arguments in debug messageStefan Weil2010-10-021-1/+1
| | | | | | | | | | According to ISO/IEC 9899:1999 7.19.6.1, the correct length modifier for ptrdiff_t is 't', not 'z'. Cc: Blue Swirl <blauwirbel@gmail.com> Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* cris: Move sign extension.Edgar E. Iglesias2010-06-161-13/+13
| | | | | | | Move it in preparation for further changes. No functional change. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@axis.com>
* cris: Centralize fetchingEdgar E. Iglesias2010-06-161-22/+44
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* cris: Make the CRISv32 insn decoders return signed int.Edgar E. Iglesias2010-06-161-86/+86
| | | | | | Prepare to return error from the individual decoders. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@axis.com>
* Fix %lld or %llx printf format useBlue Swirl2010-05-221-2/+2
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* cris: remove dead assignments, spotted by clang analyzerBlue Swirl2010-04-251-4/+1
| | | | | | Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* cris: Add support for CRISv10 translation.Edgar E. Iglesias2010-02-151-30/+132
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* cris: Use tcg_gen_movi_tl.Edgar E. Iglesias2010-02-151-2/+2
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* cris: Prettify register dumps.Edgar E. Iglesias2010-01-311-2/+2
| | | | | | Use friendly names for registers in the dumps. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* CRIS: Update PR_EDA on TLB faults.Edgar E. Iglesias2009-10-081-4/+0
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* Fix sys-queue.h conflict for goodBlue Swirl2009-09-121-2/+2
| | | | | | | | | | | | | | | Problem: Our file sys-queue.h is a copy of the BSD file, but there are some additions and it's not entirely compatible. Because of that, there have been conflicts with system headers on BSD systems. Some hacks have been introduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896, f40d753718c72693c5f520f0d9899f6e50395e94, 96555a96d724016e13190b28cffa3bc929ac60dc and 3990d09adf4463eca200ad964cc55643c33feb50 but the fixes were fragile. Solution: Avoid the conflict entirely by renaming the functions and the file. Revert the previous hacks. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Update to a hopefully more future proof FSF addressBlue Swirl2009-07-161-2/+1
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* CRIS: Prettify sizes for the internal disasm.Edgar E. Iglesias2009-06-121-8/+8
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* Include assert.h from qemu-common.hPaul Brook2009-05-131-1/+0
| | | | | | | 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>
* CRIS: Fix bmi.Edgar E. Iglesias2009-05-121-1/+2
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* qemu: introduce qemu_init_vcpu (Marcelo Tosatti)aliguori2009-04-241-0/+1
| | | | | | | | Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7242 c046a42c-6fe2-441c-8c8c-71466251a162
* Add new command line option -singlestep for tcg single stepping.aurel322009-04-051-0/+1
| | | | | | | | | | | | | | This replaces a compile time option for some targets and adds this feature to targets which did not have a compile time option. Add monitor command to enable or disable single step mode. Modify monitor command "info status" to display single step mode. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7004 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud