Changeset 04803bf in mainline for uspace/lib/c/arch/ia32/src
- Timestamp:
- 2011-03-21T22:00:17Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 143932e3
- Parents:
- b50b5af2 (diff), 7308e84 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- uspace/lib/c/arch/ia32/src
- Files:
-
- 2 added
- 6 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/ia32/src/entry.s
rb50b5af2 r04803bf 27 27 # 28 28 29 INTEL_CPUID_STANDARD = 1 30 INTEL_SEP = 11 31 29 32 .section .init, "ax" 30 33 … … 35 38 ## User-space task entry point 36 39 # 37 # %e bxcontains the PCB pointer40 # %edi contains the PCB pointer 38 41 # 39 42 __entry: … … 43 46 mov %ax, %fs 44 47 # Do not set %gs, it contains descriptor that can see TLS 45 48 49 # Detect the mechanism used for making syscalls 50 movl $(INTEL_CPUID_STANDARD), %eax 51 cpuid 52 bt $(INTEL_SEP), %edx 53 jnc 0f 54 leal __syscall_fast_func, %eax 55 movl $__syscall_fast, (%eax) 56 0: 57 # 58 # Create the first stack frame. 59 # 60 pushl $0 61 movl %esp, %ebp 62 46 63 # Pass the PCB pointer to __main as the first argument 47 pushl %e bx64 pushl %edi 48 65 call __main 49 50 call __exit -
uspace/lib/c/arch/ia32/src/syscall.S
rb50b5af2 r04803bf 27 27 # 28 28 29 .data 30 31 .global __syscall_fast_func 32 __syscall_fast_func: 33 .long __syscall_slow 34 29 35 .text 30 36 … … 35 41 * could benefit from this and not save unused registers on the stack. 36 42 */ 37 .global __syscall_ int38 __syscall_ int:43 .global __syscall_slow 44 __syscall_slow: 39 45 pushl %ebx 40 46 pushl %esi … … 64 70 * segment, otherwise the SYSENTER wouldn't work in the first place). 65 71 */ 66 .global __syscall_ sysenter67 .type __syscall_ sysenter, @function72 .global __syscall_fast 73 .type __syscall_fast, @function 68 74 69 __syscall_ sysenter:75 __syscall_fast: 70 76 pushl %ebx 71 77 pushl %esi … … 92 98 ret 93 99 94 .size __syscall_ sysenter, . - __syscall_sysenter100 .size __syscall_fast, . - __syscall_fast -
uspace/lib/c/arch/ia32/src/thread_entry.s
rb50b5af2 r04803bf 42 42 43 43 # 44 # Create the first stack frame. 45 # 46 pushl $0 47 mov %esp, %ebp 48 49 # 44 50 # EAX contains address of uarg. 45 51 #
Note:
See TracChangeset
for help on using the changeset viewer.