LoadMemShift multiplies the first 4 bits of the byte at packet[Off] by 4 and stores the result in register X. This instruction is mainly useful to load into X the length of an IPv4 packet header in a single instruction, rather than have to do the arithmetic on the header's first byte by hand.
| 292 | // IPv4 packet header in a single instruction, rather than have to do |
| 293 | // the arithmetic on the header's first byte by hand. |
| 294 | type LoadMemShift struct { |
| 295 | Off uint32 |
| 296 | } |
| 297 | |
| 298 | // Assemble implements the Instruction Assemble method. |
| 299 | func (a LoadMemShift) Assemble() (RawInstruction, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected