Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 2b903ca in mainline


Ignore:
Timestamp:
2013-05-30T22:26:46Z (7 years ago)
Author:
Martin Decky <martin@…>
Branches:
master
Children:
9ce0683
Parents:
45b4300
Message:

cstyle

Location:
uspace/lib/c/arch/ia32/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/ia32/src/entry.S

    r45b4300 r2b903ca  
    4747        # Do not set %gs, it contains descriptor that can see TLS
    4848       
    49 #ifndef PROCESSOR_i486 
     49#ifndef PROCESSOR_i486
    5050        # Detect the mechanism used for making syscalls
    5151        movl $(INTEL_CPUID_STANDARD), %eax
  • uspace/lib/c/arch/ia32/src/entryjmp.s

    r45b4300 r2b903ca  
    3636        push %ebp
    3737        movl %esp, %ebp
    38 
     38       
    3939        # %eax := entry_point
    4040        movl 0x8(%ebp), %eax
    41 
     41       
    4242        # %edi := pcb
    4343        # pcb is passed to the entry point in %edi
    4444        mov 0xc(%ebp), %edi
    45 
     45       
    4646        # Save a tiny bit of stack space
    4747        pop %ebp
    48 
     48       
    4949        jmp *%eax
  • uspace/lib/c/arch/ia32/src/fibril.S

    r45b4300 r2b903ca  
    3434.global context_restore
    3535
    36 
    3736## Save current CPU context
    3837#
     
    4140#
    4241context_save:
    43         movl 0(%esp),%eax       # the caller's return %eip
    44         movl 4(%esp),%edx       # address of the context variable to save context to
    45 
    46                 # save registers to the context structure
     42        movl 0(%esp), %eax  # the caller's return %eip
     43        movl 4(%esp), %edx  # address of the context variable to save context to
     44       
     45        # save registers to the context structure
    4746        CONTEXT_SAVE_ARCH_CORE %edx %eax
    48 
    49         # Save TLS
     47       
     48        # save TLS
    5049        movl %gs:0, %eax
    5150        movl %eax, OFFSET_TLS(%edx)     # tls -> ctx->tls
    5251       
    53         xorl %eax,%eax          # context_save returns 1
     52        xorl %eax, %eax     # context_save returns 1
    5453        incl %eax
    5554        ret
    56 
    5755
    5856## Restore saved CPU context
     
    6260#
    6361context_restore:
    64         movl 4(%esp),%eax       # address of the context variable to restore context from
    65 
    66                 # restore registers from the context structure
     62        movl 4(%esp), %eax  # address of the context variable to restore context from
     63       
     64        # restore registers from the context structure
    6765        CONTEXT_RESTORE_ARCH_CORE %eax %edx
    68 
    69         movl %edx,0(%esp)       # ctx->pc -> saver's return %eip
    70 
    71         # Set thread local storage
     66       
     67        movl %edx, 0(%esp)  # ctx->pc -> saver's return %eip
     68       
     69        # set thread local storage
    7270        pushl %edx
    73         movl OFFSET_TLS(%eax), %edx   # Set arg1 to TLS addr
    74         movl $1, %eax         # Syscall SYS_TLS_SET
     71        movl OFFSET_TLS(%eax), %edx  # Set arg1 to TLS addr
     72        movl $1, %eax                # Syscall SYS_TLS_SET
    7573        int $0x30
    7674        popl %edx
    7775       
    78         xorl %eax,%eax          # context_restore returns 0
     76        xorl %eax, %eax     # context_restore returns 0
    7977        ret
  • uspace/lib/c/arch/ia32/src/setjmp.S

    r45b4300 r2b903ca  
    3535.type setjmp,@function
    3636setjmp:
    37         movl 0(%esp),%eax  # save pc value into eax
    38         movl 4(%esp),%edx  # address of the jmp_buf structure to save context to
     37        movl 0(%esp), %eax  # save pc value into eax
     38        movl 4(%esp), %edx  # address of the jmp_buf structure to save context to
    3939       
    4040        # save registers to the jmp_buf structure
    4141        CONTEXT_SAVE_ARCH_CORE %edx %eax
    4242       
    43         xorl %eax,%eax  # set_jmp returns 0
     43        xorl %eax, %eax     # set_jmp returns 0
    4444        ret
    4545
     
    5252        CONTEXT_RESTORE_ARCH_CORE %ecx %edx
    5353       
    54         movl %edx,0(%esp)  # put saved pc on stack
     54        movl %edx, 0(%esp)  # put saved pc on stack
    5555        ret
  • uspace/lib/c/arch/ia32/src/thread_entry.s

    r45b4300 r2b903ca  
    4040        mov %dx, %fs
    4141        # Do not set %gs, it contains descriptor that can see TLS
    42 
     42       
    4343        #
    4444        # Create the first stack frame.
     
    4646        pushl $0
    4747        mov %esp, %ebp
    48 
     48       
    4949        #
    5050        # EAX contains address of uarg.
Note: See TracChangeset for help on using the changeset viewer.