Skip to content

Commit

Permalink
target/xtensa: add .inc. to non-top level source file names
Browse files Browse the repository at this point in the history
Fix definitions of existing cores and core importing script to follow
the rule of naming non-top level source files.

Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
  • Loading branch information
jcmvbkbc committed Mar 26, 2018
1 parent 7b93d78 commit dda2441
Show file tree
Hide file tree
Showing 15 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions target/xtensa/core-dc232b.c
Expand Up @@ -35,15 +35,15 @@
#include "overlay_tool.h"

#define xtensa_modules xtensa_modules_dc232b
#include "core-dc232b/xtensa-modules.c"
#include "core-dc232b/xtensa-modules.inc.c"

static XtensaConfig dc232b __attribute__((unused)) = {
.name = "dc232b",
.gdb_regmap = {
.num_regs = 120,
.num_core_regs = 52,
.reg = {
#include "core-dc232b/gdb-config.c"
#include "core-dc232b/gdb-config.inc.c"
}
},
.isa_internal = &xtensa_modules,
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions target/xtensa/core-dc233c.c
Expand Up @@ -36,15 +36,15 @@
#include "overlay_tool.h"

#define xtensa_modules xtensa_modules_dc233c
#include "core-dc233c/xtensa-modules.c"
#include "core-dc233c/xtensa-modules.inc.c"

static XtensaConfig dc233c __attribute__((unused)) = {
.name = "dc233c",
.gdb_regmap = {
.num_regs = 121,
.num_core_regs = 52,
.reg = {
#include "core-dc233c/gdb-config.c"
#include "core-dc233c/gdb-config.inc.c"
}
},
.isa_internal = &xtensa_modules,
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions target/xtensa/core-de212.c
Expand Up @@ -36,13 +36,13 @@
#include "overlay_tool.h"

#define xtensa_modules xtensa_modules_de212
#include "core-de212/xtensa-modules.c"
#include "core-de212/xtensa-modules.inc.c"

static XtensaConfig de212 __attribute__((unused)) = {
.name = "de212",
.gdb_regmap = {
.reg = {
#include "core-de212/gdb-config.c"
#include "core-de212/gdb-config.inc.c"
}
},
.isa_internal = &xtensa_modules,
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion target/xtensa/core-fsf.c
Expand Up @@ -36,7 +36,7 @@
#include "overlay_tool.h"

#define xtensa_modules xtensa_modules_fsf
#include "core-fsf/xtensa-modules.c"
#include "core-fsf/xtensa-modules.inc.c"

static XtensaConfig fsf __attribute__((unused)) = {
.name = "fsf",
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions target/xtensa/core-sample_controller.c
Expand Up @@ -36,13 +36,13 @@
#include "overlay_tool.h"

#define xtensa_modules xtensa_modules_sample_controller
#include "core-sample_controller/xtensa-modules.c"
#include "core-sample_controller/xtensa-modules.inc.c"

static XtensaConfig sample_controller __attribute__((unused)) = {
.name = "sample_controller",
.gdb_regmap = {
.reg = {
#include "core-sample_controller/gdb-config.c"
#include "core-sample_controller/gdb-config.inc.c"
}
},
.isa_internal = &xtensa_modules,
Expand Down
8 changes: 4 additions & 4 deletions target/xtensa/import_core.sh
Expand Up @@ -22,7 +22,7 @@ mkdir -p "$TARGET"
tar -xf "$OVERLAY" -C "$TARGET" --strip-components=1 \
--xform='s/core/core-isa/' config/core.h
tar -xf "$OVERLAY" -O gdb/xtensa-config.c | \
sed -n '1,/*\//p;/XTREG/,/XTREG_END/p' > "$TARGET"/gdb-config.c
sed -n '1,/*\//p;/XTREG/,/XTREG_END/p' > "$TARGET"/gdb-config.inc.c
#
# Fix up known issues in the xtensa-modules.c
#
Expand All @@ -33,7 +33,7 @@ tar -xf "$OVERLAY" -O binutils/xtensa-modules.c | \
-e '/^uint32 \*bypass_entry(int i)/,/}/d' \
-e '/^#include "ansidecl.h"/d' \
-e '/^Slot_[a-zA-Z0-9_]\+_decode (const xtensa_insnbuf insn)/,/^}/s/^ return 0;$/ return XTENSA_UNDEFINED;/' \
> "$TARGET"/xtensa-modules.c
> "$TARGET"/xtensa-modules.inc.c

cat <<EOF > "${TARGET}.c"
#include "qemu/osdep.h"
Expand All @@ -47,13 +47,13 @@ cat <<EOF > "${TARGET}.c"
#include "overlay_tool.h"
#define xtensa_modules xtensa_modules_$NAME
#include "core-$NAME/xtensa-modules.c"
#include "core-$NAME/xtensa-modules.inc.c"
static XtensaConfig $NAME __attribute__((unused)) = {
.name = "$NAME",
.gdb_regmap = {
.reg = {
#include "core-$NAME/gdb-config.c"
#include "core-$NAME/gdb-config.inc.c"
}
},
.isa_internal = &xtensa_modules,
Expand Down

0 comments on commit dda2441

Please sign in to comment.