Mercurial > hg > graal-compiler
comparison src/cpu/x86/vm/graalRuntime_x86.cpp @ 7386:707e9cca11de
fixed HotSpot windows build
fixed Thread.isInterrupted() slowcase
author | Christian Haeubl <haeubl@ssw.jku.at> |
---|---|
date | Tue, 18 Dec 2012 15:05:58 +0100 |
parents | a6bd253a770f |
children | 983f7bdb85ff 92d21814cf7b |
comparison
equal
deleted
inserted
replaced
7256:d0c4b6f8d67f | 7386:707e9cca11de |
---|---|
186 return call_RT(oop_result1, metadata_result, entry, 3); | 186 return call_RT(oop_result1, metadata_result, entry, 3); |
187 } | 187 } |
188 | 188 |
189 int GraalStubAssembler::call_RT(Register oop_result1, Register metadata_result, address entry, Register arg1, Register arg2, Register arg3, Register arg4) { | 189 int GraalStubAssembler::call_RT(Register oop_result1, Register metadata_result, address entry, Register arg1, Register arg2, Register arg3, Register arg4) { |
190 #ifdef _LP64 | 190 #ifdef _LP64 |
191 // if there is any conflict use the stack | 191 #ifdef _WIN64 |
192 if (arg1 == c_rarg2 || arg1 == c_rarg3 || arg1 == c_rarg4 || | 192 // on windows we only have the registers c_rarg0 to c_rarg3 for transferring parameters -> remaining parameters are on the stack |
193 arg2 == c_rarg1 || arg2 == c_rarg3 || arg2 == c_rarg4 || | 193 if (arg1 == c_rarg2 || arg1 == c_rarg3 || |
194 arg3 == c_rarg1 || arg3 == c_rarg2 || arg3 == c_rarg4 || | 194 arg2 == c_rarg1 || arg2 == c_rarg3 || |
195 arg4 == c_rarg1 || arg4 == c_rarg2 || arg4 == c_rarg3) { | 195 arg3 == c_rarg1 || arg3 == c_rarg2 || |
196 push(arg4); | 196 arg4 == c_rarg1 || arg4 == c_rarg2) { |
197 push(arg3); | 197 push(arg4); |
198 push(arg2); | 198 push(arg3); |
199 push(arg1); | 199 push(arg2); |
200 pop(c_rarg1); | 200 push(arg1); |
201 pop(c_rarg2); | 201 pop(c_rarg1); |
202 pop(c_rarg3); | 202 pop(c_rarg2); |
203 pop(c_rarg4); | 203 pop(c_rarg3); |
204 } else { | 204 } else { |
205 mov(c_rarg1, arg1); | 205 mov(c_rarg1, arg1); |
206 mov(c_rarg2, arg2); | 206 mov(c_rarg2, arg2); |
207 mov(c_rarg3, arg3); | 207 mov(c_rarg3, arg3); |
208 mov(c_rarg4, arg4); | 208 push(arg4); |
209 } | 209 } |
210 #else | |
211 // if there is any conflict use the stack | |
212 if (arg1 == c_rarg2 || arg1 == c_rarg3 || arg1 == c_rarg4 || | |
213 arg2 == c_rarg1 || arg2 == c_rarg3 || arg2 == c_rarg4 || | |
214 arg3 == c_rarg1 || arg3 == c_rarg2 || arg3 == c_rarg4 || | |
215 arg4 == c_rarg1 || arg4 == c_rarg2 || arg4 == c_rarg3) { | |
216 push(arg4); | |
217 push(arg3); | |
218 push(arg2); | |
219 push(arg1); | |
220 pop(c_rarg1); | |
221 pop(c_rarg2); | |
222 pop(c_rarg3); | |
223 pop(c_rarg4); | |
224 } else { | |
225 mov(c_rarg1, arg1); | |
226 mov(c_rarg2, arg2); | |
227 mov(c_rarg3, arg3); | |
228 mov(c_rarg4, arg4); | |
229 } | |
230 #endif | |
210 #else | 231 #else |
211 push(arg4); | 232 push(arg4); |
212 push(arg3); | 233 push(arg3); |
213 push(arg2); | 234 push(arg2); |
214 push(arg1); | 235 push(arg1); |