0001-Remove-prompt.patch 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From 006a56ac03292e38992cb946b0bbf7b357bd3b44 Mon Sep 17 00:00:00 2001
  2. From: "weiheng.cheng" <weiheng.cheng@starfivetech.com>
  3. Date: Fri, 24 Nov 2023 16:39:40 +0800
  4. Subject: [PATCH 1/1] Remove prompt Remove prompt for number of runs when
  5. DHRY_ITERS has been defined.
  6. Rebase patch using existing commit:
  7. https://github.com/sifive/benchmark-dhrystone/commit/bb3afcb3abd83f1541db9a0dbe47e1b284da7772
  8. Credit to @jstraus59
  9. Signed-off-by: weiheng.cheng <weiheng.cheng@starfivetech.com>
  10. ---
  11. dhry_1.c | 4 ++++
  12. 1 file changed, 4 insertions(+)
  13. diff --git a/dhry_1.c b/dhry_1.c
  14. index 1157d2d..88b69e4 100644
  15. --- a/dhry_1.c
  16. +++ b/dhry_1.c
  17. @@ -121,6 +121,9 @@ main ()
  18. printf ("Program compiled without 'register' attribute\n");
  19. printf ("\n");
  20. }
  21. +#ifdef DHRY_ITERS
  22. + Number_Of_Runs = DHRY_ITERS;
  23. +#else
  24. printf ("Please give the number of runs through the benchmark: ");
  25. {
  26. int n;
  27. @@ -128,6 +131,7 @@ main ()
  28. Number_Of_Runs = n;
  29. }
  30. printf ("\n");
  31. +#endif
  32. printf ("Execution starts, %d runs through Dhrystone\n", Number_Of_Runs);
  33. --
  34. 2.25.1