2016-07-19 13:31 GMT+03:00 Georg-Johann Lay <a...@gjlay.de>: > This patch tries to improve the bloated code we are currently generating for > AVR_TINY. It's mostly about printing the memory loads and stores and more > usage of reg_unused_after to print shorter instruction sequences in some > cases. > > Ok for trunk? > > I also played around with PLUS in legitimate_address_p and > legitimize_address and got better code, but the problem with such changes is > that almost all tests for such small devices are failing and no reasonable > portion of the testsuite will pass. > > I don't even know if anybody is using avr_tiny + avr-gcc or if users are > resorting to assembler. >
Keep Calm and Carry On ;-) > Johann > > > gcc/ > (avr_legitimize_address) [AVR_TINY]: Force constant addresses > outside [0,0xc0] into a register. > (avr_out_movhi_r_mr_reg_no_disp_tiny): Pass insn. And handle > cases where the base address register is unused after. > (avr_out_movhi_r_mr_reg_disp_tiny): Same. > (avr_out_movhi_mr_r_reg_disp_tiny): Same. > (avr_out_store_psi_reg_disp_tiny): Same. > > gcc/testsuite/ > * gcc.target/avr/torture/get-mem.c: New test. > * gcc.target/avr/torture/set-mem.c: New test. Approved.