Search
lxdream.org :: lxdream :: r610:581822d225aa
lxdream 0.9.1
released Jun 29
Download Now
changeset610:581822d225aa
parent609:41b61a0d5f1a
child611:0c5f53a87501
authornkeynes
dateSat Jan 26 03:16:17 2008 +0000 (11 years ago)
Remove obsolete asm file
src/sh4/ia64asm.s
1.1 --- a/src/sh4/ia64asm.s Sat Jan 26 03:11:56 2008 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,34 +0,0 @@
1.4 -#
1.5 -# Scan back through the stack until we hit the currently executing
1.6 -# translation block, and find the call return address to that block.
1.7 -#
1.8 -# Implementation: iterate back through each stack frame until we find
1.9 -# a frame that has a saved %ebp == sh4r (setup by the xlat blocks).
1.10 -# The return address is then the stack value immediately before the
1.11 -# saved %ebp.
1.12 -#
1.13 -# At most 8 stack frames are checked, to prevent infinite looping on a
1.14 -# corrupt stack.
1.15 -
1.16 -.global xlat_get_native_pc
1.17 -xlat_get_native_pc:
1.18 - mov %rbp, %rax
1.19 - mov $0x8, %ecx
1.20 - mov $sh4r, %rdx
1.21 -
1.22 -frame_loop:
1.23 - test %rax, %rax
1.24 - je frame_not_found
1.25 - cmpq (%rax), %rdx
1.26 - je frame_found
1.27 - sub $0x1, %ecx
1.28 - je frame_not_found
1.29 - movq (%rax), %rax
1.30 - jmp frame_loop
1.31 -
1.32 -frame_found:
1.33 - movl 0x4(%rax), %rax
1.34 - ret
1.35 -frame_not_found:
1.36 - xor %rax, %rax
1.37 - ret
.