make sure struct real_value's bitfields are packed

Alexandre Oliva aoliva@redhat.com
Sun Mar 21 19:10:00 GMT 2004


REAL_VALUE_TYPE_SIZE is computed assuming the bitfields in struct
real_value are packed into a single 32-bit word, but some ABIs specify
that bitfields with different underlying types don't share the same
underlying word.

This patch arranges for all bitfields in struct real_value to
explicitly have type unsigned int.  exp was renamed to uexp and
accessor macros were introduced to turn it back into a signed value.
No performance differences are expected, since the macros effectively
do what the compiler would have done to sign-extend the values.

Bootstrapped on i686-pc-linux-gnu.  Ok to install?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pack-real-bitfields.patch
Type: text/x-patch
Size: 20771 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20040321/13434640/attachment.bin>
-------------- next part --------------

-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}


More information about the Gcc mailing list