From 1edefea39ff27ed2d4aed4e45ed416f3fbaf6098 Mon Sep 17 00:00:00 2001 From: Nelson Chu Date: Tue, 8 Jul 2025 17:07:24 +0800 Subject: [PATCH] RISC-V: Fixed mapping symbol for .option norvc directive --- gas/config/tc-riscv.c | 3 ++- gas/testsuite/gas/riscv/option-norvc.d | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c index 60e4f5bf813..cb21620b5ff 100644 --- a/gas/config/tc-riscv.c +++ b/gas/config/tc-riscv.c @@ -5076,7 +5076,8 @@ s_riscv_option (int x ATTRIBUTE_UNUSED) } else if (strcmp (name, "norvc") == 0) { - riscv_update_subset (&riscv_rps_as, "-c"); + riscv_update_subset (&riscv_rps_as, "-c,-zca,-zcd,-zcf,-zcb,-zce,-zcmp," + "-zcmt,-zcmop,-zclsd"); riscv_arch_str (xlen, riscv_rps_as.subset_list, true/* update */); riscv_set_rvc (false); } diff --git a/gas/testsuite/gas/riscv/option-norvc.d b/gas/testsuite/gas/riscv/option-norvc.d index c2647d382b3..6f36ed6c085 100644 --- a/gas/testsuite/gas/riscv/option-norvc.d +++ b/gas/testsuite/gas/riscv/option-norvc.d @@ -15,10 +15,14 @@ SYMBOL TABLE: 0+0c l .text 0+00 \$xrv64i2p0_f2p0_d2p0_c2p0 0+0e l .text 0+00 \$xrv64i2p0_f2p0_d2p0 0+12 l .text 0+00 \$xrv64i2p0_f2p0_d2p0_zca1p0 +0+14 l .text 0+00 \$xrv64i2p0_f2p0_d2p0 0+18 l .text 0+00 \$xrv32i2p0_f2p0_zca1p0_zcf1p0 +0+1a l .text 0+00 \$xrv32i2p0_f2p0 0+1e l .text 0+00 \$xrv64i2p0_f2p0_d2p0_zca1p0_zcd1p0 +0+20 l .text 0+00 \$xrv64i2p0_f2p0_d2p0 0+24 l .text 0+00 \$xrv32i2p0_zilsd1p0_zca1p0_zcb1p0_zclsd1p0 -0+30 l .text 0+00 \$xrv64i2p0_zca1p0_zcmop1p0_zcmp1p0_zcmt1p0 +0+28 l .text 0+00 \$xrv32i2p0_zilsd1p0 +0+30 l .text 0+00 \$xrv64i2p0 0+0 l d .riscv.attributes 0+00 .riscv.attributes -- 2.47.2