From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: grub-devel@gnu.org
Subject: Re: Small PIC Fixes
Date: Wed, 05 Jan 2011 09:06:40 +0100 [thread overview]
Message-ID: <4D242690.3000609@gmail.com> (raw)
In-Reply-To: <201101050558.p055wvGo052896@m5p.com>
[-- Attachment #1: Type: text/plain, Size: 1458 bytes --]
On 01/05/2011 06:58 AM, ehem+grub@m5p.com wrote:
> Perhaps not the biggest deal, but I do like to get low-hanging fixes out
> of the way if they appear.
>
> One very significant item I found. It appears GCC is fine with %rbx being
> clobbered when building PIC in 64-bit mode, even though it has problems
> with %ebx being clobbered when building PIC in 32-bit mode.
>
>
This patch only increases the number of possible ways preprocessor
defines can be resolved, which in turn increases the maintenance cost.
Restoring %ebx/%rbx unconditionally is cheap. Maintaining exponentially
growing number of the way #if's can be resolved isn't.
I don't see any problem to enduser with these 2 small instructions
always being there.
> One other item I did notice. Are there really any processors in the amd64
> class that *don't* support CPUID? I'd like to hardcode
> grub_cpu_is_cpuid_supported() to return 1 if __x86_64__ is defined, but
> I'm a tad worried I'll be unpleasantly surprised.
>
>
Similar problems. Maintaining something that is always the same is
easier than something with loads of #if's.
Rule of thumb is: "if it works and your improvement isn't visible to any
enduser, don't touch it".
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
next prev parent reply other threads:[~2011-01-05 8:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-05 5:58 Small PIC Fixes ehem+grub
2011-01-05 8:06 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2011-01-06 3:07 ` ehem+grub
2011-01-06 3:16 ` crocket
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=4D242690.3000609@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.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.