diff options
| author | Max Filippov | 2017-11-01 03:14:20 +0100 |
|---|---|---|
| committer | Max Filippov | 2017-12-19 06:26:19 +0100 |
| commit | 2557c3adf07ffcf12316afdbdecedfd260c77853 (patch) | |
| tree | b929c8156fd4036a59d378a4d825186be69a5b04 /target | |
| parent | target/xtensa: extract FPU2000 opcode translators (diff) | |
| download | qemu-2557c3adf07ffcf12316afdbdecedfd260c77853.tar.gz qemu-2557c3adf07ffcf12316afdbdecedfd260c77853.tar.xz qemu-2557c3adf07ffcf12316afdbdecedfd260c77853.zip | |
target/xtensa: update import_core.sh script for libisa
Extract xtensa-modules.c from the overlay, fix up known issues, include
it into the core-$NAME.c.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'target')
| -rwxr-xr-x | target/xtensa/import_core.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/target/xtensa/import_core.sh b/target/xtensa/import_core.sh index cebb6e9c4c..32255eea9b 100755 --- a/target/xtensa/import_core.sh +++ b/target/xtensa/import_core.sh @@ -23,6 +23,17 @@ 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 +# +# Fix up known issues in the xtensa-modules.c +# +tar -xf "$OVERLAY" -O binutils/xtensa-modules.c | \ + sed -e 's/\(xtensa_opcode_encode_fn.*\[\] =\)/static \1/' \ + -e '/^int num_bypass_groups()/,/}/d' \ + -e '/^int num_bypass_group_chunks()/,/}/d' \ + -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 cat <<EOF > "${TARGET}.c" #include "qemu/osdep.h" @@ -35,6 +46,9 @@ cat <<EOF > "${TARGET}.c" #include "core-$NAME/core-isa.h" #include "overlay_tool.h" +#define xtensa_modules xtensa_modules_$NAME +#include "core-$NAME/xtensa-modules.c" + static XtensaConfig $NAME __attribute__((unused)) = { .name = "$NAME", .gdb_regmap = { @@ -42,6 +56,7 @@ static XtensaConfig $NAME __attribute__((unused)) = { #include "core-$NAME/gdb-config.c" } }, + .isa_internal = &xtensa_modules, .clock_freq_khz = $FREQ, DEFAULT_SECTIONS }; |
