Hello all, I am doing a port for a 32bit target in GCC 4.4.0. Of the addressing modes that are allowed by my target the one with (base register + offset) is restrictive in QImode. The restriction is that if the base register is not Stack Pointer then this kind of address cannot come in a load instruction but only in store instruction.
To implement this i added constrains for all supported memory operations in QImode. So the pattern is as follows (define_insn "movqi" [(set (match_operand:QI 0 "nonimmediate_operand" "=b,b,d,t,d, b,Ss0, Ss1, a,Se1, Sb2, b,Sd3, d,Se0") (match_operand:QI 1 "general_operand" "I, L,d,d,t, Ss0,b, b, Se1,a, b, Sd3,b, Se0,d"))] where d is data registers a is address registers b is data and address registers Sb2 is Rn + offset addressing mode Sd3 is SP + offset addressing mode Se0 - (Rn), (Rn)+, (Rn)-, (Rn + Ri) and Post modify register addressing mode Se1 - Se0 excluding Post modify register addressing mode I believe that there are enough combinations available for the reload to try for alternate addressing mode if it encounters the restrictive addressing mode. But I am still getting the following error main1.c:11: error: insn does not satisfy its constraints: (insn 30 29 7 2 main1.c:9 (set (reg:QI 2 d2 [orig:61 <variable>.a+1 ] [61]) (mem/s/j:QI (plus:SI (reg:SI 16 r0) (const_int 1 [0x1])) [0 <variable>.a+1 S1 A8])) 41 {movqi} (nil)) main1.c:11: internal compiler error: in reload_cse_simplify_operands, at postreload.c:396 So what am i doing wrong? Cant this scenario be solved by the reload pass? How can generate instructions with the QImode restriction? Regards, Shafi