You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the stack is big, Stack Allocation will introduce memory accesses with big offsets that are not valid in ARM. For instance,
// Stack allocation needs to split the array set and get operations into several
// instructions to that the immediates fit in one instruction.
// The LDR/STR instructions take an immediate of up to 12 bits.
// Since elements are 4 bytes, we the size limit for an array is 2^12 / 4.
param int LIMIT = 1024;
export
fn large_array() -> reg u32 {
reg u32 r;
stack u32[LIMIT + 1] a;
r = 0;
a[LIMIT] = r;
r = a[LIMIT];
return r;
}
If the stack is big, Stack Allocation will introduce memory accesses with big offsets that are not valid in ARM. For instance,
Also, this generates invalid assembly
I will add a new
extra_op
that gets compiled to several instructions to load the offset and perform the load.The text was updated successfully, but these errors were encountered: