aboutsummaryrefslogtreecommitdiff
path: root/risu_reginfo_arm.c
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2018-06-22 15:11:56 +0100
committerPeter Maydell <peter.maydell@linaro.org>2018-07-02 13:08:21 +0100
commit6283dc82df05bcde52d0a6ba3a1c10443db1593d (patch)
treeb6bcd858162ba5c090d71c0c0a882a9f0269aa40 /risu_reginfo_arm.c
parentf4639235768641b8adc520f515635c57e576c92c (diff)
risu: move optional args to each architecture
The key variables here are: *arch_long_opts and *arch_extra_help. If they are not NULL then we concatenate the extra options to appropriate structure to enable the support. Adding architecture short options is not supported. This also includes moving the ARM specific test_fp_exc/test-fp-exc into ARM specific code. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20180622141205.16306-14-alex.bennee@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'risu_reginfo_arm.c')
-rw-r--r--risu_reginfo_arm.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/risu_reginfo_arm.c b/risu_reginfo_arm.c
index 6b9ee7b..5acad02 100644
--- a/risu_reginfo_arm.c
+++ b/risu_reginfo_arm.c
@@ -13,12 +13,23 @@
#include <stdio.h>
#include <ucontext.h>
#include <string.h>
+#include <getopt.h>
#include "risu.h"
#include "risu_reginfo_arm.h"
extern int insnsize(ucontext_t *uc);
+/* Should we test for FP exception status bits? */
+static int test_fp_exc;
+static struct option extra_opts[] = {
+ {"test-fp-exc", no_argument, &test_fp_exc, 1},
+ {0, 0, 0, 0}
+};
+
+void *arch_long_opts = &extra_opts[0];
+char *arch_extra_help = " --test-fp-exc Check FP exception bits when comparing\n";
+
static void reginfo_init_vfp(struct reginfo *ri, ucontext_t *uc)
{
/* Read VFP registers. These live in uc->uc_regspace, which is