4 char b1
[23] ="0123456789abcdefghijklm";
5 char b2
[23] ="mlkjihgfedcba9876543210";
6 char b3
[23] ="mmmmmmmmmmmmmmmmmmmmmmm";
7 char b4
[23] ="00000000000000000000000";
8 char longbuf
[17000000];
10 static int clcle(unsigned long *_a1
, unsigned long *_l1
, unsigned long *_a3
, unsigned long *_l3
, char _pad
)
12 register unsigned long a1
asm ("2") = *_a1
;
13 register unsigned long l1
asm ("3") = *_l1
;
14 register unsigned long a3
asm ("4") = *_a3
;
15 register unsigned long l3
asm ("5") = *_l3
;
16 register unsigned long pad
asm ("6") = _pad
;
17 register unsigned long cc
asm ("7");
19 asm volatile( "0: clcle 2,4,0(6)\n\t"
23 :"=d" (cc
), "+d" (a1
),"+d" (l1
), "+d" (a3
), "+d" (l3
)
35 void testrun(void *_a1
, unsigned long _l1
, void *_a3
, unsigned long _l3
, char pad
)
37 unsigned long a1
,a3
,l1
,l3
;
40 a1
= (unsigned long) _a1
; l1
= _l1
; a3
= (unsigned long) _a3
; l3
= _l3
;
41 cc
= clcle(&a1
, &l1
, &a3
, &l3
, pad
);
42 printf("cc: %d, l1: %lu(%lu) l3: %lu(%lu) diff1: %lu diff3: %lu\n",
43 cc
, l1
, _l1
, l3
, _l3
, a1
-(unsigned long) _a1
, a3
-(unsigned long) _a3
);
47 void multiplex(unsigned long l1
, unsigned long l3
, char pad
)
49 testrun(b1
, l1
, b1
, l3
, pad
);
50 testrun(b1
, l1
, b2
, l3
, pad
);
51 testrun(b1
, l1
, b3
, l3
, pad
);
52 testrun(b1
, l1
, b4
, l3
, pad
);
53 testrun(b2
, l1
, b2
, l3
, pad
);
54 testrun(b2
, l1
, b3
, l3
, pad
);
55 testrun(b2
, l1
, b4
, l3
, pad
);
56 testrun(b3
, l1
, b3
, l3
, pad
);
57 testrun(b3
, l1
, b4
, l3
, pad
);
58 testrun(b4
, l1
, b4
, l3
, pad
);
69 testrun(longbuf
,10000,longbuf
,100000,0);
70 testrun(longbuf
,10000,longbuf
,100000,128);
71 testrun(longbuf
,10000,longbuf
,100000,255);