Blame src/setjmp/nt32/longjmp.s

716654
############################################################################
716654
##  mmglue: midipix architecture- and target-specific bits for musl libc  ##
716654
##  Copyright (C) 2013--2023  SysDeer Technologies, LLC                   ##
716654
##  Released under the Standard MIT License; see COPYING.MMGLUE.          ##
716654
############################################################################
716654
296178
.text
296178
.globl	___longjmp
296178
.globl	__longjmp
296178
.globl	_longjmp
296178
ed42e6
.def ___longjmp; .scl 2; .type 32; .endef
ed42e6
.def __longjmp; .scl 2; .type 32; .endef
ed42e6
.def _longjmp; .scl 2; .type 32; .endef
ed42e6
296178
___longjmp:
296178
__longjmp:
296178
_longjmp:
e3a960
	movl 4(%esp), %ecx	# jump buffer
e3a960
	movl 8(%esp), %eax	# val
e3a960
e3a960
	test %eax, %eax		# is val zero?
e3a960
	jne  1f			# no:  return val
e3a960
	xor  $1,   %eax		# yes: return one
e3a960
e3a960
1:
e3a960
	movl 20(%ecx), %esi	# restore regs
e3a960
	movl 16(%ecx), %edi
e3a960
	movl 12(%ecx), %ebp
e3a960
	movl 8(%ecx),  %ebx
e3a960
e3a960
	movl 4(%ecx),  %esp	# original stack pointer
e3a960
e3a960
	movl (%ecx),   %edx	# original return address
e3a960
	jmp  *%edx
fa55cc
fa55cc
	.section .got$longjmp
fa55cc
	.global __imp__longjmp
fa55cc
__imp__longjmp:
fa55cc
	.long	_longjmp
fa55cc
	.linkonce discard