summaryrefslogtreecommitdiffstats
path: root/target-sparc
Commit message (Collapse)AuthorAgeFilesLines
* fix spelling in target sub directoryDong Xu Wang2011-12-021-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>
* Improve "ta 0" shutdownFabien Chouteau2011-11-194-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>
* target-sparc: Implement FALIGNDATA inline.Richard Henderson2011-10-263-19/+26
| | | | | | This is a relatively simple sequence of shifts. Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-sparc: Implement BMASK/BSHUFFLE.Richard Henderson2011-10-263-4/+40
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-sparc: Implement ALIGNADDR* inline.Richard Henderson2011-10-263-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>
* target-sparc: Implement EDGE* instructions.Richard Henderson2011-10-261-2/+175
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-sparc: Implement fpack{16,32,fix}.Richard Henderson2011-10-263-1/+96
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-sparc: Implement PDIST.Richard Henderson2011-10-263-2/+41
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-sparc: Do exceptions management fully inside the helpers.Richard Henderson2011-10-263-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>
* target-sparc: Change fpr representation to doubles.Richard Henderson2011-10-265-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>
* target-sparc: Undo cpu_fpr rename.Richard Henderson2011-10-261-28/+28
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-sparc: Extract float128 move to a function.Richard Henderson2011-10-261-32/+18
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-sparc: Extract common code for floating-point operations.Richard Henderson2011-10-261-454/+381
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-sparc: Make FPU/VIS helpers const when possible.Richard Henderson2011-10-264-92/+78
| | | | | | This also removes the unused ENV parameter from these helpers. Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-sparc: Pass float64 parameters instead of dt0/1 temporaries.Richard Henderson2011-10-266-449/+381
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-sparc: Add accessors for double-precision fpr access.Richard Henderson2011-10-261-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>
* target-sparc: Mark fprs dirty in store accessor.Richard Henderson2011-10-261-46/+8
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* target-sparc: Add accessors for single-precision fpr access.Richard Henderson2011-10-261-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>
* Sparc: split load and store op helpersBlue Swirl2011-10-262-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>
* Sparc: convert win_helper to trace frameworkBlue Swirl2011-10-261-22/+8
| | | | | Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc: convert interrupt helpers to trace frameworkBlue Swirl2011-10-262-26/+16
| | | | | Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc: convert mmu_helper to trace frameworkBlue Swirl2011-10-261-44/+20
| | | | | Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc: split MMU helpersBlue Swirl2011-10-263-860/+879
| | | | | | | Move MMU helpers to mmu_helper.c. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc: fix coding style in helper.cBlue Swirl2011-10-261-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>
* Sparc: avoid AREG0 for division op helpersBlue Swirl2011-10-264-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>
* Sparc: avoid AREG0 for softint op helpers and Leon cache controlBlue Swirl2011-10-266-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>
* Sparc: avoid AREG0 for CWP and PSTATE helpersBlue Swirl2011-10-263-200/+89
| | | | | | | | Make CWP and PSTATE helpers take a parameter for CPUState instead of relying on global env. Remove wrapper functions. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-sparc: Fix use of g_new0 / g_freeStefan Weil2011-10-251-4/+4
| | | | | | | | | | g_malloc0 needs g_free instead of free. While fixing this, I also replaced g_malloc0 by g_new0 as was suggested by Stuart Brady. Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-sparc: Fix order of function parametersStefan Weil2011-10-251-4/+4
| | | | | | | | | | | | | | | | | | | | The MinGW-w64 gcc complains about wrong parameters for gen_helper_fpadd16_s and three other functions. gen_helper_fpadd16_s is declared like this (hidden in lots of macros): static inline void gen_helper_fpadd16s(TCGv_i32 retval, TCGv_ptr arg1, TCGv_i32 arg2, TCGv_i32 arg3); So it looks like cpu_env should be the 2nd parameter. Please review this patch as I have no environment to test it (maybe the 1st parameter should be cpu_dst?). Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc: split CWP and PSTATE op helpersBlue Swirl2011-10-233-489/+522
| | | | | | | Move CWP and PSTATE op helpers to win_helper.c. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc: avoid AREG0 for lazy condition code helpersBlue Swirl2011-10-234-49/+48
| | | | | | | | Make lazy condition code helpers take a parameter for CPUState instead of relying on global env. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc: split lazy condition code handling op helpersBlue Swirl2011-10-232-464/+486
| | | | | | | Move lazy condition code handling op helpers to cc_helper.c. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc: avoid AREG0 for float and VIS opsBlue Swirl2011-10-234-273/+280
| | | | | | | | Make floating point and VIS ops take a parameter for CPUState instead of relying on global env. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc: split FPU and VIS op helpersBlue Swirl2011-10-233-743/+797
| | | | | | | | Move FPU op helpers to fop_helper.c. Move VIS op helpers to vis_helper.c, compile it only for Sparc64. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc: fix coding styleBlue Swirl2011-10-231-452/+502
| | | | | | | Before the next patches, fix coding style of the areas affected. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc: avoid AREG0 for raise_exception and helper_debugBlue Swirl2011-10-234-72/+70
| | | | | | | | | Make raise_exception() and helper_debug() 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>
* Sparc: move trivial functions from op_helper.cBlue Swirl2011-10-233-47/+46
| | | | | | | | | These functions don't need access to CPUState or already pass it, so relocating them from op_helper.c to helper.c and int64_helper.c is trivial. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc: split helper.cBlue Swirl2011-10-236-1084/+1134
| | | | | | | | Move CPU init to cpu_init.c and interrupt handling to int32_helper.c for Sparc32 and int64_helper.c for Sparc64. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc: fix coding styleBlue Swirl2011-10-231-32/+41
| | | | | | | 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>
* 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>
* Gdbstub: Fix back-trace on SPARC32Fabien Chouteau2011-09-102-0/+91
| | | | | | | | | | Gdb expects all registers windows to be flushed in ram, which is not the case in Qemu. Therefore the back-trace generation doesn't work. This patch adds a function to handle reads (and only read) in stack frames as if windows were flushed. Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc64: remove useless variableBlue Swirl2011-09-101-4/+2
| | | | | | | | | Remove a useless variable, spotted by clang analyzer: /src/qemu/target-sparc/op_helper.c:3904:18: warning: unused variable 'tmp' [-Wunused-variable] target_ulong tmp = val; The error message is actually incorrect since the variable is used. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Use glib memory allocation and free functionsAnthony Liguori2011-08-201-2/+2
| | | | | | 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>
* Fix handling of conditional branches in delay slot of a conditional branchArtyom Tarasenko2011-08-061-9/+21
| | | | | | | Check whether dc->npc is dynamic before using its value for branch. Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc: fix non-faulting unassigned memory accessesBlue Swirl2011-08-011-17/+8
| | | | | | | | | | | | | | | | | Commit b14ef7c9ab41ea824c3ccadb070ad95567cca84e introduced cpu_unassigned_access() function. On Sparc, the function does not restore AREG0 used for global CPUState on function exit, causing bugs with non-faulting unassigned memory accesses. Alpha, Microblaze and MIPS are not affected. Fix by restoring AREG0 on exit. Remove excess saving by do_unassigned_access() functions. Also ignore unassigned accesses outside of CPU context. Reported-by: Bob Breuer <breuerr@mc.net> Tested-by: Bob Breuer <breuerr@mc.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* exec.h cleanupBlue Swirl2011-07-302-16/+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>
* SPARC64: implement %fprs dirty bitsTsuneo Saito2011-07-301-0/+116
| | | | | | | | | Implement %fprs.DU/DL bits. The FPU sets %fprs.DL and %fprs.DU when values are assigned to %f0-31 and %f32-63 respectively. Signed-off-by: Tsuneo Saito <tsnsaito@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* SPARC64: fix fnor* and fnand*Tsuneo Saito2011-07-301-6/+8
| | | | | | | | Fix the problem that result values are not assigned to the destination registers. Signed-off-by: Tsuneo Saito <tsnsaito@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-sparc: Fix compiler errors (format strings)Stefan Weil2011-07-221-2/+2
| | | | | | | | | | | This change is needed because commit 06e12b65 now uses an unsigned long long value (uint64_t && unsigned long long => unsigned long long). Cc: Tsuneo Saito <tsnsaito@gmail.com> 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