- Feb 18, 2021
-
-
Taylor Simpson authored
Add file to default-configs Add hexagon to meson.build Add hexagon to target/meson.build Add target/hexagon/meson.build Change scripts/qemu-binfmt-conf.sh We can build a hexagon-linux-user target and run programs on the Hexagon scalar core. With hexagon-linux-clang installed, "make check-tcg" will pass. Tested-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <1612763186-18161-35-git-send-email-tsimpson@quicinc.com> [rth: Use top-level python variable] Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <1612763186-18161-34-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Message-Id: <1612763186-18161-33-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Enable multiarch tests for Hexagon Modify tests/tcg/configure.sh Add reference files to tests/tcg/hexagon Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <1612763186-18161-32-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Implementation of Linux user emulation for Hexagon Some common files modified in addition to new files in linux-user/hexagon Acked-by:
Laurent Vivier <laurent@vivier.eu> Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <1612763186-18161-31-git-send-email-tsimpson@quicinc.com> [rth: Fix termbits.h on review by Laurent] Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Read the instruction memory Create a packet data structure Generate TCG code for the start of the packet Invoke the generate function for each instruction Generate TCG code for the end of the packet Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Message-Id: <1612763186-18161-30-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
The imported code uses host floating point. We override them to use qemu softfloat Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <1612763186-18161-29-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Helpers won't work if there are multiple definitions, so we override these instructions using #define fGEN_TCG_<tag>. Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Message-Id: <1612763186-18161-28-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Include the generated files and set up the data structures Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Message-Id: <1612763186-18161-27-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Determine legal VLIW slots for each instruction Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <1612763186-18161-26-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
macros to interface with the generator macros referenced in instruction semantics Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <1612763186-18161-25-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <1612763186-18161-24-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Python script that emits the decode tree in dectree_generated.h. Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <1612763186-18161-23-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Run the C preprocessor across the instruction definition and encoding files to expand macros and prepare the iset.py file. The resulting fill contains python data structures used to build the decode tree. Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <1612763186-18161-22-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Python scripts generate the following files helper_protos_generated.h.inc For each instruction we create DEF_HELPER function prototype helper_funcs_generated.c.inc For each instruction we create the helper function definition tcg_funcs_generated.c.inc For each instruction we create TCG code to generate call to helper tcg_func_table_generated.c.inc Table of function pointers indexed by opcode shortcode_generated.h.inc Generate a table of instruction "shortcode" semantics opcodes_def_generated.h.inc Gives a list of all the opcodes op_attribs_generated.h.inc Lists all the attributes associated with each instruction op_regs_generated.h.inc Lists the register and immediate operands for each instruction printinsn_generated.h.inc Data for printing (disassembling) each instruction (format string + operands) Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <1612763186-18161-21-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Run the C preprocessor across the instruction definition files and macro definition file to expand macros and prepare the semantics_generated.pyinc file. The resulting file contains one entry with the semantics for each instruction and one line with the instruction attributes associated with each macro. Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <1612763186-18161-20-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Imported from the Hexagon architecture library imported/macros.def The macro definitions specify instruction attributes that are applied to each instruction that references the macro. The generator will recursively apply attributes to each instruction that used the macro. imported/allidefs.def Top level instruction definition file imported/*.idef Instruction definition files These files are input to the first phase of the generator (gen_semantics.c) to create a python include file with the instruction semantics and attributes. The python include file is fed to the second phase to generate various header files. imported/encode*.def Instruction encoding bit patterns for every instruction Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Acked-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <1612763186-18161-19-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <1612763186-18161-18-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Message-Id: <1612763186-18161-17-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Message-Id: <1612763186-18161-16-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <1612763186-18161-15-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Take the words from instruction memory and build a packet_t for TCG code generation The following operations are performed Convert the .new encoded offset to the register number of the producer Reorder the packet so .new producer is before consumer Apply constant extenders Separate subinsn's into two instructions Break compare-jumps into two instructions Create instructions for :endloop Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <1612763186-18161-14-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <1612763186-18161-13-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Declare bitfields within registers such as user status register (USR) Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <1612763186-18161-12-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
The insn_t and packet_t are the interface between instruction decoding and TCG code generation Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <1612763186-18161-11-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Define types used in files imported from the Hexagon architecture library Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <1612763186-18161-10-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
GDB register read and write routines Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <1612763186-18161-9-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
The majority of helpers are generated. Define the helper functions needed then include the generated file Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Message-Id: <1612763186-18161-8-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <1612763186-18161-7-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
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>
-
Taylor Simpson authored
Add target state header, target definitions and initialization routines Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Message-Id: <1612763186-18161-5-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Define EM_HEXAGON 164 Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <1612763186-18161-4-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Gives an introduction and overview to the Hexagon target Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Message-Id: <1612763186-18161-3-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Taylor Simpson authored
Add Taylor Simpson as the Hexagon target maintainer Signed-off-by:
Taylor Simpson <tsimpson@quicinc.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <1612763186-18161-2-git-send-email-tsimpson@quicinc.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Richard Henderson authored
Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> 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> Message-Id: <20201021045149.1582203-2-richard.henderson@linaro.org>
-
Peter Maydell authored
Plugin updates: - expose vdev name in PCI memory registration - new hwprofile plugin - bunch of style cleanups to contrib/plugins - fix call signature of inline instrumentation - re-factor the io_recompile code to push specialisation into hooks - add some acceptance tests for the plugins - clean-up and remove CF_NOCACHE handling from TCG - fix instrumentation of cpu_io_recompile sections - expand tests to check inline and cb count the same # gpg: Signature made Thu 18 Feb 2021 08:24:57 GMT # gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full] # Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44 * remotes/stsquad/tags/pull-plugin-updates-180221-1: (23 commits) tests/acceptance: add a memory callback check tests/plugin: allow memory plugin to do both inline and callbacks tests/acceptance: add a new tests to detect counting errors accel/tcg: allow plugin instrumentation to be disable via cflags accel/tcg: remove CF_NOCACHE and special cases accel/tcg: re-factor non-RAM execution code accel/tcg: cache single instruction TB on pending replay exception accel/tcg: actually cache our partial icount TB tests/acceptance: add a new set of tests to exercise plugins tests/plugin: expand insn test to detect duplicate instructions target/sh4: Create superh_io_recompile_replay_branch target/mips: Create mips_io_recompile_replay_branch accel/tcg: Create io_recompile_replay_branch hook exec: Move TranslationBlock typedef to qemu/typedefs.h accel/tcg/plugin-gen: fix the call signature for inline callbacks contrib: Open brace '{' following struct go on the same line contrib: space required after that ',' contrib: Add spaces around operator contrib: Fix some code style problems, ERROR: "foo * bar" should be "foo *bar" contrib: Don't use '#' flag of printf format ... Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Alex Bennée authored
This test makes sure that the inline and callback based memory checks count the same number of accesses. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20210213130325.14781-24-alex.bennee@linaro.org>
-
Alex Bennée authored
This is going to be useful for acceptance tests that check both types are being called the same number of times, especially when icount is enabled. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20210213130325.14781-23-alex.bennee@linaro.org>
-
Alex Bennée authored
The insn plugin has a simple heuristic to detect if an instruction is detected running twice in a row. Check the plugin log after the run and pass accordingly. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Tested-by:
Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20210213130325.14781-22-alex.bennee@linaro.org>
-
Alex Bennée authored
When icount is enabled and we recompile an MMIO access we end up double counting the instruction execution. To avoid this we introduce the CF_MEMI cflag which only allows memory instrumentation for the next TB (which won't yet have been counted). As this is part of the hashed compile flags we will only execute the generated TB while coming out of a cpu_io_recompile. While we are at it delete the old TODO. We might as well keep the translation handy as it's likely you will repeatedly hit it on each MMIO access. Reported-by:
Aaron Lindsay <aaron@os.amperecomputing.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Tested-by:
Aaron Lindsay <aaron@os.amperecomputing.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210213130325.14781-21-alex.bennee@linaro.org>
-