Performing variable and/or bitwise shift operation for a shift instruction that does not provide a variable or bitwise shift option
AssigneeApple Inc.
InventorsHyeonkuk Jeong, Paul Chang
Life of this patent
Estimating the term…
Loading patent…
AssigneeApple Inc.
InventorsHyeonkuk Jeong, Paul Chang
Estimating the term…
Some embodiments present a method of performing a variable shift operation. This method can be used by a microprocessor that does not allow variable shift operation for certain operand sizes. The method simulates a shift instruction that shifts an operand by a shift count. The method identifies a first shift command and a second shift command. The method computes a mask value. The mask value depends on whether the shift count is less than half of the operand size or greater than or equal to half of the operand size. The method uses the mask value to cause one of the first shift command and the second shift command to produce no shift. In some embodiments, the method allows for the shift count to be specified in bytes or in bits.
A method of performing a variable shift operation by simulating a first shift instruction that shifts a first operand by a variable shift count, the method comprising:
For a microprocessor that does not allow a variable shift operation for at least one operand size, a method of performing a variable shift operation by simulating a first shift instruction that shifts a first operand by a shift count, the method comprising:
A computer readable medium storing a computer program for a microprocessor that does not allow a shift operation with a variable shift length for at least one operand size, said computer program for simulating said variable shift operation, said computer program comprising sets of executable instructions for:
Dependencies are inferred from the claim text.