This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

SPARCv9 as : flush instruction


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]