tests/xics: Ensure no compiler optimisations in delay()

In case it would be tempted to "read ahead" the delay function

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
jtag-port
Benjamin Herrenschmidt 4 years ago
parent 0fa14f6dec
commit 0b82024b01

@ -12,8 +12,8 @@ void delay(void)
{ {
static volatile int i; static volatile int i;


for (i = 0; i < 10; ++i) for (i = 0; i < 16; ++i)
; __asm__ volatile("" : : : "memory");
} }


void print_number(unsigned int i) // only for i = 0-999 void print_number(unsigned int i) // only for i = 0-999

Loading…
Cancel
Save