Title: RE: [openib-general] Re: uverbs events

Very important - there is a bug in gcc version 3.4.2 that had been fixed in gcc 3.4.3.
This bug ((# 17581) heart us in VAPI when full optimizations is working in bits or on 64 bits systems.

So I suggest that you replace gcc with gcc 3.4.3.

Tziporet

-----Original Message-----
From: Roland Dreier [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 12, 2005 6:14 AM
To: Grant Grundler
Cc: [email protected]
Subject: Re: [openib-general] Re: uverbs events


    Grant> doorbell[] is a local variable and mthca_write64() is
    Grant> static inline.  I don't see a problem with the assignments
    Grant> to doorbell getting optimized out since the scope of that
    Grant> variable is completely visible to gcc. A smart compiler
    Grant> would just use registers and reduce the 32-bit stores.

Actually, what is that the compiler sees that we write to doorbell[]
as a uint32_t but then read from it by dereferencing a uint64_t*.  -O2
turns on -fstrict-aliasing, which allows the compiler to assume that
pointers of different types never alias each other.  So gcc says, hey,
all you do is write to that local doorbell[] variable and never do
anything with the values you write, so I'll just throw away that dead
code.  So gcc ends up only generating code for the store in
mthca_write64() without any code to initialize doorbell[].

 - R.
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to