Problem with init of structure bit fields

2009-06-03 Thread Stelian Pop
) (reg:HI 36))) -1 (nil)) (insn 19 18 0 991118-1.c:12 (set (mem/s/j/c:HI (reg/f:HI 33) [0+2 S2 A16]) (reg:HI 35)) -1 (nil)) Any idea on what is happenning here ? Am I missing some standard patterns in my .md file ? Thanks ! -- Stelian Pop stel...@popies.net

Re: Problem with init of structure bit fields

2009-06-03 Thread Stelian Pop
On Wed, Jun 03, 2009 at 07:49:29PM +0200, Stelian Pop wrote: I'm doing a port of gcc 4.3.3 on a custom architecture and I'm having trouble when initializing the bit fields of a structure. Ok, after further analysis, it looks like a genuine bug in gcc, in store_bit_field_1(): when a field

Re: Problem with init of structure bit fields

2009-06-03 Thread Stelian Pop
the problem won't be seen on PowerPC unless someone does TI or OI bit fields... -- Stelian Pop stel...@popies.net

Issues with testsuite on constant pointer arithmetics

2009-05-06 Thread Stelian Pop
expected to fail on my port or is that something I've obviously done wrong ? Thanks. Stelian. -- Stelian Pop stel...@popies.net

Re: Issues with testsuite on constant pointer arithmetics

2009-05-06 Thread Stelian Pop
On Wed, May 06, 2009 at 12:19:55PM -0700, Ian Lance Taylor wrote: Stelian Pop stel...@popies.net writes: on TARGET_8W and TARGET_16: 920928-1.c: 1 struct{int c;}v; 2 static long i=((char*)(v.c)-(char*)v) 930326-1.c: 1 struct 2 { 3 char a, b, f[3]; 4

Re: Issues with testsuite on constant pointer arithmetics

2009-05-06 Thread Stelian Pop
On Wed, May 06, 2009 at 01:23:57PM -0700, Ian Lance Taylor wrote: Stelian Pop stel...@popies.net writes: I did spent a few hours looking but haven't had much luck. I tried tracing this one: 6 long i = s.f-s.b; and noticed that the pointers gets casted to 'long' (so they become

Re: Issues with testsuite on constant pointer arithmetics

2009-05-06 Thread Stelian Pop
On Wed, May 06, 2009 at 03:42:47PM -0700, Ian Lance Taylor wrote: Stelian Pop stel...@popies.net writes: There is something strange in your trees. Why did it convert the pointers to long int? Why did it not simply convert them to int? The fact that they are going to be assigned to a long

question on 16 bit registers with 32 bit pointers

2009-04-10 Thread Stelian Pop
? Thanks. -- Stelian Pop stel...@popies.net

Re: question on 16 bit registers with 32 bit pointers

2009-04-10 Thread Stelian Pop
On Fri, Apr 10, 2009 at 06:29:06PM +0100, Dave Korn wrote: Stelian Pop wrote: Hi, I'm (still) porting GCC to a 16 bit microcontroller, and I'm having a few issues with the way it handles memory accesses: this microcontroller can function in two modes: in one of them the pointers

Re: How to use a scratch register in jump pattern ?

2009-03-12 Thread Stelian Pop
globally reserves a register for the purpose of holding the target of long branches (well, the register is also used as link register for calls). Ok, so I'll reserve a register for indirect jumps too then. I was hoping to be able to avoid this. Thanks ! Stelian. -- Stelian Pop stel...@popies.net

Re: How to use a scratch register in jump pattern ?

2009-03-11 Thread Stelian Pop
On Wed, Mar 11, 2009 at 08:33:34AM +0100, Georg-Johann Lay wrote: Stelian Pop schrieb: On Tue, Mar 10, 2009 at 10:18:10PM +0100, Georg-Johann Lay wrote: Note that no one is generating an insn that looks like *jump. Maybe insn combine and peep2 would try to build such a pattern

How to use a scratch register in jump pattern ?

2009-03-10 Thread Stelian Pop
out of range' from the assembler because the 'rjmp' instruction was used for deplacements bigger than 2048. How can this happen, since my '(set (attr length)' code explicitly sets the correct value each time ? Thanks, -- Stelian Pop stel...@popies.net

Re: How to use a scratch register in jump pattern ?

2009-03-10 Thread Stelian Pop
On Tue, Mar 10, 2009 at 05:20:28PM +, Dave Korn wrote: Stelian Pop wrote: I need to use a scratch register in the jump pattern and I can't figure out how to do it properly. My problem is that the microcontroller I'm porting gcc onto does not permit far jumps, those must be done

Re: How to use a scratch register in jump pattern ?

2009-03-10 Thread Stelian Pop
each time ? You set the length explicitely, so the default does not matter. Yes, this was exactly my point. It shouldn't matter, but it does, because it does different things when I change the default value. Stelian. -- Stelian Pop stel...@popies.net

Re: Scratch register in jump instruction ?

2008-07-24 Thread Stelian Pop
Le lundi 21 juillet 2008 à 15:37 +0200, Stelian Pop a écrit : I have a problem with the jump instructions: my direct jumps are very limited in displacements, and I want to always generate indirect jumps instead. Ok, no answer yet. Does this mean that my question is really dumb ? Or does

Scratch register in jump instruction ?

2008-07-21 Thread Stelian Pop
, in_cfglayout=0 '\0') at /wip/src/gcc-4.3.1/gcc/cfgrtl.c:822 #4 0x08360a08 in cleanup_cfg (mode=1) [...] Thanks, -- Stelian Pop [EMAIL PROTECTED]

Re: Problem with reloading in a new backend...

2008-04-15 Thread Stelian Pop
Le lundi 14 avril 2008 à 18:27 -0700, Jim Wilson a écrit : On Tue, 2008-04-15 at 00:06 +0200, Stelian Pop wrote: - I had to add a PLUS case in PREFERRED_RELOAD_CLASS() or else reload kept generating incorrect insn (putting constants into EVEN_REGS for example). I'm not sure

Re: Problem with reloading in a new backend...

2008-04-14 Thread Stelian Pop
Le vendredi 11 avril 2008 à 11:14 -0700, Jim Wilson a écrit : Stelian Pop wrote: #define PREFERRED_RELOAD_CLASS(X, CLASS)\ ((CONSTANT_P(X)) ? EIGHT_REGS : \ (MEM_P(X)) ? EVEN_REGS : CLASS) #define PREFERRED_OUTPUT_RELOAD_CLASS(X, CLASS

Re: Problem with reloading in a new backend...

2008-04-11 Thread Stelian Pop
Le vendredi 11 avril 2008 à 11:14 -0700, Jim Wilson a écrit : Stelian Pop wrote: #define PREFERRED_RELOAD_CLASS(X, CLASS)\ ((CONSTANT_P(X)) ? EIGHT_REGS : \ (MEM_P(X)) ? EVEN_REGS : CLASS) #define PREFERRED_OUTPUT_RELOAD_CLASS(X, CLASS

Re: Problem with reloading in a new backend...

2008-04-10 Thread Stelian Pop
that such adds don't change the flags (i.e. a compare/jump pair must not have a flag-modifying add between them). I think this won't happen because I emit the compare/conditional branch insn at the same time, in beq/bne/bgt... etc define_insn() (like many other targets). Thanks. -- Stelian Pop

Re: Problem with reloading in a new backend...

2008-04-10 Thread Stelian Pop
Le jeudi 10 avril 2008 à 15:48 +0200, Stelian Pop a écrit : Le mercredi 09 avril 2008 à 18:21 -0400, DJ Delorie a écrit : Maybe I should reserve a special register for this usage (say r0). That might be the only way, yes. Ok, I reserved r0 (BP_REGNUM) for such reloads, and I'm

Re: Problem with reloading in a new backend...

2008-04-10 Thread Stelian Pop
}, \ { 0x7FFE }, \ { (1LL FIRST_PSEUDO_REGISTER) - 1 }\ } ... (define_register_constraint z EVEN_REGS Even registers (r0,r2,r4, @dots{} r30)) -- Stelian Pop [EMAIL PROTECTED]

Re: Problem with reloading in a new backend...

2008-04-10 Thread Stelian Pop
only 2^16 RAM addresses. In fact, this microcontroller is able to address 2^24, and two registers are used for indirect accesses (Rx and Rx+1, where x is even), this is the reason why only even registers are allowed in indirect addressing... -- Stelian Pop [EMAIL PROTECTED]

Re: Problem with reloading in a new backend...

2008-04-09 Thread Stelian Pop
of my GO_IF_LEGITIMATE_ADDRESS() ), so gcc crashes with 'unrecognizable insn'. So what's the proper way to tell that indirect addressing is allowed, but not with an offset ? Should I define an extra define_expand to deal with those insns ? Thanks again, Stelian. -- Stelian Pop [EMAIL PROTECTED]

Re: Problem with reloading in a new backend...

2008-04-09 Thread Stelian Pop
, this looks exactly like what I needed, thanks! I'll try this and come back afterwards. -- Stelian Pop [EMAIL PROTECTED]

Re: Problem with reloading in a new backend...

2008-04-09 Thread Stelian Pop
Le mercredi 09 avril 2008 à 21:19 +0200, Stelian Pop a écrit : You might need to define LEGITIMIZE_RELOAD_ADDRESS, or at least LEGITIMIZE_ADDRESS. I don't know if reload has assumptions about such offsets, but the m32c port has a limit on the offset range so it might help you figure out

Problem with reloading in a new backend...

2008-04-08 Thread Stelian Pop
who can explain to me what's wrong here, and give a clue on what I must do to fix it. Stelian. -- Stelian Pop [EMAIL PROTECTED]