Date: Tue, 4 Dec 2007 21:17:41 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 130199 for review Message-ID: <200712042117.lB4LHf51016911@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=130199 Change 130199 by jb@jb_freebsd1 on 2007/12/04 21:17:12 gas 2.18 is a bit fussy about operand sizes. This change might not be correct given what bde@ said in: http://lists.freebsd.org/pipermail/freebsd-emulation/2007-January/003050.html For now I just want to be able to build and test on amd64 with the latest binutils. Affected files ... .. //depot/projects/binutils/src/sys/amd64/amd64/cpu_switch.S#3 edit .. //depot/projects/binutils/src/sys/amd64/ia32/ia32_signal.c#2 edit .. //depot/projects/binutils/src/sys/amd64/ia32/ia32_sigtramp.S#2 edit .. //depot/projects/binutils/src/sys/amd64/include/cpufunc.h#2 edit .. //depot/projects/binutils/src/sys/amd64/linux32/linux32_locore.s#3 edit .. //depot/projects/binutils/src/sys/amd64/linux32/linux32_sysvec.c#3 edit Differences ... ==== //depot/projects/binutils/src/sys/amd64/amd64/cpu_switch.S#3 (text+ko) ==== @@ -110,7 +110,7 @@ jz 1f /* no, skip over */ /* Save userland %gs */ - movl %gs,PCB_GS(%r8) + mov %gs,PCB_GS(%r8) movq PCB_GS32P(%r8),%rax movq (%rax),%rax movq %rax,PCB_GS32SD(%r8) @@ -220,7 +220,7 @@ movq %rbx,(%rax) movl $MSR_GSBASE,%ecx rdmsr - movl PCB_GS(%r8),%gs + mov PCB_GS(%r8),%gs wrmsr 1: ==== //depot/projects/binutils/src/sys/amd64/ia32/ia32_signal.c#2 (text+ko) ==== @@ -328,8 +328,8 @@ sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0; sf.sf_uc.uc_mcontext.mc_gs = rgs(); sf.sf_uc.uc_mcontext.mc_fs = rfs(); - __asm __volatile("movl %%es,%0" : "=rm" (sf.sf_uc.uc_mcontext.mc_es)); - __asm __volatile("movl %%ds,%0" : "=rm" (sf.sf_uc.uc_mcontext.mc_ds)); + __asm __volatile("mov %%es,%0" : "=rm" (sf.sf_uc.uc_mcontext.mc_es)); + __asm __volatile("mov %%ds,%0" : "=rm" (sf.sf_uc.uc_mcontext.mc_ds)); sf.sf_uc.uc_mcontext.mc_edi = regs->tf_rdi; sf.sf_uc.uc_mcontext.mc_esi = regs->tf_rsi; sf.sf_uc.uc_mcontext.mc_ebp = regs->tf_rbp; @@ -443,8 +443,8 @@ sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0; sf.sf_uc.uc_mcontext.mc_gs = rgs(); sf.sf_uc.uc_mcontext.mc_fs = rfs(); - __asm __volatile("movl %%es,%0" : "=rm" (sf.sf_uc.uc_mcontext.mc_es)); - __asm __volatile("movl %%ds,%0" : "=rm" (sf.sf_uc.uc_mcontext.mc_ds)); + __asm __volatile("mov %%es,%0" : "=rm" (sf.sf_uc.uc_mcontext.mc_es)); + __asm __volatile("mov %%ds,%0" : "=rm" (sf.sf_uc.uc_mcontext.mc_ds)); sf.sf_uc.uc_mcontext.mc_edi = regs->tf_rdi; sf.sf_uc.uc_mcontext.mc_esi = regs->tf_rsi; sf.sf_uc.uc_mcontext.mc_ebp = regs->tf_rbp; ==== //depot/projects/binutils/src/sys/amd64/ia32/ia32_sigtramp.S#2 (text+ko) ==== @@ -45,8 +45,8 @@ calll *IA32_SIGF_HANDLER(%esp) leal IA32_SIGF_UC(%esp),%eax /* get ucontext */ pushl %eax - movl IA32_UC_ES(%eax),%es /* restore %es */ - movl IA32_UC_DS(%eax),%ds /* restore %ds */ + mov IA32_UC_ES(%eax),%es /* restore %es */ + mov IA32_UC_DS(%eax),%ds /* restore %ds */ movl $SYS_sigreturn,%eax pushl %eax /* junk to fake return addr. */ int $0x80 /* enter kernel with args */ @@ -60,8 +60,8 @@ calll *IA32_SIGF_HANDLER(%esp) leal IA32_SIGF_UC4(%esp),%eax/* get ucontext */ pushl %eax - movl IA32_UC4_ES(%eax),%es /* restore %es */ - movl IA32_UC4_DS(%eax),%ds /* restore %ds */ + mov IA32_UC4_ES(%eax),%es /* restore %es */ + mov IA32_UC4_DS(%eax),%ds /* restore %ds */ movl $344,%eax /* 4.x SYS_sigreturn */ pushl %eax /* junk to fake return addr. */ int $0x80 /* enter kernel with args */ ==== //depot/projects/binutils/src/sys/amd64/include/cpufunc.h#2 (text+ko) ==== @@ -482,7 +482,7 @@ rfs(void) { u_int sel; - __asm __volatile("movl %%fs,%0" : "=rm" (sel)); + __asm __volatile("mov %%fs,%0" : "=rm" (sel)); return (sel); } @@ -490,7 +490,7 @@ rgs(void) { u_int sel; - __asm __volatile("movl %%gs,%0" : "=rm" (sel)); + __asm __volatile("mov %%gs,%0" : "=rm" (sel)); return (sel); } @@ -544,7 +544,7 @@ * being trashed happens to be the kernel gsbase at the time. */ gsbase = MSR_GSBASE; - __asm __volatile("pushfq; cli; rdmsr; movl %0,%%gs; wrmsr; popfq" + __asm __volatile("pushfq; cli; rdmsr; mov %0,%%gs; wrmsr; popfq" : : "rm" (sel), "c" (gsbase) : "eax", "edx"); } #else @@ -552,13 +552,13 @@ static __inline void load_fs(u_int sel) { - __asm __volatile("movl %0,%%fs" : : "rm" (sel)); + __asm __volatile("mov %0,%%fs" : : "rm" (sel)); } static __inline void load_gs(u_int sel) { - __asm __volatile("movl %0,%%gs" : : "rm" (sel)); + __asm __volatile("mov %0,%%gs" : : "rm" (sel)); } #endif ==== //depot/projects/binutils/src/sys/amd64/linux32/linux32_locore.s#3 (text+ko) ==== @@ -11,8 +11,8 @@ NON_GPROF_ENTRY(linux_sigcode) call *LINUX_SIGF_HANDLER(%esp) leal LINUX_SIGF_SC(%esp),%ebx /* linux scp */ - movl LINUX_SC_ES(%ebx),%es - movl LINUX_SC_DS(%ebx),%ds + mov LINUX_SC_ES(%ebx),%es + mov LINUX_SC_DS(%ebx),%ds movl %esp, %ebx /* pass sigframe */ push %eax /* fake ret addr */ movl $LINUX_SYS_linux_sigreturn,%eax /* linux_sigreturn() */ @@ -23,8 +23,8 @@ linux_rt_sigcode: call *LINUX_RT_SIGF_HANDLER(%esp) leal LINUX_RT_SIGF_UC(%esp),%ebx /* linux ucp */ - movl LINUX_SC_ES(%ebx),%es - movl LINUX_SC_DS(%ebx),%ds + mov LINUX_SC_ES(%ebx),%es + mov LINUX_SC_DS(%ebx),%ds push %eax /* fake ret addr */ movl $LINUX_SYS_linux_rt_sigreturn,%eax /* linux_rt_sigreturn() */ int $0x80 /* enter kernel with args */ ==== //depot/projects/binutils/src/sys/amd64/linux32/linux32_sysvec.c#3 (text+ko) ==== @@ -355,9 +355,9 @@ frame.sf_sc.uc_mcontext.sc_mask = frame.sf_sc.uc_sigmask.__bits[0]; frame.sf_sc.uc_mcontext.sc_gs = rgs(); frame.sf_sc.uc_mcontext.sc_fs = rfs(); - __asm __volatile("movl %%es,%0" : + __asm __volatile("mov %%es,%0" : "=rm" (frame.sf_sc.uc_mcontext.sc_es)); - __asm __volatile("movl %%ds,%0" : + __asm __volatile("mov %%ds,%0" : "=rm" (frame.sf_sc.uc_mcontext.sc_ds)); frame.sf_sc.uc_mcontext.sc_edi = regs->tf_rdi; frame.sf_sc.uc_mcontext.sc_esi = regs->tf_rsi; @@ -489,8 +489,8 @@ frame.sf_sc.sc_mask = lmask.__bits[0]; frame.sf_sc.sc_gs = rgs(); frame.sf_sc.sc_fs = rfs(); - __asm __volatile("movl %%es,%0" : "=rm" (frame.sf_sc.sc_es)); - __asm __volatile("movl %%ds,%0" : "=rm" (frame.sf_sc.sc_ds)); + __asm __volatile("mov %%es,%0" : "=rm" (frame.sf_sc.sc_es)); + __asm __volatile("mov %%ds,%0" : "=rm" (frame.sf_sc.sc_ds)); frame.sf_sc.sc_edi = regs->tf_rdi; frame.sf_sc.sc_esi = regs->tf_rsi; frame.sf_sc.sc_ebp = regs->tf_rbp;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712042117.lB4LHf51016911>