Inline Assembly under MIPS
David Daney
ddaney@avtrex.com
Mon Jun 18 21:18:00 GMT 2007
Mohamed Bamakhrama wrote:
> Hi all,
> I have some inline assembly code for MIPS. It contains ".set mips32"
> and ".set mips0". I tried to find some relevant documentation for
> those two directives but I couldn't find something useful.
As far as I know, these don't have good documentation. I think they are
hold overs from the SGI assembler. Perhaps you can find a manual for
that on the net somewhere.
> My question is what is the usage of those two directives and is there
> any manual/docs/howto for inline assembly using GCC under MIPS?
>
Those .set directives override the the ISA that the assembler accepts.
For example if you tell the assembler that you are assembling mips1
code, it will give an error if you try to use instructions that are not
part of the mips1 ISA. The .set mips32 would allow you to use mips32
ISA instructions that are not part of mips1.
There are only general (not mips specific) in-line assembly docs in the
GCC documentation. The gas documentation talks about some mips specific
things. You can get an instruction set reference manual from the MIPS
web site.
David Daney
More information about the Gcc-help
mailing list