comparison runtime.S @ 540:4ca826862174

Generate m68k_start_context at runtime so it can use the generated load_context and save_context
author Michael Pavone <pavone@retrodev.com>
date Sat, 15 Feb 2014 21:25:36 -0800
parents b449af228c63
children a59ac6b4b5b5
comparison
equal deleted inserted replaced
539:c2716b502a81 540:4ca826862174
262 mov 68(%rsi), %r15d /* a7 */ 262 mov 68(%rsi), %r15d /* a7 */
263 mov 76(%rsi), %ebp /* target cycle count */ 263 mov 76(%rsi), %ebp /* target cycle count */
264 mov 80(%rsi), %eax /* current cycle count */ 264 mov 80(%rsi), %eax /* current cycle count */
265 ret 265 ret
266 266
267 .global m68k_start_context
268 m68k_start_context:
269 push %rbp
270 push %r12
271 push %r13
272 push %r14
273 push %r15
274
275 call m68k_load_context
276 call *%rdi
277 call m68k_save_context
278
279 pop %r15
280 pop %r14
281 pop %r13
282 pop %r12
283 pop %rbp
284
285 ret