em? Might that be because it will
not use rbx, but instead another register? OTOH, the code seems to work and
rbx is not assigned to PIC at the point of the call, but to the defined
parameter.
Regards,
Leif Ekblad
- Original Message -
From: "Jakub Jelinek"
To: "Le
On Fri, Jan 04, 2013 at 10:39:05PM +0100, Leif Ekblad wrote:
> I just tried the patch, but it seems to produce some problems for
> me. The other patch which used a 64-bit specific register (r15)
> instead of rbx was easier to adapt to. The problem for me is that
> syscalls might clobber higher-half
Original Message -----
From: "Uros Bizjak"
To: "Richard Henderson"
Cc: "Andi Kleen" ; "Mike Frysinger"
; ; "Leif Ekblad"
; "Jakub Jelinek" ; ; "H.J. Lu"
Sent: Sunday, December 30, 2012 8:08 PM
Subject: Re: [RFC PATCH, i38
On Fri, Dec 28, 2012 at 9:27 PM, Richard Henderson wrote:
> On 12/27/2012 12:08 AM, Uros Bizjak wrote:
>> The alternative approach is changing cpuid definition in cpuid.h (as
>> in attached patch) to preserve %rbx, but we can't detect various code
>> model settings there. Since the change depends
On 12/27/2012 12:08 AM, Uros Bizjak wrote:
> The alternative approach is changing cpuid definition in cpuid.h (as
> in attached patch) to preserve %rbx, but we can't detect various code
> model settings there. Since the change depends on the definition of
> __PIC__, we unnecessary preserve %rbx als
On Thu, Dec 27, 2012 at 10:10 AM, Florian Weimer wrote:
> * Uros Bizjak:
>
>> +#elif defined(__x86_64__)
>> +#define __cpuid(level, a, b, c, d) \
>> + __asm__ ("xchg{q}\t{%%}rbx, %q1\n\t" \
>> +"cpuid\n\t" \
>> +
* Uros Bizjak:
> +#elif defined(__x86_64__)
> +#define __cpuid(level, a, b, c, d) \
> + __asm__ ("xchg{q}\t{%%}rbx, %q1\n\t" \
> +"cpuid\n\t" \
> +"xchg{q}\t{%%}rbx, %q1\n\t" \
> +: "
On Thu, Dec 27, 2012 at 9:08 AM, Uros Bizjak wrote:
> On Wed, Dec 26, 2012 at 9:16 PM, Andi Kleen wrote:
>>> Can you please post a real-world example, where using %r15 would break
>>> existing code?
>>
>> I used to run into problems like this when porting code to gcc from icc or
>> VC.
>> A lot
On Wed, Dec 26, 2012 at 9:16 PM, Andi Kleen wrote:
>> Can you please post a real-world example, where using %r15 would break
>> existing code?
>
> I used to run into problems like this when porting code to gcc from icc or VC.
> A lot of hyper optimized inline assembler snippets wants to use all re
> Can you please post a real-world example, where using %r15 would break
> existing code?
I used to run into problems like this when porting code to gcc from icc or VC.
A lot of hyper optimized inline assembler snippets wants to use all registers
and icc/VC support that. With gcc usually had to ad
On Tue, Dec 25, 2012 at 8:27 PM, Mike Frysinger wrote:
>> >> In the case of cpuid, the code is hardly performance sensitive, and
>> >> probably runs only at startup. An alternative solution for the broken
>> >> code here is to move the result from rbx to another register, and to
>> >> save/restor
On Tuesday 25 December 2012 14:12:09 Uros Bizjak wrote:
> On Tue, Dec 25, 2012 at 6:54 AM, Mike Frysinger wrote:
> > On Monday 24 December 2012 17:26:47 Leif Ekblad wrote:
> >> In the case of cpuid, the code is hardly performance sensitive, and
> >> probably runs only at startup. An alternative so
On Tue, Dec 25, 2012 at 6:54 AM, Mike Frysinger wrote:
> On Monday 24 December 2012 17:26:47 Leif Ekblad wrote:
>> In the case of cpuid, the code is hardly performance sensitive, and
>> probably runs only at startup. An alternative solution for the broken code
>> here is to move the result from rb
On Monday 24 December 2012 17:26:47 Leif Ekblad wrote:
> In the case of cpuid, the code is hardly performance sensitive, and
> probably runs only at startup. An alternative solution for the broken code
> here is to move the result from rbx to another register, and to
> save/restore rbx. Currently,
this
problem.
Leif Ekblad
- Original Message -
From: "Andi Kleen"
To: "Uros Bizjak"
Cc: ; "Richard Henderson" ; "Jakub
Jelinek" ; ; "H.J. Lu"
Sent: Monday, December 24, 2012 10:32 PM
Subject: Re: [RFC PATCH, i386]: Use %r15 for REAL_
Uros Bizjak writes:
> Hello!
>
> Currently, we use %rbx as REAL_PIC_OFFSET_TABLE_REGNUM on x86_64.
> Since this register gets marked as fixed reg in
> ix86_conditional_register_usage, we get into troubles with insns that
> use %rbx (cmpxchg, cpuid). According to x86_64 psABI, we are free to
> use
Hello!
Currently, we use %rbx as REAL_PIC_OFFSET_TABLE_REGNUM on x86_64.
Since this register gets marked as fixed reg in
ix86_conditional_register_usage, we get into troubles with insns that
use %rbx (cmpxchg, cpuid). According to x86_64 psABI, we are free to
use any register, so attached patch ch
17 matches
Mail list logo