Make dhrystone report correct-ish numbers
authorAndrew Waterman <waterman@cs.berkeley.edu>
Fri, 1 May 2015 07:56:39 +0000 (00:56 -0700)
committerAndrew Waterman <waterman@cs.berkeley.edu>
Fri, 1 May 2015 07:56:39 +0000 (00:56 -0700)
benchmarks/Makefile
benchmarks/common/crt.S
benchmarks/common/test.ld
benchmarks/dhrystone/dhrystone.c
benchmarks/dhrystone/dhrystone.h
benchmarks/dhrystone/dhrystone_main.c

index 3cb899a665a8895b0655acb396c93fce3438788c..9738f6146ad57c35c73905a25017b401806cf535 100644 (file)
@@ -52,7 +52,7 @@ HOST_COMP = gcc $(HOST_OPTS)
 
 RISCV_PREFIX=riscv64-unknown-elf-
 RISCV_GCC = $(RISCV_PREFIX)gcc
 
 RISCV_PREFIX=riscv64-unknown-elf-
 RISCV_GCC = $(RISCV_PREFIX)gcc
-RISCV_GCC_OPTS = -static -Wa,-march=RVIMAFDXhwacha -std=gnu99 -O2 -ffast-math
+RISCV_GCC_OPTS = -static -Wa,-march=RVIMAFDXhwacha -std=gnu99 -O2 -ffast-math -fno-common -fno-builtin-printf
 RISCV_LINK = $(RISCV_GCC) -T $(bmarkdir)/common/test.ld $(incs)
 RISCV_LINK_MT = $(RISCV_GCC) -T $(bmarkdir)/common/test-mt.ld
 RISCV_LINK_OPTS = -nostdlib -nostartfiles -ffast-math -lc -lgcc
 RISCV_LINK = $(RISCV_GCC) -T $(bmarkdir)/common/test.ld $(incs)
 RISCV_LINK_MT = $(RISCV_GCC) -T $(bmarkdir)/common/test-mt.ld
 RISCV_LINK_OPTS = -nostdlib -nostartfiles -ffast-math -lc -lgcc
index 0c99c4a913df39a71c008ee1b9b38838500ff4f3..97b90d53dfb0d9a81e5c5cdbaa980a642a55e335 100644 (file)
@@ -131,6 +131,9 @@ _start:
   fmv.s.x f31,x0
 1:
 
   fmv.s.x f31,x0
 1:
 
+  # initialize global pointer
+  la gp, _gp
+
   la  tp, _end + 63
   and tp, tp, -64
 
   la  tp, _end + 63
   and tp, tp, -64
 
index 816c948d691519d2f56e2fe22e553969cabcc949..082891c3c195138acf9b979ba1cbe4efe8991387 100644 (file)
@@ -28,8 +28,20 @@ SECTIONS
     *(.text)
   }
 
     *(.text)
   }
 
-  /* data segmemt */
+  /* data segment */
   .data : { *(.data) }
   .data : { *(.data) }
+
+  .sdata : {
+    _gp = . + 0x800;
+    *(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2) *(.srodata*)
+    *(.sdata .sdata.* .gnu.linkonce.s.*)
+  }
+
+  /* bss segment */
+  .sbss : {
+    *(.sbss .sbss.* .gnu.linkonce.sb.*)
+    *(.scommon)
+  }
   .bss : { *(.bss) }
 
   /* thread-local data segment */
   .bss : { *(.bss) }
 
   /* thread-local data segment */
index 1c0ad923ea5136dfd316b8dd82540e1bdd415716..418602a45d2345aee0b2feb3251e4df75ef9c676 100644 (file)
@@ -1,5 +1,7 @@
 // See LICENSE for license details.
 
 // See LICENSE for license details.
 
+#pragma GCC optimize ("no-inline")
+
 #include "dhrystone.h"
 
 #ifndef REG
 #include "dhrystone.h"
 
 #ifndef REG
@@ -15,10 +17,13 @@ extern  int     Int_Glob;
 extern  char    Ch_1_Glob;
 
 
 extern  char    Ch_1_Glob;
 
 
-void Proc_6(Enumeration Enum_Val_Par, Enumeration* Enum_Ref_Par)
+Proc_6 (Enum_Val_Par, Enum_Ref_Par)
 /*********************************/
     /* executed once */
     /* Enum_Val_Par == Ident_3, Enum_Ref_Par becomes Ident_2 */
 /*********************************/
     /* executed once */
     /* Enum_Val_Par == Ident_3, Enum_Ref_Par becomes Ident_2 */
+
+Enumeration  Enum_Val_Par;
+Enumeration *Enum_Ref_Par;
 {
   *Enum_Ref_Par = Enum_Val_Par;
   if (! Func_3 (Enum_Val_Par))
 {
   *Enum_Ref_Par = Enum_Val_Par;
   if (! Func_3 (Enum_Val_Par))
@@ -46,7 +51,7 @@ void Proc_6(Enumeration Enum_Val_Par, Enumeration* Enum_Ref_Par)
 } /* Proc_6 */
 
 
 } /* Proc_6 */
 
 
-void Proc_7(int Int_1_Par_Val, int Int_2_Par_Val, int* Int_Par_Ref)
+Proc_7 (Int_1_Par_Val, Int_2_Par_Val, Int_Par_Ref)
 /**********************************************/
     /* executed three times                                      */ 
     /* first call:      Int_1_Par_Val == 2, Int_2_Par_Val == 3,  */
 /**********************************************/
     /* executed three times                                      */ 
     /* first call:      Int_1_Par_Val == 2, Int_2_Par_Val == 3,  */
@@ -55,6 +60,9 @@ void Proc_7(int Int_1_Par_Val, int Int_2_Par_Val, int* Int_Par_Ref)
     /*                  Int_Par_Ref becomes 17                   */
     /* third call:      Int_1_Par_Val == 6, Int_2_Par_Val == 10, */
     /*                  Int_Par_Ref becomes 18                   */
     /*                  Int_Par_Ref becomes 17                   */
     /* third call:      Int_1_Par_Val == 6, Int_2_Par_Val == 10, */
     /*                  Int_Par_Ref becomes 18                   */
+One_Fifty       Int_1_Par_Val;
+One_Fifty       Int_2_Par_Val;
+One_Fifty      *Int_Par_Ref;
 {
   One_Fifty Int_Loc;
 
 {
   One_Fifty Int_Loc;
 
@@ -63,11 +71,15 @@ void Proc_7(int Int_1_Par_Val, int Int_2_Par_Val, int* Int_Par_Ref)
 } /* Proc_7 */
 
 
 } /* Proc_7 */
 
 
-void Proc_8(Arr_1_Dim Arr_1_Par_Ref, Arr_2_Dim Arr_2_Par_Ref, int Int_1_Par_Val, int Int_2_Par_Val)
+Proc_8 (Arr_1_Par_Ref, Arr_2_Par_Ref, Int_1_Par_Val, Int_2_Par_Val)
 /*********************************************************************/
     /* executed once      */
     /* Int_Par_Val_1 == 3 */
     /* Int_Par_Val_2 == 7 */
 /*********************************************************************/
     /* executed once      */
     /* Int_Par_Val_1 == 3 */
     /* Int_Par_Val_2 == 7 */
+Arr_1_Dim       Arr_1_Par_Ref;
+Arr_2_Dim       Arr_2_Par_Ref;
+int             Int_1_Par_Val;
+int             Int_2_Par_Val;
 {
   REG One_Fifty Int_Index;
   REG One_Fifty Int_Loc;
 {
   REG One_Fifty Int_Index;
   REG One_Fifty Int_Loc;
@@ -84,12 +96,15 @@ void Proc_8(Arr_1_Dim Arr_1_Par_Ref, Arr_2_Dim Arr_2_Par_Ref, int Int_1_Par_Val,
 } /* Proc_8 */
 
 
 } /* Proc_8 */
 
 
-Enumeration Func_1 (char Ch_1_Par_Val, char Ch_2_Par_Val)
+Enumeration Func_1 (Ch_1_Par_Val, Ch_2_Par_Val)
 /*************************************************/
     /* executed three times                                         */
     /* first call:      Ch_1_Par_Val == 'H', Ch_2_Par_Val == 'R'    */
     /* second call:     Ch_1_Par_Val == 'A', Ch_2_Par_Val == 'C'    */
     /* third call:      Ch_1_Par_Val == 'B', Ch_2_Par_Val == 'C'    */
 /*************************************************/
     /* executed three times                                         */
     /* first call:      Ch_1_Par_Val == 'H', Ch_2_Par_Val == 'R'    */
     /* second call:     Ch_1_Par_Val == 'A', Ch_2_Par_Val == 'C'    */
     /* third call:      Ch_1_Par_Val == 'B', Ch_2_Par_Val == 'C'    */
+
+Capital_Letter   Ch_1_Par_Val;
+Capital_Letter   Ch_2_Par_Val;
 {
   Capital_Letter        Ch_1_Loc;
   Capital_Letter        Ch_2_Loc;
 {
   Capital_Letter        Ch_1_Loc;
   Capital_Letter        Ch_2_Loc;
@@ -107,11 +122,14 @@ Enumeration Func_1 (char Ch_1_Par_Val, char Ch_2_Par_Val)
 } /* Func_1 */
 
 
 } /* Func_1 */
 
 
-Boolean Func_2(Str_30 Str_1_Par_Ref, Str_30 Str_2_Par_Ref)
+Boolean Func_2 (Str_1_Par_Ref, Str_2_Par_Ref)
 /*************************************************/
     /* executed once */
     /* Str_1_Par_Ref == "DHRYSTONE PROGRAM, 1'ST STRING" */
     /* Str_2_Par_Ref == "DHRYSTONE PROGRAM, 2'ND STRING" */
 /*************************************************/
     /* executed once */
     /* Str_1_Par_Ref == "DHRYSTONE PROGRAM, 1'ST STRING" */
     /* Str_2_Par_Ref == "DHRYSTONE PROGRAM, 2'ND STRING" */
+
+Str_30  Str_1_Par_Ref;
+Str_30  Str_2_Par_Ref;
 {
   REG One_Thirty        Int_Loc;
       Capital_Letter    Ch_Loc;
 {
   REG One_Thirty        Int_Loc;
       Capital_Letter    Ch_Loc;
@@ -146,10 +164,11 @@ Boolean Func_2(Str_30 Str_1_Par_Ref, Str_30 Str_2_Par_Ref)
 } /* Func_2 */
 
 
 } /* Func_2 */
 
 
-Boolean Func_3(Enumeration Enum_Par_Val)
+Boolean Func_3 (Enum_Par_Val)
 /***************************/
     /* executed once        */
     /* Enum_Par_Val == Ident_3 */
 /***************************/
     /* executed once        */
     /* Enum_Par_Val == Ident_3 */
+Enumeration Enum_Par_Val;
 {
   Enumeration Enum_Loc;
 
 {
   Enumeration Enum_Loc;
 
@@ -160,3 +179,4 @@ Boolean Func_3(Enumeration Enum_Par_Val)
   else /* not executed */
     return (false);
 } /* Func_3 */
   else /* not executed */
     return (false);
 } /* Func_3 */
+
index f3f7bfd59ca159423b0dc3df5d407017e00f09a3..767a65728b796ab462b593071ed2f39060a27bcb 100644 (file)
@@ -382,10 +382,10 @@ extern clock_t    clock();
 #elif defined(__riscv)
 
 #define HZ 976563
 #elif defined(__riscv)
 
 #define HZ 976563
-#define Too_Small_Time 50
+#define Too_Small_Time 1
 #define CLOCK_TYPE "rdcycle()"
 #define CLOCK_TYPE "rdcycle()"
-#define Start_Timer() Begin_Time = rdcycle()/1024
-#define Stop_Timer() End_Time = rdcycle()/1024
+#define Start_Timer() Begin_Time = rdcycle()
+#define Stop_Timer() End_Time = rdcycle()
 
 #else
                 /* Use times(2) time function unless    */
 
 #else
                 /* Use times(2) time function unless    */
@@ -474,16 +474,4 @@ typedef struct record
           } variant;
       } Rec_Type, *Rec_Pointer;
 
           } variant;
       } Rec_Type, *Rec_Pointer;
 
-void Proc_1(Rec_Pointer Ptr_Val_Par);
-void Proc_2(int* Int_Par_Ref);
-void Proc_3(Rec_Pointer* Ptr_Ref_Par);
-void Proc_4();
-void Proc_5();
-void Proc_6(Enumeration Enum_Val_Par, Enumeration* Enum_Ref_Par);
-void Proc_7(int Int_1_Par_Val, int Int_2_Par_Val, int* Int_Par_Ref);
-void Proc_8(Arr_1_Dim Arr_1_Par_Ref, Arr_2_Dim Arr_2_Par_Ref, int Int_1_Par_Val, int Int_2_Par_Val);
-Enumeration Func_1 (char Ch_1_Par_Val, char Ch_2_Par_Val);
-Boolean Func_2(Str_30 Str_1_Par_Ref, Str_30 Str_2_Par_Ref);
-Boolean Func_3(Enumeration Enum_Par_Val);
-
 #endif
 #endif
index b4bfda17b6566103808d116a844789615e401dd1..34451f94472face60b6fa214c18a9c0d869b3270 100644 (file)
@@ -8,6 +8,8 @@
 // You should not change anything except the HOST_DEBUG and
 // PREALLOCATE macros for your timing run.
 
 // You should not change anything except the HOST_DEBUG and
 // PREALLOCATE macros for your timing run.
 
+#pragma GCC optimize ("no-inline")
+
 #include "dhrystone.h"
 
 //--------------------------------------------------------------------------
 #include "dhrystone.h"
 
 //--------------------------------------------------------------------------
@@ -38,9 +40,9 @@
 #endif
 
 #if HOST_DEBUG
 #endif
 
 #if HOST_DEBUG
-# define do_fprintf fprintf
+# define debug_printf printf
 #else
 #else
-int __attribute__((noinline)) do_fprintf(FILE* f, const char* str, ...)
+void debug_printf(const char* str, ...)
 {
   return 0;
 }
 {
   return 0;
 }
@@ -61,6 +63,10 @@ char            Ch_1_Glob,
 int             Arr_1_Glob [50];
 int             Arr_2_Glob [50] [50];
 
 int             Arr_1_Glob [50];
 int             Arr_2_Glob [50] [50];
 
+extern char     *malloc ();
+Enumeration     Func_1 ();
+  /* forward declaration necessary since Enumeration may not simply be int */
+
 #ifndef REG
         Boolean Reg = false;
 #define REG
 #ifndef REG
         Boolean Reg = false;
 #define REG
@@ -77,7 +83,7 @@ Boolean               Done;
 long            Begin_Time,
                 End_Time,
                 User_Time;
 long            Begin_Time,
                 End_Time,
                 User_Time;
-float           Microseconds,
+long            Microseconds,
                 Dhrystones_Per_Second;
 
 /* end of variables for time measurement */
                 Dhrystones_Per_Second;
 
 /* end of variables for time measurement */
@@ -102,18 +108,15 @@ int main (int argc, char** argv)
 #if HOST_DEBUG
   if (argc > 2)
   {
 #if HOST_DEBUG
   if (argc > 2)
   {
-     do_fprintf (stdout, "Usage: %s [number of loops]\n", argv[0]);
+     printf("Usage: %s [number of loops]\n", argv[0]);
      exit (1);
   }
   if (argc == 2)
   {
      Number_Of_Runs = atoi (argv[1]);
      exit (1);
   }
   if (argc == 2)
   {
      Number_Of_Runs = atoi (argv[1]);
-  } else
-#endif
-  {
-     Number_Of_Runs = NUMBER_OF_RUNS;
   }
   }
-  if (Number_Of_Runs <= 0)
+  else if (Number_Of_Runs <= 0)
+#endif
   {
      Number_Of_Runs = NUMBER_OF_RUNS;
   }
   {
      Number_Of_Runs = NUMBER_OF_RUNS;
   }
@@ -137,26 +140,22 @@ int main (int argc, char** argv)
         /* Warning: With 16-Bit processors and Number_Of_Runs > 32000,  */
         /* overflow may occur for this array element.                   */
 
         /* Warning: With 16-Bit processors and Number_Of_Runs > 32000,  */
         /* overflow may occur for this array element.                   */
 
-#if HOST_DEBUG
-  do_fprintf (stdout, "\n");
-  do_fprintf (stdout, "Dhrystone Benchmark, Version %s\n", Version);
+  debug_printf("\n");
+  debug_printf("Dhrystone Benchmark, Version %s\n", Version);
   if (Reg)
   {
   if (Reg)
   {
-    do_fprintf (stdout, "Program compiled with 'register' attribute\n");
+    debug_printf("Program compiled with 'register' attribute\n");
   }
   else
   {
   }
   else
   {
-    do_fprintf (stdout, "Program compiled without 'register' attribute\n");
+    debug_printf("Program compiled without 'register' attribute\n");
   }
   }
-  do_fprintf (stdout, "Using %s, HZ=%d\n", CLOCK_TYPE, HZ);
-  do_fprintf (stdout, "\n");
-#endif
+  debug_printf("Using %s, HZ=%d\n", CLOCK_TYPE, HZ);
+  debug_printf("\n");
 
   Done = false;
   while (!Done) {
 
   Done = false;
   while (!Done) {
-#if HOST_DEBUG
-    do_fprintf (stdout, "Trying %d runs through Dhrystone:\n", Number_Of_Runs);
-#endif
+    debug_printf("Trying %d runs through Dhrystone:\n", Number_Of_Runs);
 
     /***************/
     /* Start timer */
 
     /***************/
     /* Start timer */
@@ -222,83 +221,78 @@ int main (int argc, char** argv)
 
     if (User_Time < Too_Small_Time)
     {
 
     if (User_Time < Too_Small_Time)
     {
-      do_fprintf (stdout, "Measured time too small to obtain meaningful results\n");
+      printf("Measured time too small to obtain meaningful results\n");
       Number_Of_Runs = Number_Of_Runs * 10;
       Number_Of_Runs = Number_Of_Runs * 10;
-      do_fprintf (stdout, "\n");
+      printf("\n");
     } else Done = true;
   }
 
     } else Done = true;
   }
 
-  do_fprintf (stderr, "Final values of the variables used in the benchmark:\n");
-  do_fprintf (stderr, "\n");
-  do_fprintf (stderr, "Int_Glob:            %d\n", Int_Glob);
-  do_fprintf (stderr, "        should be:   %d\n", 5);
-  do_fprintf (stderr, "Bool_Glob:           %d\n", Bool_Glob);
-  do_fprintf (stderr, "        should be:   %d\n", 1);
-  do_fprintf (stderr, "Ch_1_Glob:           %c\n", Ch_1_Glob);
-  do_fprintf (stderr, "        should be:   %c\n", 'A');
-  do_fprintf (stderr, "Ch_2_Glob:           %c\n", Ch_2_Glob);
-  do_fprintf (stderr, "        should be:   %c\n", 'B');
-  do_fprintf (stderr, "Arr_1_Glob[8]:       %d\n", Arr_1_Glob[8]);
-  do_fprintf (stderr, "        should be:   %d\n", 7);
-  do_fprintf (stderr, "Arr_2_Glob[8][7]:    %d\n", Arr_2_Glob[8][7]);
-  do_fprintf (stderr, "        should be:   Number_Of_Runs + 10\n");
-  do_fprintf (stderr, "Ptr_Glob->\n");
-  do_fprintf (stderr, "  Ptr_Comp:          %d\n", (long) Ptr_Glob->Ptr_Comp);
-  do_fprintf (stderr, "        should be:   (implementation-dependent)\n");
-  do_fprintf (stderr, "  Discr:             %d\n", Ptr_Glob->Discr);
-  do_fprintf (stderr, "        should be:   %d\n", 0);
-  do_fprintf (stderr, "  Enum_Comp:         %d\n", Ptr_Glob->variant.var_1.Enum_Comp);
-  do_fprintf (stderr, "        should be:   %d\n", 2);
-  do_fprintf (stderr, "  Int_Comp:          %d\n", Ptr_Glob->variant.var_1.Int_Comp);
-  do_fprintf (stderr, "        should be:   %d\n", 17);
-  do_fprintf (stderr, "  Str_Comp:          %s\n", Ptr_Glob->variant.var_1.Str_Comp);
-  do_fprintf (stderr, "        should be:   DHRYSTONE PROGRAM, SOME STRING\n");
-  do_fprintf (stderr, "Next_Ptr_Glob->\n");
-  do_fprintf (stderr, "  Ptr_Comp:          %d\n", (long) Next_Ptr_Glob->Ptr_Comp);
-  do_fprintf (stderr, "        should be:   (implementation-dependent), same as above\n");
-  do_fprintf (stderr, "  Discr:             %d\n", Next_Ptr_Glob->Discr);
-  do_fprintf (stderr, "        should be:   %d\n", 0);
-  do_fprintf (stderr, "  Enum_Comp:         %d\n", Next_Ptr_Glob->variant.var_1.Enum_Comp);
-  do_fprintf (stderr, "        should be:   %d\n", 1);
-  do_fprintf (stderr, "  Int_Comp:          %d\n", Next_Ptr_Glob->variant.var_1.Int_Comp);
-  do_fprintf (stderr, "        should be:   %d\n", 18);
-  do_fprintf (stderr, "  Str_Comp:          %s\n",
+  debug_printf("Final values of the variables used in the benchmark:\n");
+  debug_printf("\n");
+  debug_printf("Int_Glob:            %d\n", Int_Glob);
+  debug_printf("        should be:   %d\n", 5);
+  debug_printf("Bool_Glob:           %d\n", Bool_Glob);
+  debug_printf("        should be:   %d\n", 1);
+  debug_printf("Ch_1_Glob:           %c\n", Ch_1_Glob);
+  debug_printf("        should be:   %c\n", 'A');
+  debug_printf("Ch_2_Glob:           %c\n", Ch_2_Glob);
+  debug_printf("        should be:   %c\n", 'B');
+  debug_printf("Arr_1_Glob[8]:       %d\n", Arr_1_Glob[8]);
+  debug_printf("        should be:   %d\n", 7);
+  debug_printf("Arr_2_Glob[8][7]:    %d\n", Arr_2_Glob[8][7]);
+  debug_printf("        should be:   Number_Of_Runs + 10\n");
+  debug_printf("Ptr_Glob->\n");
+  debug_printf("  Ptr_Comp:          %d\n", (long) Ptr_Glob->Ptr_Comp);
+  debug_printf("        should be:   (implementation-dependent)\n");
+  debug_printf("  Discr:             %d\n", Ptr_Glob->Discr);
+  debug_printf("        should be:   %d\n", 0);
+  debug_printf("  Enum_Comp:         %d\n", Ptr_Glob->variant.var_1.Enum_Comp);
+  debug_printf("        should be:   %d\n", 2);
+  debug_printf("  Int_Comp:          %d\n", Ptr_Glob->variant.var_1.Int_Comp);
+  debug_printf("        should be:   %d\n", 17);
+  debug_printf("  Str_Comp:          %s\n", Ptr_Glob->variant.var_1.Str_Comp);
+  debug_printf("        should be:   DHRYSTONE PROGRAM, SOME STRING\n");
+  debug_printf("Next_Ptr_Glob->\n");
+  debug_printf("  Ptr_Comp:          %d\n", (long) Next_Ptr_Glob->Ptr_Comp);
+  debug_printf("        should be:   (implementation-dependent), same as above\n");
+  debug_printf("  Discr:             %d\n", Next_Ptr_Glob->Discr);
+  debug_printf("        should be:   %d\n", 0);
+  debug_printf("  Enum_Comp:         %d\n", Next_Ptr_Glob->variant.var_1.Enum_Comp);
+  debug_printf("        should be:   %d\n", 1);
+  debug_printf("  Int_Comp:          %d\n", Next_Ptr_Glob->variant.var_1.Int_Comp);
+  debug_printf("        should be:   %d\n", 18);
+  debug_printf("  Str_Comp:          %s\n",
                                 Next_Ptr_Glob->variant.var_1.Str_Comp);
                                 Next_Ptr_Glob->variant.var_1.Str_Comp);
-  do_fprintf (stderr, "        should be:   DHRYSTONE PROGRAM, SOME STRING\n");
-  do_fprintf (stderr, "Int_1_Loc:           %d\n", Int_1_Loc);
-  do_fprintf (stderr, "        should be:   %d\n", 5);
-  do_fprintf (stderr, "Int_2_Loc:           %d\n", Int_2_Loc);
-  do_fprintf (stderr, "        should be:   %d\n", 13);
-  do_fprintf (stderr, "Int_3_Loc:           %d\n", Int_3_Loc);
-  do_fprintf (stderr, "        should be:   %d\n", 7);
-  do_fprintf (stderr, "Enum_Loc:            %d\n", Enum_Loc);
-  do_fprintf (stderr, "        should be:   %d\n", 1);
-  do_fprintf (stderr, "Str_1_Loc:           %s\n", Str_1_Loc);
-  do_fprintf (stderr, "        should be:   DHRYSTONE PROGRAM, 1'ST STRING\n");
-  do_fprintf (stderr, "Str_2_Loc:           %s\n", Str_2_Loc);
-  do_fprintf (stderr, "        should be:   DHRYSTONE PROGRAM, 2'ND STRING\n");
-  do_fprintf (stderr, "\n");
-
-
-#if HOST_DEBUG
-    Microseconds = (float) User_Time * Mic_secs_Per_Second 
-                        / ((float) HZ * ((float) Number_Of_Runs));
-    Dhrystones_Per_Second = ((float) HZ * (float) Number_Of_Runs)
-                        / (float) User_Time;
-
-    do_fprintf (stdout, "Microseconds for one run through Dhrystone: ");
-    do_fprintf (stdout, "%10.1f \n", Microseconds);
-    do_fprintf (stdout, "Dhrystones per Second:                      ");
-    do_fprintf (stdout, "%10.0f \n", Dhrystones_Per_Second);
-    do_fprintf (stdout, "\n");
-#endif
+  debug_printf("        should be:   DHRYSTONE PROGRAM, SOME STRING\n");
+  debug_printf("Int_1_Loc:           %d\n", Int_1_Loc);
+  debug_printf("        should be:   %d\n", 5);
+  debug_printf("Int_2_Loc:           %d\n", Int_2_Loc);
+  debug_printf("        should be:   %d\n", 13);
+  debug_printf("Int_3_Loc:           %d\n", Int_3_Loc);
+  debug_printf("        should be:   %d\n", 7);
+  debug_printf("Enum_Loc:            %d\n", Enum_Loc);
+  debug_printf("        should be:   %d\n", 1);
+  debug_printf("Str_1_Loc:           %s\n", Str_1_Loc);
+  debug_printf("        should be:   DHRYSTONE PROGRAM, 1'ST STRING\n");
+  debug_printf("Str_2_Loc:           %s\n", Str_2_Loc);
+  debug_printf("        should be:   DHRYSTONE PROGRAM, 2'ND STRING\n");
+  debug_printf("\n");
+
+
+  Microseconds = ((User_Time / Number_Of_Runs) * Mic_secs_Per_Second) / HZ;
+  Dhrystones_Per_Second = (HZ * Number_Of_Runs) / User_Time;
+
+  printf("Microseconds for one run through Dhrystone: %ld\n", Microseconds);
+  printf("Dhrystones per Second:                      %ld\n", Dhrystones_Per_Second);
 
   return 0;
 }
 
 
 
   return 0;
 }
 
 
-void Proc_1(Rec_Pointer Ptr_Val_Par)
+Proc_1 (Ptr_Val_Par)
 /******************/
 /******************/
+
+REG Rec_Pointer Ptr_Val_Par;
     /* executed once */
 {
   REG Rec_Pointer Next_Record = Ptr_Val_Par->Ptr_Comp;  
     /* executed once */
 {
   REG Rec_Pointer Next_Record = Ptr_Val_Par->Ptr_Comp;  
@@ -329,10 +323,12 @@ void Proc_1(Rec_Pointer Ptr_Val_Par)
 } /* Proc_1 */
 
 
 } /* Proc_1 */
 
 
-void Proc_2(int* Int_Par_Ref)
+Proc_2 (Int_Par_Ref)
 /******************/
     /* executed once */
     /* *Int_Par_Ref == 1, becomes 4 */
 /******************/
     /* executed once */
     /* *Int_Par_Ref == 1, becomes 4 */
+
+One_Fifty   *Int_Par_Ref;
 {
   One_Fifty  Int_Loc;  
   Enumeration   Enum_Loc;
 {
   One_Fifty  Int_Loc;  
   Enumeration   Enum_Loc;
@@ -350,10 +346,13 @@ void Proc_2(int* Int_Par_Ref)
 } /* Proc_2 */
 
 
 } /* Proc_2 */
 
 
-void Proc_3(Rec_Pointer* Ptr_Ref_Par)
+Proc_3 (Ptr_Ref_Par)
 /******************/
     /* executed once */
     /* Ptr_Ref_Par becomes Ptr_Glob */
 /******************/
     /* executed once */
     /* Ptr_Ref_Par becomes Ptr_Glob */
+
+Rec_Pointer *Ptr_Ref_Par;
+
 {
   if (Ptr_Glob != Null)
     /* then, executed */
 {
   if (Ptr_Glob != Null)
     /* then, executed */
@@ -362,7 +361,7 @@ void Proc_3(Rec_Pointer* Ptr_Ref_Par)
 } /* Proc_3 */
 
 
 } /* Proc_3 */
 
 
-void Proc_4()
+Proc_4 () /* without parameters */
 /*******/
     /* executed once */
 {
 /*******/
     /* executed once */
 {
@@ -374,7 +373,7 @@ void Proc_4()
 } /* Proc_4 */
 
 
 } /* Proc_4 */
 
 
-void Proc_5()
+Proc_5 () /* without parameters */
 /*******/
     /* executed once */
 {
 /*******/
     /* executed once */
 {