<div dir="ltr"><div>Okay, thanks for the suggestion.</div><div><br></div><div>Nelson</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, Jul 4, 2025 at 2:37 PM Kito Cheng <<a href="mailto:kito.cheng@gmail.com">kito.cheng@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Could you add some testcase with zcb? that might be an interesting<br>
case since zcb isn't really included in C-ext,<br>
but we may want to turn off when norvc.<br>
<br>
On Fri, Jul 4, 2025 at 1:43 PM Nelson Chu <<a href="mailto:nelson@rivosinc.com" target="_blank">nelson@rivosinc.com</a>> wrote:<br>
><br>
> ---<br>
>  gas/testsuite/gas/riscv/option-arch-rvc.d | 38 +++++++++++++++++++++++<br>
>  gas/testsuite/gas/riscv/option-arch-rvc.s | 35 +++++++++++++++++++++<br>
>  2 files changed, 73 insertions(+)<br>
>  create mode 100644 gas/testsuite/gas/riscv/option-arch-rvc.d<br>
>  create mode 100644 gas/testsuite/gas/riscv/option-arch-rvc.s<br>
><br>
> diff --git a/gas/testsuite/gas/riscv/option-arch-rvc.d b/gas/testsuite/gas/riscv/option-arch-rvc.d<br>
> new file mode 100644<br>
> index 00000000000..767854689cb<br>
> --- /dev/null<br>
> +++ b/gas/testsuite/gas/riscv/option-arch-rvc.d<br>
> @@ -0,0 +1,38 @@<br>
> +#as: -misa-spec=2.2 -march=rv64i<br>
> +#source: option-arch-rvc.s<br>
> +#objdump: -d --syms --special-syms -Mno-aliases<br>
> +<br>
> +.*:[   ]+file format .*<br>
> +<br>
> +SYMBOL TABLE:<br>
> +0+00 l    d  .text     0+00 .text<br>
> +0+00 l    d  .data     0+00 .data<br>
> +0+00 l    d  .bss      0+00 .bss<br>
> +0+00 l       .text     0+00 \$xrv64i2p0_c2p0<br>
> +0+02 l       .text     0+00 \$xrv64i2p0<br>
> +0+06 l       .text     0+00 \$xrv32i2p0_f2p0_c2p0<br>
> +0+08 l       .text     0+00 \$xrv32i2p0_f2p0<br>
> +0+0c l       .text     0+00 \$xrv32i2p0_f2p0_d2p0_c2p0<br>
> +0+0e l       .text     0+00 \$xrv32i2p0_f2p0_d2p0<br>
> +0+12 l       .text     0+00 \$xrv32i2p0_f2p0_d2p0_zca1p0<br>
> +0+16 l       .text     0+00 \$xrv32i2p0_f2p0_zca1p0_zcf1p0<br>
> +0+1a l       .text     0+00 \$xrv32i2p0_f2p0_d2p0_zca1p0_zcd1p0<br>
> +0+0 l    d  .riscv.attributes  0+00 .riscv.attributes<br>
> +<br>
> +<br>
> +Disassembly of section .text:<br>
> +<br>
> +0+000 <.text>:<br>
> +[      ]+[0-9a-f]+:[   ]+0001[         ]+c\.addi[      ]+zero,0<br>
> +[      ]+[0-9a-f]+:[   ]+00000013[     ]+addi[         ]+zero,zero,0<br>
> +[      ]+[0-9a-f]+:[   ]+6108[         ]+c\.ld[        ]+a0,0\(a0\)<br>
> +[      ]+[0-9a-f]+:[   ]+00052507[     ]+flw[  ]+fa0,0\(a0\)<br>
> +[      ]+[0-9a-f]+:[   ]+2108[         ]+c\.fld[       ]+fa0,0\(a0\)<br>
> +[      ]+[0-9a-f]+:[   ]+00053507[     ]+fld[  ]+fa0,0\(a0\)<br>
> +[      ]+[0-9a-f]+:[   ]+0001[         ]+c\.addi[      ]+zero,0<br>
> +[      ]+[0-9a-f]+:[   ]+0001[         ]+c\.addi[      ]+zero,0<br>
> +[      ]+[0-9a-f]+:[   ]+6108[         ]+c\.ld[        ]+a0,0\(a0\)<br>
> +[      ]+[0-9a-f]+:[   ]+6108[         ]+c\.ld[        ]+a0,0\(a0\)<br>
> +[      ]+[0-9a-f]+:[   ]+2108[         ]+c\.fld[       ]+fa0,0\(a0\)<br>
> +[      ]+[0-9a-f]+:[   ]+2108[         ]+c\.fld[       ]+fa0,0\(a0\)<br>
> +#...<br>
> diff --git a/gas/testsuite/gas/riscv/option-arch-rvc.s b/gas/testsuite/gas/riscv/option-arch-rvc.s<br>
> new file mode 100644<br>
> index 00000000000..3e48bc5ad60<br>
> --- /dev/null<br>
> +++ b/gas/testsuite/gas/riscv/option-arch-rvc.s<br>
> @@ -0,0 +1,35 @@<br>
> +.option rvc<br>
> +nop<br>
> +.option norvc<br>
> +nop<br>
> +<br>
> +.option push<br>
> +.option arch, rv32i<br>
> +.option arch, +c,+f<br>
> +flw fa0, 0(a0)<br>
> +.option arch, -c<br>
> +flw fa0, 0(a0)<br>
> +.option pop<br>
> +<br>
> +.option arch, +c,+d<br>
> +fld fa0, 0(a0)<br>
> +.option arch, -c<br>
> +fld fa0, 0(a0)<br>
> +<br>
> +.option arch, +zca<br>
> +nop<br>
> +.option arch, -c<br>
> +nop<br>
> +<br>
> +.option push<br>
> +.option arch, rv32i<br>
> +.option arch, +zcf<br>
> +flw fa0, 0(a0)<br>
> +.option arch, -c<br>
> +flw fa0, 0(a0)<br>
> +.option pop<br>
> +<br>
> +.option arch, +zcd<br>
> +fld fa0, 0(a0)<br>
> +.option arch, -c<br>
> +fld fa0, 0(a0)<br>
> --<br>
> 2.39.5 (Apple Git-154)<br>
><br>
</blockquote></div></div>