All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian King <adrian@xidak.com>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] .auto directive appears broken for IA-64 assembler
Date: Fri, 09 Mar 2001 21:48:24 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590693005270@msgid-missing> (raw)

I originally sent this bug report to ia64-list@redhat.com; David wrote:

> Hmmh, you are right.  I thought this had been fixed a long time ago,
> but I can reproduce the problem with the latest assembler.  Can you
> please send your bug report to linux-ia64@linuxia64.org so the right
> people can see it?

==

The GNU assembler version 2.9-ia64-000717 (ia64-redhat-linux) using BFD
version 2.9-ia64-000717 doesn't seem to obey the ".auto" directive
correctly.

For example, consider the following files "foo.s" and "bar.c" (these
files don't do anything useful; they just illustrate where stops should
go):

====================================
foo.s:
====================================
        .auto

        .global     xxx

        .text

        .global     foo
        .proc       foo
foo:    alloc       loc0 = ar.pfs,8,8,0,0

        // There should be stops between the st8 instructions, which
        // modify r14.
        add         r14 = @gprel(xxx),gp
        st8         [r14] = r0,40
        st8         [r14] = r0,-32
        st8         [r14] = r0,16
        st8         [r14] = r0,48

        // There should be a stop between the mov instruction that sets
        // r15 and the dep instruction that uses r15.
        alloc       r14 = ar.pfs,0,0,0,0
        mov         r15 = ar.rsc
        dep         r16 = 0,r15,0,2
        mov         ar.rsc = r16
        invala

        br.ret.sptk b0
        .endp   sPro
====================================

====================================
bar.c:
====================================
long xxx;

main () {
    foo();
}
====================================

The following gdb session illustrates that the stops aren't present
where the comments above say stops are needed:

  $ cc -g -o bar.c foo.s
  $ gdb bar
  GNU gdb 5.0...
  (gdb) disas foo
  Dump of assembler code for function foo:
  0x4000000000000640 <foo>:       [MII]       alloc r40=ar.pfs,16,16,0
  0x4000000000000641 <foo+1>:                 addl r14I6,r1;;
  0x4000000000000642 <foo+2>:                 nop.i 0x0
  0x4000000000000650 <foo+16>:    [MMI]       st8 [r14]=r0,40
  0x4000000000000651 <foo+17>:                st8 [r14]=r0,-32
  0x4000000000000652 <foo+18>:                nop.i 0x0
  0x4000000000000660 <foo+32>:    [MMI]       st8 [r14]=r0,16
  0x4000000000000661 <foo+33>:                st8 [r14]=r0,48
  0x4000000000000662 <foo+34>:                nop.i 0x0;;
  0x4000000000000670 <foo+48>:    [MMI]       alloc r14=ar.pfs,0,0,0
  0x4000000000000671 <foo+49>:                mov.m r15=ar.rsc
  0x4000000000000672 <foo+50>:                dep r16=0,r15,0,2;;
  0x4000000000000680 <foo+64>:    [MMB]       mov.m ar.rsc=r16
  0x4000000000000681 <foo+65>:                invala
  0x4000000000000682 <foo+66>:                br.ret.sptk.few b0;;
  End of assembler dump.

Is there something I should be doing differently, or is this a genuine
assembler bug?

Adrian


             reply	other threads:[~2001-03-09 21:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-09 21:48 Adrian King [this message]
2001-03-17  5:00 ` [Linux-ia64] .auto directive appears broken for IA-64 assembler Jim Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-ia64-105590693005270@msgid-missing \
    --to=adrian@xidak.com \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.