Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright 2003 PathScale, Inc.
0003  *
0004  * Licensed under the GPL
0005  */
0006 
0007 #ifndef __UM_PROCESSOR_X86_64_H
0008 #define __UM_PROCESSOR_X86_64_H
0009 
0010 struct arch_thread {
0011         unsigned long debugregs[8];
0012         int debugregs_seq;
0013         unsigned long fs;
0014         struct faultinfo faultinfo;
0015 };
0016 
0017 #define INIT_ARCH_THREAD { .debugregs       = { [ 0 ... 7 ] = 0 }, \
0018                .debugregs_seq   = 0, \
0019                .fs          = 0, \
0020                .faultinfo       = { 0, 0, 0 } }
0021 
0022 #define STACKSLOTS_PER_LINE 4
0023 
0024 static inline void arch_flush_thread(struct arch_thread *thread)
0025 {
0026 }
0027 
0028 static inline void arch_copy_thread(struct arch_thread *from,
0029                                     struct arch_thread *to)
0030 {
0031     to->fs = from->fs;
0032 }
0033 
0034 #define current_sp() ({ void *sp; __asm__("movq %%rsp, %0" : "=r" (sp) : ); sp; })
0035 #define current_bp() ({ unsigned long bp; __asm__("movq %%rbp, %0" : "=r" (bp) : ); bp; })
0036 
0037 #endif