Deleted Added
full compact
kse_asm.S (107167) kse_asm.S (107183)
1/*
2 * Copyright (c) 2002 Jonathan Mini <mini@freebsd.org>.
3 * Copyright (c) 2001 Daniel Eischen <deischen@freebsd.org>.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 10 unchanged lines hidden (view full) ---

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
1/*
2 * Copyright (c) 2002 Jonathan Mini <mini@freebsd.org>.
3 * Copyright (c) 2001 Daniel Eischen <deischen@freebsd.org>.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 10 unchanged lines hidden (view full) ---

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * $FreeBSD: head/tools/KSE/ksetest/kse_asm.S 107167 2002-11-22 03:01:55Z davidxu $
27 * $FreeBSD: head/tools/KSE/ksetest/kse_asm.S 107183 2002-11-23 04:39:52Z davidxu $
28 */
29
30#include <machine/asm.h>
28 */
29
30#include <machine/asm.h>
31__FBSDID("$FreeBSD: head/tools/KSE/ksetest/kse_asm.S 107167 2002-11-22 03:01:55Z davidxu $");
31__FBSDID("$FreeBSD: head/tools/KSE/ksetest/kse_asm.S 107183 2002-11-23 04:39:52Z davidxu $");
32
33/*
34 * Where do we define these?
35 */
36#define MC_SIZE 640 /* sizeof mcontext_t */
37#define UC_MC_OFFSET 16 /* offset to mcontext from ucontext */
38#define UC_MC_LEN_OFFSET 96 /* offset to mc_len from mcontext */
39#define MC_LEN_OFFSET 80 /* offset to mc_len from mcontext */

--- 44 unchanged lines hidden (view full) ---

84 frstor MC_FP_REGS_OFFSET(%edx) /* restore FP regs */
85 jmp 4f
863: fninit
87 fldcw MC_FP_CW_OFFSET(%edx)
884: movl 48(%edx), %eax /* restore ax, bx, cx, dx */
89 pushl 68(%edx) /* flags on stack */
90 pushl 36(%edx) /* %ebx on stack */
91 pushl 44(%edx) /* %ecx on stack */
32
33/*
34 * Where do we define these?
35 */
36#define MC_SIZE 640 /* sizeof mcontext_t */
37#define UC_MC_OFFSET 16 /* offset to mcontext from ucontext */
38#define UC_MC_LEN_OFFSET 96 /* offset to mc_len from mcontext */
39#define MC_LEN_OFFSET 80 /* offset to mc_len from mcontext */

--- 44 unchanged lines hidden (view full) ---

84 frstor MC_FP_REGS_OFFSET(%edx) /* restore FP regs */
85 jmp 4f
863: fninit
87 fldcw MC_FP_CW_OFFSET(%edx)
884: movl 48(%edx), %eax /* restore ax, bx, cx, dx */
89 pushl 68(%edx) /* flags on stack */
90 pushl 36(%edx) /* %ebx on stack */
91 pushl 44(%edx) /* %ecx on stack */
92 pushl 40(%edx) /* %edx on stack */
92 movl 40(%edx), %edx /* %edx */
93 /*
93 /*
94 * all registers are now moved out of mailbox
95 * it's now safe to set current thread pointer
94 * all registers are now moved out of mailbox,
95 * it's safe to set current thread pointer
96 */
97 movl %ebx,(%ecx)
96 */
97 movl %ebx,(%ecx)
98 popl %edx /* %edx off stack */
99 popl %ecx /* %ecx off stack */
100 pop %ebx /* %ebx off stack */
101 popf /* flags off stack */
1025: ret /* %eip off stack */
103
104/*
105 * int thread_to_uts(struct kse_thr_mailbox *tm, struct kse_mailbox *km);
106 *

--- 52 unchanged lines hidden ---
98 popl %ecx /* %ecx off stack */
99 pop %ebx /* %ebx off stack */
100 popf /* flags off stack */
1015: ret /* %eip off stack */
102
103/*
104 * int thread_to_uts(struct kse_thr_mailbox *tm, struct kse_mailbox *km);
105 *

--- 52 unchanged lines hidden ---