summaryrefslogtreecommitdiff
path: root/target-cris
AgeCommit message (Collapse)AuthorFilesLines
2011-12-12cris: Handle conditional stores on CRISv10Stefan Sandstrom3-6/+69
Signed-off-by: Stefan Sandstrom <Stefan.Sandstrom@axis.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-10-01softmmu_header: pass CPUState to tlb_fillBlue Swirl1-4/+3
Pass CPUState pointer to tlb_fill() instead of architecture local cpu_single_env hacks. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-08-20Use glib memory allocation and free functionsAnthony Liguori1-1/+1
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-20target-cris/opcode-cris.h: rename REG_PC/SP to CRIS_REG_PC/SPPeter Maydell1-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>
2011-08-07Remove unused is_softmmu parameter from cpu_handle_mmu_faultBlue Swirl3-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>
2011-07-30exec.h cleanupBlue Swirl2-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>
2011-06-28cris: Handle opcode zeroEdgar E. Iglesias1-3/+0
It's a valid branch pc + 2. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-06-26Remove exec-all.h include directivesBlue Swirl4-4/+0
Most exec-all.h include directives are now useless, remove them. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-06-26Move cpu_has_work and cpu_pc_from_tb to cpu.hBlue Swirl2-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>
2011-06-26exec.h: fix coding style and change cpu_has_work to return boolBlue Swirl1-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>
2011-06-26cpu_loop_exit: avoid using AREG0Blue Swirl1-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>
2011-05-12Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2-2/+2
Conflicts: cpu-all.h
2011-05-08irq: Privatize CPU_INTERRUPT_NMI.Richard Henderson1-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>
2011-05-08Fix typo in comment (truely -> truly)Stefan Weil1-1/+1
Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-05-08Fix typos in comments (accessable -> accessible, priveleged -> privileged)Stefan Weil1-1/+1
Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-04-20Remove unused function parameter from cpu_restore_stateStefan Weil1-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>
2011-04-20Remove unused function parameters from gen_pc_load and rename the functionStefan Weil1-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>
2011-04-10Fix conversions from pointer to tcg_target_longStefan Weil1-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>
2011-03-13inline cpu_halted into sole callerPaolo Bonzini1-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>
2011-02-08cris, microblaze: use cpu_has_workPaolo Bonzini1-3/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-01-25cris: Replace tcg branch sequence with setcondEdgar E. Iglesias1-9/+2
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-01-13cris: Set btaken when storing direct jumpsEdgar E. Iglesias1-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>
2011-01-10cris: Remove unused orig_flagsEdgar E. Iglesias1-2/+2
Based on a patch by Blue Swirl <blauwirbel@gmail.com>. Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
2011-01-10cris: Allow more TB chaining for crisv10Edgar E. Iglesias2-14/+33
Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
2011-01-07cris: Allow more TB chaningEdgar E. Iglesias1-19/+22
Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
2011-01-07cris: Avoid useless tmp in t_gen_cc_jmp()Edgar E. Iglesias1-6/+1
Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
2010-10-30target-xxx: Use fprintf_function (format checking)Stefan Weil2-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>
2010-10-13cris: avoid a write only variableBlue Swirl1-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>
2010-10-07cris: Consider the TLB valid bit on writes to the TLBEdgar E. Iglesias1-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>
2010-10-02target-cris: Use %td for ptrdiff_t arguments in debug messageStefan Weil1-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>
2010-09-19cris: Fix watchdog resetsEdgar E. Iglesias1-2/+3
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-09-18cris: Fix TLB exec bit protectionEdgar E. Iglesias2-2/+2
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-09-18Use gcc warning flag -Wempty-bodyBlue Swirl1-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>
2010-09-16cris: Avoid spurios hw_abort on recursive bus faultsEdgar E. Iglesias1-1/+7
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-07-05cris: Avoid debug clobbering for both I & D MMU state.Edgar E. Iglesias3-20/+10
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@axis.com>
2010-07-05cris: Dont clobber the MMU state across calls to cpu_get_phys_page_debug.Edgar E. Iglesias1-0/+17
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-07-05cris: Break out rand LFSR update into a separate func.Edgar E. Iglesias1-8/+13
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@axis.com>
2010-07-03remove exec-all.h inclusion from cpu.hPaolo Bonzini1-1/+0
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-07-03move cpu_pc_from_tb to target-*/exec.hPaolo Bonzini2-5/+6
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-07-03remove unused stuff from */exec.hPaolo Bonzini1-3/+0
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-16cris: Move sign extension.Edgar E. Iglesias1-13/+13
Move it in preparation for further changes. No functional change. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@axis.com>
2010-06-16cris: Centralize fetchingEdgar E. Iglesias1-22/+44
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-06-16cris: Make the CRISv32 insn decoders return signed int.Edgar E. Iglesias1-86/+86
Prepare to return error from the individual decoders. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@axis.com>
2010-06-10cris: Break out image loading to hw/cris-boot.c.Edgar E. Iglesias1-0/+2
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@axis.com>
2010-05-22Fix %lld or %llx printf format useBlue Swirl1-2/+2
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-19Fix __VA__ARGS__ typo in cris mmu.cRiccardo Magliocchetti1-1/+1
Fix compilation with DEBUG defined Signed-off-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-04-25cris: remove dead assignments, spotted by clang analyzerBlue Swirl2-7/+2
Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-18Replace assert(0) with abort() or cpu_abort()Blue Swirl2-8/+10
When building with -DNDEBUG, assert(0) will not stop execution so it must not be used for abnormal termination. Use cpu_abort() when in CPU context, abort() otherwise. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-17Large page TLB flushPaul Brook1-2/+3
QEMU uses a fixed page size for the CPU TLB. If the guest uses large pages then we effectively split these into multiple smaller pages, and populate the corresponding TLB entries on demand. When the guest invalidates the TLB by virtual address we must invalidate all entries covered by the large page. However the address used to invalidate the entry may not be present in the QEMU TLB, so we do not know which regions to clear. Implementing a full vaiable size TLB is hard and slow, so just keep a simple address/mask pair to record which addresses may have been mapped by large pages. If the guest invalidates this region then flush the whole TLB. Signed-off-by: Paul Brook <paul@codesourcery.com>
2010-03-12Remove cpu_get_phys_page_debug from userspace emulationPaul Brook1-5/+0
cpu_get_phys_page_debug makes no sense for userspace emulation, so remove it. Signed-off-by: Paul Brook <paul@codesourcery.com>