2 usad-run.c from the execute part of the gcc torture tests.
7 extern int abs (int __x
);
10 foo (unsigned char *w
, int i
, unsigned char *x
, int j
)
13 for (int a
= 0; a
< 16; a
++)
15 for (int b
= 0; b
< 16; b
++)
16 tot
+= abs (w
[b
] - x
[b
]);
24 bar (unsigned char *w
, unsigned char *x
, int i
, int *result
)
26 *result
= foo (w
, 16, x
, i
);
30 testTortureExecute (void)
32 #if !defined(__SDCC_mcs51) && !defined(__SDCC_pdk13) && !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) && !( (defined (__SDCC_mos6502) || defined(__SDCC_mos65c02 )) && defined(__SDCC_STACK_AUTO) ) // Lack of memory
37 for (i
= 0; i
< 256; ++i
)
40 m
[i
] = (i
% 8) * 2 + 1;
45 m
[i
] = -((i
% 8) * 2 + 2);
46 n
[i
] = -((i
% 8) >> 1);