This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: porting GCC to a micro with a very limited addressing mode --- what to write in LEGITIMATE_ADDRESS, LEGITIMIZE_ADDRESS and micro.md ?!
- From: Sergio Ruocco <sergio dot ruocco at gmail dot com>
- To: GCC <gcc at gcc dot gnu dot org>
- Date: Mon, 25 Jan 2010 19:21:04 +0100
- Subject: Re: porting GCC to a micro with a very limited addressing mode --- what to write in LEGITIMATE_ADDRESS, LEGITIMIZE_ADDRESS and micro.md ?!
- References: <4B5D8FC1.60205@gmail.com> <20100125152424.GA6408@iram.es>
- Reply-to: sergio dot ruocco at gmail dot com
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) register as the address, without any offset:
>>
>> LOAD (R2) R1 ; load R1 from memory at address (R2)
>> STORE R1 (R2) ; store R1 to memory at address (R2)
>>
>> As far as I can understand, this is more limited than the current
>> architectures supported by GCC that I found in the current gcc/config/*.
>
> The Itanium (ia64) has the same limited choice of addressing modes.
>
> Gabriel
Thanks Gabriel.
I dived into the ia64 md, but it is still unclear to me how the various
parts (macros, define_expand and define_insn in MD etc.) work together
to force the computation of a source/dest address plus offset into a
register... can anyone help me with this ?
Thanks,
Sergio