summaryrefslogtreecommitdiffstats
path: root/target-xtensa/helper.c
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2015-07-01 13:00:29 +0300
committerMax Filippov <jcmvbkbc@gmail.com>2015-07-06 13:25:12 +0300
commit1479073b7e849fa03e5892eea0e0b5dadde1a98a (patch)
treee319568c0fc78a98afc712e1a7ac57a9650757a8 /target-xtensa/helper.c
parentddd44279fdbc545a9182cb642645af8a4672c267 (diff)
downloadhqemu-1479073b7e849fa03e5892eea0e0b5dadde1a98a.zip
hqemu-1479073b7e849fa03e5892eea0e0b5dadde1a98a.tar.gz
target-xtensa: fix gdb register map construction
Due to different gdb overlay organization between windowed/call0 configurations core import script doesn't always work correctly. Simplify the script: always copy complete gdb register map from overlay, count registers at core registerstion time. Update existing cores. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'target-xtensa/helper.c')
-rw-r--r--target-xtensa/helper.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/target-xtensa/helper.c b/target-xtensa/helper.c
index d84d259..76be50d 100644
--- a/target-xtensa/helper.c
+++ b/target-xtensa/helper.c
@@ -51,6 +51,20 @@ static void xtensa_core_class_init(ObjectClass *oc, void *data)
cc->gdb_num_core_regs = config->gdb_regmap.num_regs;
}
+void xtensa_finalize_config(XtensaConfig *config)
+{
+ unsigned i, n = 0;
+
+ if (config->gdb_regmap.num_regs) {
+ return;
+ }
+
+ for (i = 0; config->gdb_regmap.reg[i].targno >= 0; ++i) {
+ n += (config->gdb_regmap.reg[i].type != 6);
+ }
+ config->gdb_regmap.num_regs = n;
+}
+
void xtensa_register_core(XtensaConfigList *node)
{
TypeInfo type = {
OpenPOWER on IntegriCloud