Diff
checker
Texte
Texte
Images
Documents
Excel
Dossiers
Legal
Enterprise
Application de bureau
Prix
Se connecter
Télécharger Diffchecker Desktop
Comparer le texte
Trouver la différence entre deux fichiers texte
Outils
Historique
Éditeur live
Cacher identiques
Sans retour à la ligne
Vue
Divisé
Unifié
Niveau de précision
Intelligent
Mot
Caractère
Coloration syntaxique
Choisir la syntaxe
Ignorer
Transformer le texte
Aller au premier écart
Modifier l'entrée
Diffchecker Desktop
La façon la plus sécurisée d'utiliser Diffchecker. Obtenez l'application Diffchecker Desktop : vos diffs ne quittent jamais votre ordinateur !
Obtenir Desktop
Untitled diff
Créé
il y a 9 ans
Le diff n'expire jamais
Effacer
Exporter
Partager
Expliquer
153 suppressions
Lignes
Total
Supprimé
Caractères
Total
Supprimé
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
134 lignes
Copier tout
66 ajouts
Lignes
Total
Ajouté
Caractères
Total
Ajouté
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
55 lignes
Copier tout
Copier
Copié
Copier
Copié
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
Copier
Copié
Copier
Copié
/* This is file is a merger of SETJMP.S and LONGJMP.S */
/*
/*
Copier
Copié
Copier
Copié
* 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.
*
*
Copier
Copié
Copier
Copié
* 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.
* ====================================================
*/
*/
/*
/*
Copier
Copié
Copier
Copié
**
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
*/
*/
Copier
Copié
Copier
Copié
#include "
i386
mach.h"
#include "
x86_64
mach.h"
Copier
Copié
Copier
Copié
.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):
Copier
Copié
Copier
Copié
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):
Copier
Copié
Copier
Copié
#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
Copier
Copié
Copier
Copié
__CLI
movq
8 (r
di),
rbp
movl 28(e
di),
esp
pushl 32(edi)
Copier
Copié
Copier
Copié
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
Copier
Copié
Copier
Copié
ret
ret
Différences enregistrées
Texte d'origine
Ouvrir un fichier
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
Texte modifié
Ouvrir un fichier
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
Trouver la différence