[fpc-devel] about mips/mipsel chaos

Mark Morgan Lloyd markMLl.fpc-devel at telemetry.co.uk
Fri Jun 8 19:36:05 CEST 2012


Fuxin Zhang wrote:
> hi buddys,
> 
>  Current trunk code use both CPUMIPS/CPUMIPS32/CPUMIPSEL etc. which make
> it easy to be wrong. For example, now the rtl code use only CPUMIPS, so
> for mipsel something will be wrong. It brings me some troubles while
> trying to integrate patches already.
> 
>   Since mipsel/mips has most of the code equal(code is endian free or use
> endian setting in target_info), I would like to propose make such
> conventions:
> 
>    define mips, cpumips, mips32 for use of common mips related code
>    define mipsel/mipsel32 for little endian cpus
>    define mipseb/mipseb32 for big endian cpus
> 
>  to avoid code like "if defined(mips) or defined(mipsel)" ... everywhere.
> 
> What do you think? If ok, I will go on to make the patches.

That definitely needs comment from Jonas, Florian, or another core 
developer. It's an issue I struggled with last Summer when I was trying 
to work through David Zhang's code.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-devel mailing list