Ignore:
Timestamp:
Jul 7, 2017, 11:55:32 AM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
3f12158
Parents:
b5f9829
Message:

Converted CtxGet? from asm function to asm statement for more robustness, should fix full build

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/invoke.h

    rb5f9829 rf32e53e  
    9999#ifndef _INVOKE_PRIVATE_H_
    100100#define _INVOKE_PRIVATE_H_
    101      
     101
    102102      struct machine_context_t {
    103103            void *SP;
     
    109109      extern void CtxInvokeStub( void );
    110110      void CtxSwitch( void * from, void * to ) asm ("CtxSwitch");
    111       void CtxGet( void * this ) asm ("CtxGet");
     111
     112      #if   defined( __x86_64__ )
     113      #define CtxGet( ctx ) __asm__ ( \
     114                  "movq %%rsp,%0\n"   \
     115                  "movq %%rbp,%1\n"   \
     116            : "=rm" (ctx.SP), "=rm" (ctx.FP) )
     117      #elif defined( __i386__ )
     118      #define CtxGet( ctx ) __asm__ ( \
     119                  "movl %%esp,%0\n"   \
     120                  "movl %%ebp,%1\n"   \
     121            : "=rm" (ctx.SP), "=rm" (ctx.FP) )
     122      #endif
    112123
    113124#endif //_INVOKE_PRIVATE_H_
Note: See TracChangeset for help on using the changeset viewer.