From: Nelson Chu Date: Tue, 8 Jul 2025 09:07:24 +0000 (+0800) Subject: RISC-V: Fixed mapping symbol for .option norvc directive X-Git-Tag: binutils-2_45~140 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1edefea39ff27ed2d4aed4e45ed416f3fbaf6098;p=thirdparty%2Fbinutils-gdb.git RISC-V: Fixed mapping symbol for .option norvc directive --- 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