summaryrefslogtreecommitdiffstats
path: root/backends/riscv_init.c
diff options
context:
space:
mode:
authorAndreas Schwab <[email protected]>2018-06-13 12:28:00 +0200
committerMark Wielaard <[email protected]>2018-06-20 13:02:48 +0200
commit6ad1343200116145aae9e3f04f4973a7aaf3a999 (patch)
tree3351f37ff095a6c55ca92744dd973d63f616456a /backends/riscv_init.c
parent9e16a100bf8e0d43415253fe8cfd3ba1d8e637d1 (diff)
backends: add abi_cfi and register_info callbacks for RISC-V
From https://github.com/riscv/riscv-isa-manual/raw/master/release/riscv-spec-v2.2.pdf and GCC source. Signed-off-by: Andreas Schwab <[email protected]>
Diffstat (limited to 'backends/riscv_init.c')
-rw-r--r--backends/riscv_init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/backends/riscv_init.c b/backends/riscv_init.c
index 80be86d3..5588a6b7 100644
--- a/backends/riscv_init.c
+++ b/backends/riscv_init.c
@@ -51,6 +51,10 @@ riscv_init (Elf *elf __attribute__ ((unused)),
eh->name = "RISC-V";
riscv_init_reloc (eh);
HOOK (eh, reloc_simple_type);
+ HOOK (eh, register_info);
+ HOOK (eh, abi_cfi);
+ /* gcc/config/ #define DWARF_FRAME_REGISTERS. */
+ eh->frame_nregs = 66;
HOOK (eh, check_special_symbol);
HOOK (eh, machine_flag_check);