linux32_sysvec.c (186211) | linux32_sysvec.c (187948) |
---|---|
1/*- 2 * Copyright (c) 2004 Tim J. Robbins 3 * Copyright (c) 2003 Peter Wemm 4 * Copyright (c) 2002 Doug Rabson 5 * Copyright (c) 1998-1999 Andrew Gallatin 6 * Copyright (c) 1994-1996 S�ren Schmidt 7 * All rights reserved. 8 * --- 17 unchanged lines hidden (view full) --- 26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2004 Tim J. Robbins 3 * Copyright (c) 2003 Peter Wemm 4 * Copyright (c) 2002 Doug Rabson 5 * Copyright (c) 1998-1999 Andrew Gallatin 6 * Copyright (c) 1994-1996 S�ren Schmidt 7 * All rights reserved. 8 * --- 17 unchanged lines hidden (view full) --- 26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/amd64/linux32/linux32_sysvec.c 186211 2008-12-17 06:11:42Z imp $"); | 34__FBSDID("$FreeBSD: head/sys/amd64/linux32/linux32_sysvec.c 187948 2009-01-31 11:37:21Z obrien $"); |
35#include "opt_compat.h" 36 37#ifndef COMPAT_IA32 38#error "Unable to compile Linux-emulator due to missing COMPAT_IA32 option!" 39#endif 40 41#define __ELF_WORD_SIZE 32 42 --- 303 unchanged lines hidden (view full) --- 346 ? ((oonstack) ? LINUX_SS_ONSTACK : 0) : LINUX_SS_DISABLE; 347 PROC_UNLOCK(p); 348 349 bsd_to_linux_sigset(mask, &frame.sf_sc.uc_sigmask); 350 351 frame.sf_sc.uc_mcontext.sc_mask = frame.sf_sc.uc_sigmask.__bits[0]; 352 frame.sf_sc.uc_mcontext.sc_gs = rgs(); 353 frame.sf_sc.uc_mcontext.sc_fs = rfs(); | 35#include "opt_compat.h" 36 37#ifndef COMPAT_IA32 38#error "Unable to compile Linux-emulator due to missing COMPAT_IA32 option!" 39#endif 40 41#define __ELF_WORD_SIZE 32 42 --- 303 unchanged lines hidden (view full) --- 346 ? ((oonstack) ? LINUX_SS_ONSTACK : 0) : LINUX_SS_DISABLE; 347 PROC_UNLOCK(p); 348 349 bsd_to_linux_sigset(mask, &frame.sf_sc.uc_sigmask); 350 351 frame.sf_sc.uc_mcontext.sc_mask = frame.sf_sc.uc_sigmask.__bits[0]; 352 frame.sf_sc.uc_mcontext.sc_gs = rgs(); 353 frame.sf_sc.uc_mcontext.sc_fs = rfs(); |
354 __asm __volatile("movl %%es,%0" : | 354 __asm __volatile("mov %%es,%0" : |
355 "=rm" (frame.sf_sc.uc_mcontext.sc_es)); | 355 "=rm" (frame.sf_sc.uc_mcontext.sc_es)); |
356 __asm __volatile("movl %%ds,%0" : | 356 __asm __volatile("mov %%ds,%0" : |
357 "=rm" (frame.sf_sc.uc_mcontext.sc_ds)); 358 frame.sf_sc.uc_mcontext.sc_edi = regs->tf_rdi; 359 frame.sf_sc.uc_mcontext.sc_esi = regs->tf_rsi; 360 frame.sf_sc.uc_mcontext.sc_ebp = regs->tf_rbp; 361 frame.sf_sc.uc_mcontext.sc_ebx = regs->tf_rbx; 362 frame.sf_sc.uc_mcontext.sc_edx = regs->tf_rdx; 363 frame.sf_sc.uc_mcontext.sc_ecx = regs->tf_rcx; 364 frame.sf_sc.uc_mcontext.sc_eax = regs->tf_rax; --- 115 unchanged lines hidden (view full) --- 480 bsd_to_linux_sigset(mask, &lmask); 481 482 /* 483 * Build the signal context to be used by sigreturn. 484 */ 485 frame.sf_sc.sc_mask = lmask.__bits[0]; 486 frame.sf_sc.sc_gs = rgs(); 487 frame.sf_sc.sc_fs = rfs(); | 357 "=rm" (frame.sf_sc.uc_mcontext.sc_ds)); 358 frame.sf_sc.uc_mcontext.sc_edi = regs->tf_rdi; 359 frame.sf_sc.uc_mcontext.sc_esi = regs->tf_rsi; 360 frame.sf_sc.uc_mcontext.sc_ebp = regs->tf_rbp; 361 frame.sf_sc.uc_mcontext.sc_ebx = regs->tf_rbx; 362 frame.sf_sc.uc_mcontext.sc_edx = regs->tf_rdx; 363 frame.sf_sc.uc_mcontext.sc_ecx = regs->tf_rcx; 364 frame.sf_sc.uc_mcontext.sc_eax = regs->tf_rax; --- 115 unchanged lines hidden (view full) --- 480 bsd_to_linux_sigset(mask, &lmask); 481 482 /* 483 * Build the signal context to be used by sigreturn. 484 */ 485 frame.sf_sc.sc_mask = lmask.__bits[0]; 486 frame.sf_sc.sc_gs = rgs(); 487 frame.sf_sc.sc_fs = rfs(); |
488 __asm __volatile("movl %%es,%0" : "=rm" (frame.sf_sc.sc_es)); 489 __asm __volatile("movl %%ds,%0" : "=rm" (frame.sf_sc.sc_ds)); | 488 __asm __volatile("mov %%es,%0" : "=rm" (frame.sf_sc.sc_es)); 489 __asm __volatile("mov %%ds,%0" : "=rm" (frame.sf_sc.sc_ds)); |
490 frame.sf_sc.sc_edi = regs->tf_rdi; 491 frame.sf_sc.sc_esi = regs->tf_rsi; 492 frame.sf_sc.sc_ebp = regs->tf_rbp; 493 frame.sf_sc.sc_ebx = regs->tf_rbx; 494 frame.sf_sc.sc_edx = regs->tf_rdx; 495 frame.sf_sc.sc_ecx = regs->tf_rcx; 496 frame.sf_sc.sc_eax = regs->tf_rax; 497 frame.sf_sc.sc_eip = regs->tf_rip; --- 636 unchanged lines hidden --- | 490 frame.sf_sc.sc_edi = regs->tf_rdi; 491 frame.sf_sc.sc_esi = regs->tf_rsi; 492 frame.sf_sc.sc_ebp = regs->tf_rbp; 493 frame.sf_sc.sc_ebx = regs->tf_rbx; 494 frame.sf_sc.sc_edx = regs->tf_rdx; 495 frame.sf_sc.sc_ecx = regs->tf_rcx; 496 frame.sf_sc.sc_eax = regs->tf_rax; 497 frame.sf_sc.sc_eip = regs->tf_rip; --- 636 unchanged lines hidden --- |