HI and LO qualifiers in MIPS assembly

Nikolaos Kavvadias nkavv@physics.auth.gr
Fri Mar 10 16:07:00 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Hi there

i have a question on some alternative syntaxes of the MIPS
instructions regarding the %hi and
%lo qualifiers. The %hi is necessary when specifying addition of a
carry from the lower part
highest bit.

Sometimes gas emits what i believe is a macro-instruction, e.g. this
one is for the LUI:

lui   $reg, %hi(symbol)
e.g.
lui $10,%hi(sym)

another one is:
lw $2, %lo(v)($10)

How can I expand these expressions into "normal" instructions, as
these are defined in the MIPS32 architecture manual for programmers
(vol. 2)?
I mean how does the macro-expansion take place?

thanks in advance

Nikolaos Kavvadias
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
 
iD8DBQFEEaRJMPiy0tCWlz4RAtQqAJ9VIpdiYPO8CFq0hAyS5BWBXfaXhACeLleD
ghNQXICGtiASo859Yt6TM48=
=yObe
-----END PGP SIGNATURE-----



More information about the Binutils mailing list