Changeset 17af7d1 for src/libcfa/concurrency/invoke.c
- Timestamp:
- Mar 17, 2017, 11:34:15 AM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- b32ada31
- Parents:
- 9f1695b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/invoke.c
r9f1695b r17af7d1 64 64 65 65 struct thread_desc* thrd = get_thread( this ); 66 struct coroutine_desc* cor = &thrd->c ;66 struct coroutine_desc* cor = &thrd->cor; 67 67 cor->state = Active; 68 68 … … 92 92 struct FakeStack { 93 93 void *fixedRegisters[3]; // fixed registers ebx, edi, esi (popped on 1st uSwitch, values unimportant) 94 uint32_t mxcr; 95 uint16_t fcw;// X97 FPU control word (preserved across function calls)96 void *rturn; 94 uint32_t mxcr; // SSE Status and Control bits (control bits are preserved across function calls) 95 uint16_t fcw; // X97 FPU control word (preserved across function calls) 96 void *rturn; // where to go on return from uSwitch 97 97 void *dummyReturn; // fake return compiler would have pushed on call to uInvoke 98 98 void *argument[3]; // for 16-byte ABI, 16-byte alignment starts here … … 106 106 ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->argument[0] = this; // argument to invoke 107 107 ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->rturn = invoke; 108 ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->mxcr = 0x1F80; //Vol. 2A 3-520 109 ((struct FakeStack *)(((struct machine_context_t *)stack->context)->SP))->fcw = 0x037F; //Vol. 1 8-7 108 110 109 111 #elif defined( __x86_64__ ) 110 112 111 113 struct FakeStack { 112 void *fixedRegisters[5]; 113 uint32_t mxcr; 114 uint16_t fcw; 115 void *rturn; 116 void *dummyReturn; 114 void *fixedRegisters[5]; // fixed registers rbx, r12, r13, r14, r15 115 uint32_t mxcr; // SSE Status and Control bits (control bits are preserved across function calls) 116 uint16_t fcw; // X97 FPU control word (preserved across function calls) 117 void *rturn; // where to go on return from uSwitch 118 void *dummyReturn; // NULL return address to provide proper alignment 117 119 }; 118 120
Note: See TracChangeset
for help on using the changeset viewer.