From: Andrew Morton <akpm@zip.com.au>
To: Keith Owens <kaos@ocs.com.au>
Cc: Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de>,
linux-kernel@vger.kernel.org, "H . J . Lu" <hjl@lucon.org>
Subject: Re: How to fix false positives on references to discarded text/data?
Date: Sun, 23 Dec 2001 21:44:32 -0800 [thread overview]
Message-ID: <3C26C0C0.D324D1FC@zip.com.au> (raw)
In-Reply-To: Your message of "Sun, 23 Dec 2001 16:15:47 -0800." <3C2673B3.78E21527@zip.com.au> <27651.1009169580@ocs3.intra.ocs.com.au>
Keith Owens wrote:
>
> gcc/as generates worse code for the local branches in the out of line
> subsection. With .text.lock we get
>
> 0: 80 bd f8 00 00 00 00 cmpb $0x0,0xf8(%ebp)
> 7: f3 90 repz nop
> 9: 7e f5 jle 0 <.text.lock> <=== 2 bytes
> b: e9 ca 01 00 00 jmp 1da <.text.lock+0x1da>
>
> With .subsection 1 it generates
>
> .text.lock.es1371:
> 6387: 80 bd f8 00 00 00 00 cmpb $0x0,0xf8(%ebp)
> 638e: f3 90 repz nop
> 6390: 0f 8e f1 ff ff ff jle 6387 <.text.lock.es1371> <=== 6 bytes
> 6396: e9 33 9e ff ff jmp 1ce <set_adc_rate+0x8e>
>
> The inline code is unchanged, it is only the out of line code that is
> bigger. IMHO the subsection difference is a gcc/as bug which should
> not stop us using this fix.
I don't see this. With egcs-1.1.2 and assembler 2.11.90.0.25,
your patch actually (and mysteriously) shrunk the kernel by 500
bytes - the new .text is a little smaller than the sum of the
old .text and .text.lock.
As you say, if the assembler is generating long-form branches for
the `jle' in the below sequence, we have a problem.
#APP
1: lock ; decb timerlist_lock
js 2f
.subsection 1
.ifndef .text.lock.bust_spinlocks
.text.lock.bust_spinlocks:
.endif
2: cmpb $0,timerlist_lock
rep;nop
jle 2b
jmp 1b
.previous
Keith, perhaps you could ship a .s file and a version number to HJ?
-
next prev parent reply other threads:[~2001-12-24 5:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-23 9:17 How to fix false positives on references to discarded text/data? Keith Owens
2001-12-23 10:53 ` Alex Bligh - linux-kernel
2001-12-23 22:00 ` Kai Germaschewski
2001-12-23 22:50 ` Kai Germaschewski
2001-12-24 0:15 ` Andrew Morton
2001-12-24 0:44 ` Kai Germaschewski
2001-12-24 4:53 ` Keith Owens
2001-12-24 5:44 ` Andrew Morton [this message]
2001-12-24 6:22 ` Keith Owens
2001-12-24 10:05 ` Kai Germaschewski
2001-12-24 11:02 ` Keith Owens
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=3C26C0C0.D324D1FC@zip.com.au \
--to=akpm@zip.com.au \
--cc=hjl@lucon.org \
--cc=kai@tp1.ruhr-uni-bochum.de \
--cc=kaos@ocs.com.au \
--cc=linux-kernel@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.