summaryrefslogtreecommitdiffstats
path: root/target-cris
Commit message (Collapse)AuthorAgeFilesLines
* cris: Fix NMI-flag handling on crisv10.Lars Persson2012-06-153-5/+6
| | | | | | | - The M-flag is encoded in different bits on cris v10 and cris v32. Signed-off-by: Lars Persson <larper@axis.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* cris: Add break support for v10.Edgar E. Iglesias2012-06-143-2/+4
| | | | | | Still no retb Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
* build: move other target-*/ objects to nested Makefile.objsPaolo Bonzini2012-06-071-2/+2
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* build: move libobj-y variable to nested Makefile.objsPaolo Bonzini2012-06-071-1/+4
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* build: move obj-TARGET-y variables to nested Makefile.objsPaolo Bonzini2012-06-071-0/+1
| | | | | | Also drop duplicate occurrence of device-hotplug.o. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* 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-042-6/+14
| | | | | | | | 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-242-1/+10
| | | | | | 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-242-21/+24
| | | | | | | 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-244-1/+135
| | | | | | | | 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>
* Use uintptr_t for various op related functionsBlue Swirl2012-04-141-7/+5
| | | | | | | | | Use uintptr_t instead of void * or unsigned long in several op related functions, env->mem_io_pc and GETPC() macro. Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Rename CPUState -> CPUArchStateAndreas Färber2012-03-141-1/+1
| | | | | | | | | | | | | 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 All occurrences of CPUArchState are expected to be replaced by QOM CPUState, once all targets are QOM'ified and common fields have been extracted. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
* target-cris: Don't overuse CPUStateAndreas Färber2012-03-147-62/+62
| | | | | | | | | 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-284-16/+3
| | | | | | | 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>
* cris: Handle conditional stores on CRISv10Stefan Sandstrom2011-12-123-6/+69
| | | | | Signed-off-by: Stefan Sandstrom <Stefan.Sandstrom@axis.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* softmmu_header: pass CPUState to tlb_fillBlue Swirl2011-10-011-4/+3
| | | | | | | Pass CPUState pointer to tlb_fill() instead of architecture local cpu_single_env hacks. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* 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>
* target-cris/opcode-cris.h: rename REG_PC/SP to CRIS_REG_PC/SPPeter Maydell2011-08-201-6/+6
| | | | | | | | | | | | The REG_PC constant used in opcode-cris.h can clash with a similar define in system include files. In particular the Ubuntu Lucid SPARC signal.h will define REG_PC, and since qemu-common.h now includes signal.h this was causing compile failures. Rename the constants to avoid this issue. (NB that REG_SP is not actually used within QEMU.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* Remove unused is_softmmu parameter from cpu_handle_mmu_faultBlue Swirl2011-08-073-8/+7
| | | | | | | | | Parameter is_softmmu (and its evil mutant twin brother is_softmuu) is not used in cpu_*_handle_mmu_fault() functions, remove them and adjust callers. Acked-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* exec.h cleanupBlue Swirl2011-07-302-29/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move softmmu_exec.h include directives from target-*/exec.h to target-*/op_helper.c. Move also various other stuff only used in op_helper.c there. Define global env in dyngen-exec.h. For i386, move wrappers for segment and FPU helpers from user-exec.c to op_helper.c. Implement raise_exception_err_env() to handle dynamic CPUState. Move the function declarations to cpu.h since they can be used outside of op_helper.c context. LM32, s390x, UniCore32: remove unused cpu_halted(), regs_to_env() and env_to_regs(). ARM: make raise_exception() static. Convert #include "exec.h" to #include "cpu.h" #include "dyngen-exec.h" and remove now unused target-*/exec.h. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* cris: Handle opcode zeroEdgar E. Iglesias2011-06-281-3/+0
| | | | | | It's a valid branch pc + 2. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* Remove exec-all.h include directivesBlue Swirl2011-06-264-4/+0
| | | | | | Most exec-all.h include directives are now useless, remove them. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Move cpu_has_work and cpu_pc_from_tb to cpu.hBlue Swirl2011-06-262-11/+11
| | | | | | | Move functions cpu_has_work() and cpu_pc_from_tb() from exec.h to cpu.h. This is needed by later patches. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* exec.h: fix coding style and change cpu_has_work to return boolBlue Swirl2011-06-261-2/+2
| | | | | | | | | Before the next patch, fix coding style of the areas affected. Change the type of the return value from cpu_has_work() and qemu_cpu_has_work() to bool. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* cpu_loop_exit: avoid using AREG0Blue Swirl2011-06-261-2/+2
| | | | | | | Make cpu_loop_exit() take a parameter for CPUState instead of relying on global env. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2011-05-122-2/+2
|\ | | | | | | | | Conflicts: cpu-all.h
| * Fix typo in comment (truely -> truly)Stefan Weil2011-05-081-1/+1
| | | | | | | | | | Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * Fix typos in comments (accessable -> accessible, priveleged -> privileged)Stefan Weil2011-05-081-1/+1
| | | | | | | | | | Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | irq: Privatize CPU_INTERRUPT_NMI.Richard Henderson2011-05-081-0/+3
|/ | | | | | | | This interrupt name is used by i386, CRIS, and MicroBlaze. Copy the name into each target. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Remove unused function parameter from cpu_restore_stateStefan Weil2011-04-201-1/+1
| | | | | | | | | The previous patch removed the need for parameter puc. Is is now unused, so remove it. Cc: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
* 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>
* inline cpu_halted into sole callerPaolo Bonzini2011-03-131-11/+0
| | | | | | | | All implementations are now the same, and there is only one caller, so inline the function there. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* cris, microblaze: use cpu_has_workPaolo Bonzini2011-02-081-3/+1
| | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* 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-102-14/+33
| | | | 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-302-4/+3
| | | | | | | | | | | | | 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>
* cris: avoid a write only variableBlue Swirl2010-10-131-3/+2
| | | | | | | | | | | Compiling with GCC 4.6.0 20100925 produced a warning: In file included from /src/qemu/target-cris/translate.c:3154:0: /src/qemu/target-cris/translate_v10.c: In function 'dec10_prep_move_m': /src/qemu/target-cris/translate_v10.c:111:22: error: variable 'rd' set but not used [-Werror=unused-but-set-variable] Fix by deleting rd, adjust the only user. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* cris: Consider the TLB valid bit on writes to the TLBEdgar E. Iglesias2010-10-071-1/+3
| | | | | | | | | When updating the guest TLB we only need to flush previous mappings from the entry written if the entry was valid. Also fixes a compiler warning reported by Blue Swirl. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@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: Fix watchdog resetsEdgar E. Iglesias2010-09-191-2/+3
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* cris: Fix TLB exec bit protectionEdgar E. Iglesias2010-09-182-2/+2
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* Use gcc warning flag -Wempty-bodyBlue Swirl2010-09-181-1/+1
| | | | | | | | If the compiler supports the warning flag -Wempty-body, use it. Adjust the code to avoid the warnings. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* cris: Avoid spurios hw_abort on recursive bus faultsEdgar E. Iglesias2010-09-161-1/+7
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
OpenPOWER on IntegriCloud