Ignore:
Timestamp:
Apr 18, 2019, 2:59:09 PM (5 years ago)
Author:
tdelisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
8c3a0336
Parents:
3c06bba
Message:

x87 and SSE flags are now only saved by threads

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/CtxSwitch-x86_64.S

    r3c06bba rdeca0f5  
    4646CtxSwitch:
    4747
    48         // Save floating & SSE control words on the stack.
    49 
    50         subq   $8,%rsp
    51         stmxcsr 0(%rsp)         // 4 bytes
    52         fnstcw  4(%rsp)         // 2 bytes
    53 
    5448        // Save volatile registers on the stack.
    5549
     
    7872        popq %r15
    7973
    80         // Load floating & SSE control words from the stack.
    81 
    82         fldcw   4(%rsp)
    83         ldmxcsr 0(%rsp)
    84         addq   $8,%rsp
    85 
    8674        // Return to thread.
    8775
    8876        ret
    8977        .size  CtxSwitch, .-CtxSwitch
    90 
    91 
    92 //.text
    93 //      .align 2
    94 //.globl        CtxStore
    95 //CtxStore:
    96 //      // Save floating & SSE control words on the stack.
    97 //
    98 //      subq   $8,%rsp
    99 //      stmxcsr 0(%rsp)         // 4 bytes
    100 //      fnstcw  4(%rsp)         // 2 bytes
    101 //
    102 //      // Save volatile registers on the stack.
    103 //
    104 //      pushq %r15
    105 //      pushq %r14
    106 //      pushq %r13
    107 //      pushq %r12
    108 //      pushq %rbx
    109 //
    110 //      // Save old context in the "from" area.
    111 //
    112 //      movq %rsp,SP_OFFSET(%rdi)
    113 //      movq %rbp,FP_OFFSET(%rdi)
    114 //
    115 //      // Return to thread
    116 //
    117 //      ret
    118 //
    119 //.text
    120 //      .align 2
    121 //.globl        CtxRet
    122 //CtxRet:
    123 //      // Load new context from the "to" area.
    124 //
    125 //      movq SP_OFFSET(%rdi),%rsp
    126 //      movq FP_OFFSET(%rdi),%rbp
    127 //
    128 //      // Load volatile registers from the stack.
    129 //
    130 //      popq %rbx
    131 //      popq %r12
    132 //      popq %r13
    133 //      popq %r14
    134 //      popq %r15
    135 //
    136 //      // Load floating & SSE control words from the stack.
    137 //
    138 //      fldcw   4(%rsp)
    139 //      ldmxcsr 0(%rsp)
    140 //      addq   $8,%rsp
    141 //
    142 //      // Return to thread.
    143 //
    144 //      ret
    145 
    14678
    14779.text
Note: See TracChangeset for help on using the changeset viewer.