aboutsummaryrefslogtreecommitdiff
path: root/disas/microblaze.c
AgeCommit message (Collapse)AuthorFilesLines
2017-03-24disas/microblaze: Remove unused REG_PC definePeter Maydell1-1/+1
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
2017-03-07disas/microblaze: Avoid unintended sign extensionPeter Maydell1-2/+4
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 1005401.) 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
2016-01-28disas/microblaze.c: Don't define TRUE or FALSEPeter Maydell1-4/+1
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
2015-09-11disas/microblaze: Remove unused codeStefan Weil1-150/+0
Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-09-11maint: remove unused include for strings.hDaniel P. Berrange1-1/+0
A number of files were including strings.h but not using any of the functions it provides Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-03-10disas/microblaze: Fix warnings caused by missing 'static' attributeStefan Weil1-6/+7
Warnings from the Sparse static analysis tool: disas/microblaze.c:289:3: warning: symbol 'opcodes' was not declared. Should it be static? disas/microblaze.c:570:6: warning: symbol 'register_prefix' was not declared. Should it be static? disas/microblaze.c:571:6: warning: symbol 'special_register_prefix' was not declared. Should it be static? disas/microblaze.c:572:6: warning: symbol 'fsl_register_prefix' was not declared. Should it be static? disas/microblaze.c:573:6: warning: symbol 'pvr_register_prefix' was not declared. Should it be static? Remove the unused variable special_register_prefix. The variable pvr_register_prefix was unused, too, but can be used. Add also 'const' where possible. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2012-12-19build: kill libdis, move disassemblers to disas/Paolo Bonzini1-0/+1100
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>