8 /* Convenience macros and functions for testcases */
10 #define EXIT(ret) svc1(__NR_exit, ret)
12 /* X must be a string constant */
13 #define SAY(x) say(x"\n", sizeof x)
15 /* Test COND and if it happens to be true, say so */
16 #define TEST(cond) do { if (cond) SAY(#cond); } while (0)
18 #define BRASLCLOBBER "0","1","2","3","4","5","14", \
19 "f0","f1","f2","f3","f4","f5","f6","f7"
21 int say(const char *text
, unsigned long num_chars
)
23 return svc3(4, 1, (unsigned long) text
, num_chars
);
29 /* dont use IPM to better test spechelpers */ \
30 asm volatile( " brc 8,1f\n\t" \
44 "0: bcr 0,0 /*nop*/\n\t" \
45 :"=Q" (__cc)::"memory"); \
49 static inline void dump_field(void *field
, int size
)
52 for (i
=0; i
< size
; i
++)
53 printf("%2.2X ", ((char *) field
)[i
]);
56 static inline void mysleep(long sec
, long usec
)
63 svc5(SYS_select
, 0,0,0,0,(unsigned long) &tv
);