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.




Reply via email to