alegnani / pancake-verifier

2 stars 0 forks source link

address assertions for memory ops #48

Closed JunmingZhao42 closed 3 weeks ago

JunmingZhao42 commented 4 weeks ago

I noticed that there are assertions for addresses before memory operations, for example: !ld32 value, ptr; would have assertion assert ptr % 8 == 0. However in this case ptr is not necessarily word-size aligned, such as accessing 32-bit device registers.

I think perhaps for the shared memory ops, it'd make more sense if we just let users add assertions from the Pancake side?

alegnani commented 4 weeks ago

I agree that the check for the addresses being 8-byte aligned is definitely wrong. Aren't these register at least 4-byte aligned?

JunmingZhao42 commented 4 weeks ago

Yes these registers are 4-byte aligned.