oxidecomputer / p4

A P4 compiler
Mozilla Public License 2.0
112 stars 5 forks source link

endian specific adders #19

Closed rcgoodfellow closed 1 year ago

rcgoodfellow commented 1 year ago

Compiled bit types have a little-endian underlying representation. This is, however, an implementation detail. At one point, they had big endian representation. When the transition to little endian was made, some details were left behind in the adder functions. This resulted in garbage values from add ops.

This commit introduces endian-specific adders and moves compiled code to add_le.