Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

setjmp.S 1001B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* setjmp and longjmp. Use of these functions is deprecated. */
  2. .text
  3. .arch i386
  4. .code32
  5. /**************************************************************************
  6. SETJMP - Save stack context for non-local goto
  7. **************************************************************************/
  8. .globl setjmp
  9. setjmp:
  10. movl 4(%esp),%ecx /* jmpbuf */
  11. movl 0(%esp),%edx /* return address */
  12. movl %edx,0(%ecx)
  13. movl %ebx,4(%ecx)
  14. movl %esp,8(%ecx)
  15. movl %ebp,12(%ecx)
  16. movl %esi,16(%ecx)
  17. movl %edi,20(%ecx)
  18. movl $0,%eax
  19. ret
  20. /**************************************************************************
  21. LONGJMP - Non-local jump to a saved stack context
  22. **************************************************************************/
  23. .globl longjmp
  24. longjmp:
  25. movl 4(%esp),%edx /* jumpbuf */
  26. movl 8(%esp),%eax /* result */
  27. movl 0(%edx),%ecx
  28. movl 4(%edx),%ebx
  29. movl 8(%edx),%esp
  30. movl 12(%edx),%ebp
  31. movl 16(%edx),%esi
  32. movl 20(%edx),%edi
  33. cmpl $0,%eax
  34. jne 1f
  35. movl $1,%eax
  36. 1: movl %ecx,0(%esp)
  37. ret