douggilliland / R32V2020

My 32-bit RISC CPU for smallish FPGAs
GNU General Public License v3.0
17 stars 3 forks source link

Make sure I don't overflow the constants #21

Open mjgpy3 opened 5 years ago

mjgpy3 commented 5 years ago

I'd like to assert that bytes/shorts/longs don't overflow their space. I'm not handling that right now.

mjgpy3 commented 5 years ago

For example

foo: .byte 0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41

overflows its space as the following lines

:0414141414141414141414141414141414141414141414141414141414141414141414141414145414141414141414E :00000001FF