hg: bsd-port/bsd-port/hotspot: . Add, remove and alter casts to get this to compile on Mac OS X (in 32 bit

Kurt Miller kurt at intricatesoftware.com
Tue Jan 20 07:57:08 PST 2009


Greg Lewis wrote:
> G'day Michael,
> 
> On Mon, Jan 19, 2009 at 08:58:22AM -0500, Michael Franz wrote:
>> Thanks for committing these changes, are they from upstream?
> 
> Unfortunately not.  They are just what I needed to get things built now
> that I finally have my tools updated and can build on Mac OS X.  I think
> its worth asking Xiaobin if he would be interested in pushing them
> upstream though to reduce future merge conflicts.
> 
>> One question I have, what is the purpose of NULL_WORD?  Should NULL_WORD
>> be used in this patch instead of casting NULL to intptr_t?
> 
> Thats a reasonable question.  I think the change below was a result of
> Kurt turning -Werror on (which is a good thing).  The original code
> generated a warning which I've just cast away for now.  I don't have
> an answer for you off the top of my head :).

Yes NULL_WORD is the correct value to use here. The result is going
into a intptr_t so we want (intptr_t)0 to be used.

I have more datatype changes to add including this one. I will post
them under a new thread.

> 
>> --- a/src/cpu/x86/vm/interpreterRT_x86_32.cpp	Fri Jan 16 21:34:21 2009 -0800
>> +++ b/src/cpu/x86/vm/interpreterRT_x86_32.cpp	Sun Jan 18 21:42:26 2009 -0800
>> @@ -110,7 +110,7 @@ class SlowSignatureHandler: public Nativ
>>    virtual void pass_object() {
>>      // pass address of from
>>      intptr_t from_addr = (intptr_t)(_from +
>> Interpreter::local_offset_in_bytes(0));
>> -    *_to++ = (*(intptr_t*)from_addr == 0) ? NULL : from_addr;
>> +    *_to++ = (*(intptr_t*)from_addr == 0) ? (intptr_t) NULL : from_addr;
>>      debug_only(verify_tag(frame::TagReference));
>>      _from -= Interpreter::stackElementSize();
>>     }
>>
>>
>> Michael
>>
>> On Mon, Jan 19, 2009 at 12:43 AM, <glewis at eyesbeyond.com> wrote:
>>
>>> Changeset: b86ce5362022
>>> Author:    glewis at misty.eyesbeyond.com
>>> Date:      2009-01-18 21:42 -0800
>>> URL:
>>> http://hg.openjdk.java.net/bsd-port/bsd-port/hotspot/rev/b86ce5362022
>>>
>>> . Add, remove and alter casts to get this to compile on Mac OS X (in 32 bit
>>>  mode at least).
>>>
>>> ! src/cpu/x86/vm/c1_Runtime1_x86.cpp
>>> ! src/cpu/x86/vm/interp_masm_x86_32.cpp
>>> ! src/cpu/x86/vm/interpreterRT_x86_32.cpp
>>> ! src/cpu/x86/vm/stubGenerator_x86_32.cpp
>>> ! src/cpu/x86/vm/templateInterpreter_x86_32.cpp
>>> ! src/cpu/x86/vm/templateTable_x86_32.cpp
>>>
>>>
>>>
> 




More information about the bsd-port-dev mailing list