Skip to content

Commit 5110cf2

Browse files
committed
---
yaml --- r: 77673 b: refs/heads/master c: a35bfa2 h: refs/heads/master i: 77671: f32b6c8 v: v3
1 parent baf32b2 commit 5110cf2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 5118ef6ff02c650e54fc89318e7183e4e1cd3fa3
2+
refs/heads/master: a35bfa2e9bc73cbdd420588dd098f91cd7afa172
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 60fba4d7d677ec098e6a43014132fe99f7547363
55
refs/heads/try: ebfe63cd1c0b5d23f7ea60c69b4fde2e30cfd42a

trunk/src/rt/arch/x86_64/sp.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ extern "C" CDECL ALWAYS_INLINE uintptr_t get_sp_limit() {
4343
asm volatile (
4444
"movq %%fs:24, %0"
4545
: "=r"(limit));
46+
#elif defined(_WIN64)
47+
asm volatile (
48+
"movq %%gs:0x28, %0"
49+
: "=r"(limit));
4650
#endif
4751

4852
return limit;
@@ -65,6 +69,10 @@ extern "C" CDECL ALWAYS_INLINE void record_sp_limit(void *limit) {
6569
asm volatile (
6670
"movq %0, %%fs:24"
6771
:: "r"(limit));
72+
#elif defined(_WIN64)
73+
asm volatile (
74+
"movq %0, %%gs:0x28"
75+
:: "r"(limit));
6876
#endif
6977
}
7078

0 commit comments

Comments
 (0)