Performing variable and/or bitwise shift operation for a shift instruction that does not provide a variable or bitwise shift option
Abstract
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.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 23 · Forward citations: 2.
Claims (2 — 1 Independent, 1 Dependent)
- Claim 1Independent Claim
A method of shifting content of a particular size in a register by a variable shift count using a microprocessor that does not allow a variable shift operation for an operand of the particular size, the method comprising: computing a number of bits to shift the content based on the variable shift count; determining, based on the number of bits to shift, whether shifting of the content is for “less than” or “greater than or equal to” half of the particular size; and performing two shift operations, wherein based on the determination, one of the two shifts performs a shift by 0 and the other shi
- Claim 2Depends on #1
The method of claim 1 , wherein the register is a first register, the method further comprising shifting the content in the first register by half of a size of the register and storing a resultin
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (2 of 2 total)
| Patent | Title | Year | Citations |
|---|---|---|---|
| US 2019138308 A1 | Unaligned memory accesses | — | 7 |
| US 9,104,532 B2 | Sequential location accesses in an active memory device | 2015 | 0 |
References Cited — Backward Prior Art (23)
Non-Patent Literature (2)
- Author Unknown, "IA-32 Intel Architecture Software Developer's Manual," Month N/A 2003, p. 3-624, vol. 2: Instruction Set Reference, Intel Corporation, Colorado, USA.
- U.S. Appl. No. 11/422,325, filed Sep. 18, 2009, Jeong, Hyeonkuk, et al.