Hi! On Thu, May 16, 2024 at 02:56:49PM +0800, Jiufu Guo wrote: > Jiufu Guo <guoji...@linux.ibm.com> writes: > > Segher Boessenkool <seg...@kernel.crashing.org> writes: > >> On Tue, May 14, 2024 at 05:53:56PM +0800, Jiufu Guo wrote: > >>> Thanks so much for your great review! > >>> Reference other messages, I'm wondering "invalid %%a value" may be > >>> acceptable, or "invalid %%a address expression in TOC" maybe better. > >> > >> "%%a requires a memory operand"? Maybe even print out the actual > >> operand given, too. > > > > Thanks! I updated the code using: > > "%%a requires a memory reference operand", since the actual operand > > is treated as the address. > > I suspect one thing here: if "%%a requires memory" is accurate vs. > "%%a requires a memory reference". > > Reference the words from doc: > https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#Generic-Operand-Modifiers > a: Substitute a memory reference, with the actual operand treated as the > address. > > And for below code: > '("#%a0" : :"m"(x))' is not accepted.
Yeah, it always confuses me. Sorry. The operand is the actual address. > While '("#%a0" : :"r"(&x))' is ok. > > So, it may be more accurate that: "%%a" as requirement of address of > memory. That sounds good yes. Segher