diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-02-15 03:56:52 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-02-15 03:56:52 -0500 |
commit | 7b2dd2235dd0db3a2f71e25d1c0925e0348e1996 (patch) | |
tree | 26cab4bb4f2bff3b4cf8ccb2c0e497cf9631c893 /src/thread/i386/__set_thread_area.s | |
parent | 0b2006c8fea021b7fa1fd267bf270cb8c279f230 (diff) | |
download | musl-7b2dd2235dd0db3a2f71e25d1c0925e0348e1996.tar.gz musl-7b2dd2235dd0db3a2f71e25d1c0925e0348e1996.tar.bz2 musl-7b2dd2235dd0db3a2f71e25d1c0925e0348e1996.tar.xz musl-7b2dd2235dd0db3a2f71e25d1c0925e0348e1996.zip |
finish unifying thread register handling in preparation for porting
Diffstat (limited to 'src/thread/i386/__set_thread_area.s')
-rw-r--r-- | src/thread/i386/__set_thread_area.s | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/thread/i386/__set_thread_area.s b/src/thread/i386/__set_thread_area.s new file mode 100644 index 00000000..9bf698b5 --- /dev/null +++ b/src/thread/i386/__set_thread_area.s @@ -0,0 +1,22 @@ +.text +.global __set_thread_area +.type __set_thread_area,%function +__set_thread_area: + pushl %ebx + movl 8(%esp),%ecx + movl $-1,4(%ecx) + movl %ecx,8(%ecx) + movl $0xfffff,12(%ecx) + movl $0x51,16(%ecx) + leal 4(%ecx),%ebx + movl $243,%eax + int $128 + popl %ebx + testl %eax,%eax + jnz 1f + movl 4(%ecx),%ecx + leal 3(,%ecx,8),%ecx + movw %cx,%gs +1: + ret +.size __set_thread_area,.-__set_thread_area |