From 96462b012988d35ebb1137a2ad9fd0a96547d79a Mon Sep 17 00:00:00 2001 From: Shihua Date: Tue, 20 Sep 2022 17:45:04 +0800 Subject: RISC-V: Implement Ztso extension This patch support ZTSO extension. It will turn on the tso flag for elf_flags once we have enabled Ztso extension. This is intended to implement v0.1 of the proposed specification which can be found in Chapter 25 of, https://github.com/riscv/riscv-isa-manual/releases/download/draft-20220723-10eea63/riscv-spec.pdf. bfd\ChangeLog: * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Set TSO flag. * elfxx-riscv.c: Add Ztso's arch. binutils\ChangeLog: * readelf.c (get_machine_flags): Set TSO flag. gas\ChangeLog: * config/tc-riscv.c (riscv_set_tso): Ditto. (riscv_set_arch): Ditto. * testsuite/gas/riscv/ztso.d: New test. include\ChangeLog: * elf/riscv.h (EF_RISCV_TSO): Ditto. --- binutils/readelf.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'binutils/readelf.c') diff --git a/binutils/readelf.c b/binutils/readelf.c index cafba9a4f56..b1dbcad06f5 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -4079,6 +4079,9 @@ get_machine_flags (Filedata * filedata, unsigned e_flags, unsigned e_machine) if (e_flags & EF_RISCV_RVE) strcat (buf, ", RVE"); + if (e_flags & EF_RISCV_TSO) + strcat (buf, ", TSO"); + switch (e_flags & EF_RISCV_FLOAT_ABI) { case EF_RISCV_FLOAT_ABI_SOFT: -- cgit v1.2.3