-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rt: Inline get_sp_limit/set_sp_limit/get_sp for x86.
- Loading branch information
Showing
2 changed files
with
45 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +0,0 @@ | ||
.text | ||
|
||
#if defined(__APPLE__) || defined(_WIN32) | ||
#define RECORD_SP_LIMIT _record_sp_limit | ||
#define GET_SP_LIMIT _get_sp_limit | ||
#define GET_SP _get_sp | ||
#else | ||
#define RECORD_SP_LIMIT record_sp_limit | ||
#define GET_SP_LIMIT get_sp_limit | ||
#define GET_SP get_sp | ||
#endif | ||
|
||
.globl RECORD_SP_LIMIT | ||
.globl GET_SP_LIMIT | ||
.globl GET_SP | ||
|
||
#if defined(__linux__) || defined(__FreeBSD__) | ||
RECORD_SP_LIMIT: | ||
movl 4(%esp), %eax | ||
movl %eax, %gs:48 | ||
ret | ||
#endif | ||
|
||
#if defined(__APPLE__) | ||
RECORD_SP_LIMIT: | ||
movl $0x48+90*4, %eax | ||
movl 4(%esp), %ecx | ||
movl %ecx, %gs:(%eax) | ||
ret | ||
#endif | ||
|
||
#if defined(_WIN32) | ||
RECORD_SP_LIMIT: | ||
movl 4(%esp), %eax | ||
movl %eax, %fs:0x14 | ||
ret | ||
#endif | ||
|
||
#if defined(__linux__) || defined(__FreeBSD__) | ||
GET_SP_LIMIT: | ||
movl %gs:48, %eax | ||
ret | ||
#endif | ||
|
||
#if defined(__APPLE__) | ||
GET_SP_LIMIT: | ||
movl $0x48+90*4, %ecx | ||
movl %gs:(%ecx), %eax | ||
ret | ||
#endif | ||
|
||
#if defined(_WIN32) | ||
GET_SP_LIMIT: | ||
movl %fs:0x14, %eax | ||
ret | ||
#endif | ||
|
||
GET_SP: | ||
movl %esp, %eax | ||
ret | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a692777
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from brson
at luqmana@a692777
a692777
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging luqmana/rust/inline-rt = a692777 into auto
a692777
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
luqmana/rust/inline-rt = a692777 merged ok, testing candidate = 6d4499c
a692777
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
http://buildbot.rust-lang.org/builders/auto-linux/builds/599
http://buildbot.rust-lang.org/builders/auto-win/builds/594
http://buildbot.rust-lang.org/builders/auto-mac/builds/607
a692777
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding incoming to auto = 6d4499c