2016-08-01 10:56 GMT+03:00 Georg-Johann Lay <a...@gjlay.de>: > The length computation of "branch" flavour insn length attribute computed a > length one instruction too short, e.g. in the following test case: > > #define N0(N) if (X++ < N) __builtin_avr_nop() > > #define N1(N) N0(N);N0(N);N0(N);N0(N);N0(N);N0(N);N0(N);N0(N);N0(N);N0(N) > #define N2(N) N1(N);N1(N);N1(N);N1(N);N1(N);N1(N);N1(N);N1(N);N1(N);N1(N) > #define N3(N) N2(N);N2(N);N2(N);N2(N);N2(N);N2(N);N2(N);N2(N);N2(N);N2(N) > #define N4(N) N3(N);N3(N);N3(N);N3(N);N3(N);N3(N);N3(N);N3(N);N3(N);N3(N) > > void bra_63 (unsigned char x) > { > if (x > 0) > { > unsigned X = 0; > N4 (63); > } > } > > void bra_2045 (unsigned char x) > { > if (x > 0) > { > unsigned X = 0; > N4 (2045); > } > } > > when compiled for MCU with JMP instruction like -mmcu=atmega168 > > Ok to apply? > > Johann > > > * config/avr/avr.md (length) [branch]: Correct insn length > attribute for forward branches.
Please apply.