Hi everyone,
I am porting GCC to a custom 16-bit microcontroller with very limited
addressing modes. Basically, it can only load/store using a (general
purpose) register as the address, without any offset:
LOAD (R2) R1; load R1 from memory at address (R2)
STORE R1 (R2) ; st
Gabriel Paubert wrote:
> On Mon, Jan 25, 2010 at 01:34:09PM +0100, Sergio Ruocco wrote:
>> Hi everyone,
>>
>> I am porting GCC to a custom 16-bit microcontroller with very limited
>> addressing modes. Basically, it can only load/store using a (general
>> purpose)
set.
>
> GCC will feed any memory accesses through this function to see if they
> are directly supported, and if not it will break them up into
> something smaller and try again.
>
> Hope that helps,
>
> -- Michael
>
>
> 2010/1/26 Sergio Ruocco :
>> Gabriel Pa
811 }
Could it be the REG+OFF which the LEGITIMATE_ADDRESS() rejects above?
But then why all the others before it get re-written by a call to
LEGITIMIZE_ ADDRESS() ?!
What is calling change_address_1() at the end of the compilation phase?
Thanks
Sergio
======
rtx x,
>bool strict_checking)
> {
> /* (mem reg) */
> if (REG_P (x)
> && _reg_ok (x, strict_checking)
> )
> {
> return 1;
> }
>
> return 0;
> }
>
> Note that this ISA only has indirect addres
s_constant(stack_pointer_rtx,-4)),hard_frame_pointer_rtx);
...
}
Sergio Ruocco wrote:
>
> Thanks Micheal for your code, I will try it... however, I think the
> problem that crashes my compiler may not lie in my LEGITIMATE/LEGITIMIZE
> ADDRESS macros, which are equivalent to many others (
Hi Radu,
Check both the GCC Wiki and the work done at IIT Bombay:
http://www.cse.iitb.ac.in/grc/reach.html
Activities->Workshops
They developed some tutorials on porting GCC and writing new backends, such as:
http://www.cse.iitb.ac.in/grc/gcc-workshop-09/
http://www.cse.iitb.ac.in/~uday/gcc-mini-
Dear All,
I am porting GCC to a 16 bit micro (with 16 bit bytes, thus
BITS_PER_UNIT=16, 16 bit ints become "QI"s etc).
The port compiles is nearly done and simple C programs, but now chokes
on a trivial line such as:
yyy(&array[4], &e, &p);
with this error:
xxx.c: In function ‘yyy’:
x