[avr-gcc-list] split movhi to 2 movqi

2011-05-19 Thread Ilya Lesokhin
Hi, I would like to split a movhi instruction from an immediate to a const address to 2 movqi instructions. (I'm using gcc 4.5.3 but i dont think it matters in this case) My motivation is the following: Code in the form: OCR2RA = 1; compiles to: ldi r24, 0x01 ; 1 ldi r25, 0x00 ; 0 sts 0x00F7,

Re: [avr-gcc-list] split movhi to 2 movqi

2011-05-19 Thread Ilya Lesokhin
a little mistake: ofcourse the desired code is: ldi r24, 0x01 ; 1 sts 0x00F7, __zero_reg__ sts 0x00F6, r24 and not the one posed earlier. On Thu, May 19, 2011 at 12:18 PM, Ilya Lesokhin wrote: > Hi, > > I would like to split a movhi instruction from an immediate to a const >

Re: [avr-gcc-list] split movhi to 2 movqi

2011-05-20 Thread Ilya Lesokhin
On Thu, May 19, 2011 at 6:43 PM, Georg-Johann Lay wrote: > Ilya Lesokhin schrieb: > > Hi, >> >> I would like to split a movhi instruction from an immediate to a const >> address to 2 movqi instructions. >> (I'm using gcc 4.5.3 but i dont think it ma

Re: [avr-gcc-list] split movhi to 2 movqi

2011-05-20 Thread Ilya Lesokhin
i want to try to do it after the IRA phase, does anyone know if it makes sence, and if so, is there a macro which tells me that i'm after that phase? thanks. On Thu, May 19, 2011 at 7:38 PM, Ilya Lesokhin wrote: > > > On Thu, May 19, 2011 at 6:43 PM, Georg-Johann Lay wrote: >

Re: [avr-gcc-list] split movhi to 2 movqi

2011-05-20 Thread Ilya Lesokhin
On Fri, May 20, 2011 at 4:39 PM, Georg-Johann Lay wrote: > Ilya Lesokhin schrieb: > > On Thu, May 19, 2011 at 6:43 PM, Georg-Johann Lay wrote: > > > >> Ilya Lesokhin schrieb: > >> > >> Hi, > >>> I would like to split a movhi instruction

Re: [avr-gcc-list] split movhi to 2 movqi

2011-05-20 Thread Ilya Lesokhin
it works great, thanks for all the help. though i have a few more questions and i'd be glad if you could answer them for me. 1. when and by whom adjust_insn_length(...) is called? 2. to update my new pattern length all i have to do is recongenise it in adjust_insn_length(...) ? 3. to implement

Re: [avr-gcc-list] Incorrect code

2014-08-09 Thread Ilya Lesokhin
you didn't assign anything to ptr1. so *ptr1++ = *ptr2++; is undefined. On Sat, Aug 9, 2014 at 3:51 PM, Thomas D. Dean wrote: > Is this a problem with -Os? > > It looks like the compiler has decided that cs is always zero in the code > below. The cs calculation appears correct. > > In spi_copy

Re: avr-ld rjmp 2-off anomaly

2021-10-26 Thread Ilya Lesokhin
Seems to be the same issue as https://sourceware.org/bugzilla/show_bug.cgi?id=13402. On Wed, Oct 27, 2021 at 1:25 AM Karakó Tibor wrote: > Hi, > > I ran into a weird situation regarding whether I compile and link the > code in one go or in two phases. > > main.c: > > int main() { > asm("out