public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H. J. Lu" <hjl@lucon.org>
To: "David S. Miller" <davem@redhat.com>
Cc: aoliva@redhat.com, rsandifo@redhat.com,
	linux-mips@linux-mips.org, gcc@gcc.gnu.org,
	binutils@sources.redhat.com
Subject: Re: MIPS gas relaxation still doesn't work
Date: Mon, 14 Oct 2002 14:14:00 -0000	[thread overview]
Message-ID: <20021014130932.A32693@lucon.org> (raw)
In-Reply-To: <20021014.125134.98070597.davem@redhat.com>; from davem@redhat.com on Mon, Oct 14, 2002 at 12:51:34PM -0700

On Mon, Oct 14, 2002 at 12:51:34PM -0700, David S. Miller wrote:
>    From: "H. J. Lu" <hjl@lucon.org>
>    Date: Mon, 14 Oct 2002 12:55:49 -0700
> 
>            .set    noreorder
>            .set    nomacro
>    
>            bne     $2,$0,$L7493
>            nop
>            j       $L2
>            nop
>    
>            .set    macro
>            .set    reorder
>    
>    answer your question?
>    
>    
> What instruction would you like to place in the bne's delay
> slot?  'j' cannot go into a delay slot.
> 
> And likewise, 'bne' cannot go into j's delay slot.

If gcc just emits

	bne     $2,$0,$L7493
	j       $L2

gas will fill the delay slot with nop or branch relaxation. For

bar:
foo:
	.space	0x20000
	bne     $2,$0,bar
	j	foo

gas generates

foo.o:     file format elf32-tradlittlemips

Disassembly of section .text:

00000000 <bar>:
	...
   20000:	10400005 	beqz	v0,20018 <bar+0x20018>
   20004:	00000000 	nop
   20008:	8f810000 	lw	at,0(gp)
			20008: R_MIPS_GOT16	.text
   2000c:	00000000 	nop
   20010:	24210000 	addiu	at,at,0
			20010: R_MIPS_LO16	.text
   20014:	00200008 	jr	at
   20018:	00000000 	nop
   2001c:	8f810000 	lw	at,0(gp)
			2001c: R_MIPS_GOT16	.text
   20020:	00000000 	nop
   20024:	24210000 	addiu	at,at,0
			20024: R_MIPS_LO16	.text
   20028:	00200008 	jr	at
   2002c:	00000000 	nop

H.J.

  reply	other threads:[~2002-10-14 20:09 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20021012113423.A27894@lucon.org>
     [not found] ` <20021013145423.A10174@lucon.org>
2002-10-14  9:23   ` H. J. Lu
2002-10-14  9:35     ` Richard Sandiford
2002-10-14  9:37       ` H. J. Lu
2002-10-14 10:04         ` Richard Sandiford
2002-10-14 10:43           ` H. J. Lu
2002-10-14 10:50             ` David S. Miller
2002-10-14 10:53               ` H. J. Lu
2002-10-14 11:13             ` Alexandre Oliva
2002-10-14 11:21               ` H. J. Lu
2002-10-14 12:28                 ` Alexandre Oliva
2002-10-14 12:37                   ` H. J. Lu
2002-10-14 12:58                     ` Alexandre Oliva
2002-10-14 13:00                       ` H. J. Lu
2002-10-14 13:08                         ` David S. Miller
2002-10-14 13:23                           ` H. J. Lu
2002-10-14 14:04                             ` David S. Miller
2002-10-14 14:14                               ` H. J. Lu [this message]
2002-10-14 14:17                                 ` Alexandre Oliva
2002-10-14 14:18                                   ` H. J. Lu
2002-10-14 15:37                                     ` Alexandre Oliva
2002-10-14 15:40                                       ` H. J. Lu
2002-10-15  1:08                                         ` Alexandre Oliva
2002-10-15  2:53                                           ` Dominic Sweetman
2002-10-15  8:12                                             ` Alexandre Oliva
2002-10-15 14:18                                             ` Jim Wilson
2002-10-15 13:27                                           ` Maciej W. Rozycki
2002-10-15 16:37                                             ` Jim Wilson
2002-10-16  6:39                                               ` Maciej W. Rozycki
2002-10-16 10:38                                                 ` Jim Wilson
2002-10-15 18:40                                             ` Alexandre Oliva
2002-10-16  7:01                                               ` Maciej W. Rozycki
2002-10-16  7:47                                                 ` Alexandre Oliva
2002-10-16  8:06                                                   ` Maciej W. Rozycki
2002-10-14 17:02                                     ` Eric Christopher
2002-10-15  1:15                                       ` Alexandre Oliva
2002-10-14 14:44                                   ` Michael Matz
2002-10-15 13:28                         ` Jim Wilson
2002-10-15 13:45                           ` Paul Koning
2002-10-15 14:32                             ` Maciej W. Rozycki
2002-10-15 15:33                               ` Alexandre Oliva
2002-10-16  5:32                                 ` Maciej W. Rozycki
2002-10-15 14:00                           ` Daniel Jacobowitz
2002-10-15 14:56                             ` Eric Christopher
2002-10-15 15:05                               ` Daniel Jacobowitz
2002-10-16  7:53                                 ` Paul Koning
2002-10-16  8:11                                   ` Maciej W. Rozycki
2002-10-15 15:23                             ` Jim Wilson
2002-10-16  5:38                               ` Maciej W. Rozycki
2002-10-16 10:37                                 ` Jim Wilson
2002-10-16 11:04                                   ` Maciej W. Rozycki
2002-10-15 16:54                         ` Richard Henderson
2002-10-14  9:40     ` Alexandre Oliva
2002-10-14  9:44       ` H. J. Lu

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=20021014130932.A32693@lucon.org \
    --to=hjl@lucon.org \
    --cc=aoliva@redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=davem@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=linux-mips@linux-mips.org \
    --cc=rsandifo@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).