Re: [PATCH] RISC-V: Add tests for constraints "i" and "s"

2024-02-21 Thread Fangrui Song
On Wed, Feb 21, 2024 at 4:07 PM Kito Cheng wrote: > > LGTM, but I am OoO today, will commit that once I have laptop :p Thanks! Dropped the gcc/doc/md.texi change and pushed as commit 9ca4c1bf082a4691482ca9f4814fea68f04e2cb3 (I have write-after-approval now:) ) > Fangrui Song 於 2024年2月22日 週四

Re: [PATCH] RISC-V: Add tests for constraints "i" and "s"

2024-02-21 Thread Kito Cheng
LGTM, but I am OoO today, will commit that once I have laptop :p Fangrui Song 於 2024年2月22日 週四 05:54 寫道: > On Tue, Feb 13, 2024 at 10:36 PM Fangrui Song wrote: > > > > The constraints "i" and "s" can be used with a symbol that binds > > externally, e.g. > > ``` > > namespace ns { extern int

Re: [PATCH] RISC-V: Add tests for constraints "i" and "s"

2024-02-21 Thread Fangrui Song
On Tue, Feb 13, 2024 at 10:36 PM Fangrui Song wrote: > > The constraints "i" and "s" can be used with a symbol that binds > externally, e.g. > ``` > namespace ns { extern int var, a[4]; } > void foo() { > asm(".pushsection .xxx,\"aw\"; .dc.a %0; .popsection" :: "s"(::var)); > asm(".reloc .,

[PATCH] RISC-V: Add tests for constraints "i" and "s"

2024-02-13 Thread Fangrui Song
The constraints "i" and "s" can be used with a symbol that binds externally, e.g. ``` namespace ns { extern int var, a[4]; } void foo() { asm(".pushsection .xxx,\"aw\"; .dc.a %0; .popsection" :: "s"(::var)); asm(".reloc ., BFD_RELOC_NONE, %0" :: "s"(::a[3])); } ``` gcc/testsuite/ChangeLog: