Diff
checker
Text
Text
Images
Documents
Excel
Folders
Legal
Enterprise
Desktop
Pricing
Sign in
Download Diffchecker Desktop
Compare text
Find the difference between two text files
Tools
History
Real-time editor
Hide unchanged lines
Disable line wrap
Layout
Split
Unified
Diff precision
Smart
Word
Char
Syntax highlighting
Choose syntax
Ignore
Transform text
Go to first change
Edit input
Diffchecker Desktop
The most secure way to run Diffchecker. Get the Diffchecker Desktop app: your diffs never leave your computer!
Get Desktop
Untitled diff
Created
9 years ago
Diff never expires
Clear
Export
Share
Explain
153 removals
Lines
Total
Removed
Characters
Total
Removed
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
134 lines
Copy
66 additions
Lines
Total
Added
Characters
Total
Added
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
55 lines
Copy
Copy
Copied
Copy
Copied
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
Copy
Copied
Copy
Copied
/* This is file is a merger of SETJMP.S and LONGJMP.S */
/*
/*
Copy
Copied
Copy
Copied
* 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.
*
*
Copy
Copied
Copy
Copied
* 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.
* ====================================================
*/
*/
/*
/*
Copy
Copied
Copy
Copied
**
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
*/
*/
Copy
Copied
Copy
Copied
#include "
i386
mach.h"
#include "
x86_64
mach.h"
Copy
Copied
Copy
Copied
.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):
Copy
Copied
Copy
Copied
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):
Copy
Copied
Copy
Copied
#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
Copy
Copied
Copy
Copied
__CLI
movq
8 (r
di),
rbp
movl 28(e
di),
esp
pushl 32(edi)
Copy
Copied
Copy
Copied
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
Copy
Copied
Copy
Copied
ret
ret
Saved diffs
Original text
Open file
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
Changed text
Open file
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
Find difference