test32
auto test32 =
q{--- test32
// Test reg alloc xchg generation
@extern(module, "host")
void print(i32); // external
void fibonacci() {
i32 lo = 0;
i32 hi = 1;
while (hi < 10000) {
i32 tmp = hi;
hi = hi + lo;
lo = tmp;
print(lo);
}
while (hi < 10000) {
i32 tmp = hi;
hi = hi + lo;
lo = tmp;
print(lo);
}
while (hi < 10000) {
i32 tmp = hi;
hi = hi + lo;
lo = tmp;
print(lo);
}
while (hi < 10000) {
i32 tmp = hi;
hi = hi + lo;
lo = tmp;
print(lo);
}
}
};
tests passing
functionsvariables