summaryrefslogtreecommitdiff
path: root/src/base/bitunion.hh
AgeCommit message (Collapse)Author
2016-01-11scons: Enable -Wextra by defaultAndreas Hansson
Make best use of the compiler, and enable -Wextra as well as -Wall. There are a few issues that had to be resolved, but they are all trivial.
2015-01-07base: Fix assigning between identical bitfields.Gabe Black
If two bitfields are of the same type, also implying that they have the same first and last bit positions, the existing implementation would copy the entire bitfield. That includes the __data member which is shared among all the bitfields, effectively overwritting the entire bitunion. This change also adjusts the write only signed bitfield assignment operator to be like the unsigned version, using "using" instead of implementing it again and calling down to the underlying implementation.
2014-08-26base: Add a static assert to check bit union rangesAndreas Sandberg
If a bit field in a bit union specified as Bitfield<LSB, MSB> instead of Bitfield<MSB, LSB> the code silently fails and the field is read as zero. This changeset introduces a static assert that tests, at compile time, that the bit order is correct.
2009-06-21BitUnion: Add more constiness.Gabe Black
2009-05-17includes: use base/types.hh not inttypes.h or stdint.hNathan Binkert
2008-09-10style: Remove non-leading tabs everywhere they shouldn't be. Developers ↵Ali Saidi
should configure their editors to not insert tabs
2008-06-12BitUnion: Take out namespace declaration so bitunions can be declared inside ↵Gabe Black
classes.
2007-10-07BitUnion: Fix some types in the bitunion classes.Gabe Black
--HG-- extra : convert_revision : 1c003f9fc9ef3a57c9199d692d172e747581f383
2007-07-18Fix a compilation error for SubBitUnions,Gabe Black
--HG-- extra : convert_revision : aad9388afe81ba6541d0b18fa9777e6ffcfd871c
2007-07-17Add a conversion constructor so a bitunion can be initialized to a value.Gabe Black
Previously, the bitunion would need to be declared and then assigned to separately. --HG-- extra : convert_revision : d229bd83bc7baeca2259d4e7b080f359915015f3
2007-07-14Move bitunion code into it's own file.Gabe Black
--HG-- extra : convert_revision : 8d55ca9645ee4e357b7f4595435542eb72490331