[llvm-commits] [llvm-gcc-4.2] r46726 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Devang Patel
dpatel at apple.com
Sat Feb 9 12:31:33 PST 2008
On Feb 8, 2008, at 10:03 AM, Duncan Sands wrote:
> I can't help feeling that a bitfield load or store should touch the
> minimum amount of bytes possible: only those that contain some part
> of the bitfield. In some situations touching other bytes could be
> fatal, for example if the type is overlaid on some memory mapped io
> region, or multiple threads are accessing different parts of the
> type simulteneously.
I do not think this is required as part of current C ABI. This is
responsibility of programmer who is using threading.
> In the above example you could try accessing
> d using 4 bytes starting from b, but this would give wrong results
> if some other thread was accessing b at the same time. I'm fairly
> sure that Ada has quite strict requirements about this, and I have
> the vague idea (I don't know where I got it from) that there is talk
> of requiring a minimum disturbance rule of some kind in C.
However what about huge amount of existing C code and other tools that
do not enforce this ?
-
Devang
More information about the llvm-commits
mailing list