SPARCv9 as : flush instruction

Vincent Pelletier subdino2004@yahoo.fr
Sat Aug 27 21:02:00 GMT 2005


Hello.

I found a segfault in my as version when dealing with flush with more
than one argument. But it turns out to be fixed in cvs version, so it's
not the point of my mail.

I find the specs ambiguous about flush instruction :
http://www.sparc.org/resource.htm#V9 (page 191)

"Formats" looks like there are 2 arguments, with 2 possibilities :
 rs1, rs2
 rs1, simm13

"Suggested assembly syntax" looks like there is only one argument.

Though, description tells :
(quoting)
The effective address operand for the FLUSH instruction is “r[rs1] +
r[rs2]” if i = 0, or “r[rs1] + sign_ext(simm13)” if i = 1.
(end of quote)

Running "dis" (OpenBoot embedded disassembler) on a function containing
(quote from source built with as) :
	flush	%l0
Gives (quote form OB output) :
	iflush  %l0, %g0, %g0

Now it suggests there are 3 arguments !

as only accepts flush with one argument, being either a register or an
immediate value. If the instruction actualy contains 2 and/or 3
arguments forms, shouldn't as support them too ?

Vincent Pelletier



More information about the Binutils mailing list