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....
target-alpha: use new float64_unordered_quiet() function
Use float64_unordered_quiet() in helper_cmptun() instead of doing thethe comparison manually.
According to the "Alpha Compiler Writer's Guide", we should use the_quiet version here, as CMPTUN and CMPTEQ should generate InvalidOp...
softfloat: rename float*_eq() into float*_eq_quiet()
float*_eq functions have a different semantics than other comparisonfunctions. Fix that by first renaming float*_quiet() into float*_eq_quiet().
Note that it is purely mechanical, and the behaviour should be unchanged....
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...
inline cpu_halted into sole caller
All implementations are now the same, and there is only one caller,so inline the function there.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
softfloat: Rename float*_is_nan() functions to float*_is_quiet_nan()
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...
target-xxx: Use fprintf_function (format checking)
fprintf_function uses format checking with GCC_FMT_ATTR.
Cc: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
remove exec-all.h inclusion from cpu.h
move cpu_pc_from_tb to target-*/exec.h
remove unused stuff from */exec.h
target-alpha: Implement RPCC.
A minimal implementation that more or less corresponds to theuser-level version used by target-i386. More hoops will wantto be jumped through when alpha gets system-level emulation.
Signed-off-by: Richard Henderson <rth@twiddle.net>...
target-alpha: Implement cpys{, n, e} inline.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
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: Enable NPTL.
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: add missing 'break', spotted by clang analyzer
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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.
target-alpha: Add flags markups to helpers.h.
Almost all alpha helpers are at least TCG_CALL_CONSTand a fair few are also TCG_CALL_PURE.
Remove cpu_get_phys_page_debug from userspace emulation
cpu_get_phys_page_debug makes no sense for userspace emulation, so remove it.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Move TARGET_PHYS_ADDR_SPACE_BITS to target-*/cpu.h.
Removes a set of ifdefs from exec.c.
Introduce TARGET_VIRT_ADDR_SPACE_BITS for all targets otherthan Alpha. This will be used for page_find_alloc, which issupposed to be using virtual addresses in the first place....
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: Split up FPCR value into separate fields.
The fpcr_exc_status, fpcr_exc_mask, and fpcr_dyn_round fieldsare stored in <softfloat.h> format for convenience duringregular execution.
Revert the addition of float_exception_mask to float_status,...
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: Clean up arithmetic traps.
Replace the EXCP_ARITH_OVERFLOW placeholder with the completeset of bits from the EXC_SUM IPR. Use them in the existingplaces where we raise arithmetic exceptions.
target-alpha: Mark helper_excp as NORETURN.
Fix incorrect exception_index use
env->exception_index should be cleared with -1, not 0.
See also 821b19fe923ac49a24cdb4af902584fdd019cee6.
Spotted by Igor Kovalenko.
kill regs_to_env and env_to_regs
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
target-alpha: Initialize fpcr
Linux, at least, disables exceptions by default.
target-alpha: Emit tcg debug_insn_start.
target-alpha: Fix cvtlq.
We were missing the 0xc0000000 mask, leading to incorrect results.
target-alpha: Fix float32_to_s vs zero exponent.
There was a bug in float32_to_s that incorrectly mapped a zero exponentto 0x38. This meant 0.0f != 0. At the same time, fix a generic typepunning bug in helper_memory_to_s and helper_s_to_memory.
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: Fix compiler warning for gcc-4.3 (and older)
"Old" compilers obviously are not able to recognisethat all cases are handled here:
qemu/target-alpha/helper.c:70: error: ‘round_mode’ may be used uninitialized in this function
A small modification helps the compiler to do its jobs....
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: Fixes for alpha-linux syscalls.
1. Add correct definitions of error numbers.2. Implement SYS_osf_sigprocmask3. Implement SYS_osf_get/setsysinfo for IEEE_FP_CONTROL.
This last requires exposing the FPCR value to do_syscall.Since this value is actually split up into the float_status,...
Revert "Get rid of _t suffix"
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. Somethinglike this must be presented on the list first so people can provide input...
Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the timebeing.
Signed-off-by: malc <av1474@comtv.ru>
Add 'static' to please Sparse
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,...
cleanup cpu-exec.c, part 0/N: consolidate handle_cpu_signal
handle_cpu_signal is very nearly copy-paste code for each target, with afew minor variations. This patch sets up appropriate defaults for ageneric handle_cpu_signal and provides overrides for particular targets...
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
qemu: per-arch cpu_has_work (Marcelo Tosatti)
Blue Swirl: fix Sparc32 breakage
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7238 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>...
target-alpha: remove helper_load_implver
There is no need to use an helper. Directly load the value with tcg code.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7074 c046a42c-6fe2-441c-8c8c-71466251a162
target-alpha: overflow condition for sublv and subqv
The conditions to detect overflow in sub operations was wrong.
This patch is necessary to boot Tru64.
target-alpha: fix palcode mask for user pal calls
(Also 6 bits for unprivileged calls)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7033 c046a42c-6fe2-441c-8c8c-71466251a162
target-alpha: document more registers used by 21264
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7032 c046a42c-6fe2-441c-8c8c-71466251a162
target-alpha: set target page size to 13 bits
(As defined by the alpha arch ref).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7029 c046a42c-6fe2-441c-8c8c-71466251a162
target-alpha: stop translation if too long
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7027 c046a42c-6fe2-441c-8c8c-71466251a162
Add new command line option -singlestep for tcg single stepping.
This replaces a compile time option for some targets and addsthis feature to targets which did not have a compile time option.
Add monitor command to enable or disable single step mode.
Modify monitor command "info status" to display single step mode....
target-alpha: bug fix: avoid nop to override next instruction
While searching PC, always store the pc of a new instruction.Instructions that didn't generate tcg code (such as nop) prevented the nextone to be referenced.
Signed-off-by: Tristan Gingold <gingold@adacore.com>...
target-alpha: remove PALCODE_ declarations (unused).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6929 c046a42c-6fe2-441c-8c8c-71466251a162
target-alpha: add instruction name in comments for hw_ld opcode.
Make code slightly easier to read.Also unused hw_ld opcodes now generate an invalid opc fault.
Document which IPR are used by 21264
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6927 c046a42c-6fe2-441c-8c8c-71466251a162
target-alpha: tb_flush helper should flush the tb (and not the tlb).
Looks to be a typo fix.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6926 c046a42c-6fe2-441c-8c8c-71466251a162
target-alpha: fix temp free for hw_st
No need to stop translation after hw_st.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6925 c046a42c-6fe2-441c-8c8c-71466251a162
target-alpha: fix bug: integer conditional branch offset is 21 bits wide.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6924 c046a42c-6fe2-441c-8c8c-71466251a162
target-alpha: Fix bug: do not mask address LSBs for ldwu.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6923 c046a42c-6fe2-441c-8c8c-71466251a162
target-alpha: Fix bug: palcode is at least 6 bits.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6922 c046a42c-6fe2-441c-8c8c-71466251a162
The _exit syscall is used for both thread termination in NPTL applications,and process termination in legacy applications. Try to guess which we wantbased on the presence of multiple threads.
Also implement locking when modifying the CPU list.
Signed-off-by: Paul Brook <paul@codesourcery.com>...
targets: remove error handling from qemu_malloc() callers (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6530 c046a42c-6fe2-441c-8c8c-71466251a162
global s/loglevel & X/qemu_loglevel_mask(X)/ (Eduardo Habkost)
These are references to 'loglevel' that aren't on a simple 'if (loglevel &X) qemu_log()' statement.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
Convert references to logfile/loglevel to use qemu_log*() macros
This is a large patch that changes all occurrences of logfile/loglevelglobal variables to use the new qemu_log*() macros.
Clean up debugging code #ifdefs (Eduardo Habkost)
Use macros to avoid #ifdefs on debugging code.
This patch doesn't try to merge logging macros from different files,but just unify the debugging code #ifdefs onto a macro on each file. Afurther cleanup can unify the debugging macros on a common header, later...
Update FSF address in GPL/LGPL boilerplate
The attached patch updates the FSF address in the GPL/LGPL boilerplatein most GPL/LGPLed files, and also in COPYING.LIB.
Signed-off-by: Stuart Brady <stuart.brady@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>...
Remove unnecessary trailing newlines
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6000 c046a42c-6fe2-441c-8c8c-71466251a162
target-alpha: fix 2 warnings
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5992 c046a42c-6fe2-441c-8c8c-71466251a162
target-alpha: gdb-stub support
(Vince Weaver)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5945 c046a42c-6fe2-441c-8c8c-71466251a162
Common cpu_loop_exit prototype
All archs use the same cpu_loop_exit, so move the prototype in a commonheader. i386 was carrying a __hidden attribute, but that was empty forthis arch anyway.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>...
Use sys-queue.h for break/watchpoint managment (Jan Kiszka)
This switches cpu_break/watchpoint_* to TAILQ wrappers, simplifying thecode and also fixing a use after release issue incpu_break/watchpoint_remove_all.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
target-alpha: use CPU_Float/CPU_Double instead of ugly casts
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5771 c046a42c-6fe2-441c-8c8c-71466251a162
Refactor and enhance break/watchpoint API (Jan Kiszka)
This patch prepares the QEMU cpu_watchpoint/breakpoint API to allow thesucceeding enhancements this series comes with.
First of all, it overcomes MAX_BREAKPOINTS/MAX_WATCHPOINTS by switchingto dynamically allocated data structures that are kept in linked lists....
Refactor translation block CPU state handling (Jan Kiszka)
This patch refactors the way the CPU state is handled that is associatedwith a TB. The basic motivation is to move more arch specific code outof generic files. Specifically the long #ifdef clutter in tb_find_fast()...
Convert CPU_PC_FROM_TB to static inline (Jan Kiszka)
as macros should be avoided when possible.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5735 c046a42c-6fe2-441c-8c8c-71466251a162