From: David Woodhouse <dwmw2@infradead.org>
To: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
Cc: The development of GRUB 2 <grub-devel@gnu.org>, llvmdev@cs.uiuc.edu
Subject: Re: clang .code16 with -Os producing larger code that it needs to
Date: Fri, 20 Feb 2015 16:05:08 +0000 [thread overview]
Message-ID: <1424448308.5437.57.camel@infradead.org> (raw)
In-Reply-To: <54E756EE.1030401@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 813 bytes --]
On Fri, 2015-02-20 at 16:46 +0100, Vladimir 'φ-coder/phcoder' Serbinenko
wrote:
>
> All labels are local to the source file. If I use %eax instead of %ebx
> in first example I get the short code. For the second example how does
> clang detect that offset fits into one byte for issuing EB XX sequence
> which is issued in resulting file in several places. Can we use the
> same mechanism to detect when issuing 16-bit reference and keep 32-bit
> one for external references?
It's been a while since I looked at this... but I think for the short
jumps we just emit the 8-bit version and there's a fixup which can go
back and re-emit the instruction in 32-bit mode if it finds it doesn't
fit?
Do we just need to support a similar fixup for promoting 16-bit to
32-bit relocations?
--
dwmw2
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5745 bytes --]
next prev parent reply other threads:[~2015-02-20 18:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-20 14:58 clang .code16 with -Os producing larger code that it needs to Vladimir 'φ-coder/phcoder' Serbinenko
2015-02-20 15:26 ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-02-20 15:38 ` David Woodhouse
2015-02-20 15:46 ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-02-20 16:05 ` David Woodhouse [this message]
2015-02-20 16:18 ` David Woodhouse
2015-02-20 18:47 ` [LLVMdev] " Rafael Espíndola
2015-02-23 12:07 ` David Woodhouse
2015-02-24 8:42 ` Craig Topper
2015-02-24 9:07 ` David Woodhouse
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=1424448308.5437.57.camel@infradead.org \
--to=dwmw2@infradead.org \
--cc=grub-devel@gnu.org \
--cc=llvmdev@cs.uiuc.edu \
--cc=phcoder@gmail.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 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.