aboutsummaryrefslogtreecommitdiff
path: root/risu_reginfo_i386.c
AgeCommit message (Collapse)Author
2023-09-18Pass siginfo_t->si_addr to the reginfo_init() functionThomas Huth
On s390x, we need the si_addr from the siginfo_t to get to the address of the illegal instruction (the PSW address in the ucontext_t is already pointing to the next instruction there). So let's prepare for that situation and pass the si_addr to the reginfo_init() function everywhere. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-id: 20230914113311.379537-2-thuth@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-07-18aarch64: Use arch_init to configure sveRichard Henderson
Adjust some of the aarch64 code to look at the reginfo struct instead of looking at test_sve, so that we do not need to pass the --test-sve option in order to dump sve trace files. Diagnose EINVAL as either cpu or kernel does not support SVE. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20220708154700.18682-22-richard.henderson@linaro.org Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-07-18Compute reginfo_size based on the reginfoRichard Henderson
This will allow dumping of SVE frames without having to know the SVE vector length beforehand. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20220708154700.18682-19-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-07-18Use EXIT_FAILURE, EXIT_SUCCESSRichard Henderson
Some of the time we exit via the return value from main. This can make it easier to tell what it is we're returning. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20220708154700.18682-6-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-06-07risu_reginfo_i386: rework --xfeatures value parsingJan Bobek
Have the --xfeatures option accept "sse", "avx" and "avx512" in addition to a plain numerical value, purely for users' convenience. Don't fail silently when an incorrect value is specified, to avoid confusion. Suggested-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Jan Bobek <jan.bobek@gmail.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-06-07risu_reginfo_i386: replace xfeature constants with symbolic namesJan Bobek
The original code used "magic numbers", which made it unclear in some places. Include a reference to the Intel manual where the constants' meaning is discussed. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Jan Bobek <jan.bobek@gmail.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-06-07i386: Add avx512 state to reginfo_tRichard Henderson
The state expected for a given test must be specifically requested with the --xfeatures=mask command-line argument. This is recorded with the saved state so that it is obvious if the apprentice is given a different argument. Any features beyond what are present on the running cpu will read as zero. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-06-07risu_reginfo_i386: implement arch-specific reginfo interfaceJan Bobek
CPU-specific code in risu_reginfo_* is expected to define and export the following symbols: - arch_long_opts, arch_extra_help, process_arch_opt - reginfo_size - reginfo_init - reginfo_is_eq - reginfo_dump, reginfo_dump_mismatch Make risu_reginfo_i386.c implement this interface; and while we're at it, expand the support to x86_64 as well. Suggested-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Jan Bobek <jan.bobek@gmail.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-06-07risu_i386: move reginfo-related code to risu_reginfo_i386.cJan Bobek
In order to build risu successfully for i386, we need files risu_reginfo_i386.{h,c}; this patch adds the latter by extracting the relevant code from risu_i386.c. This patch is pure code motion; no functional changes were made. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Jan Bobek <jan.bobek@gmail.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>