- Apr 03, 2017
-
-
Peter Maydell authored
Commit 001ebaca fixed some unintended sign extension issues spotted by Coverity (CID 1005402, 1005403), but didn't catch all of them. Fix the rest, so we behave consistently whether 'long' is 32 bit or 64 bit. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Edgar E. Iglesias <edgar.iglesias@xilinx.com> Message-id: 1490970671-20560-1-git-send-email-peter.maydell@linaro.org
-
- Mar 24, 2017
-
-
Peter Maydell authored
The REG_PC define in disas/microblaze.c clashes with a define in the Linux SPARC system headers: /home/pm215/qemu/disas/microblaze.c:162:0: error: "REG_PC" redefined [-Werror] #define REG_PC 32 /* PC */ In file included from /usr/include/signal.h:326:0, from /home/pm215/qemu/include/qemu/osdep.h:86, from /home/pm215/qemu/disas/microblaze.c:36: /usr/include/sparc64-linux-gnu/sys/ucontext.h:96:0: note: this is the location of the previous definition #define REG_PC (1) Since the code doesn't actually use the REG_PC define anywhere, the simplest fix is just to remove it. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Edgar E. Iglesias <edgar.iglesias@xilinx.com> Message-id: 1490272961-1128-1-git-send-email-peter.maydell@linaro.org
-
- Mar 07, 2017
-
-
Peter Maydell authored
When assembling 'given' from the instruction bytes, C's integer promotion rules mean we may promote an unsigned char to a signed integer before shifting it, and then sign extend to a 64-bit long, which can set the high bits of the long. The code doesn't in fact care about the high bits if the long is 64 bits, but this is surprising, so don't do it. (Spotted by Coverity, CID 1005404.) Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Message-id: 1488556233-31246-7-git-send-email-peter.maydell@linaro.org
-
Peter Maydell authored
In the cris disassembler we were using 'unsigned long' to calculate addresses which are supposed to be 32 bits. This meant that we might accidentally sign extend or calculate a value that was outside the 32 bit range of the guest CPU. Use 'uint32_t' instead so we give the right answers on 64-bit hosts. (Spotted by Coverity, CID 1005402, 1005403.) Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 1488556233-31246-6-git-send-email-peter.maydell@linaro.org
-
Peter Maydell authored
In read_insn_microblaze() we assemble 4 bytes into an 'unsigned long'. If 'unsigned long' is 64 bits and the high byte has its top bit set, then C's implicit conversion from 'unsigned char' to 'int' for the shift will result in an unintended sign extension which sets the top 32 bits in 'inst'. Add casts to prevent this. (Spotted by Coverity, CID 10054016.) Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Edgar E. Iglesias <edgar.iglesias@xilinx.com> Message-id: 1488556233-31246-5-git-send-email-peter.maydell@linaro.org
-
Peter Maydell authored
In get_field(), we take an 'unsigned char' value and shift it left, which implicitly promotes it to 'signed int', before ORing it into an 'unsigned long' type. If 'unsigned long' is 64 bits then this will result in a sign extension and the top 32 bits of the result will be 1s. Add explicit casts to unsigned long before shifting to prevent this. (Spotted by Coverity, CID 715697.) Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Laurent Vivier <laurent@vivier.eu> Message-id: 1488556233-31246-4-git-send-email-peter.maydell@linaro.org
-
Peter Maydell authored
In a code path where we hit an internal disassembler error, execution would subsequently attempt to dereference a NULL pointer. This should never happen, but avoid the crash. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Message-id: 1488556233-31246-3-git-send-email-peter.maydell@linaro.org
-
Peter Maydell authored
Coverity complains (CID 1302705) that the "fr0" part of the ?: in fput_fp_reg_r() is dead. This looks like cut-n-paste error from fput_fp_reg(); delete the dead code. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 1488556233-31246-2-git-send-email-peter.maydell@linaro.org
-
- Jan 30, 2017
-
-
Stefan Weil authored
Signed-off-by:
Stefan Weil <sw@weilnetz.de> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
- Jan 24, 2017
-
-
Marek Vasut authored
Add nios2 disassembler support. This patch is composed from binutils files from commit "Opcodes and assembler support for Nios II R2". The files from binutils used in this patch are: include/opcode/nios2.h include/opcode/nios2r1.h include/opcode/nios2r2.h opcodes/nios2-opc.c opcodes/nios2-dis.c Checkpatch says total: 114 errors, 0 warnings, 3609 lines checked , which is caused by a different coding style in those files. These warnings and errors are not addressed To let these files be easily synchronized between binutils and qemu. Signed-off-by:
Marek Vasut <marex@denx.de> Cc: Chris Wulff <crwulff@gmail.com> Cc: Jeff Da Silva <jdasilva@altera.com> Cc: Ley Foon Tan <lftan@altera.com> Cc: Sandra Loosemore <sandra@codesourcery.com> Cc: Yves Vandervennet <yvanderv@altera.com> Reviewed-by:
Alexander Graf <agraf@suse.de> Message-Id: <20170118220146.489-2-marex@denx.de> Signed-off-by:
Richard Henderson <rth@twiddle.net>
-
Peter Maydell authored
Coverity (CID 1005689) warns that we don't check that spec_reg_info() returned non-NULL before dereferencing. Add the check, though as the comment notes this is a can't-really-happen case because the earlier constraint matching should have ruled out the "unknown reg" case. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- Jan 23, 2017
-
-
Richard Henderson authored
This reverts commit d41f3c3c. Signed-off-by:
Richard Henderson <rth@twiddle.net>
-
- Jan 10, 2017
-
-
Richard Henderson authored
Signed-off-by:
Richard Henderson <rth@twiddle.net>
-
Richard Henderson authored
Signed-off-by:
Richard Henderson <rth@twiddle.net>
-
- Dec 20, 2016
-
-
Yuval Shaia authored
Signed-off-by:
Yuval Shaia <yuval.shaia@oracle.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Laurent Vivier <lvivier@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Thomas Huth authored
We've currently got 18 architectures in QEMU, and thus 18 target-xxx folders in the root folder of the QEMU source tree. More architectures (e.g. RISC-V, AVR) are likely to be included soon, too, so the main folder of the QEMU sources slowly gets quite overcrowded with the target-xxx folders. To disburden the main folder a little bit, let's move the target-xxx folders into a dedicated target/ folder, so that target-xxx/ simply becomes target/xxx/ instead. Acked-by: Laurent Vivier <laurent@vivier.eu> [m68k part] Acked-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> [tricore part] Acked-by: Michael Walle <michael@walle.cc> [lm32 part] Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> [s390x part] Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> [s390x part] Acked-by: Eduardo Habkost <ehabkost@redhat.com> [i386 part] Acked-by: Artyom Tarasenko <atar4qemu@gmail.com> [sparc part] Acked-by: Richard Henderson <rth@twiddle.net> [alpha part] Acked-by: Max Filippov <jcmvbkbc@gmail.com> [xtensa part] Reviewed-by: David Gibson <david@gibson.dropbear.id.au> [ppc part] Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> [crisµblaze part] Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn> [unicore32 part] Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- Nov 14, 2016
-
-
Bharata B Rao authored
vrldnm: Vector Rotate Left Doubleword then AND with Mask vrlwnm: Vector Rotate Left Word then AND with Mask Signed-off-by:
Bharata B Rao <bharata@linux.vnet.ibm.com> Signed-off-by:
Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Gautham R. Shenoy authored
vrldmi: Vector Rotate Left Dword then Mask Insert vrlwmi: Vector Rotate Left Word then Mask Insert Signed-off-by:
Gautham R. Shenoy <ego@linux.vnet.ibm.com> Signed-off-by:
Bharata B Rao <bharata@linux.vnet.ibm.com> ( use extract[32,64] and rol[32,64], introduce mask helpers in internal.h ) Signed-off-by:
Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
- Sep 22, 2016
-
-
Peter Maydell authored
The macros ISSPACE, strneq, NUM_ELEMS and NUM_ARM_REGNAMES are defined in disas/arm.c but never used. Remove the unnecessary definitions. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
- Sep 15, 2016
-
-
Ladi Prosek authored
Unused function declarations were found using a simple gcc plugin and manually verified by grepping the sources. Signed-off-by:
Ladi Prosek <lprosek@redhat.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
Thomas Huth authored
The HPPA backend has been removed by the following commit: 802b5081 tcg-hppa: Remove tcg backend But some small pieces of the HPPA backend still survived until today. Since we also do not have support for a HPPA target in QEMU, we can nowadays safely remove the remaining HPPA parts (like the disassembler code, or the detection of HPPA in the configure script). Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- Jul 19, 2016
-
-
Peter Maydell authored
disas/bfd.h defines ATTRIBUTE_UNUSED, but unfortunately the ALSA system headers also define this macro, which means that you can get a compilation failure if building with ALSA and any files happen to include the alsa headers before bfd.h rather than the other way around. This is unfortunate namespace pollution by the ALSA headers but we can work around it. Add an #ifndef guard to bfd.h and remove the unnecessary extra definition in disas/arm.c to fix this. Reported-by:
BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-id: 1468937076-21503-1-git-send-email-peter.maydell@linaro.org
-
- Jul 18, 2016
-
-
Lluís Vilanova authored
Eliminates a future compilation error when UI code includes the tracing headers (indirectly pulling "disas/bfd.h" through "qom/cpu.h") and GLib's i18n '_' macro. Signed-off-by:
Lluís Vilanova <vilanova@ac.upc.edu> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- May 20, 2016
-
-
Paolo Bonzini authored
TCI does not need the runtime definition in exec-all.h. It only needs the host-side definitions in tcg/tcg.h. Now that cpu.h is not included everywhere, this caused a failure because exec-all.h does need cpu.h but does not include it itself. Fix by including the intended header. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Message-id: 1463745452-25831-1-git-send-email-pbonzini@redhat.com Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
- May 19, 2016
-
-
Paolo Bonzini authored
exec-all.h contains TCG-specific definitions. It is not needed outside TCG-specific files such as translate.c, exec.c or *helper.c. One generic function had snuck into include/exec/exec-all.h; move it to include/qom/cpu.h. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Mar 22, 2016
-
-
Veronia Bahaa authored
Move declarations out of qemu-common.h for functions declared in utils/ files: e.g. include/qemu/path.h for utils/path.c. Move inline functions out of qemu-common.h and into new files (e.g. include/qemu/bcd.h) Signed-off-by:
Veronia Bahaa <veroniabahaa@gmail.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Stefan Weil authored
As soon as setjmp.h is included from qemu/osdep.h, those old include statements are no longer needed. Add also setjmp.h to the list in scripts/clean-includes. Signed-off-by:
Stefan Weil <sw@weilnetz.de>
-
- Feb 26, 2016
-
-
Yongbok Kim authored
MIPS Release 6 provides multi-threading features which replace pre-R6 MT Module. CP0.Config3.MT is always 0 in R6, instead there is new CP0.Config5.VP (Virtual Processor) bit which indicates presence of multi-threading support which includes CP0.GlobalNumber register and DVP/EVP instructions. Signed-off-by:
Yongbok Kim <yongbok.kim@imgtec.com> Signed-off-by:
Leon Alrae <leon.alrae@imgtec.com>
-
- Feb 23, 2016
-
-
Peter Maydell authored
Rearrange include directives so that we include osdep.h first. This has to be done manually because clean-includes doesn't handle C++. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Eric Blake <eblake@redhat.com>
-
- Feb 04, 2016
-
-
Peter Maydell authored
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Message-id: 1454089805-5470-7-git-send-email-peter.maydell@linaro.org
-
- Feb 03, 2016
-
-
Peter Maydell authored
The std::abs() function did not get a version that works on 'long long' until C++11. Avoid it, so that we can compile on 32-bit platforms (where int64_t is 'long long') with older compilers (which don't support C++11). Reported-by:
Franz-Josef Haider <Franz-Josef.Haider@student.uibk.ac.at> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Message-id: 1453739429-31477-1-git-send-email-peter.maydell@linaro.org
-
- Jan 29, 2016
-
-
Peter Maydell authored
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Message-id: 1453832250-766-33-git-send-email-peter.maydell@linaro.org
-
Peter Maydell authored
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Message-id: 1453832250-766-32-git-send-email-peter.maydell@linaro.org
-
Peter Maydell authored
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Message-id: 1453832250-766-28-git-send-email-peter.maydell@linaro.org
-
Peter Maydell authored
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Message-id: 1453832250-766-13-git-send-email-peter.maydell@linaro.org
-
Peter Maydell authored
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Message-id: 1453832250-766-12-git-send-email-peter.maydell@linaro.org
-
Peter Maydell authored
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Message-id: 1453832250-766-6-git-send-email-peter.maydell@linaro.org
-
Peter Maydell authored
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Message-id: 1453832250-766-5-git-send-email-peter.maydell@linaro.org
-
- Jan 28, 2016
-
-
Peter Maydell authored
Don't define TRUE and FALSE locally or manually include stdio.h; instead use osdep.h which provides them. This is a necessary prerequisite for moving to "everywhere includes osdep.h", because otherwise there is a compile error due to the redefinition of TRUE and FALSE. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Eric Blake <eblake@redhat.com> Acked-by:
Edgar E. Iglesias <edgar.iglesias@xilinx.com> Message-id: 1453831531-667-2-git-send-email-peter.maydell@linaro.org
-
- Jan 23, 2016
-
-
Peter Maydell authored
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Leon Alrae <leon.alrae@imgtec.com> Signed-off-by:
Leon Alrae <leon.alrae@imgtec.com>
-