public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* bogus gas error messages
@ 2006-07-21 17:09 David Mosberger-Tang
  2006-07-22  3:34 ` James E Wilson
  2006-07-24 16:10 ` David Mosberger-Tang
  0 siblings, 2 replies; 3+ messages in thread
From: David Mosberger-Tang @ 2006-07-21 17:09 UTC (permalink / raw)
  To: linux-ia64

Trying to compile libunwind, I'm now getting these error messages:

  ia64-test-readonly-asm.S:37: Error: Operand 2 to .spillreg must be a
writable register

These are bogus errors in my opinion and should be removed.  For
example, we already commonly use "saves" to r0 to terminate the
call-chain.  I'm seeing this with gas v2.17, but it may have been
around for longer.

Thanks,

  --david
-- 
Mosberger Consulting LLC, http://www.mosberger-consulting.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bogus gas error messages
  2006-07-21 17:09 bogus gas error messages David Mosberger-Tang
@ 2006-07-22  3:34 ` James E Wilson
  2006-07-24 16:10 ` David Mosberger-Tang
  1 sibling, 0 replies; 3+ messages in thread
From: James E Wilson @ 2006-07-22  3:34 UTC (permalink / raw)
  To: linux-ia64

On Fri, 2006-07-21 at 10:09, David Mosberger-Tang wrote:
> These are bogus errors in my opinion and should be removed.  For
> example, we already commonly use "saves" to r0 to terminate the
> call-chain.  I'm seeing this with gas v2.17, but it may have been
> around for longer.

This was added by Jan Beulich of Novell on July 1, 2005.  He was fixing
inconsistencies between gas and ias, while trying to port a large body
of code from ias to gas.  So both IAS and the Intel Assembler Language
Guide say that r0/f0/f1 are not valid registers here.  However, the
Intel ALG does not prevent saves to r0.  It is only spillreg and
spillreg.p that aren't allowed to take a readonly register as an
operand.

There is similar language in the Software Conventions and Run-time
Architecure Guide.  In Appendix B, Unwind Descriptor Record Format,
section B.5, in the Format X2 description, it gives encodings for all
registers other than r0/f0/f1.  Looking at this, it is clear that r0 is
a problem here, because the obvious encoding for r0 is actually used by
the restorereg record type.

We can't support spillreg for r0, though we could for f0.  However, we
run the risk that SCRA may someday use the f0 encoding for something
else.  So it seems unwise to do this.

Jim



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bogus gas error messages
  2006-07-21 17:09 bogus gas error messages David Mosberger-Tang
  2006-07-22  3:34 ` James E Wilson
@ 2006-07-24 16:10 ` David Mosberger-Tang
  1 sibling, 0 replies; 3+ messages in thread
From: David Mosberger-Tang @ 2006-07-24 16:10 UTC (permalink / raw)
  To: linux-ia64

Hi Jim,

On 21 Jul 2006 20:34:58 -0700, James E Wilson <wilson@tuliptree.org> wrote:

> There is similar language in the Software Conventions and Run-time
> Architecure Guide.  In Appendix B, Unwind Descriptor Record Format,
> section B.5, in the Format X2 description, it gives encodings for all
> registers other than r0/f0/f1.  Looking at this, it is clear that r0 is
> a problem here, because the obvious encoding for r0 is actually used by
> the restorereg record type.

You're right, the SCRA does exclude spilling of f0/f1 via the X2
descriptor.  I didn't remember that being the case.  I agree that the
asssembler shouldn't emit code that would be undefined per SCRA, so
the current behavior gas is fine.  I'll need to update the libunwind
test-suite to account for that.

Thanks,

  --david
-- 
Mosberger Consulting LLC, http://www.mosberger-consulting.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-07-24 16:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-21 17:09 bogus gas error messages David Mosberger-Tang
2006-07-22  3:34 ` James E Wilson
2006-07-24 16:10 ` David Mosberger-Tang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox