NordicSemiconductor / zcbor

Low footprint C/C++ CBOR library and Python tool providing code generation from CDDL descriptions.
Apache License 2.0
114 stars 34 forks source link

zcbor_decode: Add _pexpect() functions #343

Closed oyvindronningstad closed 1 year ago

oyvindronningstad commented 1 year ago

and make sure multi_(en|de)code always uses functions with pointer arguments. This is to avoid problems with register alignment or other issues in the calling conventions of pointer arguments vs. other arguments. E.g. on cortex-m a uint64 as the 2nd argument will be aligned to registers R2 and R3 instead of R1, while a uint32 or a pointer will use R1.

Add test that fails on the previous implementation and is fixed by this change.