trampoffset.s 536 B

1234567891011121314151617181920
  1. | Function to compute the offset for nested function trampolines. Also handles
  2. | the automatical global import of EXECUTE_IN_GHOST_SPACE (i.e. ghost space
  3. | execution for HW2, HW3Patch detection for HW3).
  4. | Copyright (C) 2003, 2006 Kevin Kofler.
  5. | See License.txt for licensing conditions.
  6. | This object file needs EXECUTE_IN_GHOST_SPACE.
  7. .xdef __ref_all___execute_in_ghost_space
  8. .xdef __trampoline_offset
  9. __trampoline_offset:
  10. jbsr __get_hw_version
  11. moveq.l #0,%d1
  12. subq.w #2,%d0
  13. bne.s 0f
  14. bset.l #18,%d1
  15. 0:
  16. move.l %d1,%d0
  17. rts