summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-01-14target-sh4: add fipr instructionAurelien Jarno3-0/+33
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>
2011-01-14target-sh4: implement FPU exceptionsAurelien Jarno1-22/+136
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>
2011-01-14target-sh4: implement flush-to-zeroAurelien Jarno2-0/+2
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>
2011-01-14target-sh4: define FPSCR constantsAurelien Jarno3-9/+37
Define FPSCR constants for all field and use them instead of hardcoded values. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-14target-sh4: use default-NaN modeAurelien Jarno1-0/+1
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>
2011-01-14softfloat: fix default-NaN modeAurelien Jarno1-18/+18
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>
2011-01-14softfloat: SH4 has the sNaN bit setAurelien Jarno1-5/+5
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-14target-sh4: switch sh4 to softfloatAurelien Jarno1-3/+3
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>
2011-01-14configure: fix broken testAurelien Jarno1-1/+1
Since commit d1807a4f836c27f6dc7061e53a834dd27f78e46a ./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>
2011-01-14make trace options use autoconfy namesPaolo Bonzini1-4/+4
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>
2011-01-14move --srcdir detection earlierPaolo Bonzini1-5/+7
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>
2011-01-14 [PATCH v3 14/15] remove HOST_CC mention from roms/{sea, vga}bios/config.makPaolo Bonzini1-1/+0
Not used in the submodules. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-01-14remove source_path_usedPaolo Bonzini1-29/+16
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>
2011-01-14move "ln -sf" emulation to a functionPaolo Bonzini1-15/+11
"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>
2011-01-14reorganize sdl-config testsPaolo Bonzini1-13/+13
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>
2011-01-14do not default to non-prefixed pkg-config when cross compilingPaolo Bonzini1-2/+2
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>
2011-01-14fix spelling of $pkg_config, move default together with other cross toolsPaolo Bonzini1-17/+17
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-01-14provide portable HOST_LONG_BITS testPaolo Bonzini1-7/+9
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>
2011-01-14do not pass bogus $(SRC_PATH) include paths to cc during configurePaolo Bonzini3-12/+16
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>
2011-01-14test cc with the complete set of chosen flagsPaolo Bonzini1-25/+25
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>
2011-01-14fix sparse support (?)Paolo Bonzini1-5/+5
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>
2011-01-14move feature variables to the topPaolo Bonzini1-82/+82
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-01-14default make and install to environment variablesPaolo Bonzini1-9/+10
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-01-14default compilation tools to environment variablesPaolo Bonzini1-13/+7
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-01-14microblaze: Improve unconditional direct branchingEdgar E. Iglesias1-7/+14
Avoid emitting conditional tcg operations for uncoditional direct branches. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2011-01-13cris: Set btaken when storing direct jumpsEdgar E. Iglesias1-0/+3
When storing a direct jmp from translation state into runtime state we should set the btaken flag. Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
2011-01-13slirp: Use strcasecmp() to check tftp mode, tsizeSergei Gavrikov1-2/+2
According to RFC 1350 (TFTP Revision 2) the mode field can contain any combination of upper and lower case; also RFC 2349 propagates that the transfer size option ("tsize") is case in-sensitive too. Current implementation of embedded TFTP server missed that what does mess some TFTP clients. Fixed by using STRCASECMP(3) in the required places. Signed-off-by: Sergei Gavrikov <sergei.gavrikov@gmail.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
2011-01-12ppc405_uc: fix a buffer overflowBlue Swirl1-2/+3
Fix a buffer overflow, reported by cppcheck: [/src/qemu/hw/ppc405_uc.c:72]: (error) Buffer access out-of-bounds: bd.bi_s_version The use of field bi_s_version seems to be a typo, it should be bi_r_version. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-01-12lan9118: fix a buffer overflowBlue Swirl1-2/+2
Fix a buffer overflow, reported by cppcheck: [/src/qemu/hw/lan9118.c:849]: (error) Buffer access out-of-bounds: s.eeprom All eeprom handling code assumes that the size of eeprom is 128, except lan9118_eeprom_cmd. Fix this by restricting the address passed. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-01-12vpc: fix a file descriptor leakBlue Swirl1-17/+30
Fix a file descriptor leak, reported by cppcheck: [/src/qemu/block/vpc.c:524]: (error) Resource leak: fd Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-01-12qemu-io: fix a memory leakBlue Swirl1-1/+3
Fix a memory leak, reported by cppcheck: [/src/qemu/qemu-io.c:1135]: (error) Memory leak: ctx Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-01-12vvfat: fix a file descriptor leakBlue Swirl1-0/+1
Fix a file descriptor leak, reported by cppcheck: [/src/qemu/block/vvfat.c:759]: (error) Resource leak: dir Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-01-12loader: fix a file descriptor leakBlue Swirl1-2/+3
Fix a file descriptor leak, reported by cppcheck: [/src/qemu/hw/loader.c:311]: (error) Resource leak: fd Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-01-12vnc-auth-sasl: fix a memory leakBlue Swirl1-6/+8
Fix a memory leak reported by cppcheck: [/src/qemu/ui/vnc-auth-sasl.c:448]: (error) Memory leak: mechname Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-01-12audio: split sample conversion and volume mixingMichael Walle13-55/+52
Refactor the volume mixing, so it can be reused for capturing devices. Additionally, it removes superfluous multiplications with the nominal volume within the hardware voice code path. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: malc <av1474@comtv.ru>
2011-01-12disas: remove opcode printing on ARM hostsAurelien Jarno1-5/+0
Following commit 5d48e9174e3bfa8655e1dc8f80887acd9040b427, it's possible to remove the hack that used to display the opcodes on ARM hosts only. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-12arm-dis: Include opcode hex when doing disassemblyPeter Maydell1-0/+24
Enhance the ARM disassembler used for debugging so that it includes the hex dump of the opcode as well as the symbolic disassembly. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-12tcg arm/mips/ia64: add a comment about retranslation and cachesAurelien Jarno3-1/+9
Add a comment about cache coherency and retranslation, so that people developping new targets based on existing ones are warned of the issue. Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-12linux-user: Add configure check for linux/fiemap.h and IOC_FS_FIEMAPPeter Maydell3-1/+25
Add a configure check for the existence of linux/fiemap.h and the IOC_FS_FIEMAP ioctl. This fixes a compilation failure on Linux systems which don't have that header file. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-12ARM: Fix decoding of VQSHL/VQSHLU immediate formsPeter Maydell1-15/+36
Fix errors in the decoding of ARM VQSHL/VQSHLU immediate forms, including using the new VQSHLU helper functions where appropriate. Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-12ARM: add neon helpers for VQSHLUJuha Riihimäki2-0/+51
Add neon helper functions to implement VQSHLU, which is a signed-to-unsigned version of VQSHL available only as an immediate form. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-11target-sh4: fix fpu disabled/illegal exceptionAurelien Jarno1-10/+18
Illegal instructions in a slot delay should generate a slot illegal instruction exception instead of an illegal instruction exception. The current PC should be saved before generating such an exception, but should not be corrected if in a delay slot, given it's already done in the exception handler do_interrupt(). Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-10cris: Remove unused orig_flagsEdgar E. Iglesias1-2/+2
Based on a patch by Blue Swirl <blauwirbel@gmail.com>. Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
2011-01-10cris: Allow more TB chaining for crisv10Edgar E. Iglesias2-14/+33
Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
2011-01-10cris: Support disassembly of crisv10Edgar E. Iglesias3-4/+15
Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
2011-01-10Merge remote branch 'mst/for_anthony' into stagingAnthony Liguori16-35/+410
2011-01-10slirp: fix unaligned access in bootp codeAurelien Jarno1-15/+17
Slirp code tries to be smart an avoid data copy by using pointer to the data. This solution leads to unaligned access, in this case preq_addr, which is a 32-bit long structure. There is no real point of avoiding data copy in a such case, as the value itself is smaller or the same size as a pointer. The patch replaces pointers to the preq_addr structure by the strcture itself, and use the address 0.0.0.0 if no address has been requested (this is not a valid address in such a request). It compares it with htonl(0L) for correctness reasons, in case a code checker look for such mistakes. It also uses memcpy() for copying the data, which takes care of alignement issues. This fixes an unaligned access on IA64 host while requesting a DHCP address. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-10bswap.h: add cpu_to_be64wu()Aurelien Jarno1-0/+15
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-10tcg/arm: improve constant loadingAurelien Jarno1-18/+21
Improve constant loading in two ways: - On all ARM versions, it's possible to load 0xffffff00 = -0x100 using the mvn rd, #0. Fix the conditions. - On <= ARMv6 versions, where movw and movt are not available, load the constants using mov and orr with rotations depending on the constant to load. This is very useful for example to load constants where the low byte is 0. This reduce the generated code size by about 7%. Also fix the coding style at the same time. Cc: Andrzej Zaborowski <balrog@zabor.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-01-10tcg/ia64: remove an unnecessary stop bitAurelien Jarno1-1/+1
Spotted by Richard Henderson. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>