Kill off cpu_state_reset()
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...
target-lm32: Let cpu_lm32_init() return LM32CPU
Make the include paths for cpu-qom.h consistent to allow using LM32CPUin cpu.h.
Turn cpu_init macro into a static inline function returning CPULM32Statefor backwards compatibility.
Signed-off-by: Andreas Färber <afaerber@suse.de>...
Use uintptr_t for various op related functions
Use uintptr_t instead of void * or unsigned long inseveral op related functions, env->mem_io_pc andGETPC macro.
Reviewed-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
target-lm32: QOM'ify CPU reset
Move code from cpu_state_reset() into QOM lm32_cpu_reset().
Signed-off-by: Andreas Färber <afaerber@suse.de>Acked-by: Michael Walle <michael@walle.cc>
target-lm32: QOM'ify CPU init
Move code from cpu_lm32_init() to an initfn; call cpu_reset()instead of cpu_state_reset().
target-lm32: QOM'ify CPU
Embed CPULM32State as first member of QOM LM32CPU.Let CPUClass::reset() call cpu_state_reset() for now.
target-lm32: init tcg only if available
Once qtest support for target-lm32 arrives, tcg may be disabled.
Signed-off-by: Michael Walle <michael@walle.cc>
target-lm32/microblaze: Drop second CPU{LM32, MB}State typedef
Commit 9b9a970a23625de4ae6b7461906a9a0d98d3ca95(target-lm32/microblaze: Typedef struct CPU{MB,LM32}State)introduced necessary typedefs for cpu_mmu_index() and mmu.hrespectively.
On some GCC versions this leads to "error: redefinition of typedef"....
Rename CPUState -> CPUArchState
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...
target-lm32: Don't overuse CPUState
Scripted conversion: sed -i "s/CPUState/CPULM32State/g" target-lm32/*.[hc] sed -i "s/#define CPULM32State/#define CPUState/" target-lm32/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()
Frees the identifier cpu_reset for QOM CPUs (manual rename).
Don't hide the parameter type behind explicit casts, use staticfunctions with strongly typed argument to indirect.
target-lm32/microblaze: Typedef struct CPU{MB,LM32}State
Signed-off-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
target-lm32: Clean includes
config.h was missing in cpu.h.
Acked-by: Michael Walle <michael@walle.cc>Signed-off-by: Stefan Weil <sw@weilnetz.de>
lm32: add missing qemu_init_vcpu() call
softmmu_header: pass CPUState to tlb_fill
Pass CPUState pointer to tlb_fill() instead of architecture localcpu_single_env hacks.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Use glib memory allocation and free functions
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_fault
Parameter is_softmmu (and its evil mutant twin brother is_softmuu)is not used in cpu_*_handle_mmu_fault() functions, remove themand adjust callers.
Acked-by: Richard Henderson <rth@twiddle.net>...
exec.h cleanup
Move softmmu_exec.h include directives from target-*/exec.h totarget-*/op_helper.c. Move also various other stuff only used inop_helper.c there.
Define global env in dyngen-exec.h.
For i386, move wrappers for segment and FPU helpers from user-exec.c...
Remove exec-all.h include directives
Most exec-all.h include directives are now useless, remove them.
Move cpu_has_work and cpu_pc_from_tb to cpu.h
Move functions cpu_has_work() and cpu_pc_from_tb() from exec.h to cpu.h. This isneeded by later patches.
exec.h: fix coding style and change cpu_has_work to return bool
Before the next patch, fix coding style of the areas affected.
Change the type of the return value from cpu_has_work() andqemu_cpu_has_work() to bool.
cpu_loop_exit: avoid using AREG0
Make cpu_loop_exit() take a parameter for CPUState instead of relyingon global env.
Remove warning in printf due to type mismatch
----8<----qemu/target-lm32/translate.c: In function ‘gen_intermediate_code_internal’:qemu/target-lm32/translate.c:1135: warning: format ‘%zd’ expects type ‘signed size_t’, but argument 4 has type ‘int’----8<----...
target-lm32: Remove unused local variables
cppcheck report:target-lm32/translate.c:587: style: Variable 't0' is assigned a value that is never usedtarget-lm32/translate.c:588: style: Variable 'l1' is assigned a value that is never used
Remove both variables. Please check whether that is the correct solution....
lm32: fix exception handling
Global interrupt enable bit is already saved within the exception handlerhelper routine. Thus remove extra code in translation routines.
Additionally, debug exceptions has always DEBA as base address.
Signed-off-by: Michael Walle <michael@walle.cc>...
Remove unused function parameter from cpu_restore_state
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 function
Function gen_pc_load was introduced in commitd2856f1ad4c259e5766847c49acbb4e390731bd4.The only reason for parameter searched_pc wasa debug statement in target-i386/translate.c....
Fix conversions from pointer to tcg_target_long
tcg_gen_exit_tb takes a parameter of type tcg_target_long,so the type casts of pointer to long should be replaced bytype casts of pointer to tcg_target_long (suggested by Blue Swirl).
These changes are needed for build environments where...
lm32: rename raise opcode to scall
To be consistent with the new reference manual.
Signed-off-by: Michael Walle <michael@walle.cc>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
lm32: use lookup table for opcodes
Instead of a for loop use a faster lookup table.
lm32: todo and documentation
This patch adds general target documentation and a todo list.
LatticeMico32 target support
This patch adds support for the LatticeMico32 softcore processor by LatticeSemiconductor.
lm32: translation routines
This patch adds the main translation routine. All opcodes of theLatticeMico32 processor are supported and translated to TCG ops.
lm32: translation code helper
This patch adds translation helper functions.
lm32: machine state loading/saving
This patch adds support for saving and loading the processor state.