Lines Matching refs:X
18 X
19 X Reinhold P. Weicker
20 X Siemens AG, E STE 35
21 X Postfach 3240
22 X D-8520 Erlangen
23 X Germany (West)
24 X
25 X
26 X
27 X
76 X"Dhrystone"; the confusion generated by such a change would probably
308 X generation" and "optimization" in compilers: Some compilers perform
496 X * Dhrystone version 2".
1211 X#ifdef NOSTRUCTASSIGN
1216 X{
1217 X while (l--) *d++ = *s++;
1218 X}
1219 X#endif
1220 X
1221 X
1229 X/*
1230 X ****************************************************************************
1231 X *
1232 X * "DHRYSTONE" Benchmark Program
1233 X * -----------------------------
1234 X *
1235 X * Version: C, Version 2.1
1236 X *
1237 X * File: dhry_2.c (part 3 of 3)
1238 X *
1239 X * Date: May 17, 1988
1240 X *
1241 X * Author: Reinhold P. Weicker
1242 X *
1243 X ****************************************************************************
1244 X */
1245 X
1246 X#include "dhry.h"
1247 X
1248 X#ifndef REG
1249 X#define REG
1250 X /* REG becomes defined as empty */
1251 X /* i.e. no register variables */
1252 X#endif
1253 X
1256 X
1257 X
1259 X/*********************************/
1260 X /* executed once */
1261 X /* Enum_Val_Par == Ident_3, Enum_Ref_Par becomes Ident_2 */
1262 X
1265 X{
1266 X *Enum_Ref_Par = Enum_Val_Par;
1267 X if (! Func_3 (Enum_Val_Par))
1268 X /* then, not executed */
1269 X *Enum_Ref_Par = Ident_4;
1270 X switch (Enum_Val_Par)
1271 X {
1272 X case Ident_1:
1273 X *Enum_Ref_Par = Ident_1;
1274 X break;
1275 X case Ident_2:
1276 X if (Int_Glob > 100)
1277 X /* then */
1278 X *Enum_Ref_Par = Ident_1;
1279 X else *Enum_Ref_Par = Ident_4;
1280 X break;
1281 X case Ident_3: /* executed */
1282 X *Enum_Ref_Par = Ident_2;
1283 X break;
1284 X case Ident_4: break;
1285 X case Ident_5:
1286 X *Enum_Ref_Par = Ident_3;
1287 X break;
1288 X } /* switch */
1289 X} /* Proc_6 */
1290 X
1291 X
1293 X/**********************************************/
1294 X /* executed three times */
1295 X /* first call: Int_1_Par_Val == 2, Int_2_Par_Val == 3, */
1296 X /* Int_Par_Ref becomes 7 */
1297 X /* second call: Int_1_Par_Val == 10, Int_2_Par_Val == 5, */
1298 X /* Int_Par_Ref becomes 17 */
1299 X /* third call: Int_1_Par_Val == 6, Int_2_Par_Val == 10, */
1300 X /* Int_Par_Ref becomes 18 */
1304 X{
1305 X One_Fifty Int_Loc;
1306 X
1307 X Int_Loc = Int_1_Par_Val + 2;
1308 X *Int_Par_Ref = Int_2_Par_Val + Int_Loc;
1309 X} /* Proc_7 */
1310 X
1311 X
1313 X/*********************************************************************/
1314 X /* executed once */
1315 X /* Int_Par_Val_1 == 3 */
1316 X /* Int_Par_Val_2 == 7 */
1321 X{
1322 X REG One_Fifty Int_Index;
1323 X REG One_Fifty Int_Loc;
1324 X
1325 X Int_Loc = Int_1_Par_Val + 5;
1326 X Arr_1_Par_Ref [Int_Loc] = Int_2_Par_Val;
1327 X Arr_1_Par_Ref [Int_Loc+1] = Arr_1_Par_Ref [Int_Loc];
1328 X Arr_1_Par_Ref [Int_Loc+30] = Int_Loc;
1329 X for (Int_Index = Int_Loc; Int_Index <= Int_Loc+1; ++Int_Index)
1330 X Arr_2_Par_Ref [Int_Loc] [Int_Index] = Int_Loc;
1331 X Arr_2_Par_Ref [Int_Loc] [Int_Loc-1] += 1;
1332 X Arr_2_Par_Ref [Int_Loc+20] [Int_Loc] = Arr_1_Par_Ref [Int_Loc];
1333 X Int_Glob = 5;
1334 X} /* Proc_8 */
1335 X
1336 X
1338 X/*************************************************/
1339 X /* executed three times */
1340 X /* first call: Ch_1_Par_Val == 'H', Ch_2_Par_Val == 'R' */
1341 X /* second call: Ch_1_Par_Val == 'A', Ch_2_Par_Val == 'C' */
1342 X /* third call: Ch_1_Par_Val == 'B', Ch_2_Par_Val == 'C' */
1343 X
1346 X{
1347 X Capital_Letter Ch_1_Loc;
1348 X Capital_Letter Ch_2_Loc;
1349 X
1350 X Ch_1_Loc = Ch_1_Par_Val;
1351 X Ch_2_Loc = Ch_1_Loc;
1352 X if (Ch_2_Loc != Ch_2_Par_Val)
1353 X /* then, executed */
1354 X return (Ident_1);
1355 X else /* not executed */
1356 X {
1357 X Ch_1_Glob = Ch_1_Loc;
1358 X return (Ident_2);
1359 X }
1360 X} /* Func_1 */
1361 X
1362 X
1364 X/*************************************************/
1365 X /* executed once */
1366 X /* Str_1_Par_Ref == "DHRYSTONE PROGRAM, 1'ST STRING" */
1367 X /* Str_2_Par_Ref == "DHRYSTONE PROGRAM, 2'ND STRING" */
1368 X
1371 X{
1372 X REG One_Thirty Int_Loc;
1373 X Capital_Letter Ch_Loc;
1374 X
1375 X Int_Loc = 2;
1376 X while (Int_Loc <= 2) /* loop body executed once */
1377 X if (Func_1 (Str_1_Par_Ref[Int_Loc],
1378 X Str_2_Par_Ref[Int_Loc+1]) == Ident_1)
1379 X /* then, executed */
1380 X {
1381 X Ch_Loc = 'A';
1382 X Int_Loc += 1;
1383 X } /* if, while */
1384 X if (Ch_Loc >= 'W' && Ch_Loc < 'Z')
1385 X /* then, not executed */
1386 X Int_Loc = 7;
1387 X if (Ch_Loc == 'R')
1388 X /* then, not executed */
1389 X return (true);
1390 X else /* executed */
1391 X {
1392 X if (strcmp (Str_1_Par_Ref, Str_2_Par_Ref) > 0)
1393 X /* then, not executed */
1394 X {
1395 X Int_Loc += 7;
1396 X Int_Glob = Int_Loc;
1397 X return (true);
1398 X }
1399 X else /* executed */
1400 X return (false);
1401 X } /* if Ch_Loc */
1402 X} /* Func_2 */
1403 X
1404 X
1406 X/***************************/
1407 X /* executed once */
1408 X /* Enum_Par_Val == Ident_3 */
1410 X{
1411 X Enumeration Enum_Loc;
1412 X
1413 X Enum_Loc = Enum_Par_Val;
1414 X if (Enum_Loc == Ident_3)
1415 X /* then, executed */
1416 X return (true);
1417 X else /* not executed */
1418 X return (false);
1419 X} /* Func_3 */
1420 X