Diff
checker
텍스트
텍스트
이미지
문서
Excel
폴더
Legal
Enterprise
데스크톱
요금제
로그인
데스크톱 앱 다운로드
텍스트 비교
두 텍스트 파일의 차이점을 찾아보세요
도구
기록
실시간 편집
변경 없는 행 숨기기
줄바꿈 비활성화
레이아웃
나란히 보기
합쳐 보기
비교 단위
스마트
단어
글자
구문 강조
언어 선택
제외
텍스트 변환
첫 변경으로
수정
Diffchecker Desktop
가장 안전하게 Diffchecker를 사용하는 방법. 데스크톱 앱을 사용하면 비교 데이터가 외부로 전송되지 않습니다!
데스크톱 앱 받기
Untitled diff
생성일
9년 전
비교 결과 만료 없음
초기화
내보내기
공유
설명
153 삭제
행
총
삭제
글자
총
삭제
이 기능을 계속 사용하려면 업그레이드해 주세요
Diff
checker
Pro
요금제 보기
134 행
복사
66 추가
행
총
추가
글자
총
추가
이 기능을 계속 사용하려면 업그레이드해 주세요
Diff
checker
Pro
요금제 보기
55 행
복사
복사
복사됨
복사
복사됨
https://github.com/Alexpux/Cygwin/blob/master/newlib/libc/machine/
i386
/setjmp.S
https://github.com/Alexpux/Cygwin/blob/master/newlib/libc/machine/
x86_64
/setjmp.S
복사
복사됨
복사
복사됨
/* This is file is a merger of SETJMP.S and LONGJMP.S */
/*
/*
복사
복사됨
복사
복사됨
* This file was modified to use the __USER_LABEL_PREFIX__ and
* ====================================================
* __REGISTER_PREFIX__ macros defined by later versions of GNU cpp by
* Copyright (C) 2007 by Ellips BV. All rights reserved.
* Joel Sherrill (joel@OARcorp.com)
* Slight change: now includes i386mach.h for this (Werner Almesberger)
*
* Copyright (C) 1991 DJ Delorie
* All rights reserved.
*
* Redistribution, modification, and use in source and binary forms is permitted
* provided that the above copyright notice and following paragraph are
* duplicated in all such forms.
*
*
복사
복사됨
복사
복사됨
* This file is distributed WITHOUT ANY WARRANTY; without even the implied
* Permission to use, copy, modify, and distribute this
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
*/
/*
/*
복사
복사됨
복사
복사됨
**
jmp_buf:
**
jmp_buf:
**
eax e
bx
ecx edx esi edi e
bp
e
sp
e
ip
**
r
bx
r
bp
r12 r13 r14 r15 r
sp
r
ip
**
0
4
8
12
16
20 24 28 32
**
0
8
16
24 32
4
0 4
8
56
**
** Intel MCU jmp_buf:
** ebx esi edi ebp esp eip
** 0
4
8
12 16 20
*/
*/
복사
복사됨
복사
복사됨
#include "
i386
mach.h"
#include "
x86_64
mach.h"
복사
복사됨
복사
복사됨
.global SYM (setjmp)
.global SYM (setjmp)
.global SYM (longjmp)
.global SYM (longjmp)
SOTYPE_FUNCTION(setjmp)
SOTYPE_FUNCTION(setjmp)
SOTYPE_FUNCTION(longjmp)
SOTYPE_FUNCTION(longjmp)
SYM (setjmp):
SYM (setjmp):
복사
복사됨
복사
복사됨
movq rbx, 0 (rdi)
#ifdef __iamcu__
movq rbp, 8 (rdi)
/* Store EIP. */
mov
q r12, 16 (r
di)
movl 0(esp),ecx
mov
q r13, 24 (r
di)
movl ecx,20(eax)
mov
q r14, 32 (r
di)
mov
q r15, 40 (r
di)
movl ebx,0 (eax)
leaq 8 (rsp), r
ax
movl esi,4 (eax)
mov
q r
ax,
48 (r
di)
movl edi,8 (eax)
mov
q (rsp), r
ax
movl ebp,12(eax)
mov
q r
ax,
56 (r
di)
mov
q
$0,
r
ax
/* Skip return address, which will be pushed onto stack in
ret
longjmp, and store SP. */
leal 4(esp),ecx
movl ecx,16(eax)
xorl eax,eax
#else
pushl ebp
movl esp,ebp
pushl edi
movl 8 (ebp),edi
movl eax,0 (edi)
mov
l ebx,4 (e
di)
mov
l ecx,8 (e
di)
mov
l edx,12 (e
di)
movl esi,16 (edi)
movl -4 (ebp),eax
mov
l eax,20 (e
di)
movl 0 (ebp),eax
movl eax,24 (edi)
movl esp,eax
addl $12,e
ax
mov
l e
ax,
28 (e
di)
mov
l 4 (ebp),e
ax
mov
l e
ax,
32 (e
di)
popl edi
mov
l
$0,
e
ax
leave
#endif
ret
SYM (longjmp):
SYM (longjmp):
복사
복사됨
복사
복사됨
#ifdef __iamcu__
movq rsi, rax /* Return value */
/* Check retval. */
testl edx,edx
jne 0f
incl edx
0:
/* Restore stack first. */
movl 16(eax),esp
/* Put return address on stack. */
pushl 20(eax)
movl 0(eax),ebx
movl 4(eax),esi
movl 8(eax),edi
movl 12(eax),ebp
movl edx,eax
#else
pushl ebp
movl esp,ebp
movl 8(ebp),edi /* get jmp_buf */
movl 12(ebp),eax /* store retval in j->eax */
testl eax,eax
jne 0f
incl eax
0:
movl eax,0(edi)
movl 24(edi),ebp
복사
복사됨
복사
복사됨
__CLI
movq
8 (r
di),
rbp
movl 28(e
di),
esp
pushl 32(edi)
복사
복사됨
복사
복사됨
mov
l 0(e
di),
eax
__CLI
mov
l 4(e
di),
e
bx
mov
q 48 (r
di),
rsp
mov
l 8(e
di),
ecx
pushq 56 (rdi)
mov
l 12(e
di),
edx
mov
q 0 (r
di),
r
bx
mov
l 16(e
di),
esi
mov
q 16 (r
di),
r12
mov
l 20(e
di),
edi
mov
q 24 (r
di),
r13
__STI
mov
q 32 (r
di),
r14
#endif
mov
q 40 (r
di),
r15
__STI
복사
복사됨
복사
복사됨
ret
ret
저장된 비교 결과
원본
파일 열기
https://github.com/Alexpux/Cygwin/blob/master/newlib/libc/machine/i386/setjmp.S /* This is file is a merger of SETJMP.S and LONGJMP.S */ /* * This file was modified to use the __USER_LABEL_PREFIX__ and * __REGISTER_PREFIX__ macros defined by later versions of GNU cpp by * Joel Sherrill (joel@OARcorp.com) * Slight change: now includes i386mach.h for this (Werner Almesberger) * * Copyright (C) 1991 DJ Delorie * All rights reserved. * * Redistribution, modification, and use in source and binary forms is permitted * provided that the above copyright notice and following paragraph are * duplicated in all such forms. * * This file is distributed WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ /* ** jmp_buf: ** eax ebx ecx edx esi edi ebp esp eip ** 0 4 8 12 16 20 24 28 32 ** ** Intel MCU jmp_buf: ** ebx esi edi ebp esp eip ** 0 4 8 12 16 20 */ #include "i386mach.h" .global SYM (setjmp) .global SYM (longjmp) SOTYPE_FUNCTION(setjmp) SOTYPE_FUNCTION(longjmp) SYM (setjmp): #ifdef __iamcu__ /* Store EIP. */ movl 0(esp),ecx movl ecx,20(eax) movl ebx,0 (eax) movl esi,4 (eax) movl edi,8 (eax) movl ebp,12(eax) /* Skip return address, which will be pushed onto stack in longjmp, and store SP. */ leal 4(esp),ecx movl ecx,16(eax) xorl eax,eax #else pushl ebp movl esp,ebp pushl edi movl 8 (ebp),edi movl eax,0 (edi) movl ebx,4 (edi) movl ecx,8 (edi) movl edx,12 (edi) movl esi,16 (edi) movl -4 (ebp),eax movl eax,20 (edi) movl 0 (ebp),eax movl eax,24 (edi) movl esp,eax addl $12,eax movl eax,28 (edi) movl 4 (ebp),eax movl eax,32 (edi) popl edi movl $0,eax leave #endif ret SYM (longjmp): #ifdef __iamcu__ /* Check retval. */ testl edx,edx jne 0f incl edx 0: /* Restore stack first. */ movl 16(eax),esp /* Put return address on stack. */ pushl 20(eax) movl 0(eax),ebx movl 4(eax),esi movl 8(eax),edi movl 12(eax),ebp movl edx,eax #else pushl ebp movl esp,ebp movl 8(ebp),edi /* get jmp_buf */ movl 12(ebp),eax /* store retval in j->eax */ testl eax,eax jne 0f incl eax 0: movl eax,0(edi) movl 24(edi),ebp __CLI movl 28(edi),esp pushl 32(edi) movl 0(edi),eax movl 4(edi),ebx movl 8(edi),ecx movl 12(edi),edx movl 16(edi),esi movl 20(edi),edi __STI #endif ret
수정본
파일 열기
https://github.com/Alexpux/Cygwin/blob/master/newlib/libc/machine/x86_64/setjmp.S /* * ==================================================== * Copyright (C) 2007 by Ellips BV. All rights reserved. * * Permission to use, copy, modify, and distribute this * software is freely granted, provided that this notice * is preserved. * ==================================================== */ /* ** jmp_buf: ** rbx rbp r12 r13 r14 r15 rsp rip ** 0 8 16 24 32 40 48 56 */ #include "x86_64mach.h" .global SYM (setjmp) .global SYM (longjmp) SOTYPE_FUNCTION(setjmp) SOTYPE_FUNCTION(longjmp) SYM (setjmp): movq rbx, 0 (rdi) movq rbp, 8 (rdi) movq r12, 16 (rdi) movq r13, 24 (rdi) movq r14, 32 (rdi) movq r15, 40 (rdi) leaq 8 (rsp), rax movq rax, 48 (rdi) movq (rsp), rax movq rax, 56 (rdi) movq $0, rax ret SYM (longjmp): movq rsi, rax /* Return value */ movq 8 (rdi), rbp __CLI movq 48 (rdi), rsp pushq 56 (rdi) movq 0 (rdi), rbx movq 16 (rdi), r12 movq 24 (rdi), r13 movq 32 (rdi), r14 movq 40 (rdi), r15 __STI ret
비교하기