summaryrefslogtreecommitdiffstats
path: root/target-mips
Commit message (Collapse)AuthorAgeFilesLines
* target-mips: Add compiler attribute to some functions which don't returnStefan Weil2012-03-242-3/+4
| | | | | | | | | | helper_raise_exception_err does not return, nor do helper_raise_exception and do_unaligned_access. Cc: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Andreas Färber <afaerber@suse.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-mips: Don't overuse CPUStateAndreas Färber2012-03-145-274/+274
| | | | | | | | | Scripted conversion: sed -i "s/CPUState/CPUMIPSState/g" target-mips/*.[hc] sed -i "s/#define CPUMIPSState/#define CPUState/" target-mips/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-142-3/+3
| | | | | | | | | | 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>
* Spelling fixes in comments (it's -> its)Stefan Weil2012-03-081-1/+1
| | | | | | | | | | * it's -> its (fixed for all files) * dont -> don't (only fixed in a line which was touched by the previous fix) * distrub -> disturb (fixed in the same line) Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* target-mips: Clean includesStefan Weil2012-02-281-7/+0
| | | | | | | Remove some include statements which are not needed. Cc: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Fix spelling in comments, documentation and messagesStefan Weil2011-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | accidently->accidentally annother->another choosen->chosen consideres->considers decriptor->descriptor developement->development paramter->parameter preceed->precede preceeding->preceding priviledge->privilege propogation->propagation substraction->subtraction throught->through upto->up to usefull->useful Fix also grammar in posix-aio-compat.c Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* fix spelling in target sub directoryDong Xu Wang2011-12-022-2/+2
| | | | | | | | | | | Cc: Richard Henderson <rth@twiddle.net> Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: Alexander Graf <agraf@suse.de> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.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>
* mips: Support the MT TCStatus IXMT irq disable flagEdgar E. Iglesias2011-09-061-0/+4
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* mips: Add MT halting and waking of VPEsEdgar E. Iglesias2011-09-062-4/+129
| | | | | | + some partial support for TC's. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* mips: Initialize MT state at resetEdgar E. Iglesias2011-09-061-0/+26
| | | | | | | Only TC0 on VPE0 is active after reset. All other VPEs and TCs start in sleep. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* mips: Default to using one VPE and one TC.Edgar E. Iglesias2011-09-061-1/+1
| | | | | | Boards can override the setup if needed. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* mips: Enable VInt interrupt mode for the 34KfEdgar E. Iglesias2011-09-061-1/+1
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* mips: Correct VInt vector generationEdgar E. Iglesias2011-09-061-3/+3
| | | | | | | | 1. The pending need to pass the Status IM gating. 2. The priority is from seven (highest prio) down to zero. QEMU was doing the opposite. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* mips: Correct IntCtl write mask for VIntEdgar E. Iglesias2011-09-061-1/+1
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* mips: Hook in more reg accesses via mttr/mftrEdgar E. Iglesias2011-09-063-11/+225
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* mips: Synchronize CP0 TCSTatus, Status and EntryHiEdgar E. Iglesias2011-09-061-44/+106
| | | | | | | These registers share some of their fields. Writes to these fields should be visible through the corresponding mirror fields. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* mips: Handle TC indexing of other VPEsEdgar E. Iglesias2011-09-061-105/+161
| | | | | | | Introduce mips_cpu_map_tc() to map a global TC index into a VPE nr and local tc index. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* Use glib memory allocation and free functionsAnthony Liguori2011-08-202-3/+3
| | | | | | qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Remove unused is_softmmu parameter from cpu_handle_mmu_faultBlue Swirl2011-08-073-5/+5
| | | | | | | | | 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-303-61/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Fix unassigned memory access handlingBlue Swirl2011-07-202-4/+6
| | | | | | | | cea5f9a28faa528b6b1b117c9ab2d8828f473fef exposed bugs in unassigned memory access handling. Fix them by always passing CPUState to the handlers. Reported-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Remove exec-all.h include directivesBlue Swirl2011-06-264-4/+1
| | | | | | 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-22/+24
| | | | | | | 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-1/+1
| | | | | | | | | 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>
* target-mips: Fix warning caused by unused local variableAurelien Jarno2011-05-151-8/+6
| | | | | | | Fix compilation with gcc-4.6, based on a patch from Stefan Weil <weil@mail.berlios.de>. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2011-05-121-2/+2
|\ | | | | | | | | Conflicts: cpu-all.h
| * Fix typos in comments (interupt -> interrupt)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 typo in code and commentsStefan Weil2011-05-061-1/+1
| | | | | | | | | | | | | | Replace writeable -> writable Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | target-mips: Do not check CPU_INTERRUPT_TIMER.Richard Henderson2011-05-081-4/+0
|/ | | | | | | This bit is never set, therefore we should not read it either. 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-2/+2
| | | | | | | | | 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>
* target-mips: clear softfpu exception state for comparison instructionsAurelien Jarno2011-04-171-16/+25
| | | | | | | MIPS FPU instructions should start with a clean softfpu status. This is done for the most instructions, but not for comparison ones. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-mips: fix c.ps.* instructionsAurelien Jarno2011-04-171-4/+4
| | | | | | | Contrary to cabs.ps.* instructions, c.ps.* should not compare the absolute value of the operand, but directly the operands. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-mips: don't hardcode softfloat exception bitsAurelien Jarno2011-04-171-15/+20
| | | | | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-mips: simplify FP comparisonsAurelien Jarno2011-04-171-36/+36
| | | | | | | | As the softfloat comparison functions already test for NaN, there is no need to always call the float*_unordered*() functions. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* softfloat: rename float*_eq() into float*_eq_quiet()Aurelien Jarno2011-04-171-16/+16
| | | | | | | | | | | | | | float*_eq functions have a different semantics than other comparison functions. Fix that by first renaming float*_quiet() into float*_eq_quiet(). Note that it is purely mechanical, and the behaviour should be unchanged. That said it clearly highlight problems due to this different semantics, they are fixed later in this patch series. Cc: Alexander Graf <agraf@suse.de> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-mips: use new float*_unordered*() functionsAurelien Jarno2011-04-171-98/+70
| | | | | | | | Use the new float*_unordered*() functions from softfloat instead of redefining a private version. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* 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>
* Fix trivial "endianness bugs"Stefan Weil2011-04-031-1/+1
| | | | | | | Replace endianess -> endianness. 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>
* [PATCH] [MIPS] Clear softfpu exception state for round, trunc, ceil and floorChris Dearman2011-02-091-0/+16
| | | | | | | | | MIPS FPU instructions should start with a clean softfpu status. This is done for the arithmetic operations and cvt instructions, but not for round, trunc, ceil and floor. Signed-off-by: Chris Dearman <chris@mips.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-mips: fix save_cpu_state() callsAurelien Jarno2011-01-241-6/+6
| | | | | | | | | | The rule is: - don't save PC if the exception is only triggered by softmmu. - save PC if the exception can be triggered by an helper. Fix a 64-bit kernel crash when loading modules. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* mips: Break TBs after mfc0_countEdgar E. Iglesias2011-01-181-2/+6
| | | | | | | | Break the TB after reading the count register. This makes it possible to take timer interrupts immediately after a read of a possibly expired timer. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* softfloat: Rename float*_is_nan() functions to float*_is_quiet_nan()Peter Maydell2011-01-021-4/+4
| | | | | | | | | | | | | | | | The softfloat functions float*_is_nan() were badly misnamed, because they return true only for quiet NaNs, not for all NaNs. Rename them to float*_is_quiet_nan() to more accurately reflect what they do. This change was produced by: perl -p -i -e 's/_is_nan/_is_quiet_nan/g' $(git grep -l is_nan) (with the results manually checked.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Nathan Froyd <froydnj@codesourcery.com> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-mips: fix host CPU consumption when guest is idleAurelien Jarno2010-12-272-3/+23
| | | | | | | | | | | | | | When the CPU is in wait state, do not wake-up if an interrupt can't be taken. This avoid host CPU running at 100% if a device (e.g. timer) has an interrupt line left enabled. Also factorize code to check if interrupts are enabled in cpu_mips_hw_interrupts_pending(). Based on a patch from Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* target-mips: fix translation of MT instructionsNathan Froyd2010-12-223-28/+16
| | | | | | | | | | | | | | | | The translation of dmt/emt/dvpe/evpe was doing the moral equivalent of: int x; ... /* no initialization of x */ x = f (x); which confused later bits of TCG rather badly, leading to crashes. Fix the helpers to only return results (those instructions have no inputs), and fix the translation code accordingly. Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-xxx: Use fprintf_function (format checking)Stefan Weil2010-10-303-9/+8
| | | | | | | | | | | | | 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>
OpenPOWER on IntegriCloud