- Jun 06, 2022
-
-
Song Gao authored
This patch adds support for disassembling via option '-d in_asm'. Signed-off-by:
Song Gao <gaosong@loongson.cn> Signed-off-by:
Xiaojuan Yang <yangxiaojuan@loongson.cn> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220606124333.2060567-17-yangxiaojuan@loongson.cn> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- May 09, 2022
-
-
Thomas Huth authored
Capstone should be superior to the old libopcode disassembler, so we can drop the old file nowadays. Message-Id: <20220505173619.488350-1-thuth@redhat.com> Reviewed-by:
Cédric Le Goater <clg@kaod.org> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Thomas Huth authored
Capstone should be superior to the old libopcode disassembler, so we can drop the old file nowadays. Signed-off-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220412165836.355850-4-thuth@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Thomas Huth authored
Capstone should be superior to the old libopcode disassembler, so we can drop the old file nowadays. Signed-off-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220412165836.355850-3-thuth@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- May 04, 2022
-
-
Thomas Huth authored
Capstone should be superior to the old libopcode disassembler, so we can drop the old file nowadays. Message-Id: <20220412165836.355850-2-thuth@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- Mar 22, 2022
-
-
Marc-André Lureau authored
One less qemu-specific macro. It also helps to make some headers/units only depend on glib, and thus moved in standalone projects eventually. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Richard W.M. Jones <rjones@redhat.com>
-
- Jan 08, 2022
-
-
Frédéric Pétrot authored
This patch adds the support of the '-cpu rv128' option to qemu-system-riscv64 so that we can indicate that we want to run rv128 executables. Still, there is no support for 128-bit insns at that stage so qemu fails miserably (as expected) if launched with this option. Signed-off-by:
Frédéric Pétrot <frederic.petrot@univ-grenoble-alpes.fr> Co-authored-by:
Fabien Portas <fabien.portas@grenoble-inp.org> Reviewed-by:
Alistair Francis <alistair.francis@wdc.com> Message-id: 20220106210108.138226-8-frederic.petrot@univ-grenoble-alpes.fr [ Changed by AF - Rename CPU to "x-rv128" ] Signed-off-by:
Alistair Francis <alistair.francis@wdc.com>
-
- Oct 22, 2021
-
-
Philippe Mathieu-Daudé authored
Since commit 12b6e9b2 ("disas: Clean up CPUDebug initialization") the disassemble_info->bfd_endian enum is set for all targets in target_disas(). We can directly call print_insn_nios2() and simplify. Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Laurent Vivier <laurent@vivier.eu> Reviewed-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20210807110939.95853-3-f4bug@amsat.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
- May 12, 2021
-
-
Markus Armbruster authored
Target lm32 was deprecated in commit d8498005, v5.2.0. See there for rationale. Some of its code lives on in device models derived from milkymist ones: hw/char/digic-uart.c and hw/display/bcm2835_fb.c. Cc: Michael Walle <michael@walle.cc> Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20210503084034.3804963-2-armbru@redhat.com> Acked-by:
Michael Walle <michael@walle.cc> [Trivial conflicts resolved, reST markup fixed]
-
Thomas Huth authored
There are no known users of this CPU anymore, and there are no binaries available online which could be used for regression tests, so the code has likely completely bit-rotten already. It's been marked as deprecated since two releases now and nobody spoke up that there is still a need to keep it, thus let's remove it now. Signed-off-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20210430160355.698194-1-thuth@redhat.com> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> [Commit message typos fixed, trivial conflicts resolved] Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
- May 10, 2021
-
-
Peter Maydell authored
Make dis-asm.h handle being included outside an 'extern "C"' block; this allows us to remove the 'extern "C"' blocks that our two C++ files that include it are using. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Feb 18, 2021
-
-
Taylor Simpson authored
Add hexagon to disas/meson.build Add disas/hexagon.c Add hexagon to include/disas/dis-asm.h Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Tested-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <1612763186-18161-6-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Jan 07, 2021
-
-
Richard Henderson authored
Reviewed-by:
Joelle van Dyne <j@getutm.app> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Richard Henderson authored
Add two helper functions, using a global variable to hold the displacement. The displacement is currently always 0, so no change in behaviour. Begin using the functions in tcg common code only. Reviewed-by:
Joelle van Dyne <j@getutm.app> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Oct 03, 2020
-
-
Richard Henderson authored
There is nothing target-specific about this code, so it can be added to common_ss. This also requires that the base capstone dependency be added to common_ss, so that we get the correct include paths added to CFLAGS. Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Richard Henderson authored
Use the routines we have already instead of open-coding. Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Richard Henderson authored
Rename several functions, dropping "generic" and making "host" vs "target" clearer. Make a bunch of functions static that are not used outside this file. Replace INIT_DISASSEMBLE_INFO with a trio of functions. Acked-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Richard Henderson authored
Instead of creating GStrings and passing them into log_disas, just print the annotations directly in tb_gen_code. Fix the annotations for the slow paths of the TB, after the part implementing the final guest instruction. Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Jul 11, 2020
-
-
Michael Rolnik authored
Add AVR related definitions into QEMU, make AVR support buildable. [AM: Remove word 'Atmel' from filenames and all elements of code] Suggested-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Signed-off-by:
Michael Rolnik <mrolnik@gmail.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Aleksandar Markovic <aleksandar.m.mail@gmail.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Aleksandar Markovic <amarkovic@wavecomp.com> Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Message-Id: <20200705140315.260514-23-huth@tuxfamily.org> [PMD: Fixed @avr tag in qapi/machine.json] Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
- May 15, 2020
-
-
Alex Bennée authored
This will become useful shortly for providing more information about output assembly inline. While there fix up the indenting and code formatting in disas(). Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200513175134.19619-9-alex.bennee@linaro.org>
-
- Mar 19, 2020
-
-
Yoshinori Sato authored
Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200224141923.82118-8-ysato@users.sourceforge.jp> Acked-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
- Jan 29, 2020
-
-
Aleksandar Markovic authored
This patch adds a field "target_info" to the structure disassemble_info. The purpose of this field is to enable targets to pass to disassembler code any additional data thet deem suitable. Reviewed-by:
Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Signed-off-by:
Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1579883929-1517-6-git-send-email-aleksandar.markovic@rt-rk.com>
-
- Oct 28, 2019
-
-
Alex Bennée authored
Give the plugins access to the QEMU dissasembler so they don't have to re-invent the wheel. We generate a warning when there are spare bytes in the decode buffer. This is usually due to the front end loading in more bytes than decoded. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Aug 16, 2019
-
-
Markus Armbruster authored
Back in 2016, we discussed[1] rules for headers, and these were generally liked: 1. Have a carefully curated header that's included everywhere first. We got that already thanks to Peter: osdep.h. 2. Headers should normally include everything they need beyond osdep.h. If exceptions are needed for some reason, they must be documented in the header. If all that's needed from a header is typedefs, put those into qemu/typedefs.h instead of including the header. 3. Cyclic inclusion is forbidden. This patch gets include/ closer to obeying 2. It's actually extracted from my "[RFC] Baby steps towards saner headers" series[2], which demonstrates a possible path towards checking 2 automatically. It passes the RFC test there. [1] Message-ID: <87h9g8j57d.fsf@blackfin.pond.sub.org> https://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg03345.html [2] Message-Id: <20190711122827.18970-1-armbru@redhat.com> https://lists.nongnu.org/archive/html/qemu-devel/2019-07/msg02715.html Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Alistair Francis <alistair.francis@wdc.com> Message-Id: <20190812052359.30071-2-armbru@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com>
-
- Jun 12, 2019
-
-
Markus Armbruster authored
Commit 58ea30f5 "Clean up header guards that don't match their file name" messed up contrib/elf2dmp/qemu_elf.h and tests/migration/migration-test.h. It missed target/cris/opcode-cris.h and tests/uefi-test-tools/UefiTestToolsPkg/Include/Guid/BiosTablesTest.h due to the scripts/clean-header-guards.pl bug fixed in the previous commit. Commit a8b991b5 "Clean up ill-advised or unusual header guards" missed include/hw/xen/io/ring.h for the same reason. Commit 3979fca4 "disas: Rename include/disas/bfd.h back to include/disas/dis-asm.h" neglected to update the guard symbol for the rename. Commit a331c6d7 "semihosting: implement a semihosting console" created include/hw/semihosting/console.h with an ill-advised guard symbol. Clean them up. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20190604181618.19980-4-armbru@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com>
-
Markus Armbruster authored
No header includes qemu-common.h after this commit, as prescribed by qemu-common.h's file comment. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20190523143508.25387-5-armbru@redhat.com> [Rebased with conflicts resolved automatically, except for include/hw/arm/xlnx-zynqmp.h hw/arm/nrf51_soc.c hw/arm/msf2-soc.c block/qcow2-refcount.c block/qcow2-cluster.c block/qcow2-cache.c target/arm/cpu.h target/lm32/cpu.h target/m68k/cpu.h target/mips/cpu.h target/moxie/cpu.h target/nios2/cpu.h target/openrisc/cpu.h target/riscv/cpu.h target/tilegx/cpu.h target/tricore/cpu.h target/unicore32/cpu.h target/xtensa/cpu.h; bsd-user/main.c and net/tap-bsd.c fixed up]
-
- May 13, 2019
-
-
Markus Armbruster authored
We commonly define the header guard symbol without an explicit value. Normalize the exceptions. Done with scripts/clean-header-guards.pl. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20190315145123.28030-8-armbru@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com>
-
- Apr 18, 2019
-
-
Markus Armbruster authored
The previous commits have eliminated fprintf_function outside disassemblers, simplifying code and cleaning up the ugly type-punning fprintf_function seems to attract. Move fprintf_function to include/disas/dis-asm.h to reduce the temptation to abuse it. I considered renaming it to fprintf_ftype (reverting that part of commit 6e2d864e, v0.14.0) to get us closer to binutils, but I figure the fork is too distant to make this worthwhile. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20190417191805.28198-18-armbru@redhat.com>
-
Markus Armbruster authored
Commit dc99065b (v0.1.0) added dis-asm.h from binutils. Commit 43d4145a (v0.1.5) inlined bfd.h into dis-asm.h to remove the dependency on binutils. Commit 76cad711 (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>
-
- Oct 25, 2018
-
-
Aleksandar Markovic authored
Add disassembler support for nanoMIPS. Reviewed-by:
Stefan Markovic <smarkovic@wavecomp.com> Signed-off-by:
Matthew Fortune <matthew.fortune@mips.com> Signed-off-by:
Aleksandar Markovic <amarkovic@wavecomp.com>
-
- Mar 06, 2018
-
-
Michael Clark authored
The RISC-V disassembler has no dependencies outside of the 'disas' directory so it can be applied independently. The majority of the disassembler is machine-generated from instruction set metadata: - https://github.com/michaeljclark/riscv-meta Expected checkpatch errors for consistency and brevity reasons: ERROR: line over 90 characters ERROR: trailing statements should be on next line ERROR: space prohibited between function name and open parenthesis '(' Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Michael Clark <mjc@sifive.com>
-
- Jan 09, 2018
-
-
Max Filippov authored
Add disas/xtensa.c and use libisa for instruction decoding/opcode name lookup. Signed-off-by:
Max Filippov <jcmvbkbc@gmail.com>
-
- Nov 09, 2017
-
-
Richard Henderson authored
This feature is present for some targets in the bfd disassembler(s). Implement it generically for all capstone users. Suggested-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Oct 25, 2017
-
-
Richard Henderson authored
If configured, prefer this over our rather dated copy of the GPLv2-only binutils. This will be especially apparent with the proposed vector extensions to TCG, as disas/i386.c does not handle AVX. Tested-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Richard Henderson authored
Now that every target is using the disas_set_info hook, the flags argument is unused. Remove it. Tested-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Richard Henderson authored
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>
-
- Oct 12, 2017
-
-
Thomas Huth authored
I've recently seen this with valgrind while running the HMP tester: ==22373== Conditional jump or move depends on uninitialised value(s) ==22373== at 0x4A41FD: arm_disas_set_info (cpu.c:504) ==22373== by 0x3867A7: monitor_disas (disas.c:390) ==22373== by 0x38E80E: memory_dump (monitor.c:1339) ==22373== by 0x38FA43: handle_hmp_command (monitor.c:3123) ==22373== by 0x38FB9E: qmp_human_monitor_command (monitor.c:613) ==22373== by 0x4E3124: qmp_marshal_human_monitor_command (qmp-marshal.c:1736) ==22373== by 0x769678: do_qmp_dispatch (qmp-dispatch.c:104) ==22373== by 0x769678: qmp_dispatch (qmp-dispatch.c:131) ==22373== by 0x38B734: handle_qmp_command (monitor.c:3853) ==22373== by 0x76ED07: json_message_process_token (json-streamer.c:105) ==22373== by 0x78D40A: json_lexer_feed_char (json-lexer.c:323) ==22373== by 0x78D4CD: json_lexer_feed (json-lexer.c:373) ==22373== by 0x38A08D: monitor_qmp_read (monitor.c:3895) And indeed, in monitor_disas, the read_memory_inner_func variable was not initialized, but arm_disas_set_info() expects this to be NULL or a valid pointer. Let's properly set this to NULL in the INIT_DISASSEMBLE_INFO to fix it in all functions that use the disassemble_info struct. Fixes: f7478a92 ("Fix Thumb-1 BE32 execution") Signed-off-by:
Thomas Huth <thuth@redhat.com> Message-Id: <1506524313-20037-1-git-send-email-thuth@redhat.com>
-
- Feb 07, 2017
-
-
Julian Brown authored
Thumb-1 code has some issues in BE32 mode (as currently implemented). In short, since bytes are swapped within words at load time for BE32 executables, this also swaps pairs of adjacent Thumb-1 instructions. This patch un-swaps those pairs of instructions again, both for execution, and for disassembly. (The previous version of the patch always read four bytes in arm_read_memory_func and then extracted the proper two bytes, in a probably misguided attempt to match the behaviour of actual hardware as described by e.g. the ARM9TDMI TRM, section 3.3 "Endian effects for instruction fetches". It's less complicated to just read the correct two bytes though.) Signed-off-by:
Julian Brown <julian@codesourcery.com> Message-id: ca20462a044848000370318a8bd41dd0a4ed273f.1484929304.git.julian@codesourcery.com Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
- 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>
-
- 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
-