summaryrefslogtreecommitdiffstats
path: root/target-microblaze/op_helper.c
Commit message (Collapse)AuthorAgeFilesLines
* cpu: Turn cpu_unassigned_access() into a CPUState hookAndreas Färber2013-06-281-4/+13
| | | | | | | Use it for all targets, but be careful not to pass invalid CPUState. cpu_single_env can be NULL, e.g. on Xen. Signed-off-by: Andreas Färber <afaerber@suse.de>
* microblaze: Ignore non-cpu accesses to unmapped areasEdgar E. Iglesias2013-03-191-1/+1
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* misc: move include files to include/qemu/Paolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* exec: move include files to include/exec/Paolo Bonzini2012-12-191-5/+5
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* exec: refactor cpu_restore_stateBlue Swirl2012-12-161-7/+1
| | | | | | | | Refactor common code around calls to cpu_restore_state(). tb_find_pc() has now no external users, make it static. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Rename target_phys_addr_t to hwaddrAvi Kivity2012-10-231-1/+1
| | | | | | | | | | | | | | | target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are reserved) and its purpose doesn't match the name (most target_phys_addr_t addresses are not target specific). Replace it with a finger-friendly, standards conformant hwaddr. Outstanding patchsets can be fixed up with the command git rebase -i --exec 'find -name "*.[ch]" | xargs s/target_phys_addr_t/hwaddr/g' origin Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* target-microblaze: switch to AREG0 free modeBlue Swirl2012-09-151-63/+52
| | | | | | | Add an explicit CPUState parameter instead of relying on AREG0 and switch to AREG0 free mode. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Use uintptr_t for various op related functionsBlue Swirl2012-04-141-5/+3
| | | | | | | | | 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>
* target-microblaze: added PetaLogix copyrightPeter A. G. Crosthwaite2012-04-121-0/+1
| | | | | | | | Microblaze cpu development has been driven and funded by PetaLogix. Added (c) PetaLogix line accordingly. Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* target-microblaze: Don't overuse CPUStateAndreas Färber2012-03-141-4/+4
| | | | | | | | | Scripted conversion: sed -i "s/CPUState/CPUMBState/g" target-microblaze/*.[hc] sed -i "s/#define CPUMBState/#define CPUState/" target-microblaze/cpu.h Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
* microblaze: Emulate the hw stackprotectorEdgar E. Iglesias2012-01-121-0/+11
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Add support for the clz insnEdgar E. Iglesias2012-01-121-0/+5
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@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>
* Remove unused is_softmmu parameter from cpu_handle_mmu_faultBlue Swirl2011-08-071-1/+1
| | | | | | | | | 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-301-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-201-10/+4
| | | | | | | | 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>
* 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>
* 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>
* 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>
* microblaze: Add partial decoding of stream insnsEdgar E. Iglesias2011-04-121-0/+35
| | | | | | Based on a patch from: Alejandro Cabrera <aldaya@gmail.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: cleanup helper_addkcEdgar E. Iglesias2011-01-231-5/+2
| | | | | | Remove unused addition and rename to helper_carry. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Improve subkcEdgar E. Iglesias2011-01-221-22/+0
| | | | | | | | Move code from the helper into the translator. The remaining helper parts can reuse helper_addkc, making it possible to remove helper_subkc entirely. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Improve addkcEdgar E. Iglesias2011-01-221-16/+4
| | | | | | | | | * Optimize handling when carry is not updated. * Optimize handling for adds with nop semantics. * Move code from helper_addkc to the translator making helper_addkc PURE and CONST. 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-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>
* microblaze: Add support for fcmp.unEdgar E. Iglesias2010-09-091-2/+16
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
* microblaze: Add basic FPU emulationEdgar E. Iglesias2010-09-091-0/+230
| | | | | | | | | Missing: * fcmp.un insn * Denormalized exceptions * Exception model is not accurate Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
* Target specific usermode cleanupPaul Brook2010-03-121-1/+1
| | | | | | Disable various target specific code that is only relevant to system emulation. Signed-off-by: Paul Brook <paul@codesourcery.com>
* microblaze: Dont segfault when singlestepping first insn.Edgar E. Iglesias2010-02-201-0/+6
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
* microblaze: Print content of EAR registerMichal Simek2009-12-161-2/+2
| | | | | | | I need to see EAR register in output because I need to parse irqsoff problem. Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Update debug logs.Edgar E. Iglesias2009-12-161-0/+9
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Restore env when raising unmapped bus access.Edgar E. Iglesias2009-11-121-0/+2
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* Revert "Get rid of _t suffix"Anthony Liguori2009-10-011-1/+1
| | | | | | | | | | | | In the very least, a change like this requires discussion on the list. The naming convention is goofy and it causes a massive merge problem. Something like this _must_ be presented on the list first so people can provide input and cope with it. This reverts commit 99a0949b720a0936da2052cb9a46db04ffc6db29. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Get rid of _t suffixmalc2009-10-011-1/+1
| | | | | | | Some not so obvious bits, slirp and Xen were left alone for the time being. Signed-off-by: malc <av1474@comtv.ru>
* microblaze: HW Exception fixes.Edgar E. Iglesias2009-09-111-9/+11
| | | | | | | | * Correct PVR checks for masking off individual exceptions. * Correct FPU exception code. * Set EAR on unaligned and unassigned exceptions. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Compute masks for alignment checks at translation time.Edgar E. Iglesias2009-09-031-13/+4
| | | | | Thanks to Blue Swirl for reporting. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Trap on bus accesses to unmapped areas.Edgar E. Iglesias2009-09-031-0/+27
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Trap on unaligned data accesses.Edgar E. Iglesias2009-09-031-0/+27
| | | | | | Untested... Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Trap on divizions by zero.Edgar E. Iglesias2009-09-031-1/+6
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* Update to a hopefully more future proof FSF addressBlue Swirl2009-07-161-2/+1
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* microblaze: Add translation routines.Edgar E. Iglesias2009-05-261-0/+216
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
OpenPOWER on IntegriCloud