65816-llvm-mos/benchmarks/globalArrFill.c
2026-05-18 14:43:35 -05:00

8 lines
286 B
C

// Fill the first n elements of a global i16 array. Exercises the
// store-side of the W65816UnLSR + STA_AbsX combine for global-array
// loops.
unsigned short globalArrF[100];
void globalArrFill(unsigned short n) {
for (unsigned short i = 0; i < n; i++) globalArrF[i] = i + 1;
}