rename registers.h -> processor.h
authorPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Tue, 27 Oct 2009 22:32:52 +0000 (18:32 -0400)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Tue, 27 Oct 2009 22:35:28 +0000 (18:35 -0400)
libust/marker.h
libust/processor.h [new file with mode: 0644]
libust/registers.h [deleted file]

index 06f2b93f826d25fbf4ec976668b3ff14a3658126..4c6a703be5ac6cd3b9babe91b5a3427d10b1a883 100644 (file)
@@ -31,7 +31,7 @@
 #include "kernelcompat.h"
 #include <kcompat/list.h>
 #include "localerr.h"
-#include "registers.h"
+#include "processor.h"
 
 //ust// struct module;
 //ust// struct task_struct;
diff --git a/libust/processor.h b/libust/processor.h
new file mode 100644 (file)
index 0000000..1eb5843
--- /dev/null
@@ -0,0 +1,107 @@
+#ifndef UST_PROCESSOR_H
+#define UST_PROCESSOR_H
+
+#include <stddef.h>
+
+#ifdef X86_32
+
+struct registers {
+       long eax;
+       long ebx;
+       long ecx;
+       long edx;
+       long ebp;
+       long esp;
+       long esi;
+       long edi;
+       int  xds;
+       int  xes;
+       int  xfs;
+       int  xgs;
+       long eip;
+       int  xcs;
+       long eflags;
+       int  xss;
+};
+
+static inline save_registers(struct registers *regs)
+{
+}
+
+#define RELATIVE_ADDRESS(__rel_label__) __rel_label__
+
+#define _ASM_PTR ".long "
+
+#else
+
+struct registers {
+       unsigned long rax;
+       unsigned long rbx;
+       unsigned long rcx;
+       unsigned long rdx;
+       unsigned long rbp;
+       unsigned long rsp;
+       unsigned long rsi;
+       unsigned long rdi;
+       unsigned long r8;
+       unsigned long r9;
+       unsigned long r10;
+       unsigned long r11;
+       unsigned long r12;
+       unsigned long r13;
+       unsigned long r14;
+       unsigned long r15;
+       int cs;
+       int ss;
+};
+
+#define save_registers(regsptr) \
+       asm ("movq %%rax,%c[rax_off](%[regs])\n\t" \
+            "movq %%rbx,%c[rbx_off](%[regs])\n\t" \
+            "movq %%rcx,%c[rcx_off](%[regs])\n\t" \
+            "movq %%rdx,%c[rdx_off](%[regs])\n\t" \
+            "movq %%rbp,%c[rbp_off](%[regs])\n\t" \
+            "movq %%rsp,%c[rsp_off](%[regs])\n\t" \
+            "movq %%rsi,%c[rsi_off](%[regs])\n\t" \
+            "movq %%rdi,%c[rdi_off](%[regs])\n\t" \
+            "movq %%r8,%c[r8_off](%[regs])\n\t" \
+            "movq %%r9,%c[r9_off](%[regs])\n\t" \
+            "movq %%r10,%c[r10_off](%[regs])\n\t" \
+            "movq %%r11,%c[r11_off](%[regs])\n\t" \
+            "movq %%r12,%c[r12_off](%[regs])\n\t" \
+            "movq %%r13,%c[r13_off](%[regs])\n\t" \
+            "movq %%r14,%c[r14_off](%[regs])\n\t" \
+            "movq %%r15,%c[r15_off](%[regs])\n\t" \
+            "movw %%cs,%c[cs_off](%[regs])\n\t" \
+            "movw %%ss,%c[ss_off](%[regs])\n\t" \
+       : \
+       : [regs] "r" (regsptr), \
+         [rax_off] "i" (offsetof(struct registers, rax)), \
+         [rbx_off] "i" (offsetof(struct registers, rbx)), \
+         [rcx_off] "i" (offsetof(struct registers, rcx)), \
+         [rdx_off] "i" (offsetof(struct registers, rdx)), \
+         [rbp_off] "i" (offsetof(struct registers, rbp)), \
+         [rsp_off] "i" (offsetof(struct registers, rsp)), \
+         [rsi_off] "i" (offsetof(struct registers, rsi)), \
+         [rdi_off] "i" (offsetof(struct registers, rdi)), \
+         [r8_off] "i" (offsetof(struct registers, r8)), \
+         [r9_off] "i" (offsetof(struct registers, r9)), \
+         [r10_off] "i" (offsetof(struct registers, r10)), \
+         [r11_off] "i" (offsetof(struct registers, r11)), \
+         [r12_off] "i" (offsetof(struct registers, r12)), \
+         [r13_off] "i" (offsetof(struct registers, r13)), \
+         [r14_off] "i" (offsetof(struct registers, r14)), \
+         [r15_off] "i" (offsetof(struct registers, r15)), \
+         [cs_off] "i" (offsetof(struct registers, cs)), \
+         [ss_off] "i" (offsetof(struct registers, ss)) \
+       );
+
+/* Macro to insert the address of a relative jump in an assembly stub,
+ * in a relocatable way. On x86-64, this uses a special (%rip) notation. */
+#define RELATIVE_ADDRESS(__rel_label__) __rel_label__(%%rip)
+
+#define _ASM_PTR ".quad "
+
+#endif
+
+#endif /* UST_PROCESSOR_H */
diff --git a/libust/registers.h b/libust/registers.h
deleted file mode 100644 (file)
index ab12c4e..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-#ifndef UST_REGISTERS_H
-#define UST_REGISTERS_H
-
-#include <stddef.h>
-
-#ifdef X86_32
-
-struct registers {
-       long eax;
-       long ebx;
-       long ecx;
-       long edx;
-       long ebp;
-       long esp;
-       long esi;
-       long edi;
-       int  xds;
-       int  xes;
-       int  xfs;
-       int  xgs;
-       long eip;
-       int  xcs;
-       long eflags;
-       int  xss;
-};
-
-static inline save_registers(struct registers *regs)
-{
-}
-
-#define RELATIVE_ADDRESS(__rel_label__) __rel_label__
-
-#define _ASM_PTR ".long "
-
-#else
-
-struct registers {
-       unsigned long rax;
-       unsigned long rbx;
-       unsigned long rcx;
-       unsigned long rdx;
-       unsigned long rbp;
-       unsigned long rsp;
-       unsigned long rsi;
-       unsigned long rdi;
-       unsigned long r8;
-       unsigned long r9;
-       unsigned long r10;
-       unsigned long r11;
-       unsigned long r12;
-       unsigned long r13;
-       unsigned long r14;
-       unsigned long r15;
-       int cs;
-       int ss;
-};
-
-#define save_registers(regsptr) \
-       asm ("movq %%rax,%c[rax_off](%[regs])\n\t" \
-            "movq %%rbx,%c[rbx_off](%[regs])\n\t" \
-            "movq %%rcx,%c[rcx_off](%[regs])\n\t" \
-            "movq %%rdx,%c[rdx_off](%[regs])\n\t" \
-            "movq %%rbp,%c[rbp_off](%[regs])\n\t" \
-            "movq %%rsp,%c[rsp_off](%[regs])\n\t" \
-            "movq %%rsi,%c[rsi_off](%[regs])\n\t" \
-            "movq %%rdi,%c[rdi_off](%[regs])\n\t" \
-            "movq %%r8,%c[r8_off](%[regs])\n\t" \
-            "movq %%r9,%c[r9_off](%[regs])\n\t" \
-            "movq %%r10,%c[r10_off](%[regs])\n\t" \
-            "movq %%r11,%c[r11_off](%[regs])\n\t" \
-            "movq %%r12,%c[r12_off](%[regs])\n\t" \
-            "movq %%r13,%c[r13_off](%[regs])\n\t" \
-            "movq %%r14,%c[r14_off](%[regs])\n\t" \
-            "movq %%r15,%c[r15_off](%[regs])\n\t" \
-            "movw %%cs,%c[cs_off](%[regs])\n\t" \
-            "movw %%ss,%c[ss_off](%[regs])\n\t" \
-       : \
-       : [regs] "r" (regsptr), \
-         [rax_off] "i" (offsetof(struct registers, rax)), \
-         [rbx_off] "i" (offsetof(struct registers, rbx)), \
-         [rcx_off] "i" (offsetof(struct registers, rcx)), \
-         [rdx_off] "i" (offsetof(struct registers, rdx)), \
-         [rbp_off] "i" (offsetof(struct registers, rbp)), \
-         [rsp_off] "i" (offsetof(struct registers, rsp)), \
-         [rsi_off] "i" (offsetof(struct registers, rsi)), \
-         [rdi_off] "i" (offsetof(struct registers, rdi)), \
-         [r8_off] "i" (offsetof(struct registers, r8)), \
-         [r9_off] "i" (offsetof(struct registers, r9)), \
-         [r10_off] "i" (offsetof(struct registers, r10)), \
-         [r11_off] "i" (offsetof(struct registers, r11)), \
-         [r12_off] "i" (offsetof(struct registers, r12)), \
-         [r13_off] "i" (offsetof(struct registers, r13)), \
-         [r14_off] "i" (offsetof(struct registers, r14)), \
-         [r15_off] "i" (offsetof(struct registers, r15)), \
-         [cs_off] "i" (offsetof(struct registers, cs)), \
-         [ss_off] "i" (offsetof(struct registers, ss)) \
-       );
-
-/* Macro to insert the address of a relative jump in an assembly stub,
- * in a relocatable way. On x86-64, this uses a special (%rip) notation. */
-#define RELATIVE_ADDRESS(__rel_label__) __rel_label__(%%rip)
-
-#define _ASM_PTR ".quad "
-
-#endif
-
-#endif /* UST_REGISTERS_H */
This page took 0.027618 seconds and 4 git commands to generate.