[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Small PIC Fixes

From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: Small PIC Fixes
Date: Wed, 05 Jan 2011 09:06:40 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20101226 Icedove/3.0.11

On 01/05/2011 06:58 AM, address@hidden 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
> address@hidden

Vladimir 'φ-coder/phcoder' Serbinenko

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]