This source file includes following definitions.
- ldq_u
- ldl_u
- ldw_u
- stq_u
- stl_u
- stw_u
1 #ifndef __ALPHA_UNALIGNED_H
2 #define __ALPHA_UNALIGNED_H
3
4
5
6
7 extern inline unsigned long ldq_u(unsigned long * r11)
8 {
9 unsigned long r1,r2;
10 __asm__("ldq_u %0,%3\n\t"
11 "ldq_u %1,%4\n\t"
12 "extql %0,%2,%0\n\t"
13 "extqh %1,%2,%1\n\t"
14 "bis %1,%0,%0"
15 :"=&r" (r1), "=&r" (r2)
16 :"r" (r11),
17 "m" (*r11),
18 "m" (*(unsigned long *)(7+(char *) r11)));
19 return r1;
20 }
21
22 extern inline unsigned long ldl_u(unsigned int * r11)
23 {
24 unsigned long r1,r2;
25 __asm__("ldq_u %0,%3\n\t"
26 "ldq_u %1,%4\n\t"
27 "extll %0,%2,%0\n\t"
28 "extlh %1,%2,%1\n\t"
29 "bis %1,%0,%0"
30 :"=&r" (r1), "=&r" (r2)
31 :"r" (r11),
32 "m" (*r11),
33 "m" (*(unsigned long *)(3+(char *) r11)));
34 return r1;
35 }
36
37 extern inline unsigned long ldw_u(unsigned short * r11)
38 {
39 unsigned long r1,r2;
40 __asm__("ldq_u %0,%3\n\t"
41 "ldq_u %1,%4\n\t"
42 "extwl %0,%2,%0\n\t"
43 "extwh %1,%2,%1\n\t"
44 "bis %1,%0,%0"
45 :"=&r" (r1), "=&r" (r2)
46 :"r" (r11),
47 "m" (*r11),
48 "m" (*(unsigned long *)(1+(char *) r11)));
49 return r1;
50 }
51
52 extern inline void stq_u(unsigned long r5, unsigned long * r11)
53 {
54 unsigned long r1,r2,r3,r4;
55
56 __asm__("ldq_u %3,%1\n\t"
57 "ldq_u %2,%0\n\t"
58 "insqh %6,%7,%5\n\t"
59 "insql %6,%7,%4\n\t"
60 "mskqh %3,%7,%3\n\t"
61 "mskql %2,%7,%2\n\t"
62 "bis %3,%5,%3\n\t"
63 "bis %2,%4,%2\n\t"
64 "stq_u %3,%1\n\t"
65 "stq_u %2,%0"
66 :"=m" (*r11),
67 "=m" (*(unsigned long *)(7+(char *) r11)),
68 "=&r" (r1), "=&r" (r2), "=&r" (r3), "=&r" (r4)
69 :"r" (r5), "r" (r11));
70 }
71
72 extern inline void stl_u(unsigned long r5, unsigned int * r11)
73 {
74 unsigned long r1,r2,r3,r4;
75
76 __asm__("ldq_u %3,%1\n\t"
77 "ldq_u %2,%0\n\t"
78 "inslh %6,%7,%5\n\t"
79 "insll %6,%7,%4\n\t"
80 "msklh %3,%7,%3\n\t"
81 "mskll %2,%7,%2\n\t"
82 "bis %3,%5,%3\n\t"
83 "bis %2,%4,%2\n\t"
84 "stq_u %3,%1\n\t"
85 "stq_u %2,%0"
86 :"=m" (*r11),
87 "=m" (*(unsigned long *)(3+(char *) r11)),
88 "=&r" (r1), "=&r" (r2), "=&r" (r3), "=&r" (r4)
89 :"r" (r5), "r" (r11));
90 }
91
92 extern inline void stw_u(unsigned long r5, unsigned short * r11)
93 {
94 unsigned long r1,r2,r3,r4;
95
96 __asm__("ldq_u %3,%1\n\t"
97 "ldq_u %2,%0\n\t"
98 "inswh %6,%7,%5\n\t"
99 "inswl %6,%7,%4\n\t"
100 "mskwh %3,%7,%3\n\t"
101 "mskwl %2,%7,%2\n\t"
102 "bis %3,%5,%3\n\t"
103 "bis %2,%4,%2\n\t"
104 "stq_u %3,%1\n\t"
105 "stq_u %2,%0"
106 :"=m" (*r11),
107 "=m" (*(unsigned long *)(1+(char *) r11)),
108 "=&r" (r1), "=&r" (r2), "=&r" (r3), "=&r" (r4)
109 :"r" (r5), "r" (r11));
110 }
111
112 #endif