From 1270b047fdc68d89f05668ed919d17f5fceeba2a Mon Sep 17 00:00:00 2001 From: Palmer Dabbelt Date: Mon, 6 Nov 2017 13:22:42 -0800 Subject: RISC-V: Add satp as an alias for sptbr The RISC-V privileged ISA changed the name of sptbr (Supervisor Page Table Base Register) to satp (Supervisor Address Translation and Protection) to reflect the fact it could be used for more than just paging. This patch adds an alias, as they're the same register. include/ChangeLog 2017-11-06 Palmer Dabbelt * opcode/riscv-opc.h (sptbr): Rename to satp. (CSR_SPTBR): Rename to CSR_SATP. (sptbr): Alias to CSR_SATP. gas/ChangeLog 2017-11-06 Palmer Dabbelt * testsuite/gas/riscv/satp.d: New test. testsuite/gas/riscv/satp.s: Likewise. testsuite/gas/riscv/riscv.exp: Likewise. config/tc-riscv.c (md_begin): Handle CSR aliases. --- gas/config/tc-riscv.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gas/config/tc-riscv.c') diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c index f4276c9..c8955a6 100644 --- a/gas/config/tc-riscv.c +++ b/gas/config/tc-riscv.c @@ -643,6 +643,7 @@ md_begin (void) hash_reg_names (RCLASS_FPR, riscv_fpr_names_abi, NFPR); #define DECLARE_CSR(name, num) hash_reg_name (RCLASS_CSR, #name, num); +#define DECLARE_CSR_ALIAS(name, num) DECLARE_CSR(name, num); #include "opcode/riscv-opc.h" #undef DECLARE_CSR -- cgit v1.1