summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/usr.bin/binutils/gdb/amd64obsd-tdep.c16
-rw-r--r--sys/arch/amd64/amd64/genassym.cf6
-rw-r--r--sys/arch/amd64/amd64/vector.S4
-rw-r--r--sys/arch/amd64/include/frame.h10
-rw-r--r--sys/arch/amd64/include/frameasm.h5
5 files changed, 12 insertions, 29 deletions
diff --git a/gnu/usr.bin/binutils/gdb/amd64obsd-tdep.c b/gnu/usr.bin/binutils/gdb/amd64obsd-tdep.c
index b43c698095e..cb31d6358b8 100644
--- a/gnu/usr.bin/binutils/gdb/amd64obsd-tdep.c
+++ b/gnu/usr.bin/binutils/gdb/amd64obsd-tdep.c
@@ -356,8 +356,8 @@ static int amd64obsd_tf_reg_offset[] =
2 * 8, /* %rdx */
1 * 8, /* %rsi */
0 * 8, /* %rdi */
- 20 * 8, /* %rbp */
- 24 * 8, /* %rsp */
+ 16 * 8, /* %rbp */
+ 20 * 8, /* %rsp */
4 * 8, /* %r8 ... */
5 * 8,
6 * 8,
@@ -366,14 +366,10 @@ static int amd64obsd_tf_reg_offset[] =
9 * 8,
10 * 8,
11 * 8, /* ... %r15 */
- 21 * 8, /* %rip */
- 23 * 8, /* %eflags */
- 22 * 8, /* %cs */
- 25 * 8, /* %ss */
- 18 * 8, /* %ds */
- 17 * 8, /* %es */
- 16 * 8, /* %fs */
- 15 * 8 /* %gs */
+ 17 * 8, /* %rip */
+ 19 * 8, /* %rflags */
+ 18 * 8, /* %cs */
+ 21 * 8, /* %ss */
};
diff --git a/sys/arch/amd64/amd64/genassym.cf b/sys/arch/amd64/amd64/genassym.cf
index 5d4ddd1c3e3..59235d4c8d9 100644
--- a/sys/arch/amd64/amd64/genassym.cf
+++ b/sys/arch/amd64/amd64/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.37 2018/07/03 20:15:57 guenther Exp $
+# $OpenBSD: genassym.cf,v 1.38 2018/07/10 08:57:44 guenther Exp $
# Written by Artur Grabowski art@openbsd.org, Public Domain
include <sys/param.h>
@@ -64,10 +64,6 @@ member tf_r15
member tf_rbp
member tf_rbx
member tf_rax
-member tf_gs
-member tf_fs
-member tf_es
-member tf_ds
member tf_trapno
member tf_err
member tf_rip
diff --git a/sys/arch/amd64/amd64/vector.S b/sys/arch/amd64/amd64/vector.S
index 9ce4fc1e61f..d9c42d5b03c 100644
--- a/sys/arch/amd64/amd64/vector.S
+++ b/sys/arch/amd64/amd64/vector.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: vector.S,v 1.69 2018/07/06 02:43:01 guenther Exp $ */
+/* $OpenBSD: vector.S,v 1.70 2018/07/10 08:57:44 guenther Exp $ */
/* $NetBSD: vector.S,v 1.5 2004/06/28 09:13:11 fvdl Exp $ */
/*
@@ -168,7 +168,7 @@ KUENTRY(calltrap_specstk_tramp)
popq %rbp
popq %rbx
popq %rax
- addq $48,%rsp # ignored TF_[DEFG]S
+ addq $16,%rsp
iretq
IDTVEC(trap03)
diff --git a/sys/arch/amd64/include/frame.h b/sys/arch/amd64/include/frame.h
index 68b72ec04db..19691ff19c5 100644
--- a/sys/arch/amd64/include/frame.h
+++ b/sys/arch/amd64/include/frame.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: frame.h,v 1.9 2018/07/03 20:15:57 guenther Exp $ */
+/* $OpenBSD: frame.h,v 1.10 2018/07/10 08:57:44 guenther Exp $ */
/* $NetBSD: frame.h,v 1.1 2003/04/26 18:39:40 fvdl Exp $ */
/*-
@@ -97,10 +97,6 @@ struct trapframe {
int64_t tf_err; /* not the hardware position */
int64_t tf_rbx;
int64_t tf_rax;
- int64_t tf_gs;
- int64_t tf_fs;
- int64_t tf_es;
- int64_t tf_ds;
int64_t tf_trapno;
int64_t tf_rbp; /* hardware puts err here, INTRENTRY() moves it up */
/* below portion defined in hardware */
@@ -131,10 +127,6 @@ struct intrframe {
int64_t if_err; /* IREENT_MAGIC if resume/recurse */
int64_t if_rbx;
int64_t if_rax;
- int64_t tf_gs;
- int64_t tf_fs;
- int64_t tf_es;
- int64_t tf_ds;
int64_t if_ppl; /* previous priority level */
int64_t if_rbp;
/* below portion defined in hardware */
diff --git a/sys/arch/amd64/include/frameasm.h b/sys/arch/amd64/include/frameasm.h
index 0c5a6a7f881..05a9ecb8b2a 100644
--- a/sys/arch/amd64/include/frameasm.h
+++ b/sys/arch/amd64/include/frameasm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: frameasm.h,v 1.17 2018/07/09 08:35:36 guenther Exp $ */
+/* $OpenBSD: frameasm.h,v 1.18 2018/07/10 08:57:44 guenther Exp $ */
/* $NetBSD: frameasm.h,v 1.1 2003/04/26 18:39:40 fvdl Exp $ */
#ifndef _AMD64_MACHINE_FRAMEASM_H
@@ -80,7 +80,7 @@ INTRENTRY_LABEL(label): /* from kernel */ \
INTR_CLEAR_GPRS
#define INTR_ENTRY_KERN \
- subq $152,%rsp ; \
+ subq $120,%rsp ; \
movq %rcx,TF_RCX(%rsp) ; \
/* the hardware puts err next to %rip, we move it elsewhere and */ \
/* later put %rbp in this slot to make it look like a call frame */ \
@@ -112,7 +112,6 @@ INTRENTRY_LABEL(label): /* from kernel */ \
/* For faking up an interrupt frame when we're already in the kernel */
#define INTR_REENTRY \
- subq $32,%rsp ; \
INTR_SAVE_GPRS
#define INTRFASTEXIT \