summaryrefslogtreecommitdiff
path: root/target-sparc
AgeCommit message (Collapse)AuthorFilesLines
2012-06-21qemu-log: use LOG_UNIMP for some target CPU casesBlue Swirl1-32/+48
Use LOG_UNIMP for some target CPU cases. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Acked-by: Alexander Graf <agraf@suse.de>
2012-06-07build: move other target-*/ objects to nested Makefile.objsPaolo Bonzini1-1/+2
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-06-07build: move libobj-y variable to nested Makefile.objsPaolo Bonzini1-1/+7
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-06-07build: move obj-TARGET-y variables to nested Makefile.objsPaolo Bonzini1-0/+1
Also drop duplicate occurrence of device-hotplug.o. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-06-04Kill off cpu_state_reset()Andreas Färber1-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>
2012-06-04target-sparc: Let cpu_sparc_init() return SPARCCPUAndreas Färber2-5/+16
Make include paths for cpu-qom.h consistent, so that SPARCCPU can be used in cpu.h. Turn cpu_init macro into a static inline function returning CPUSPARCState for backwards compatibility. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Blue Swirl <blauwirbel@gmail.com>
2012-05-12fix block loads broken in commit 30038fd818Artyom Tarasenko1-1/+1
Fix UltraSPARC/JPS1/UA2007 VIS block load instructions broken in 30038fd81808f7c3bca92be2369e74c8ca7b3d69. Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> [blauwirbel@gmail.com: trimmed unwanted part of patch] Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-05-12Implement address masking for SPARC v9 CPUsArtyom Tarasenko1-1/+24
According to UltraSPARC - IIi User's manual: 14.1.11 Address Masking (Impdep #125) When PSTATE.AM=1, the CALL, JMPL, and RDPC instructions and all traps transmit zero in the high-order 32-bits of the PC to their specified destination registers. Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-04-19sparc: fix qtestBlue Swirl1-1/+3
Initialize TCG only when enabled. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-04-14Use uintptr_t for various op related functionsBlue Swirl2-8/+6
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>
2012-04-07target-sparc: QOM'ify CPUAndreas Färber3-9/+135
Embed CPUSPARCState as first member of SPARCCPU. Drop cpu_sparc_close() in favor of object_delete() and a finalizer. Let cpu_state_reset() call cpu_reset(). Make TYPE_SPARC_CPU non-abstract for now. Distinguish between "sparc-cpu" and "sparc64-cpu". Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-04-07target-sparc: Rename cpu_init.cAndreas Färber1-0/+0
Align QOM'ified targets, with a view to simplify Makefile.target. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-27sparc: pass page aligned addresses to tlb_set_pageBlue Swirl1-11/+8
Mask incoming page address early so that resolved addresses are page aligned. Remove further address masking. Tested-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-24target-sparc: Add compiler attribute to some functions which don't returnStefan Weil2-3/+4
helper_raise_exception does not return, nor does do_unaligned_access. Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-18Sparc: avoid AREG0 wrappers for memory access helpersBlue Swirl4-265/+77
Adjust generation of load and store templates so that the functions take a parameter for CPUState instead of relying on global env. Remove wrappers. Move remaining memory helpers to ldst_helper.c. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-18Sparc: avoid AREG0 for memory access helpersBlue Swirl5-225/+387
Make memory access helpers take a parameter for CPUState instead of relying on global env. Introduce wrappers for load and store ops. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-17sparc64: implement PCI and ISA irqsBlue Swirl2-6/+17
Generate correct trap for external interrupts. Map PCI and ISA IRQs to RIC/UltraSPARC-IIi interrupt vectors. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-17sparc: reset CPU state on resetBlue Swirl2-2/+4
Not strictly accurate for Sparc64 but avoid confusing Valgrind. Reported-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-14Rename CPUState -> CPUArchStateAndreas Färber1-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>
2012-03-14target-sparc: Don't overuse CPUStateAndreas Färber13-208/+208
Scripted conversion: sed -i "s/CPUState/CPUSPARCState/g" target-sparc/*.[hc] sed -i "s/#define CPUSPARCState/#define CPUState/" target-sparc/cpu.h Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14target-sparc: Typedef struct CPUSPARCState earlyAndreas Färber1-2/+4
Will be needed for qemu_irq_ack callback. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14Rename cpu_reset() to cpu_state_reset()Andreas Färber1-1/+1
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>
2012-01-22target-sparc: Fix mixup of uint64 and uint64_tAndreas Färber1-1/+1
Commit 793a137a41ad4125011c7022cf16a1baa40a5ab6 (target-sparc: Implement BMASK/BSHUFFLE.) introduced a stray usage of softfloat uint64 type. Use uint64_t instead. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Richard Henderson <rth@twiddle.net> Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-01-03sparc: avoid cpu_get_physical_page_desc()Avi Kivity1-1/+4
This reaches into the innards of the memory core, which are being changed. Switch to a memory API version. Signed-off-by: Avi Kivity <avi@redhat.com>
2011-12-02fix spelling in target sub directoryDong Xu Wang1-1/+1
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>
2011-11-19Improve "ta 0" shutdownFabien Chouteau4-18/+9
This patch replace the previous implementation with this simplified and more complete version (no shutdown when psret == 1). Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-26target-sparc: Implement FALIGNDATA inline.Richard Henderson3-19/+26
This is a relatively simple sequence of shifts. Signed-off-by: Richard Henderson <rth@twiddle.net>
2011-10-26target-sparc: Implement BMASK/BSHUFFLE.Richard Henderson3-4/+40
Signed-off-by: Richard Henderson <rth@twiddle.net>
2011-10-26target-sparc: Implement ALIGNADDR* inline.Richard Henderson3-14/+22
While ALIGNADDR was implemented out-of-line, ALIGNADDRL was not implemeneted at all. However, this is a very simple operation so we're better off doing this inline. Signed-off-by: Richard Henderson <rth@twiddle.net>
2011-10-26target-sparc: Implement EDGE* instructions.Richard Henderson1-2/+175
Signed-off-by: Richard Henderson <rth@twiddle.net>
2011-10-26target-sparc: Implement fpack{16,32,fix}.Richard Henderson3-1/+96
Signed-off-by: Richard Henderson <rth@twiddle.net>
2011-10-26target-sparc: Implement PDIST.Richard Henderson3-2/+41
Signed-off-by: Richard Henderson <rth@twiddle.net>
2011-10-26target-sparc: Do exceptions management fully inside the helpers.Richard Henderson3-91/+146
This reduces the size of the individual translation blocks, since we only emit a single call for each FOP rather than three. In addition, clear_float_exceptions expands inline to a single byte store. Signed-off-by: Richard Henderson <rth@twiddle.net>
2011-10-26target-sparc: Change fpr representation to doubles.Richard Henderson5-140/+114
This allows a more efficient representation for 64-bit hosts. It should be about the same for 32-bit hosts, as we can still access the individual pieces of the double. Signed-off-by: Richard Henderson <rth@twiddle.net>
2011-10-26target-sparc: Undo cpu_fpr rename.Richard Henderson1-28/+28
Signed-off-by: Richard Henderson <rth@twiddle.net>
2011-10-26target-sparc: Extract float128 move to a function.Richard Henderson1-32/+18
Signed-off-by: Richard Henderson <rth@twiddle.net>
2011-10-26target-sparc: Extract common code for floating-point operations.Richard Henderson1-454/+381
Signed-off-by: Richard Henderson <rth@twiddle.net>
2011-10-26target-sparc: Make FPU/VIS helpers const when possible.Richard Henderson4-92/+78
This also removes the unused ENV parameter from these helpers. Signed-off-by: Richard Henderson <rth@twiddle.net>
2011-10-26target-sparc: Pass float64 parameters instead of dt0/1 temporaries.Richard Henderson6-449/+381
Signed-off-by: Richard Henderson <rth@twiddle.net>
2011-10-26target-sparc: Add accessors for double-precision fpr access.Richard Henderson1-112/+130
Begin using i64 quantities to manipulate double-precision values. On a 64-bit host this will, for the moment, generate less efficient code; on a 32-bit host code quality should be largely unchanged. Code quality for 64-bit will be adjusted with a subsequent patch. Signed-off-by: Richard Henderson <rth@twiddle.net>
2011-10-26target-sparc: Mark fprs dirty in store accessor.Richard Henderson1-46/+8
Signed-off-by: Richard Henderson <rth@twiddle.net>
2011-10-26target-sparc: Add accessors for single-precision fpr access.Richard Henderson1-195/+337
Load, store, and "create destination". This version attempts to change the behaviour of the translator as little as possible. We previously used cpu_tmp32 as the temporary destination, and we continue to use that. This will eventually allow a change in representation of the fprs. Change the name of the cpu_fpr array to make certain that all instances are converted. Signed-off-by: Richard Henderson <rth@twiddle.net>
2011-10-26Sparc: split load and store op helpersBlue Swirl2-2416/+2434
Move load and store op helpers top ldst_helper.c. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-26Sparc: convert win_helper to trace frameworkBlue Swirl1-22/+8
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-26Sparc: convert interrupt helpers to trace frameworkBlue Swirl2-26/+16
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-26Sparc: convert mmu_helper to trace frameworkBlue Swirl1-44/+20
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-26Sparc: split MMU helpersBlue Swirl3-860/+879
Move MMU helpers to mmu_helper.c. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-26Sparc: fix coding style in helper.cBlue Swirl1-43/+52
Before the next patch, fix coding style of the areas affected. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-26Sparc: avoid AREG0 for division op helpersBlue Swirl4-82/+88
Make [su]div{,cc} helpers take a parameter for CPUState instead of relying on global env. Move the functions to helper.c. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-26Sparc: avoid AREG0 for softint op helpers and Leon cache controlBlue Swirl6-107/+117
Make softint op helpers and Leon cache irq manager take a parameter for CPUState instead of relying on global env. Move the functions to int{32,64}_helper.c. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>