FW: [Gc] Uses of SSE registers?

Boehm, Hans hans.boehm at hp.com
Fri Oct 18 23:17:27 PDT 2013


Forwarding, since I can't currently get to the mailing list server to approve:

Hans

-----Original Message-----
From: Kenjiro Taura [mailto:tau at eidos.ic.i.u-tokyo.ac.jp] 
Sent: Thursday, October 17, 2013 12:19 AM
To: qinsoon at gmail.com
Cc: bruce at hoult.org; gc at linux.hpl.hp.com; clemahieu at gmail.com; tau at eidos.ic.i.u-tokyo.ac.jp
Subject: Re: [Gc] Uses of SSE registers?


Hi Yi,

Here is my two cents.

The issue is definitely not specific to GC.

I think a more 'logical' solution to your problem is to make sure you use one of CALLEE-SAVE registers for the global variable you mentioned.

Given that there are no callbacks (i.e., GC never calls your code back), no matter whether GC uses SSE regs internally or not, the state of that register should always be as expected from your code's point of view. (any function call never clobbers the register).

Logically, just keeping GC from using SSE regs won't help if the another function not in GC is the one to blame (in theory, even 'printf' might clobber any non callee-save register).

---------

If GC (or any function your code calls, for that matter) calls back your code, sure, you then must keep all code other than yours from using that register.  In that case the logical solution seems to give the same "dedicate-this-reg-for-this-global-variable" statement as you gave to your code when you compile GC (and any external library which might call you back).


> I tried in my program to use one SSE register to store a C global 
> variable (gcc has support for this). But the value from that register 
> variable was not as intended sometimes. I am trying to figure out the 
> reason, and one of my guesses is that the GC uses those registers. I 
> will try use -mno-sse for building the GC and see what happens then.
> 
> Thanks very much.
> 
> Regards,
> Yi
> 
> On 17/10/2013 4:12 PM, Bruce Hoult wrote:
>> I could be wrong, but I don't *think* there is anything explicitly 
>> about SSE in the GC, except for adjusting the exception mask when 
>> pushing callee-save registers.
>>
>> It could well be that your build flags are such that your compiler 
>> uses SSE instructions for some things written in C.
>>
>> I'm also not entirely sure why you believe that you'd want or need to 
>> prevent the GC from using SSE?
>>
>>
>> On Thu, Oct 17, 2013 at 5:02 PM, Yi Lin <qinsoon at gmail.com 
>> <mailto:qinsoon at gmail.com>> wrote:
>>
>>     Hi all,
>>
>>     It seems the GC uses SSE registers. If I want to use those
>>     registers in my program, is there a way to turn it off for the GC?
>>     Thanks very much.
>>
>>     Regards,
>>     Yi
>>     _______________________________________________
>>     Gc mailing list
>>     Gc at linux.hpl.hp.com <mailto:Gc at linux.hpl.hp.com>
>>     https://www.hpl.hp.com/hosted/linux/mail-archives/gc/
>>
>>     --     This message has been scanned for viruses and
>>     dangerous content by MailScanner, and is
>>     believed to be clean.
>>
>>
> 



More information about the Gc mailing list