summaryrefslogtreecommitdiffstats
path: root/target-microblaze/translate.c
Commit message (Collapse)AuthorAgeFilesLines
...
* target-microblaze: QOM'ify CPU resetAndreas Färber2012-04-241-49/+2
| | | | | | | Move code from cpu_state_reset() to QOM mb_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Tested-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
* target-microblaze: QOM'ify CPUAndreas Färber2012-04-241-1/+3
| | | | | | | | | | Embed CPUMBState as first member of QOM MicroBlazeCPU. Let CPUClass::reset() call cpu_state_reset() for now. Signed-off-by: Andreas Färber <afaerber@suse.de> Tested-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> [AF: Updated cpu.c to include cpu-qom.h indirectly via cpu.h]
* 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-26/+26
| | | | | | | | | 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>
* Rename cpu_reset() to cpu_state_reset()Andreas Färber2012-03-141-2/+2
| | | | | | | | | | 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>
* target-microblaze: Clean includesStefan Weil2012-02-281-8/+0
| | | | | | The change in cpu.h is needed when HOST_LONG_BITS is defined in qemu-common.h. Signed-off-by: Stefan Weil <sw@weilnetz.de>
* microblaze: Break the tb at memory barriersEdgar E. Iglesias2012-01-121-1/+11
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Emulate the hw stackprotectorEdgar E. Iglesias2012-01-121-0/+33
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Add support for the clz insnEdgar E. Iglesias2012-01-121-0/+11
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* fix spelling in target sub directoryDong Xu Wang2011-12-021-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>
* microblaze: Add an MSR_PVR constant and use it.Edgar E. Iglesias2011-08-251-2/+2
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
* microblaze: Make the MSR PVR bit non writableEdgar E. Iglesias2011-08-251-3/+8
| | | | | | Instead of hardcoding it to 1. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.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>
* microblaze: Add missing call to qemu_init_vcpu.Peter A. G. Crosthwaite2011-07-311-0/+1
| | | | | | | Fixes emulation with io-thread. Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* Remove exec-all.h include directivesBlue Swirl2011-06-261-1/+0
| | | | | | Most exec-all.h include directives are now useless, remove them. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* 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>
* microblaze: Add partial decoding of stream insnsEdgar E. Iglesias2011-04-121-0/+37
| | | | | | Based on a patch from: Alejandro Cabrera <aldaya@gmail.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* 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>
* microblaze: Handle singlestepping over direct jmpsEdgar E. Iglesias2011-02-101-2/+6
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
* microblaze: cleanup helper_addkcEdgar E. Iglesias2011-01-231-4/+4
| | | | | | 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-15/+49
| | | | | | | | 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: Fix 3rd addkc arg when rd is r0Edgar E. Iglesias2011-01-221-2/+1
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Improve addkcEdgar E. Iglesias2011-01-221-9/+40
| | | | | | | | | * 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>
* microblaze: Remove debug leftovers.Edgar E. Iglesias2011-01-221-2/+0
| | | | | | No functional changes. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Reorganize for future patchesEdgar E. Iglesias2011-01-221-19/+17
| | | | | | No functional changes. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Add support for load/store reversedEdgar E. Iglesias2011-01-191-8/+161
| | | | | | | Load/store reversed (lwr/swr) are insns that endian translate the sub-word part of the address and byteswap the data lanes. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
* microblaze: Tweak comment, fast cases -> common casesEdgar E. Iglesias2011-01-191-1/+1
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Improve unconditional direct branchingEdgar E. Iglesias2011-01-141-7/+14
| | | | | | | Avoid emitting conditional tcg operations for uncoditional direct branches. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
* microblaze: Use more TB chainingEdgar E. Iglesias2011-01-051-5/+23
| | | | | | | For some workloads with tight loops this ~doubles the emulation speed. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
* 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>
* target-microblaze: Use %td for ptrdiff_t arguments in debug messageStefan Weil2010-10-021-1/+1
| | | | | | | | | | According to ISO/IEC 9899:1999 7.19.6.1, the correct length modifier for ptrdiff_t is 't', not 'z'. Cc: Blue Swirl <blauwirbel@gmail.com> Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Add basic FPU emulationEdgar E. Iglesias2010-09-091-9/+110
| | | | | | | | | Missing: * fcmp.un insn * Denormalized exceptions * Exception model is not accurate Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
* microblaze: Remove unused members from the disas contextEdgar E. Iglesias2010-07-251-5/+1
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
* microblaze: Speed up base + index addressing modeEdgar E. Iglesias2010-07-241-0/+7
| | | | | | Speed up reg + reg addressing mode when any of the regs is r0. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
* microblaze: Use setcond for conditional branchesEdgar E. Iglesias2010-07-241-32/+6
| | | | | | | | Use setcond for evaluating the condition for branches. In the future, we could do better for branches without delay slots. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
* microblaze: Improve branch with small immediatesEdgar E. Iglesias2010-07-241-7/+21
| | | | | | | Slight improvements of conditional branches with small immediate offsets. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
* microblaze: Improve brk emulation.Edgar E. Iglesias2010-02-201-5/+14
| | | | | | | brk insns while in user mode raise priv insn exceptions. This commit makes gdbserver work on linux guests. 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-2/+5
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Handle wdc flush and clear.Edgar E. Iglesias2009-12-131-0/+3
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Correct branch to registers.Paul Hartke2009-12-131-1/+1
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Unbreak reset.Edgar E. Iglesias2009-11-121-27/+26
| | | | | | | Initialize synthesis config registers at reset to cope with the new cpu_reset sequences. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* gcc wants 1st static and then constJuan Quintela2009-09-251-2/+2
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Fix sys-queue.h conflict for goodBlue Swirl2009-09-121-2/+2
| | | | | | | | | | | | | | | Problem: Our file sys-queue.h is a copy of the BSD file, but there are some additions and it's not entirely compatible. Because of that, there have been conflicts with system headers on BSD systems. Some hacks have been introduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896, f40d753718c72693c5f520f0d9899f6e50395e94, 96555a96d724016e13190b28cffa3bc929ac60dc and 3990d09adf4463eca200ad964cc55643c33feb50 but the fixes were fragile. Solution: Avoid the conflict entirely by renaming the functions and the file. Revert the previous hacks. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* microblaze: Trap if QEMU finds an unknown insns.Edgar E. Iglesias2009-09-111-0/+6
| | | | | | | If PVR settings enable illegal insn trap, trap when QEMU finds an insn it knows nothing about. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Correct prio between MMU and unaligned exceptions.Edgar E. Iglesias2009-09-111-6/+25
| | | | | | | | The microblaze gives MMU faults priority. For stores we still have a flaw that the value leaks to memory in the case of an unaligned exception. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: HW Exception fixes.Edgar E. Iglesias2009-09-111-10/+10
| | | | | | | | * 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: Trap on illegal load/store sizes.Edgar E. Iglesias2009-09-041-0/+13
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Compute masks for alignment checks at translation time.Edgar E. Iglesias2009-09-031-2/+2
| | | | | Thanks to Blue Swirl for reporting. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
OpenPOWER on IntegriCloud