Changeset 4980
- Timestamp:
- Aug 20, 2006, 10:51:47 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ccl/lisp-kernel/x86-asmutils64.s (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/lisp-kernel/x86-asmutils64.s
r4940 r4980 142 142 _exportfn(C(put_vector_registers)) 143 143 _endfn 144 144 145 146 __ifdef([DARWIN_GS_HACK]) 147 /* Check (in and ugly, non-portale way) to see if %gs is addressing 148 threads data. If it was, return 0; otherwise, assume that it's 149 addressing a lisp tcr and set %gs to point to the tcr's tcr.osid, 150 then return 1. */ 151 152 thread_signature = 0x54485244 /* 'THRD' */ 153 154 _exportfn(C(ensure_gs_pthread)) 155 __(cmpl $thread_signature,%gs:0) 156 __(movl $0,%eax) 157 __(je 9f) 158 __(movq %gs:tcr.osid,%rdi) 159 __(movl $0x3000003,%eax) 160 __(syscall) 161 __(movl $1,%eax) 162 9: __(ret) 163 _endfn 164 165 /* Ensure that %gs addresses the linear address in %rdi */ 166 /* This incidentally returns the segment selector .*/ 167 _exportfn(C(set_gs_address)) 168 __(movl $0x3000003,%eax) 169 __(syscall) 170 __(ret) 171 _endfn 172 __endif 145 173 _endfile
Note:
See TracChangeset
for help on using the changeset viewer.
