Revision 14ce26e7 target-i386/opreg_template.h
b/target-i386/opreg_template.h | ||
---|---|---|
20 | 20 |
*/ |
21 | 21 |
void OPPROTO glue(op_movl_A0,REGNAME)(void) |
22 | 22 |
{ |
23 |
A0 = REG; |
|
23 |
A0 = (uint32_t)REG;
|
|
24 | 24 |
} |
25 | 25 |
|
26 | 26 |
void OPPROTO glue(op_addl_A0,REGNAME)(void) |
27 | 27 |
{ |
28 |
A0 += REG;
|
|
28 |
A0 = (uint32_t)(A0 + REG);
|
|
29 | 29 |
} |
30 | 30 |
|
31 | 31 |
void OPPROTO glue(glue(op_addl_A0,REGNAME),_s1)(void) |
32 | 32 |
{ |
33 |
A0 += REG << 1;
|
|
33 |
A0 = (uint32_t)(A0 + (REG << 1));
|
|
34 | 34 |
} |
35 | 35 |
|
36 | 36 |
void OPPROTO glue(glue(op_addl_A0,REGNAME),_s2)(void) |
37 | 37 |
{ |
38 |
A0 += REG << 2;
|
|
38 |
A0 = (uint32_t)(A0 + (REG << 2));
|
|
39 | 39 |
} |
40 | 40 |
|
41 | 41 |
void OPPROTO glue(glue(op_addl_A0,REGNAME),_s3)(void) |
42 | 42 |
{ |
43 |
A0 += REG << 3; |
|
43 |
A0 = (uint32_t)(A0 + (REG << 3)); |
|
44 |
} |
|
45 |
|
|
46 |
#ifdef TARGET_X86_64 |
|
47 |
void OPPROTO glue(op_movq_A0,REGNAME)(void) |
|
48 |
{ |
|
49 |
A0 = REG; |
|
50 |
} |
|
51 |
|
|
52 |
void OPPROTO glue(op_addq_A0,REGNAME)(void) |
|
53 |
{ |
|
54 |
A0 = (A0 + REG); |
|
55 |
} |
|
56 |
|
|
57 |
void OPPROTO glue(glue(op_addq_A0,REGNAME),_s1)(void) |
|
58 |
{ |
|
59 |
A0 = (A0 + (REG << 1)); |
|
60 |
} |
|
61 |
|
|
62 |
void OPPROTO glue(glue(op_addq_A0,REGNAME),_s2)(void) |
|
63 |
{ |
|
64 |
A0 = (A0 + (REG << 2)); |
|
44 | 65 |
} |
45 | 66 |
|
67 |
void OPPROTO glue(glue(op_addq_A0,REGNAME),_s3)(void) |
|
68 |
{ |
|
69 |
A0 = (A0 + (REG << 3)); |
|
70 |
} |
|
71 |
#endif |
|
72 |
|
|
46 | 73 |
void OPPROTO glue(op_movl_T0,REGNAME)(void) |
47 | 74 |
{ |
48 | 75 |
T0 = REG; |
... | ... | |
65 | 92 |
|
66 | 93 |
void OPPROTO glue(glue(op_movl,REGNAME),_T0)(void) |
67 | 94 |
{ |
68 |
REG = T0; |
|
95 |
REG = (uint32_t)T0;
|
|
69 | 96 |
} |
70 | 97 |
|
71 | 98 |
void OPPROTO glue(glue(op_movl,REGNAME),_T1)(void) |
72 | 99 |
{ |
73 |
REG = T1; |
|
100 |
REG = (uint32_t)T1;
|
|
74 | 101 |
} |
75 | 102 |
|
76 | 103 |
void OPPROTO glue(glue(op_movl,REGNAME),_A0)(void) |
77 | 104 |
{ |
105 |
REG = (uint32_t)A0; |
|
106 |
} |
|
107 |
|
|
108 |
#ifdef TARGET_X86_64 |
|
109 |
void OPPROTO glue(glue(op_movq,REGNAME),_T0)(void) |
|
110 |
{ |
|
111 |
REG = T0; |
|
112 |
} |
|
113 |
|
|
114 |
void OPPROTO glue(glue(op_movq,REGNAME),_T1)(void) |
|
115 |
{ |
|
116 |
REG = T1; |
|
117 |
} |
|
118 |
|
|
119 |
void OPPROTO glue(glue(op_movq,REGNAME),_A0)(void) |
|
120 |
{ |
|
78 | 121 |
REG = A0; |
79 | 122 |
} |
123 |
#endif |
|
80 | 124 |
|
81 | 125 |
/* mov T1 to REG if T0 is true */ |
82 | 126 |
void OPPROTO glue(glue(op_cmovw,REGNAME),_T1_T0)(void) |
83 | 127 |
{ |
84 | 128 |
if (T0) |
85 |
REG = (REG & 0xffff0000) | (T1 & 0xffff);
|
|
129 |
REG = (REG & ~0xffff) | (T1 & 0xffff);
|
|
86 | 130 |
FORCE_RET(); |
87 | 131 |
} |
88 | 132 |
|
89 | 133 |
void OPPROTO glue(glue(op_cmovl,REGNAME),_T1_T0)(void) |
90 | 134 |
{ |
91 | 135 |
if (T0) |
136 |
REG = (uint32_t)T1; |
|
137 |
FORCE_RET(); |
|
138 |
} |
|
139 |
|
|
140 |
#ifdef TARGET_X86_64 |
|
141 |
void OPPROTO glue(glue(op_cmovq,REGNAME),_T1_T0)(void) |
|
142 |
{ |
|
143 |
if (T0) |
|
92 | 144 |
REG = T1; |
93 | 145 |
FORCE_RET(); |
94 | 146 |
} |
147 |
#endif |
|
95 | 148 |
|
96 | 149 |
/* NOTE: T0 high order bits are ignored */ |
97 | 150 |
void OPPROTO glue(glue(op_movw,REGNAME),_T0)(void) |
98 | 151 |
{ |
99 |
REG = (REG & 0xffff0000) | (T0 & 0xffff);
|
|
152 |
REG = (REG & ~0xffff) | (T0 & 0xffff);
|
|
100 | 153 |
} |
101 | 154 |
|
102 | 155 |
/* NOTE: T0 high order bits are ignored */ |
103 | 156 |
void OPPROTO glue(glue(op_movw,REGNAME),_T1)(void) |
104 | 157 |
{ |
105 |
REG = (REG & 0xffff0000) | (T1 & 0xffff);
|
|
158 |
REG = (REG & ~0xffff) | (T1 & 0xffff);
|
|
106 | 159 |
} |
107 | 160 |
|
108 | 161 |
/* NOTE: A0 high order bits are ignored */ |
109 | 162 |
void OPPROTO glue(glue(op_movw,REGNAME),_A0)(void) |
110 | 163 |
{ |
111 |
REG = (REG & 0xffff0000) | (A0 & 0xffff);
|
|
164 |
REG = (REG & ~0xffff) | (A0 & 0xffff);
|
|
112 | 165 |
} |
113 | 166 |
|
114 | 167 |
/* NOTE: T0 high order bits are ignored */ |
115 | 168 |
void OPPROTO glue(glue(op_movb,REGNAME),_T0)(void) |
116 | 169 |
{ |
117 |
REG = (REG & 0xffffff00) | (T0 & 0xff);
|
|
170 |
REG = (REG & ~0xff) | (T0 & 0xff);
|
|
118 | 171 |
} |
119 | 172 |
|
120 | 173 |
/* NOTE: T0 high order bits are ignored */ |
121 | 174 |
void OPPROTO glue(glue(op_movh,REGNAME),_T0)(void) |
122 | 175 |
{ |
123 |
REG = (REG & 0xffff00ff) | ((T0 & 0xff) << 8);
|
|
176 |
REG = (REG & ~0xff00) | ((T0 & 0xff) << 8);
|
|
124 | 177 |
} |
125 | 178 |
|
126 | 179 |
/* NOTE: T1 high order bits are ignored */ |
127 | 180 |
void OPPROTO glue(glue(op_movb,REGNAME),_T1)(void) |
128 | 181 |
{ |
129 |
REG = (REG & 0xffffff00) | (T1 & 0xff);
|
|
182 |
REG = (REG & ~0xff) | (T1 & 0xff);
|
|
130 | 183 |
} |
131 | 184 |
|
132 | 185 |
/* NOTE: T1 high order bits are ignored */ |
133 | 186 |
void OPPROTO glue(glue(op_movh,REGNAME),_T1)(void) |
134 | 187 |
{ |
135 |
REG = (REG & 0xffff00ff) | ((T1 & 0xff) << 8);
|
|
188 |
REG = (REG & ~0xff00) | ((T1 & 0xff) << 8);
|
|
136 | 189 |
} |
190 |
|
Also available in: Unified diff