~ubuntu-branches/ubuntu/raring/vc/raring-proposed

« back to all changes in this revision

Viewing changes to sse/forceToRegisters.tcc

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-03-08 12:50:59 UTC
  • Revision ID: package-import@ubuntu.com-20130308125059-2vpu3hm02kgrqv96
Tags: upstream-0.7.0
ImportĀ upstreamĀ versionĀ 0.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifdef VC_GNU_ASM
 
2
template<typename T1>
 
3
static Vc_ALWAYS_INLINE void forceToRegisters(const Vector<T1> &x1) {
 
4
  __asm__ __volatile__(""::"x"(x1.data()));
 
5
}
 
6
template<typename T1>
 
7
static Vc_ALWAYS_INLINE void forceToRegistersDirty(Vector<T1> &x1) {
 
8
  __asm__ __volatile__("":"+x"(x1.data()));
 
9
}
 
10
template<typename T2, typename T1>
 
11
static Vc_ALWAYS_INLINE void forceToRegisters(const Vector<T2> &x2, const Vector<T1> &x1) {
 
12
  __asm__ __volatile__(""::"x"(x2.data()), "x"(x1.data()));
 
13
}
 
14
template<typename T2, typename T1>
 
15
static Vc_ALWAYS_INLINE void forceToRegistersDirty(Vector<T2> &x2, Vector<T1> &x1) {
 
16
  __asm__ __volatile__("":"+x"(x2.data()), "+x"(x1.data()));
 
17
}
 
18
template<typename T3, typename T2, typename T1>
 
19
static Vc_ALWAYS_INLINE void forceToRegisters(const Vector<T3> &x3, const Vector<T2> &x2, const Vector<T1> &x1) {
 
20
  __asm__ __volatile__(""::"x"(x3.data()), "x"(x2.data()), "x"(x1.data()));
 
21
}
 
22
template<typename T3, typename T2, typename T1>
 
23
static Vc_ALWAYS_INLINE void forceToRegistersDirty(Vector<T3> &x3, Vector<T2> &x2, Vector<T1> &x1) {
 
24
  __asm__ __volatile__("":"+x"(x3.data()), "+x"(x2.data()), "+x"(x1.data()));
 
25
}
 
26
template<typename T4, typename T3, typename T2, typename T1>
 
27
static Vc_ALWAYS_INLINE void forceToRegisters(const Vector<T4> &x4, const Vector<T3> &x3, const Vector<T2> &x2, const Vector<T1> &x1) {
 
28
  __asm__ __volatile__(""::"x"(x4.data()), "x"(x3.data()), "x"(x2.data()), "x"(x1.data()));
 
29
}
 
30
template<typename T4, typename T3, typename T2, typename T1>
 
31
static Vc_ALWAYS_INLINE void forceToRegistersDirty(Vector<T4> &x4, Vector<T3> &x3, Vector<T2> &x2, Vector<T1> &x1) {
 
32
  __asm__ __volatile__("":"+x"(x4.data()), "+x"(x3.data()), "+x"(x2.data()), "+x"(x1.data()));
 
33
}
 
34
template<typename T5, typename T4, typename T3, typename T2, typename T1>
 
35
static Vc_ALWAYS_INLINE void forceToRegisters(const Vector<T5> &x5, const Vector<T4> &x4, const Vector<T3> &x3, const Vector<T2> &x2, const Vector<T1> &x1) {
 
36
  __asm__ __volatile__(""::"x"(x5.data()), "x"(x4.data()), "x"(x3.data()), "x"(x2.data()), "x"(x1.data()));
 
37
}
 
38
template<typename T5, typename T4, typename T3, typename T2, typename T1>
 
39
static Vc_ALWAYS_INLINE void forceToRegistersDirty(Vector<T5> &x5, Vector<T4> &x4, Vector<T3> &x3, Vector<T2> &x2, Vector<T1> &x1) {
 
40
  __asm__ __volatile__("":"+x"(x5.data()), "+x"(x4.data()), "+x"(x3.data()), "+x"(x2.data()), "+x"(x1.data()));
 
41
}
 
42
template<typename T6, typename T5, typename T4, typename T3, typename T2, typename T1>
 
43
static Vc_ALWAYS_INLINE void forceToRegisters(const Vector<T6> &x6, const Vector<T5> &x5, const Vector<T4> &x4, const Vector<T3> &x3, const Vector<T2> &x2, const Vector<T1> &x1) {
 
44
  __asm__ __volatile__(""::"x"(x6.data()), "x"(x5.data()), "x"(x4.data()), "x"(x3.data()), "x"(x2.data()), "x"(x1.data()));
 
45
}
 
46
template<typename T6, typename T5, typename T4, typename T3, typename T2, typename T1>
 
47
static Vc_ALWAYS_INLINE void forceToRegistersDirty(Vector<T6> &x6, Vector<T5> &x5, Vector<T4> &x4, Vector<T3> &x3, Vector<T2> &x2, Vector<T1> &x1) {
 
48
  __asm__ __volatile__("":"+x"(x6.data()), "+x"(x5.data()), "+x"(x4.data()), "+x"(x3.data()), "+x"(x2.data()), "+x"(x1.data()));
 
49
}
 
50
template<typename T7, typename T6, typename T5, typename T4, typename T3, typename T2, typename T1>
 
51
static Vc_ALWAYS_INLINE void forceToRegisters(const Vector<T7> &x7, const Vector<T6> &x6, const Vector<T5> &x5, const Vector<T4> &x4, const Vector<T3> &x3, const Vector<T2> &x2, const Vector<T1> &x1) {
 
52
  __asm__ __volatile__(""::"x"(x7.data()), "x"(x6.data()), "x"(x5.data()), "x"(x4.data()), "x"(x3.data()), "x"(x2.data()), "x"(x1.data()));
 
53
}
 
54
template<typename T7, typename T6, typename T5, typename T4, typename T3, typename T2, typename T1>
 
55
static Vc_ALWAYS_INLINE void forceToRegistersDirty(Vector<T7> &x7, Vector<T6> &x6, Vector<T5> &x5, Vector<T4> &x4, Vector<T3> &x3, Vector<T2> &x2, Vector<T1> &x1) {
 
56
  __asm__ __volatile__("":"+x"(x7.data()), "+x"(x6.data()), "+x"(x5.data()), "+x"(x4.data()), "+x"(x3.data()), "+x"(x2.data()), "+x"(x1.data()));
 
57
}
 
58
template<typename T8, typename T7, typename T6, typename T5, typename T4, typename T3, typename T2, typename T1>
 
59
static Vc_ALWAYS_INLINE void forceToRegisters(const Vector<T8> &x8, const Vector<T7> &x7, const Vector<T6> &x6, const Vector<T5> &x5, const Vector<T4> &x4, const Vector<T3> &x3, const Vector<T2> &x2, const Vector<T1> &x1) {
 
60
  __asm__ __volatile__(""::"x"(x8.data()), "x"(x7.data()), "x"(x6.data()), "x"(x5.data()), "x"(x4.data()), "x"(x3.data()), "x"(x2.data()), "x"(x1.data()));
 
61
}
 
62
template<typename T8, typename T7, typename T6, typename T5, typename T4, typename T3, typename T2, typename T1>
 
63
static Vc_ALWAYS_INLINE void forceToRegistersDirty(Vector<T8> &x8, Vector<T7> &x7, Vector<T6> &x6, Vector<T5> &x5, Vector<T4> &x4, Vector<T3> &x3, Vector<T2> &x2, Vector<T1> &x1) {
 
64
  __asm__ __volatile__("":"+x"(x8.data()), "+x"(x7.data()), "+x"(x6.data()), "+x"(x5.data()), "+x"(x4.data()), "+x"(x3.data()), "+x"(x2.data()), "+x"(x1.data()));
 
65
}
 
66
#elif defined(VC_MSVC)
 
67
#pragma optimize("g", off)
 
68
template<typename T1>
 
69
static Vc_ALWAYS_INLINE void forceToRegisters(const Vector<T1> &/*x1*/) {
 
70
}
 
71
#pragma optimize("g", off)
 
72
template<typename T1>
 
73
static Vc_ALWAYS_INLINE void forceToRegistersDirty(Vector<T1> &/*x1*/) {
 
74
}
 
75
#pragma optimize("g", on)
 
76
#pragma optimize("g", off)
 
77
template<typename T2, typename T1>
 
78
static Vc_ALWAYS_INLINE void forceToRegisters(const Vector<T2> &/*x2*/, const Vector<T1> &/*x1*/) {
 
79
}
 
80
#pragma optimize("g", off)
 
81
template<typename T2, typename T1>
 
82
static Vc_ALWAYS_INLINE void forceToRegistersDirty(Vector<T2> &/*x2*/, Vector<T1> &/*x1*/) {
 
83
}
 
84
#pragma optimize("g", on)
 
85
#pragma optimize("g", off)
 
86
template<typename T3, typename T2, typename T1>
 
87
static Vc_ALWAYS_INLINE void forceToRegisters(const Vector<T3> &/*x3*/, const Vector<T2> &/*x2*/, const Vector<T1> &/*x1*/) {
 
88
}
 
89
#pragma optimize("g", off)
 
90
template<typename T3, typename T2, typename T1>
 
91
static Vc_ALWAYS_INLINE void forceToRegistersDirty(Vector<T3> &/*x3*/, Vector<T2> &/*x2*/, Vector<T1> &/*x1*/) {
 
92
}
 
93
#pragma optimize("g", on)
 
94
#pragma optimize("g", off)
 
95
template<typename T4, typename T3, typename T2, typename T1>
 
96
static Vc_ALWAYS_INLINE void forceToRegisters(const Vector<T4> &/*x4*/, const Vector<T3> &/*x3*/, const Vector<T2> &/*x2*/, const Vector<T1> &/*x1*/) {
 
97
}
 
98
#pragma optimize("g", off)
 
99
template<typename T4, typename T3, typename T2, typename T1>
 
100
static Vc_ALWAYS_INLINE void forceToRegistersDirty(Vector<T4> &/*x4*/, Vector<T3> &/*x3*/, Vector<T2> &/*x2*/, Vector<T1> &/*x1*/) {
 
101
}
 
102
#pragma optimize("g", on)
 
103
#pragma optimize("g", off)
 
104
template<typename T5, typename T4, typename T3, typename T2, typename T1>
 
105
static Vc_ALWAYS_INLINE void forceToRegisters(const Vector<T5> &/*x5*/, const Vector<T4> &/*x4*/, const Vector<T3> &/*x3*/, const Vector<T2> &/*x2*/, const Vector<T1> &/*x1*/) {
 
106
}
 
107
#pragma optimize("g", off)
 
108
template<typename T5, typename T4, typename T3, typename T2, typename T1>
 
109
static Vc_ALWAYS_INLINE void forceToRegistersDirty(Vector<T5> &/*x5*/, Vector<T4> &/*x4*/, Vector<T3> &/*x3*/, Vector<T2> &/*x2*/, Vector<T1> &/*x1*/) {
 
110
}
 
111
#pragma optimize("g", on)
 
112
#pragma optimize("g", off)
 
113
template<typename T6, typename T5, typename T4, typename T3, typename T2, typename T1>
 
114
static Vc_ALWAYS_INLINE void forceToRegisters(const Vector<T6> &/*x6*/, const Vector<T5> &/*x5*/, const Vector<T4> &/*x4*/, const Vector<T3> &/*x3*/, const Vector<T2> &/*x2*/, const Vector<T1> &/*x1*/) {
 
115
}
 
116
#pragma optimize("g", off)
 
117
template<typename T6, typename T5, typename T4, typename T3, typename T2, typename T1>
 
118
static Vc_ALWAYS_INLINE void forceToRegistersDirty(Vector<T6> &/*x6*/, Vector<T5> &/*x5*/, Vector<T4> &/*x4*/, Vector<T3> &/*x3*/, Vector<T2> &/*x2*/, Vector<T1> &/*x1*/) {
 
119
}
 
120
#pragma optimize("g", on)
 
121
#pragma optimize("g", off)
 
122
template<typename T7, typename T6, typename T5, typename T4, typename T3, typename T2, typename T1>
 
123
static Vc_ALWAYS_INLINE void forceToRegisters(const Vector<T7> &/*x7*/, const Vector<T6> &/*x6*/, const Vector<T5> &/*x5*/, const Vector<T4> &/*x4*/, const Vector<T3> &/*x3*/, const Vector<T2> &/*x2*/, const Vector<T1> &/*x1*/) {
 
124
}
 
125
#pragma optimize("g", off)
 
126
template<typename T7, typename T6, typename T5, typename T4, typename T3, typename T2, typename T1>
 
127
static Vc_ALWAYS_INLINE void forceToRegistersDirty(Vector<T7> &/*x7*/, Vector<T6> &/*x6*/, Vector<T5> &/*x5*/, Vector<T4> &/*x4*/, Vector<T3> &/*x3*/, Vector<T2> &/*x2*/, Vector<T1> &/*x1*/) {
 
128
}
 
129
#pragma optimize("g", on)
 
130
#pragma optimize("g", off)
 
131
template<typename T8, typename T7, typename T6, typename T5, typename T4, typename T3, typename T2, typename T1>
 
132
static Vc_ALWAYS_INLINE void forceToRegisters(const Vector<T8> &/*x8*/, const Vector<T7> &/*x7*/, const Vector<T6> &/*x6*/, const Vector<T5> &/*x5*/, const Vector<T4> &/*x4*/, const Vector<T3> &/*x3*/, const Vector<T2> &/*x2*/, const Vector<T1> &/*x1*/) {
 
133
}
 
134
#pragma optimize("g", off)
 
135
template<typename T8, typename T7, typename T6, typename T5, typename T4, typename T3, typename T2, typename T1>
 
136
static Vc_ALWAYS_INLINE void forceToRegistersDirty(Vector<T8> &/*x8*/, Vector<T7> &/*x7*/, Vector<T6> &/*x6*/, Vector<T5> &/*x5*/, Vector<T4> &/*x4*/, Vector<T3> &/*x3*/, Vector<T2> &/*x2*/, Vector<T1> &/*x1*/) {
 
137
}
 
138
#pragma optimize("g", on)
 
139
#else
 
140
#error "forceToRegisters unsupported on this compiler"
 
141
#endif