aboutsummaryrefslogtreecommitdiff
path: root/disas/arm.c
AgeCommit message (Collapse)AuthorFilesLines
2019-04-18disas: Rename include/disas/bfd.h back to include/disas/dis-asm.hMarkus Armbruster1-1/+1
Commit dc99065b5f9 (v0.1.0) added dis-asm.h from binutils. Commit 43d4145a986 (v0.1.5) inlined bfd.h into dis-asm.h to remove the dependency on binutils. Commit 76cad71136b (v1.4.0) moved dis-asm.h to include/disas/bfd.h. The new name is confusing when you try to match against (pre GPLv3+) binutils. Rename it back. Keep it in the same directory, of course. Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190417191805.28198-17-armbru@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2019-01-11remove space-tab sequencesPaolo Bonzini1-1/+1
There are not many, and they are all simple mistakes that ended up being committed. Remove them. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20181213223737.11793-2-pbonzini@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Acked-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-12-18disas/arm: fix 'instuction' typo in commentEmilio G. Cota1-1/+1
Signed-off-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2017-10-25target/arm: Move BE32 disassembler fixupRichard Henderson1-5/+16
The Capstone disassembler has its own big-endian fixup. Doing this twice does not work, of course. Move our current fixup from target/arm/cpu.c to disas/arm.c. This makes read_memory_inner_func unused and can be removed. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2017-03-07disas/arm: Avoid unintended sign extensionPeter Maydell1-2/+2
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
2016-09-22disas/arm.c: Remove unused macro definitionsPeter Maydell1-11/+0
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>
2016-07-19disas: Fix ATTRIBUTE_UNUSED define clash with ALSA headersPeter Maydell1-1/+0
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
2016-07-18disas: Remove unused macro '_'Lluís Vilanova1-1/+1
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>
2016-01-29arm: Clean up includesPeter Maydell1-0/+1
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
2015-11-17disas/arm: avoid clang shifting negative signed warningStefan Hajnoczi1-1/+1
clang 3.7.0 on x86_64 warns about the following: disas/arm.c:1782:17: warning: shifting a negative signed value is undefined [-Wshift-negative-value] imm |= (-1 << 7); ~~ ^ Note that this patch preserves the tab indent in this source file because the surrounding code still uses tabs. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2015-03-10disas/arm: Fix warnings caused by missing 'static' attributeStefan Weil1-128/+0
Warnings from the Sparse static analysis tool: disas/arm.c:1552:15: warning: symbol 'last_type' was not declared. Should it be static? disas/arm.c:1553:5: warning: symbol 'last_mapping_sym' was not declared. Should it be static? disas/arm.c:1554:9: warning: symbol 'last_mapping_addr' was not declared. Should it be static? Instead of adding 'static', the unused variables and the unused code which refers to those variables (which was deactivated a long time ago in commit 4b0f1a8b) are removed. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-04-27tcg-arm: Implement division instructionsRichard Henderson1-0/+4
An armv7 extension implements division, present on Cortex A15. Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net>
2012-12-19build: kill libdis, move disassemblers to disas/Paolo Bonzini1-0/+4136
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>