[fpc-devel] Bounty for MIPS

Mark Morgan Lloyd markMLl.fpc-devel at telemetry.co.uk
Sun Jan 29 20:20:59 CET 2012

Pierre Free Pascal wrote:
>>> Questions:
>>>   It seems like GNU AS has a different MUPS syntax as traditional MIPS
>>> assembler, but I didn't find precise information about this;
>>> Could someone give me some pointers?
>> I don't think I've got access to any MIPS as other than gas, but if
>> necessary I could put the disc that came with my problematic SGI system
>> into a PC server and investigate whether it has any development software
>> (it's a fairly minimal IRIX).
>> What differences did you have in mind?
> Take a look at trunk/rtl/linux/mips/prt0.as
> This file is non-functional, but it seems to contain some disassembly
> of a start code (probably from some other compiler...)
> This disassembly syntax seems quite different from
> the other assembler code (below in same file and in other sources
> seem more like gnu as generated by GCC if using --save-temps.
> Well, at least register naming is different (using a4 or s7 instead of $sp
> and $X
> where X is a number...)

I agree that there's something odd with that, but I was working against 
the rtl/linux/mipsel one. Also:

"Note that register names are 0, 1 etc. with $ as a mandatory sigil, and 
that register assignment is right-to-left; versions of GNU as from 2.18 
onwards also support symbolic register names a0, a1 etc. There is a 
delay slot after branch etc. instructions." 

I forget what version gas is currently at, but that's a comparatively 
recent change so I think there's a good argument either for converting 
back to the numeric form, or having an include file with symbolic 
definitions available for older versions.

> Anyway, maybe the content of rtl/mips/prt0.as isn't really MIPS assembler at
> all :(

Somebody's working notes by the looks of it.

Can anybody say whether David Zhang did his port in isolation, or was he 
in discussion with core developers?

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