- 14 Jan, 2011 40 commits
-
-
Peter Maydell authored
When translating, the condexec bits for the TB are in the TB flags; the CPUState condexec bits may be different. This patch fixes https://bugs.launchpad.net/bugs/604872 where we might segfault if we took an exception in the middle of a TB with an IT block, because when we came to retranslate in cpu_restore_state() the CPUState condexec bits would have advanced compared to the start of the TB and we would generate different (wrong) code. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Aurelien Jarno <aurelien@aurel32.net> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Peter Maydell authored
The Thumb/ARM state for the TB being translated should come from the TB flags, not the CPUState. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Aurelien Jarno <aurelien@aurel32.net> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Peter Maydell authored
When translating, the VFP vector length and stride for this TB are encoded in the TB flags; the CPUState copies may be different and must not be used. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Aurelien Jarno <aurelien@aurel32.net> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Peter Maydell authored
When translating code, whether the VFP unit is enabled for this TB is stored in a bit in the TB flags. Use this rather than incorrectly reading the FPEXC from the CPUState passed to translation. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Aurelien Jarno <aurelien@aurel32.net> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Peter Maydell authored
Add symbolic constants for the bitfields we use in the TB flags. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Aurelien Jarno <aurelien@aurel32.net> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Peter Maydell authored
When translating the SRS instruction, handle the "store registers to stack of current mode" case in the helper function rather than inline. This means the generated code does not make assumptions about the current CPU mode which might not be valid when the TB is executed later. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Aurelien Jarno <aurelien@aurel32.net> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Peter Maydell authored
VSQRTS always uses the standard FPSCR value as it is a Neon instruction. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Aurelien Jarno <aurelien@aurel32.net> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Peter Maydell authored
Add support to the ARM helper routines for a second fp_status value which should be used for operations which the ARM ARM indicates use "ARM standard floating-point arithmetic" rather than being controlled by the rounding/flush/NaN settings in the FPSCR. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Aurelien Jarno <aurelien@aurel32.net> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Peter Maydell authored
The implementation of the ARM VRSQRTS instruction (which calculates (3 - op1 * op2) / 2) was missing the division operation. It also did not handle the special cases of (0,inf) and (inf,0). Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Aurelien Jarno <aurelien@aurel32.net> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Peter Maydell authored
Add a utility function to softfloat to test whether a float32 is zero or denormal. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Aurelien Jarno <aurelien@aurel32.net> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Aurelien Jarno authored
lsi_ram_read*() and lsi_ram_write*() are not consistent, one uses leXX_to_cpu() the other uses nothing. As the comment above the RAM declaration says: "Script ram is stored as 32-bit words in host byteorder.", remove the leXX_to_cpu() calls. This fixes the boot of an ARM versatile machine on MIPS and PowerPC hosts. Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Aurelien Jarno authored
Board id can't be written with stl_phys() as it's read-only part of memory. Use stl_p() on the memory buffer instead. Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Aurelien Jarno authored
Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Aurelien Jarno authored
Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Aurelien Jarno authored
When a TCG variable is anded with a value and the compared with the same value, we can simply invert the comparison and compare it with 0. The generated code is smaller. Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Aurelien Jarno authored
Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Aurelien Jarno authored
As exception is not the normal path, don't bother saving PC, before raising one, instead rely on code retranslation to get the CPU state. Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Aurelien Jarno authored
Add the ftrv XMTRX,FVn instruction, which computes the 4-row x 4-column matrix XMTRX by the 4-dimensional vector FVn. Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Aurelien Jarno authored
Add the fipr FVm,FVn instruction, which computes the inner products of a 4-dimensional single precision floating-point vector. Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Aurelien Jarno authored
FPU exception support where not implemented on SH4. Implement them by clearing the softfloat exceptions flags before an FP instruction (the SH4 FPU also clear them before an instruction), and calling a function to update the FPSCR register after an FP instruction. This function update the corresponding FPSCR bits (both flags and cumulative flags) and trigger exception if enabled. Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Aurelien Jarno authored
When the FPSCR.DN bit is set, the SH4 FPU treat denormalized numbers as zero. Enable the corresponding softfloat option when this bit is set. Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Aurelien Jarno authored
Define FPSCR constants for all field and use them instead of hardcoded values. Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Aurelien Jarno authored
SH4 FPU doesn't propagate NaN, and instead always regenerate new ones. Enable the default-NaN mode by default. Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Aurelien Jarno authored
When the default-NaN mode is enabled, it should return the default NaN value, but it should anyway raise the invalid operation flag if one of the operand is an sNaN. I have checked that this behavior matches the ARM and SH4 manuals, as well as real SH4 hardware. Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Aurelien Jarno authored
Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Aurelien Jarno authored
We need to be able to catch exceptions correctly and thus enable softfloat on SH4. As all machines except i386 and x86_64 are using softfloat, make it the default and change the case to detect i386 and x86_64. Note that CRIS doesn't have an FPU, so it can be configured with both softfloat-native and softfloat. Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Aurelien Jarno authored
Since commit d1807a4f ./configure tries to test files and directories with "test -f", which only test for regular files. Test with "test -e", which looks for any kind of files. This unbreak the configure script when not using a separate object directory. Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Paolo Bonzini authored
These are not in any release, so I am just renaming them. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Paolo Bonzini authored
This will help getting config.guess and config.sub from the srcdir. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Paolo Bonzini authored
Not used in the submodules. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Paolo Bonzini authored
Not necessary since we use mkdir -p and from this patch test -f. Also, dirname returns "." if a path has no directory component, as is the case for "sh configure". Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Paolo Bonzini authored
"ln -sf" does not really do anything more than "ln -s" on Solaris. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Paolo Bonzini authored
This also allows overriding it with SDL_CONFIG, and warning in suspicious cross-compilation scenarios. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Paolo Bonzini authored
This can still be requested with PKG_CONFIG=/path/to/pkg-config. Just do not use it as a default, and print a warning. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Paolo Bonzini authored
Do not hardcode the list of 64-bit CPUs. Use sizeof(void *) to compute it. Renaming it to HOST_LONG_BITS to HOST_POINTER_BITS is left for later. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Paolo Bonzini authored
Non-existent -I paths are dropped silently by the compiler, but still it is not polite to pass bogus options. Configure-time tests do not need any include files from the source path, so only include -I flags at make time (when they're properly expanded). Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Paolo Bonzini authored
The "test the C compiler works ok" comes before a bunch of flags are added for --cpu or just depending on the host. It helps debugging if the test is done after these flags are (unconditionally) added. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Paolo Bonzini authored
I didn't test with sparse, but the old code using += before a variable was set was wrong. Sparse support should probably be ripped out or redone, but this at least keeps some sanity. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-