https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120347

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Arnd Bergmann from comment #4)
> I have reduced another build failure (in some configurations but many files)
> and found that also to be caused by -flate-combine-instructions
> 
> https://godbolt.org/z/7o1KE4jd3
> void c(short *d) { asm("strh %1, %0" : : "Qo"(*(d + 1000)), "r"(0)); }
> 
> arm-linux-gnueabihf-gcc -O2 -march=armv7-a -marm test.c
> /tmp/ccw7KGmj.s:77: Error: bad immediate value for 8-bit offset (2000)
> 
> I've added -fno-late-combine-instructions to the kernel cflags on my test
> box now, which seems to address all of these. Let me know if I should open a
> separate report for that.

That is a different issue overall and I think it is invalid inline-asm:
(define_memory_constraint "Q"
 "@internal
  An address that is a single base register."
 (and (match_code "mem")
      (match_test "REG_P (XEXP (op, 0))")))

'o' definition:
A memory operand is allowed, but only if the address is offsettable. This means
that adding a small integer (actually, the width in bytes of the operand, as
determined by its machine mode) may be added to the address and the result is
also a valid memory address.

Reply via email to