Re: Question on cse_not_expected in explow.c:memory_address_addr_space()

2011-09-30 Thread Georg-Johann Lay
Paolo Bonzini schrieb: > On 09/28/2011 02:14 PM, Georg-Johann Lay wrote: >> This leads to unpleasant code. The machine can access all RAM >> locations by >> direct addressing. However, the resulting code is: >> >> foo: >> ldi r24,lo8(-86) ; 6*movqi/2[length = 1] >> ldi r30,lo8(

Re: Question on cse_not_expected in explow.c:memory_address_addr_space()

2011-09-30 Thread Paolo Bonzini
On 09/28/2011 02:14 PM, Georg-Johann Lay wrote: This leads to unpleasant code. The machine can access all RAM locations by direct addressing. However, the resulting code is: foo: ldi r24,lo8(-86) ; 6 *movqi/2[length = 1] ldi r30,lo8(-64) ; 34 *movhi/5

Question on cse_not_expected in explow.c:memory_address_addr_space()

2011-09-28 Thread Georg-Johann Lay
Hi, looking into PR50448 there is the following C code: typedef struct { unsigned char a,b,c,d; } SPI_t; #define SPIE (*(SPI_t volatile*) 0x0AC0) void foo (void) { SPIE.d = 0xAA; while (!(SPIE.c & 0x80)); SPIE.d = 0xBB; while (!(SPIE.c & 0x80)); } At .optimized, the .c and