about summary refs log tree commit diff stats
path: root/kernel.soso/task.asm
blob: f0f2b464560e4f7ceab6284f7aa92b645d3425a4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
global switchTask

switchTask:
        mov esi, [esp]
        pop eax			; *current thread

        ; get values from thread->regs structure

        push dword [esi+4]	; eax
        push dword [esi+8]	; ecx
        push dword [esi+12]	; edx
        push dword [esi+16]	; ebx
        push dword [esi+24]	; ebp
        push dword [esi+28]	; esi
        push dword [esi+32]	; edi
        push dword [esi+48]	; ds
        push dword [esi+50]	; es
        push dword [esi+52]	; fs
        push dword [esi+54]	; gs

        mov al, 0x20
        out 0x20, al

        mov eax, [esi+56]
        mov cr3, eax

        pop gs
        pop fs
        pop es
        pop ds
        pop edi
        pop esi
        pop ebp
        pop ebx
        pop edx
        pop ecx
        pop eax

        iret
pan>= 5.1 R= 5.1.5 all: $(PLAT) $(PLATS) clean: cd src && $(MAKE) $@ install: dummy cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN) cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) ranlib: cd src && cd $(INSTALL_LIB) && $(RANLIB) $(TO_LIB) local: $(MAKE) install INSTALL_TOP=.. none: @echo "Please do" @echo " make PLATFORM" @echo "where PLATFORM is one of these:" @echo " $(PLATS)" @echo "See INSTALL for complete instructions." # make may get confused with test/ and INSTALL in a case-insensitive OS dummy: # echo config parameters echo: @echo "" @echo "These are the parameters currently set in src/Makefile to build Lua $R:" @echo "" @cd src && $(MAKE) -s echo @echo "" @echo "These are the parameters currently set in Makefile to install Lua $R:" @echo "" @echo "PLAT = $(PLAT)" @echo "INSTALL_TOP = $(INSTALL_TOP)" @echo "INSTALL_BIN = $(INSTALL_BIN)" @echo "INSTALL_INC = $(INSTALL_INC)" @echo "INSTALL_LIB = $(INSTALL_LIB)" @echo "INSTALL_MAN = $(INSTALL_MAN)" @echo "INSTALL_LMOD = $(INSTALL_LMOD)" @echo "INSTALL_CMOD = $(INSTALL_CMOD)" @echo "INSTALL_EXEC = $(INSTALL_EXEC)" @echo "INSTALL_DATA = $(INSTALL_DATA)" @echo "" @echo "See also src/luaconf.h ." @echo "" # echo private config parameters pecho: @echo "V = $(V)" @echo "R = $(R)" @echo "TO_BIN = $(TO_BIN)" @echo "TO_INC = $(TO_INC)" @echo "TO_LIB = $(TO_LIB)" @echo "TO_MAN = $(TO_MAN)" # echo config parameters as Lua code # uncomment the last sed expression if you want nil instead of empty strings lecho: @echo "-- installation parameters for Lua $R" @echo "VERSION = '$V'" @echo "RELEASE = '$R'" @$(MAKE) echo | grep = | sed -e 's/= /= "/' -e 's/$$/"/' #-e 's/""/nil/' @echo "-- EOF" # list targets that do not create files (but not all makes understand .PHONY) .PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho # (end of Makefile)