History | View | Annotate | Download (105.6 kB)
target-alpha: Copy singlestep_enabled to DisasContext
Prepare for removing env from DisasContext.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Andreas Färber <afaerber@suse.de>
target-alpha: Copy implver to DisasContext
Which allows removing env from DisasContext.
cpu: Move singlestep_enabled field from CPU_COMMON to CPUState
Prepares for changing cpu_single_step() argument to CPUState.
Acked-by: Michael Walle <michael@walle.cc> (for lm32)Signed-off-by: Andreas Färber <afaerber@suse.de>
target-alpha: Move alarm to vm_clock
Basing the alarm off the rtc_clock was silly. It leads to horriblespinning in the guest after being suspended and resumed, as it triesto catch up with lost ticks.
This requires adding an accessor for reading the vm_clock too....
target-alpha: Change gen_intermediate_code_internal() argument to AlphaCPU
Also use bool argument while at it.
Prepares for moving singlestep_enabled field to CPUState.
Reviewed-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Move halted and interrupt_request fields to CPUState
Both fields are used in VMState, thus need to be moved together.Explicitly zero them on reset since they were located beforebreakpoints.
Pass PowerPCCPU to kvmppc_handle_halt().
Signed-off-by: Andreas Färber <afaerber@suse.de>
gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end
The gen_icount_start/end functions are now somewhat misnamed since theyare useful for generic "start/end of TB" code, used for more than justicount. Rename them to gen_tb_start/end.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
target-alpha: Use mulu2 for umulh insn
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
cpu: Move cpu_index field to CPUState
Note that target-alpha accesses this field from TCG, now using anegative offset. Therefore the field is placed last in CPUState.
Pass PowerPCCPU to [kvm]ppc_fixup_cpu() to facilitate this change.
Move common parts of mips cpu_state_reset() to mips_cpu_reset()....
Merge branch 'master' of git://git.qemu.org/qemu into qom-cpu
Adapt header include paths.
fpu: move public header file to include/fpu
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
misc: move include files to include/qemu/
exec: move include files to include/exec/
build: kill libdis, move disassemblers to disas/
target-alpha: Let cpu_alpha_init() return AlphaCPU
Replace cpu_init() macro with inline function for backwardscompatibility.
Signed-off-by: Andreas Färber <afaerber@suse.de>Acked-by: Richard Henderson <rth@twiddle.net>
target-alpha: Turn CPU definitions into subclasses
Make TYPE_ALPHA_CPU abstract and add types <name>-alpha-cpu.Use type inheritence, and turn "2*" models into aliases.
Move cpu_alpha_init() to cpu.c and split out CPU realization.Default to creating type "ev67-alpha-cpu" as before....
TCG: Use gen_opc_instr_start from context instead of global variable.
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
TCG: Use gen_opc_pc from context instead of global variable.
TCG: Use gen_opc_icount from context instead of global variable.
TCG: Use gen_opc_buf from context instead of global variable.
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>Reviewed-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
TCG: Use gen_opc_ptr from context instead of global variable.
disas: avoid using cpu_single_env
Pass around CPUArchState instead of using global cpu_single_env.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>Acked-by: Richard Henderson <rth@twiddle.net>Acked-by: Aurelien Jarno <aurelien@aurel32.net>Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
Emit debug_insn for CPU_LOG_TB_OP_OPT as well.
For all targets that currently call tcg_gen_debug_insn_start,add CPU_LOG_TB_OP_OPT to the condition that gates it.
This is useful for comparing optimization dumps, when thepre-optimization dump is merely noise....
Merge remote-tracking branch 'afaerber/qom-cpu' into staging
target-alpha: Use movcond
For proper cmov insns, as well as the non-goto-tb caseof conditional branch.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-alpha: Initialize env->cpu_model_str
Save the cpu_model_str so that we have a non-null value whencreating a new cpu during clone.
target-alpha: QOM'ify CPU init
Move code from cpu_alpha_init() into a CPU initializer.
target-alpha: QOM'ify CPU
Embed CPUAlphaState as first member of AlphaCPU.
target-alpha: Make use of fp_status.flush_inputs_to_zero.
This softfp feature post-dates the last major update to the Alphafpu translation. We can make use of this to eliminate at leastone helper function that was performing this operation by hand.
Signed-off-by: Richard Henderson <rth@twiddle.net>...
target-alpha: Move memory helpers to mem_helper.c.
This completes the transition away from AREG0. This patch mustbe last because it requires CONFIG_TCG_PASS_AREG0 set too.
target-alpha: Move palcode support helpers to sys_helper.c.
target-alpha: Move integer overflow helpers to int_helper.c.
target-alpha: Move fpcr helpers from op_helper.c to helper.c.
target-alpha: Move floating-point helpers to fpu_helper.c.
target-alpha: Move exception helpers to helper.c.
alpha-linux-user: Initialize fpu to round-to-normal.
target-alpha: Don't overuse CPUState
Scripted conversion: sed -i "s/CPUState/CPUAlphaState/g" target-alpha/*.[hc] sed -i "s/#define CPUAlphaState/#define CPUState/" target-alpha/cpu.h
Signed-off-by: Andreas Färber <afaerber@suse.de>Acked-by: Anthony Liguori <aliguori@us.ibm.com>
target-alpha: Clean includes
The change in cpu.h is needed when HOST_LONG_BITS is defined in qemu-common.h.
Cc: Richard Henderson <rth@twiddle.net>Signed-off-by: Stefan Weil <sw@weilnetz.de>
target-alpha: Implement WAIT IPR.
Signed-off-by: Richard Henderson <rth@twiddle.net>
target-alpha: Implement HALT IPR.
target-alpha: Add high-resolution access to wall clock and an alarm.
The alarm is a fully general one-shot time comparator, which will beusable under Linux as a hrtimer source. It's much more flexible thanthe RTC source available on real hardware.
The wall clock allows the guest access to the host timekeeping. Much...
target-alpha: Honor icount for RPCC instruction.
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 exec-all.h include directives
Most exec-all.h include directives are now useless, remove them.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
alpha/translate: remve unused variables
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Acked-by: Richard Henderson <rth@twiddle.net>
alpha: remove unused variable
target-alpha: Implement more CALL_PAL values inline.
In particular, SWPIPL is used quite a lot by the Linux kernel.Doing this inline makes it significantly easier to step throughwithout the debugger getting confused by the mode switch.
target-alpha: Implement TLB flush primitives.
Expose these via MTPR, more or less like the real HW does.
target-alpha: Fix system store_conditional
This code contained typos, as it had never been compiled.
target-alpha: Cleanup MMU modes.
Don't bother including executive and supervisor modes.
target-alpha: Merge HW_REI and HW_RET implementations.
target-alpha: Rationalize internal processor registers.
Delete all the code that tried to emulate the real IPRs of someunnamed CPU. Replace those with just 3 slots that we can use tocommunicate trap information between the helper functions thatsignal exceptions and the OS trap handler....
target-alpha: Tidy exception constants.
There's no need to attempt to match EXCP_* values with PALcode entrypoint offsets. Instead, compress all the values to make for moreefficient switch statements within QEMU.
We will be doing TLB fill within QEMU proper, not within the PALcode,...
target-alpha: Add various symbolic constants.
The EXC_M_* constants were being set for the EV6, not as set forthe Unix kernel entry point.
Use PS_USER_MODE instead of hard-coding access to the PS register.
target-alpha: Use kernel mmu_idx for pal_mode.
target-alpha: Add IPRs to be used by the emulation PALcode.
These aren't actually used yet, but we can at least accessthem via the HW_MFPR and HW_MTPR instructions.
target-alpha: All ISA checks to use TB->FLAGS.
We had two different methods in use, both of which referenced ENV,and neither of which indicated to the generic code when differentcompilation modes are not compatible.
target-alpha: Single-step properly across branches.
We were failing to generate EXC_DEBUG in the EXIT_PC_UPDATED path.This caused us not to stop at the instruction after a branch, buton the instruction afterward.
target-alpha: Remove partial support for palcode emulation.
This code does not work, and will be replaced by a bios image.
target-alpha: Fix translation of PALmode memory insns.
All of the "raw" memory accesses should be "phys" instead. Fixsome confusion about argument ordering of the store routines.Fix the implementation of store-conditional.
Delete the "alt-mode" helpers. Because we only implement two...
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...
target-alpha: Implement cpys{, n, e} inline.
target-alpha: Implement rs/rc properly.
This is a per-cpu flag; there's no need for a spinlock of any kind.
We were also failing to manipulate the flag with $31 as a target regand failing to clear the flag on execution of a return-from-interruptinstruction....
target-alpha: Implement cvtlq inline.
It's a simple shift and mask sequence.
target-alpha: Emit goto_tb opcodes.
Use an ExitStatus enumeration instead of magic numbers as the returnvalue from translate_one. Emit goto_tb opcodes when ending a TB viaa direct branch.
target-alpha: Update commentary for opcode 0x1A.
target-alpha: Indicate NORETURN status when raising exception.
When (indirectly) calling raise_exception, don't emit cleanupcode at the end of the TB, as it is unused.
target-alpha: Fix load-locked/store-conditional.
Use an exception plus start_exclusive to implement the compare-and-swap.This follows the example set by the MIPS and PPC ports.
alpha: remove dead assignments, spotted by clang analyzer
Value stored is never read.
target-alpha: Use setcond for int comparisons.
target-alpha: Use non-inverted arguments to gen_{f}cmov.
The inverted conditions as argument to the function looks wrongat a glance inside translate_one. Since we have an easy functionto produce the inversion now, use it.
target-alpha: Implement cvtql inline.
It's a simple mask and shift sequence.Also, fix a typo in the actual masks used.
alpha-linux-user: Implement signals.
Move userland PALcode handling into linux-user main loop so thatwe can send signals from there. This also makes alpha_palcode.csystem-level only, so don't build it for userland. Add definesfor GENTRAP PALcall mapping to signals....
target-alpha: Implement IEEE FP qualifiers.
IEEE FP instructions are split up so that the rounding modecoming from the instruction and exceptions (both masking anddelivery) are handled external to the base FP operation.FP exceptions are properly raised for non-finite inputs to...
target-alpha: Reduce internal processor registers for user-mode.
The existing set of IPRs is totally irrelevant to user-mode emulation.Indeed, they most are irrelevant to implementing kernel-mode emulation,and would only be relevant to PAL-mode emulation, which I suspect that...
target-alpha: Initialize fpcr
Linux, at least, disables exceptions by default.
target-alpha: Emit tcg debug_insn_start.
target-alpha: Implement fp branch/cmov inline.
The old fcmov implementation had a typo:- tcg_gen_mov_i64(cpu_fir[rc], cpu_fir[ra]);which moved the condition, not the second source, to the destination.
But it's also easy to implement the simplified fp comparison inline....
target-alpha: Expand ins*l inline.
Similar in difficulty to ext*l, already expanded.
target-alpha: Expand msk*l inline.
target-alpha: Expand msk*h inline.
target-alpha: Expand ins*h inline.
target-alpha: Fix FMOV.
Properly handle move from the zero register.
target-alpha: Fix double log_cpu_state.
The proper logging is handled by generic code.
target-alpha: Implement RD/WRUNIQUE in the translator
When emulating user-mode only, there's no reason to exitthe translation block to effect a call_pal. We can generatea move to/from the unique slot directly.
target-alpha: Implement missing MVI instructions.
target-alpha: Fix -d in_asm
Generic disassembly was incorrectly keyed on ALPHA_DEBUG_DISASrather than the generic DEBUG_DISAS. Use qemu_log_mask foradditional LOG_DISAS output. Delete some random insn_countlogging noise from gen_intermediate_code_internal....
target-alpha: Expand zap/zapnot with immediate inline.
The vast majority of zap instructions have an immediate operand,since zapnot is the canonical method to zero-extend from u16 or u32.
target-alpha: Rewrite gen_ext_[hl] in terms of zapnot.
The architecture manual specifies the EXT instructionsin terms of the ZAPNOT operation; writing it that way inthe translator makes things a bit clearer.
target-alpha: Fix fbcond branch offset.
The instructions use a disp21 like all other branch insns,not the disp16 that was being passed.
target-alpha: Remove bogus DO_TB_FLUSH code from translator.
target-alpha: Honor the -cpu command line argument.
Also change the default cpu to ev67.
target-alpha: fix extlh instruction
The extlh instruction on Alpha currently doesn't work properly.It's a combination of a cut/paste bug (16 where it should be 32) as wellas a "shift by 64" bug.
Signed-off-by: Vince Weaver <vince@csl.cornell.edu>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Fix sys-queue.h conflict for good
Problem: Our file sys-queue.h is a copy of the BSD file, but there aresome additions and it's not entirely compatible. Because of that, there havebeen conflicts with system headers on BSD systems. Some hacks have beenintroduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...
Replace always_inline with inline
We define inline as always_inline.
Update to a hopefully more future proof FSF address
qemu: introduce qemu_init_vcpu (Marcelo Tosatti)
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7242 c046a42c-6fe2-441c-8c8c-71466251a162
target-alpha: fix emulation of ecb
As ECB is a hint, it can be safely emulated as a nop.
This change is necessary to boot Tru64.
Signed-off-by: Tristan Gingold <gingold@adacore.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7111 c046a42c-6fe2-441c-8c8c-71466251a162
target-alpha: remove amask helper
The direct use of helper_amask in translate.c was bogus (as env is notassigned). Directly code amask in tcg and remove the helper.
Signed-off-by: Tristan Gingold <gingold@adacore.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>...