Re: [PATCH] target/avr: fix long address calculation

2022-11-17 Thread Richard Henderson
On 11/17/22 08:11, Pavel Dovgalyuk wrote: AVR ELPMX instruction (and some others) use three registers to form long 24-bit address from RAMPZ and two 8-bit registers. RAMPZ stores shifted 8 bits like ff to simplify address calculation. This patch fixes full address calculation in function gen_

[PATCH] target/avr: fix long address calculation

2022-11-17 Thread Pavel Dovgalyuk
AVR ELPMX instruction (and some others) use three registers to form long 24-bit address from RAMPZ and two 8-bit registers. RAMPZ stores shifted 8 bits like ff to simplify address calculation. This patch fixes full address calculation in function gen_get_addr by changing the mess in offsets of