Systems and methods are disclosed for aligning data in memory access and
other applications. In one embodiment a system is provided that includes
a memory unit, a shifter, and control logic operable to route data from
the memory unit to the shifter and to send an indication to the shifter
of an amount by which the data is to be shifted. In one embodiment, the
control logic provides support for speculative execution. The control
logic may also permit multiplexing of big endian and little endian data
alignment operations, and/or multiplexing of data alignment operations
with non-data alignment operations. In one embodiment, the memory unit,
shifter, and control logic are integrated within a processing unit, such
as a microengine in a network processor.