A method and apparatus for performing a shift operation on packed data
elements having multiple values. One embodiment includes accessing the
shift control signal of a first format from a memory. The shift control
signal identifyies a first packed shift operation and whether the shift
positions are byte positions or bit positions, and causes a processor to
execute a set of control signals of a second format, thereby accessing
the packed data, shifting the packed data by the number of shift
positions according to the first packed shift operation, generating a
first replacement data for one of the number of positions, and producing
a shifted first packed data comprising the first replacement data.