[PATCH 27/27] arcv3: Add support for ARCv3
cupertinomiranda at gmail.com
cupertinomiranda at gmail.com
Mon Apr 5 15:31:38 BST 2021
From: Cupertino Miranda <cmiranda at synopsys.com>
---
configure | 2 ++
default-configs/devices/arcv3-softmmu.mak | 7 +++++++
default-configs/targets/arcv3-softmmu.mak | 3 +++
include/disas/dis-asm.h | 2 ++
include/elf.h | 1 +
meson.build | 3 ++-
6 files changed, 17 insertions(+), 1 deletion(-)
create mode 100644 default-configs/devices/arcv3-softmmu.mak
create mode 100644 default-configs/targets/arcv3-softmmu.mak
diff --git a/configure b/configure
index 80d993fac7..cec3199434 100755
--- a/configure
+++ b/configure
@@ -682,6 +682,8 @@ elif check_define __aarch64__ ; then
cpu="aarch64"
elif check_define __arc__ ; then
cpu="arc"
+elif check_define __arc64__ ; then
+ cpu="arc64"
else
cpu=$(uname -m)
fi
diff --git a/default-configs/devices/arcv3-softmmu.mak b/default-configs/devices/arcv3-softmmu.mak
new file mode 100644
index 0000000000..0ce4176b2d
--- /dev/null
+++ b/default-configs/devices/arcv3-softmmu.mak
@@ -0,0 +1,7 @@
+# Default configuration for arc-softmmu
+
+CONFIG_SEMIHOSTING=n
+
+# Boards:
+#
+CONFIG_ARC_VIRT=y
diff --git a/default-configs/targets/arcv3-softmmu.mak b/default-configs/targets/arcv3-softmmu.mak
new file mode 100644
index 0000000000..af39b7c34d
--- /dev/null
+++ b/default-configs/targets/arcv3-softmmu.mak
@@ -0,0 +1,3 @@
+TARGET_ARCH=arcv3
+TARGET_BASE_ARCH=arc
+TARGET_XML_FILES= gdb-xml/arc-core-v3.xml gdb-xml/arc64-aux-minimal.xml gdb-xml/arc64-aux-other.xml
diff --git a/include/disas/dis-asm.h b/include/disas/dis-asm.h
index 8a0aa19bc2..15ec34c185 100644
--- a/include/disas/dis-asm.h
+++ b/include/disas/dis-asm.h
@@ -214,6 +214,8 @@ enum bfd_architecture
#define bfd_mach_arc_arcv2 5
#define bfd_mach_arc_arcv2em 6
#define bfd_mach_arc_arcv2hs 7
+#define bfd_mach_arcv3_64 0x10
+#define bfd_mach_arcv3_32 0x20
bfd_arch_m32r, /* Mitsubishi M32R/D */
#define bfd_mach_m32r 0 /* backwards compatibility */
bfd_arch_mn10200, /* Matsushita MN10200 */
diff --git a/include/elf.h b/include/elf.h
index 8c7c4ab8a9..14643f4c17 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -210,6 +210,7 @@ typedef struct mips_elf_abiflags_v0 {
#define EM_ARC_COMPACT 93 /* Synopsys ARCompact */
#define EM_ARC_COMPACT2 195 /* Synopsys ARCompact V2 */
+#define EM_ARC_COMPACT3_64 253 /* Synopsys ARCompact V3 ARC64 */
#define EM_MOXIE 223 /* Moxie processor family */
#define EM_MOXIE_OLD 0xFEED
diff --git a/meson.build b/meson.build
index a25425022e..5290ad9939 100644
--- a/meson.build
+++ b/meson.build
@@ -57,7 +57,7 @@ python = import('python').find_installation()
supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', 'sunos', 'linux']
supported_cpus = ['ppc', 'ppc64', 's390x', 'sparc64', 'riscv32', 'riscv64', 'x86', 'x86_64',
- 'arc', 'arm', 'aarch64', 'mips', 'mips64', 'sparc', 'sparc64']
+ 'arc', 'arc64', 'arm', 'aarch64', 'mips', 'mips64', 'sparc', 'sparc64']
cpu = host_machine.cpu_family()
targetos = host_machine.system()
@@ -1191,6 +1191,7 @@ config_target_mak = {}
disassemblers = {
'alpha' : ['CONFIG_ALPHA_DIS'],
'arc' : ['CONFIG_ARC_DIS'],
+ 'arc64' : ['CONFIG_ARC_DIS'],
'arm' : ['CONFIG_ARM_DIS'],
'avr' : ['CONFIG_AVR_DIS'],
'cris' : ['CONFIG_CRIS_DIS'],
--
2.20.1
More information about the linux-snps-arc
mailing list