⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ecall.s

📁 OXCC is a multipass, interpreting C compiler with several language extensions. It generates an Archi
💻 S
字号:
.text
	.align 2
.globl __jumpToMethod
__jumpToMethod:
	pushl %ebp
	movl %esp,%ebp
	movl 8(%ebp),%eax
	leave
	leave
	jmp *%eax

	.align 2
.globl __callExtern
__callExtern:
	pushl %ebp
	movl %esp,%ebp
	pushl %edi
	pushl %esi
	pushl %ebx

	cmpl $0,20(%ebp)
	jz	L0
	movl 20(%ebp),%ecx
	subl %ecx,%esp
	movl %esp,%edi
	movl 16(%ebp),%esi
	sarl $2,%ecx
	cld
	rep
	movsl
	.align 2,0x90
L0:
	cmpl $0,12(%ebp)
	jz	L1
	pushl 12(%ebp)
	.align 2,0x90
L1:
	movl 8(%ebp),%eax
	call *%eax

	addl 20(%ebp),%esp
	popl %ebx
	popl %esi
	popl %edi
	leave
	ret	

	.align 2
.globl __ExternCall
__ExternCall:
	pushl %ebp
	movl %esp,%ebp
	pushl %edi
	pushl %esi
	pushl %ebx

	cmpl $0,16(%ebp)
	jz	L3
	movl 16(%ebp),%ecx
	subl %ecx,%esp
	movl %esp,%edi
	movl 12(%ebp),%esi
	sarl $2,%ecx
	cld
	rep
	movsl
	.align 2,0x90
L3:
	movl 8(%ebp),%eax
	call *%eax
	addl 16(%ebp),%esp

	movl 20(%ebp),%ecx
	movl %eax,(%ecx)
	movl %edx,4(%ecx)

	popl %ebx
	popl %esi
	popl %edi
	leave
	ret

	.align 2
.globl __ExternCallS
__ExternCallS:
	pushl %ebp
	movl %esp,%ebp
	pushl %edi
	pushl %esi
	pushl %ebx

	cmpl $0,16(%ebp)
	jz	L4
	movl 16(%ebp),%ecx
	subl %ecx,%esp
	movl %esp,%edi
	movl 12(%ebp),%esi
	sarl $2,%ecx
	cld
	rep
	movsl
	.align 2,0x90
L4:
	movl 8(%ebp),%eax
	call *%eax
	subl $4,%esp
	addl 16(%ebp),%esp

	movl 20(%ebp),%ecx
	movl %eax,(%ecx)
	movl %edx,4(%ecx)

	popl %ebx
	popl %esi
	popl %edi
	leave
	ret



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -