summaryrefslogtreecommitdiffstats
path: root/target-alpha
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Remove unused is_softmmu parameter from cpu_handle_mmu_faultBlue Swirl2011-08-073-4/+4
| | | | | | | | | 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-40/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+7
| | | | | | | | 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>
* target-alpha, target-ppc: Remove unnecessary setjmp.h includePeter Maydell2011-07-121-2/+0
| | | | | | | | | | Remove the include of setjmp.h from the cpu.h of target-alpha and target-ppc. This is unnecessary because cpu-defs.h already includes this header; this change brings these two targets into line with all the rest. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Remove exec-all.h include directivesBlue Swirl2011-06-263-3/+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-20/+22
| | | | | | | 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-3/+3
| | | | | | | Make cpu_loop_exit() take a parameter for CPUState instead of relying on global env. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* alpha: remove unused variableMichael S. Tsirkin2011-06-161-1/+6
| | | | | Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Richard Henderson <rth@twiddle.net>
* alpha/translate: remve unused variablesMichael S. Tsirkin2011-06-161-2/+1
| | | | | Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Richard Henderson <rth@twiddle.net>
* target-alpha: Implement TLB flush primitives.Richard Henderson2011-05-313-12/+34
| | | | | | Expose these via MTPR, more or less like the real HW does. Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-alpha: Use a fixed frequency for the RPCC in system mode.Richard Henderson2011-05-311-1/+10
| | | | | | | Also include the PCC_OFS in the return value. For user mode we can pretend the PCC_OFS value is always zero. Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-alpha: Trap for unassigned and unaligned addresses.Richard Henderson2011-05-312-1/+31
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-alpha: Remap PIO space for 43-bit KSEG for EV6.Richard Henderson2011-05-311-3/+7
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-alpha: Implement cpu_alpha_handle_mmu_fault for system mode.Richard Henderson2011-05-312-4/+138
| | | | | | | Reads the page table how PALcode would, except that the virtual page table base register is not used. Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-alpha: Implement more CALL_PAL values inline.Richard Henderson2011-05-311-32/+108
| | | | | | | | In particular, SWPIPL is used quite a lot by the Linux kernel. Doing this inline makes it significantly easier to step through without the debugger getting confused by the mode switch. Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-alpha: Disable interrupts properly.Richard Henderson2011-05-312-1/+16
| | | | | | Interrupts are disabled in PALmode, and when the PS IL is high enough. Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-alpha: All ISA checks to use TB->FLAGS.Richard Henderson2011-05-312-181/+229
| | | | | | | | We had two different methods in use, both of which referenced ENV, and neither of which indicated to the generic code when different compilation modes are not compatible. Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-alpha: Swap shadow registers moving to/from PALmode.Richard Henderson2011-05-313-2/+41
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-alpha: Implement do_interrupt for system mode.Richard Henderson2011-05-311-10/+111
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-alpha: Add IPRs to be used by the emulation PALcode.Richard Henderson2011-05-313-0/+124
| | | | | | | These aren't actually used yet, but we can at least access them via the HW_MFPR and HW_MTPR instructions. Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-alpha: Use kernel mmu_idx for pal_mode.Richard Henderson2011-05-312-5/+9
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-alpha: Add various symbolic constants.Richard Henderson2011-05-312-14/+44
| | | | | | | | | The EXC_M_* constants were being set for the EV6, not as set for the Unix kernel entry point. Use PS_USER_MODE instead of hard-coding access to the PS register. Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-alpha: Use do_restore_state for arithmetic exceptions.Richard Henderson2011-05-311-19/+30
| | | | | | | This gets the PC right after an arithmetic exception. Also tidies the code in the TLB fault handlers to use common code. Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-alpha: Tidy up arithmetic exceptions.Richard Henderson2011-05-311-13/+21
| | | | | | Introduce and use arith_excp, filling in the trap_arg[01] IPRs. Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-alpha: Tidy exception constants.Richard Henderson2011-05-313-26/+17
| | | | | | | | | | | | | | | There's no need to attempt to match EXCP_* values with PALcode entry point offsets. Instead, compress all the values to make for more efficient switch statements within QEMU. We will be doing TLB fill within QEMU proper, not within the PALcode, so all of the ITB/DTB miss, double fault, and access exceptions can be compressed to EXCP_MMFAULT. Compress all of the EXCP_CALL_PAL exceptions into one. Use env->error_code to store the specific entry point. Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-alpha: Enable the alpha-softmmu target.Richard Henderson2011-05-311-0/+74
| | | | | | | | | | | With all of the pre-existing code that would not compile gone, this is the earliest point at which the target can be enabled. There is no machine defined yet, so this will crash on startup. Enable the target anyway, to make sure that further compilation problems do not creep back in. Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-alpha: Rationalize internal processor registers.Richard Henderson2011-05-315-559/+20
| | | | | | | | | Delete all the code that tried to emulate the real IPRs of some unnamed CPU. Replace those with just 3 slots that we can use to communicate trap information between the helper functions that signal exceptions and the OS trap handler. Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-alpha: Merge HW_REI and HW_RET implementations.Richard Henderson2011-05-313-22/+8
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-alpha: Cleanup MMU modes.Richard Henderson2011-05-312-12/+32
| | | | | | Don't bother including executive and supervisor modes. Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-alpha: Fix system store_conditionalRichard Henderson2011-05-311-3/+3
| | | | | | This code contained typos, as it had never been compiled. Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-alpha: Fix translation of PALmode memory insns.Richard Henderson2011-05-313-183/+65
| | | | | | | | | | | | | | | | All of the "raw" memory accesses should be "phys" instead. Fix some confusion about argument ordering of the store routines. Fix the implementation of store-conditional. Delete the "alt-mode" helpers. Because we only implement two mmu modes, let /a imply user-mode unconditionally. Leave some combinations of virt access without permission checks as unimplemented. There are too many hoops through which to jump, and these insns will not be needed in the emulation palcode. Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-alpha: Remove partial support for palcode emulation.Richard Henderson2011-05-313-38/+1
| | | | | | This code does not work, and will be replaced by a bios image. Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-alpha: Single-step properly across branches.Richard Henderson2011-05-311-15/+20
| | | | | | | | We were failing to generate EXC_DEBUG in the EXIT_PC_UPDATED path. This caused us not to stop at the instruction after a branch, but on the instruction afterward. Signed-off-by: Richard Henderson <rth@twiddle.net>
* 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>
* softfloat: rename float*_eq() into float*_eq_quiet()Aurelien Jarno2011-04-171-2/+2
| | | | | | | | | | | | | | 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-alpha: use new float64_unordered_quiet() functionAurelien Jarno2011-04-171-2/+3
| | | | | | | | | | | | | | | Use float64_unordered_quiet() in helper_cmptun() instead of doing the the comparison manually. According to the "Alpha Compiler Writer's Guide", we should use the _quiet version here, as CMPTUN and CMPTEQ should generate InvalidOp for SNaNs but not for QNaNs. Thanks to Peter Maydell <peter.maydell@linaro.org> and Richard Henderson <rth@twiddle.net> for digging into the manuals. Acked-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* Fix conversions from pointer to tcg_target_longStefan Weil2011-04-101-3/+3
| | | | | | | | | | | | 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>
* softfloat: Rename float*_is_nan() functions to float*_is_quiet_nan()Peter Maydell2011-01-021-1/+1
| | | | | | | | | | | | | | | | 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-xxx: Use fprintf_function (format checking)Stefan Weil2010-10-301-2/+1
| | | | | | | | | | | | | 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>
* remove exec-all.h inclusion from cpu.hPaolo Bonzini2010-07-031-1/+0
| | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* move cpu_pc_from_tb to target-*/exec.hPaolo Bonzini2010-07-032-5/+5
| | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* remove unused stuff from */exec.hPaolo Bonzini2010-07-031-2/+0
| | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-alpha: Implement RPCC.Richard Henderson2010-04-272-3/+3
| | | | | | | | | A minimal implementation that more or less corresponds to the user-level version used by target-i386. More hoops will want to be jumped through when alpha gets system-level emulation. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-alpha: Fix load-locked/store-conditional.Richard Henderson2010-04-274-79/+138
| | | | | | | | Use an exception plus start_exclusive to implement the compare-and-swap. This follows the example set by the MIPS and PPC ports. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-alpha: Indicate NORETURN status when raising exception.Richard Henderson2010-04-271-11/+14
| | | | | | | | When (indirectly) calling raise_exception, don't emit cleanup code at the end of the TB, as it is unused. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
OpenPOWER on IntegriCloud