Changeset a35b458 in mainline for kernel/arch/amd64/src/context.S


Ignore:
Timestamp:
2018-03-02T20:10:49Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f1380b7
Parents:
3061bc1
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
Message:

style: Remove trailing whitespace on _all_ lines, including empty ones, for particular file types.

Command used: tools/srepl '\s\+$' '' -- *.c *.h *.py *.sh *.s *.S *.ag

Currently, whitespace on empty lines is very inconsistent.
There are two basic choices: Either remove the whitespace, or keep empty lines
indented to the level of surrounding code. The former is AFAICT more common,
and also much easier to do automatically.

Alternatively, we could write script for automatic indentation, and use that
instead. However, if such a script exists, it's possible to use the indented
style locally, by having the editor apply relevant conversions on load/save,
without affecting remote repository. IMO, it makes more sense to adopt
the simpler rule.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/context.S

    r3061bc1 ra35b458  
    4040FUNCTION_BEGIN(context_save_arch)
    4141        movq (%rsp), %rdx     # the caller's return %rip
    42        
     42
    4343        movq %rdx, CONTEXT_OFFSET_PC(%rdi)
    4444        movq %rsp, CONTEXT_OFFSET_SP(%rdi)
    45        
     45
    4646        movq %rbx, CONTEXT_OFFSET_RBX(%rdi)
    4747        movq %rbp, CONTEXT_OFFSET_RBP(%rdi)
     
    5050        movq %r14, CONTEXT_OFFSET_R14(%rdi)
    5151        movq %r15, CONTEXT_OFFSET_R15(%rdi)
    52        
     52
    5353#ifdef MEMORY_MODEL_large
    5454        movabsq $vreg_ptr, %rsi
     
    5959        movq %fs:VREG_TP(%rsi), %rsi
    6060        movq %rsi, CONTEXT_OFFSET_TP(%rdi)
    61        
     61
    6262        xorl %eax, %eax       # context_save returns 1
    6363        incl %eax
     
    7878        movq CONTEXT_OFFSET_RBP(%rdi), %rbp
    7979        movq CONTEXT_OFFSET_RBX(%rdi), %rbx
    80        
     80
    8181        movq CONTEXT_OFFSET_SP(%rdi), %rsp
    82        
     82
    8383        movq CONTEXT_OFFSET_PC(%rdi), %rdx
    8484        movq %rdx, (%rsp)
    85        
     85
    8686        movq CONTEXT_OFFSET_TP(%rdi), %rcx
    8787#ifdef MEMORY_MODEL_large
     
    9292#endif
    9393        movq %rcx, %fs:VREG_TP(%rsi)
    94        
     94
    9595        xorl %eax, %eax       # context_restore returns 0
    9696        ret
Note: See TracChangeset for help on using the changeset viewer.