Skip to content

Commit

Permalink
pipeline: fix endianness conversions
Browse files Browse the repository at this point in the history
[ upstream commit 48ad589 ]

The SWX pipeline instructions work with operands of different types:
header fields (h.header.field), packet meta-data (m.field), extern
object mailbox field (e.obj.field), extern function (f.field), action
data read from table entries (t.field), or immediate values; hence the
HMEFTI acronym. The H operands are stored in network byte order (NBO),
while the MEFT operands are stored in host byte order (HBO), hence the
need to operate endianness conversions.

Some of the endianness conversion macros were not working correctly
for some cases such as operands of different sizes, and they are fixed
now. Affected instructions: mov, and, or, xor, jmpeq, jmpneq.

Fixes: 7210349 ("pipeline: add SWX move instruction")
Fixes: 650195c ("pipeline: introduce SWX and instruction")
Fixes: 8f79619 ("pipeline: introduce SWX or instruction")
Fixes: b4e607f ("pipeline: introduce SWX XOR instruction")
Fixes: b3947e2 ("pipeline: introduce SWX jump and return instructions")

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
  • Loading branch information
cristian-dumitrescu authored and steevenlee committed May 8, 2021
1 parent 6b76e06 commit 51ca414
Showing 1 changed file with 382 additions and 88 deletions.
Loading

0 comments on commit 51ca414

Please sign in to comment.