diff options
Diffstat (limited to 'benchmarks/dhrystone/dhrystone.c')
-rw-r--r-- | benchmarks/dhrystone/dhrystone.c | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/benchmarks/dhrystone/dhrystone.c b/benchmarks/dhrystone/dhrystone.c index 1c0ad92..418602a 100644 --- a/benchmarks/dhrystone/dhrystone.c +++ b/benchmarks/dhrystone/dhrystone.c @@ -1,5 +1,7 @@ // See LICENSE for license details. +#pragma GCC optimize ("no-inline") + #include "dhrystone.h" #ifndef REG @@ -15,10 +17,13 @@ extern int Int_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 */ + +Enumeration Enum_Val_Par; +Enumeration *Enum_Ref_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 */ -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, */ @@ -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 */ +One_Fifty Int_1_Par_Val; +One_Fifty Int_2_Par_Val; +One_Fifty *Int_Par_Ref; { 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 */ -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 */ +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; @@ -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 */ -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' */ + +Capital_Letter Ch_1_Par_Val; +Capital_Letter Ch_2_Par_Val; { 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 */ -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" */ + +Str_30 Str_1_Par_Ref; +Str_30 Str_2_Par_Ref; { 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 */ -Boolean Func_3(Enumeration Enum_Par_Val) +Boolean Func_3 (Enum_Par_Val) /***************************/ /* executed once */ /* Enum_Par_Val == Ident_3 */ +Enumeration Enum_Par_Val; { Enumeration Enum_Loc; @@ -160,3 +179,4 @@ Boolean Func_3(Enumeration Enum_Par_Val) else /* not executed */ return (false); } /* Func_3 */ + |