Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
relibc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Limkilde Svendsen
relibc
Commits
ece0bd09
Verified
Commit
ece0bd09
authored
2 years ago
by
Jeremy Soller
Browse files
Options
Downloads
Patches
Plain Diff
Fix x86 setjmp/longjmp
parent
559387cc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/header/setjmp/impl/i386/longjmp.s
+10
-14
10 additions, 14 deletions
src/header/setjmp/impl/i386/longjmp.s
src/header/setjmp/impl/i386/setjmp.s
+10
-10
10 additions, 10 deletions
src/header/setjmp/impl/i386/setjmp.s
src/header/setjmp/mod.rs
+8
-20
8 additions, 20 deletions
src/header/setjmp/mod.rs
with
28 additions
and
44 deletions
src/header/setjmp/impl/i386/longjmp.s
+
10
−
14
View file @
ece0bd09
...
...
@@ -4,17 +4,13 @@
.
type
longjmp
,@
function
_longjmp
:
longjmp
:
mov
4
(%
esp
),%
edx
mov
8
(%
esp
),%
eax
test
%
eax
,%
eax
jnz
1
f
inc
%
eax
1
:
mov
(%
edx
),%
ebx
mov
4
(%
edx
),%
esi
mov
8
(%
edx
),%
edi
mov
12
(%
edx
),%
ebp
mov
16
(%
edx
),%
ecx
mov
%
ecx
,%
esp
mov
20
(%
edx
),%
ecx
jmp
*%
ecx
mov
edx
,
[
esp
+
4
]
mov
eax
,
[
esp
+
8
]
cmp
eax
,
1
adc
al
,
0
mov
ebx
,
[
edx
]
mov
esi
,
[
edx
+
4
]
mov
edi
,
[
edx
+
8
]
mov
ebp
,
[
edx
+
12
]
mov
esp
,
[
edx
+
16
]
jmp
[
edx
+
20
]
This diff is collapsed.
Click to expand it.
src/header/setjmp/impl/i386/setjmp.s
+
10
−
10
View file @
ece0bd09
...
...
@@ -10,14 +10,14 @@ ___setjmp:
__setjmp
:
_setjmp
:
setjmp
:
mov
4
(%
esp
),
%
eax
mov
%
ebx
,
(%
eax
)
mov
%
esi
,
4
(%
eax
)
mov
%
edi
,
8
(%
eax
)
mov
%
ebp
,
12
(%
eax
)
lea
4
(%
esp
),
%
ecx
mov
%
ecx
,
16
(%
eax
)
mov
(%
esp
),
%
ecx
mov
%
ecx
,
20
(%
eax
)
xor
%
eax
,
%
eax
mov
eax
,
[
esp
+
4
]
mov
[
eax
],
ebx
mov
[
eax
+
4
],
esi
mov
[
eax
+
8
],
edi
mov
[
eax
+
12
],
ebp
lea
ecx
,
[
esp
+
4
]
mov
[
eax
+
16
],
ecx
mov
ecx
,
[
esp
]
mov
[
eax
+
20
],
ecx
xor
eax
,
eax
ret
This diff is collapsed.
Click to expand it.
src/header/setjmp/mod.rs
+
8
−
20
View file @
ece0bd09
...
...
@@ -3,30 +3,18 @@
use
core
::
arch
::
global_asm
;
macro_rules!
platform_specific
{
(
$
(
$arch:expr
,
$ext:expr
;)
+
)
=>
{
(
$
(
$
rust_arch:expr
,
$c_
arch:expr
,
$ext:expr
;)
+
)
=>
{
$
(
#[cfg(target_arch
=
$
arch)]
global_asm!
(
include_str!
(
concat!
(
"impl/"
,
$arch
,
"/setjmp."
,
$ext
)));
#[cfg(target_arch
=
$
arch)]
global_asm!
(
include_str!
(
concat!
(
"impl/"
,
$arch
,
"/longjmp."
,
$ext
)));
#[cfg(target_arch
=
$
rust_
arch)]
global_asm!
(
include_str!
(
concat!
(
"impl/"
,
$
c_
arch
,
"/setjmp."
,
$ext
)));
#[cfg(target_arch
=
$
rust_
arch)]
global_asm!
(
include_str!
(
concat!
(
"impl/"
,
$
c_
arch
,
"/longjmp."
,
$ext
)));
)
+
}
}
platform_specific!
{
"aarch64"
,
"s"
;
"arm"
,
"s"
;
"i386"
,
"s"
;
"m68k"
,
"s"
;
"microblaze"
,
"s"
;
"mips"
,
"S"
;
"mips64"
,
"S"
;
"mipsn32"
,
"S"
;
"or1k"
,
"s"
;
"powerpc"
,
"S"
;
"powerpc64"
,
"s"
;
"s390x"
,
"s"
;
"sh"
,
"S"
;
"x32"
,
"s"
;
"x86_64"
,
"s"
;
"aarch64"
,
"aarch64"
,
"s"
;
"x86"
,
"i386"
,
"s"
;
"x86_64"
,
"x86_64"
,
"s"
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment