-
Notifications
You must be signed in to change notification settings - Fork 15
Small Data
Claudiu Zissulescu edited this page Apr 13, 2017
·
9 revisions
Data Type | Range | #Elements | Size |
---|---|---|---|
1 byte | [-256,255] | 512 | 512 bytes |
2 bytes | [-256,510] | 383 | 766 bytes |
4 bytes | [-256,1020] | 319 | 1276 bytes |
The lower limit depends on the possibility to access byte-aligned datum, hence, it is hard connected to the range of s9 short immediate (i.e., -256). Any other access can be done using address-scaling feature of the load/store instructions.
The number of elements which we can fit in sdata section highly depends on the data alignment properties. For example if we use only 4 byte datum, 1 byte aligned, we can fit up to 128 elements in the section.