Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273001
b: refs/heads/master
c: 51d3474
h: refs/heads/master
i:
  272999: 727e0fe
v: v3
  • Loading branch information
Al Viro authored and Richard Weinberger committed Nov 2, 2011
1 parent f75c230 commit e3576f3
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 86 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7eb122555c8583e1601b7a620c5a88c1e06c3eac
refs/heads/master: 51d34749051a6369093e5067ef67c17f17694921
2 changes: 1 addition & 1 deletion trunk/arch/um/os-Linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

obj-y = aio.o execvp.o file.o helper.o irq.o main.o mem.o process.o \
registers.o sigio.o signal.o start_up.o time.o tty.o \
umid.o tls.o user_syms.o util.o drivers/ sys-$(SUBARCH)/ skas/
umid.o tls.o user_syms.o util.o drivers/ sys-$(HEADER_ARCH)/ skas/

obj-$(CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA) += elf_aux.o

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
# Licensed under the GPL
#

obj-y = registers.o task_size.o tls.o
obj-y = registers.o task_size.o

obj-$(CONFIG_X86_32) += tls.o
obj-$(CONFIG_64BIT) += prctl.o

USER_OBJS := $(obj-y)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ int restore_fp_registers(int pid, unsigned long *fp_regs)
return 0;
}

#ifdef __i386__
int have_fpx_regs = 1;
int save_fpx_registers(int pid, unsigned long *fp_regs)
{
if (ptrace(PTRACE_GETFPXREGS, pid, 0, fp_regs) < 0)
Expand All @@ -38,24 +40,6 @@ int restore_fpx_registers(int pid, unsigned long *fp_regs)
return 0;
}

unsigned long get_thread_reg(int reg, jmp_buf *buf)
{
switch (reg) {
case EIP:
return buf[0]->__eip;
case UESP:
return buf[0]->__esp;
case EBP:
return buf[0]->__ebp;
default:
printk(UM_KERN_ERR "get_thread_regs - unknown register %d\n",
reg);
return 0;
}
}

int have_fpx_regs = 1;

int get_fp_registers(int pid, unsigned long *regs)
{
if (have_fpx_regs)
Expand Down Expand Up @@ -87,3 +71,41 @@ void arch_init_registers(int pid)

have_fpx_regs = 0;
}
#else

int get_fp_registers(int pid, unsigned long *regs)
{
return save_fp_registers(pid, regs);
}

int put_fp_registers(int pid, unsigned long *regs)
{
return restore_fp_registers(pid, regs);
}

#endif

unsigned long get_thread_reg(int reg, jmp_buf *buf)
{
switch (reg) {
#ifdef __i386__
case EIP:
return buf[0]->__eip;
case UESP:
return buf[0]->__esp;
case EBP:
return buf[0]->__ebp;
#else
case RIP:
return buf[0]->__rip;
case RSP:
return buf[0]->__rsp;
case RBP:
return buf[0]->__rbp;
#endif
default:
printk(UM_KERN_ERR "get_thread_regs - unknown register %d\n",
reg);
return 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include <sys/mman.h>
#include "longjmp.h"

#ifdef __i386__

static jmp_buf buf;

static void segfault(int sig)
Expand Down Expand Up @@ -136,3 +138,13 @@ unsigned long os_get_top_address(void)

return top;
}

#else

unsigned long os_get_top_address(void)
{
/* The old value of CONFIG_TOP_ADDR */
return 0x7fc0000000;
}

#endif
File renamed without changes.
10 changes: 0 additions & 10 deletions trunk/arch/um/os-Linux/sys-x86_64/Makefile

This file was deleted.

50 changes: 0 additions & 50 deletions trunk/arch/um/os-Linux/sys-x86_64/registers.c

This file was deleted.

5 changes: 0 additions & 5 deletions trunk/arch/um/os-Linux/sys-x86_64/task_size.c

This file was deleted.

0 comments on commit e3576f3

Please sign in to comment.