projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove unused comment
[lttng-ust.git]
/
include
/
ust
/
processor.h
diff --git
a/include/ust/processor.h
b/include/ust/processor.h
index 6f0b9491be99f1f4b3b858f883925ad2279d0ce0..4bd0997db76f26e7682554d88ce506140cf96d3d 100644
(file)
--- a/
include/ust/processor.h
+++ b/
include/ust/processor.h
@@
-15,8
+15,8
@@
struct registers {
long esi;
long ebp;
long edx;
long esi;
long ebp;
long edx;
- long ecx;
long edi;
long edi;
+ long ecx;
long ebx;
long eax;
long eflags;
long ebx;
long eax;
long eflags;
@@
-25,7
+25,6
@@
struct registers {
#ifdef CONFIG_UST_GDB_INTEGRATION
#ifdef CONFIG_UST_GDB_INTEGRATION
-//#error "GDB integration not supported for x86-32 yet."
#define save_registers(regsptr) \
asm volatile ( \
#define save_registers(regsptr) \
asm volatile ( \
@@
-35,46
+34,66
@@
struct registers {
"pushfl\n\t" \
/* eax will hold the ptr to the private stack bottom */ \
"pushl %%eax\n\t" \
"pushfl\n\t" \
/* eax will hold the ptr to the private stack bottom */ \
"pushl %%eax\n\t" \
- /* ebx
will be used to temporarily hold the stack bottom addr
*/ \
+ /* ebx
is used for TLS access
*/ \
"pushl %%ebx\n\t" \
"pushl %%ebx\n\t" \
+ /* ecx will be used to temporarily hold the stack bottom addr */ \
+ "pushl %%ecx\n\t" \
/* rdi is the input to __tls_get_addr, and also a temp var */ \
"pushl %%edi\n\t" \
/* rdi is the input to __tls_get_addr, and also a temp var */ \
"pushl %%edi\n\t" \
+ /* Get GOT address */ \
+ "call __i686.get_pc_thunk.bx\n\t" \
+ "addl $_GLOBAL_OFFSET_TABLE_, %%ebx\n\t" \
+ /* Save registers before call (not using ecx yet but we must preserve \
+ the original value of edx. */ \
+ "pushl %%edx\n\t" \
/* Start TLS access of private reg stack pointer */ \
"leal ust_reg_stack_ptr@tlsgd(,%%ebx,1),%%eax\n\t" \
"call ___tls_get_addr@plt\n\t" \
/* --- End TLS access */ \
/* Start TLS access of private reg stack pointer */ \
"leal ust_reg_stack_ptr@tlsgd(,%%ebx,1),%%eax\n\t" \
"call ___tls_get_addr@plt\n\t" \
/* --- End TLS access */ \
+ "popl %%edx\n\t" \
/* check if ust_reg_stack_ptr has been initialized */ \
/* check if ust_reg_stack_ptr has been initialized */ \
- "movl (%%eax),%%e
b
x\n\t" \
- "testl %%e
bx,%%eb
x\n\t" \
+ "movl (%%eax),%%e
c
x\n\t" \
+ "testl %%e
cx,%%ec
x\n\t" \
"jne 1f\n\t" \
"jne 1f\n\t" \
- "movl %%eax,%%ebx\n\t" \
+ "movl %%eax,%%ecx\n\t" \
+ /* Save registers before call (using ecx and we must preserve \
+ the original value of edx. */ \
+ "pushl %%ecx\n\t" \
+ "pushl %%edx\n\t" \
/* Start TLS access of private reg stack */ \
"leal ust_reg_stack@tlsgd(,%%ebx,1),%%eax\n\t" \
"call ___tls_get_addr@plt\n\t" \
/* --- End TLS access */ \
/* Start TLS access of private reg stack */ \
"leal ust_reg_stack@tlsgd(,%%ebx,1),%%eax\n\t" \
"call ___tls_get_addr@plt\n\t" \
/* --- End TLS access */ \
+ "popl %%edx\n\t" \
+ "popl %%ecx\n\t" \
"addl $500,%%eax\n\t" \
"addl $500,%%eax\n\t" \
- "movl %%eax,(%%e
b
x)\n\t" \
- "movl %%e
b
x,%%eax\n\t" \
+ "movl %%eax,(%%e
c
x)\n\t" \
+ "movl %%e
c
x,%%eax\n\t" \
/* now the pointer to the private stack is in eax. \
must add stack size so the ptr points to the stack bottom. */ \
"1:\n\t" \
/* Manually push esp to private stack */ \
"addl $-4,(%%eax)\n\t" \
/* now the pointer to the private stack is in eax. \
must add stack size so the ptr points to the stack bottom. */ \
"1:\n\t" \
/* Manually push esp to private stack */ \
"addl $-4,(%%eax)\n\t" \
- "movl
16
(%%esp), %%edi\n\t" \
+ "movl
20
(%%esp), %%edi\n\t" \
"movl (%%eax), %%ebx\n\t" \
"movl %%edi, (%%ebx)\n\t" \
/* Manually push eflags to private stack */ \
"addl $-4,(%%eax)\n\t" \
"movl (%%eax), %%ebx\n\t" \
"movl %%edi, (%%ebx)\n\t" \
/* Manually push eflags to private stack */ \
"addl $-4,(%%eax)\n\t" \
- "movl 1
2
(%%esp), %%edi\n\t" \
+ "movl 1
6
(%%esp), %%edi\n\t" \
"movl (%%eax), %%ebx\n\t" \
"movl %%edi, (%%ebx)\n\t" \
/* Manually push eax to private stack */ \
"addl $-4,(%%eax)\n\t" \
"movl (%%eax), %%ebx\n\t" \
"movl %%edi, (%%ebx)\n\t" \
/* Manually push eax to private stack */ \
"addl $-4,(%%eax)\n\t" \
- "movl
8
(%%esp), %%edi\n\t" \
+ "movl
12
(%%esp), %%edi\n\t" \
"movl (%%eax), %%ebx\n\t" \
"movl %%edi, (%%ebx)\n\t" \
/* Manually push ebx to private stack */ \
"addl $-4,(%%eax)\n\t" \
"movl (%%eax), %%ebx\n\t" \
"movl %%edi, (%%ebx)\n\t" \
/* Manually push ebx to private stack */ \
"addl $-4,(%%eax)\n\t" \
+ "movl 8(%%esp), %%edi\n\t" \
+ "movl (%%eax), %%ebx\n\t" \
+ "movl %%edi, (%%ebx)\n\t" \
+ /* Manually push ecx to private stack */ \
+ "addl $-4,(%%eax)\n\t" \
"movl 4(%%esp), %%edi\n\t" \
"movl (%%eax), %%ebx\n\t" \
"movl %%edi, (%%ebx)\n\t" \
"movl 4(%%esp), %%edi\n\t" \
"movl (%%eax), %%ebx\n\t" \
"movl %%edi, (%%ebx)\n\t" \
@@
-87,12
+106,10
@@
struct registers {
/* -- esp already pushed -- */ \
/* -- eax already pushed -- */ \
/* -- ebx already pushed -- */ \
/* -- esp already pushed -- */ \
/* -- eax already pushed -- */ \
/* -- ebx already pushed -- */ \
+ /* -- ecx already pushed -- */ \
/* -- edi already pushed -- */ \
"addl $-4,(%%eax)\n\t" \
"movl (%%eax), %%ebx\n\t" \
/* -- edi already pushed -- */ \
"addl $-4,(%%eax)\n\t" \
"movl (%%eax), %%ebx\n\t" \
- "movl %%ecx,(%%ebx)\n\t" \
- "addl $-4,(%%eax)\n\t" \
- "movl (%%eax), %%ebx\n\t" \
"movl %%edx,(%%ebx)\n\t" \
"addl $-4,(%%eax)\n\t" \
"movl (%%eax), %%ebx\n\t" \
"movl %%edx,(%%ebx)\n\t" \
"addl $-4,(%%eax)\n\t" \
"movl (%%eax), %%ebx\n\t" \
@@
-110,6
+127,7
@@
struct registers {
"movw %%ss, (%%ebx)\n\t" \
/* restore original values of regs that were used internally */ \
"popl %%edi\n\t" \
"movw %%ss, (%%ebx)\n\t" \
/* restore original values of regs that were used internally */ \
"popl %%edi\n\t" \
+ "popl %%ecx\n\t" \
"popl %%ebx\n\t" \
"popl %%eax\n\t" \
/* cancel push of rsp */ \
"popl %%ebx\n\t" \
"popl %%eax\n\t" \
/* cancel push of rsp */ \
@@
-120,8
+138,6
@@
struct registers {
memcpy(regsptr, (void *)ust_reg_stack_ptr, sizeof(struct registers)); \
ust_reg_stack_ptr = (void *)(((long)ust_reg_stack_ptr) + sizeof(struct registers));
memcpy(regsptr, (void *)ust_reg_stack_ptr, sizeof(struct registers)); \
ust_reg_stack_ptr = (void *)(((long)ust_reg_stack_ptr) + sizeof(struct registers));
-#define save_ip(channel,name)
-
#else /* CONFIG_UST_GDB_INTEGRATION */
#define save_registers(a)
#else /* CONFIG_UST_GDB_INTEGRATION */
#define save_registers(a)
This page took
0.026016 seconds
and
4
git commands to generate.