On Tue, Nov 3, 2020 at 9:51 PM Richard Sandiford <richard.sandif...@arm.com> wrote: > > Vladimir Makarov via Gcc-patches <gcc-patches@gcc.gnu.org> writes: > > On 2020-10-27 2:53 a.m., Hongtao Liu wrote: > >> Hi: > >> For inline asm, there could be an operand like (not (mem:)), it's > >> not a valid operand for normal memory constraint. > >> Bootstrap is ok, regression test is ok for make check > >> RUNTESTFLAGS="--target_board='unix{-m32,}'" > >> > >> gcc/ChangeLog > >> PR target/97540 > >> * ira.c: (ira_setup_alts): Extract memory from operand only > >> for special memory constraint. > >> * recog.c (asm_operand_ok): Ditto. > >> * lra-constraints.c (process_alt_operands): MEM_P is > >> required for normal memory constraint. > >> > >> gcc/testsuite/ChangeLog > >> * gcc.target/i386/pr97540.c: New test. > >> > > I understand Richard's concerns and actually these concerns were my > > motivations to constraint possible cases for extract_mem_from_operand in > > the original patch introducing the function. > > > > If Richard proposes a better solution we will reconsider the current > > approach and revert the changes if it is necessary. > > > > Meanwhile I am approving this patch. I hope it will not demotivate > > Richard's attempt to find a better solution. > > OK, that's fine with me. I might come back to this next stage 1, > depending on how things turn out. > > Richard
Thanks for all your comments, patch committed. And I'm not going to add "Br" to more patterns until the final solution is in place. -- BR, Hongtao