Commit f23baa572f96e1e13d7f1a3c8addb61b5d0dbd29

Authored by Tom Rini
1 parent 82ceba2ca2

cmd_dhry.c: Use lldiv for vax_mips calculation as well

Since dhry_per_sec is a u64 we must also use lldiv here when working
with it.  Otherwise:
../lib/dhry/cmd_dhry.c:(.text.do_dhry+0xd8): undefined reference to `__udivdi3'

On some platforms.

Signed-off-by: Tom Rini <trini@konsulko.com>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -22,7 +22,7 @@
22 22 dhry(iterations);
23 23 duration = get_timer(start);
24 24 dhry_per_sec = lldiv(iterations * 1000ULL, duration);
25   - vax_mips = dhry_per_sec / 1757;
  25 + vax_mips = lldiv(dhry_per_sec, 1757);
26 26 printf("%d iterations in %lu ms: %lu/s, %lu DMIPS\n", iterations,
27 27 duration, (ulong)dhry_per_sec, vax_mips);
28 28