1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00

Change some movl's to mov's. Newer GAS no longer accept 'movl' instructions

for moving between a segment register and a 32-bit memory location.

Looked at by:	jhb
This commit is contained in:
David E. O'Brien 2009-01-31 11:37:21 +00:00
parent e173d3df0c
commit e6493bbebf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=187948
12 changed files with 48 additions and 48 deletions

View File

@ -260,12 +260,12 @@ do_kthread:
jmp do_tss
store_seg:
movl %gs,PCB_GS(%r8)
mov %gs,PCB_GS(%r8)
testl $PCB_GS32BIT,PCB_FLAGS(%r8)
jnz 2f
1: movl %ds,PCB_DS(%r8)
movl %es,PCB_ES(%r8)
movl %fs,PCB_FS(%r8)
1: mov %ds,PCB_DS(%r8)
mov %es,PCB_ES(%r8)
mov %fs,PCB_FS(%r8)
jmp done_store_seg
2: movq PCPU(GS32P),%rax
movq (%rax),%rax
@ -277,11 +277,11 @@ load_seg:
jnz 2f
1: movl $MSR_GSBASE,%ecx
rdmsr
movl PCB_GS(%r8),%gs
mov PCB_GS(%r8),%gs
wrmsr
movl PCB_DS(%r8),%ds
movl PCB_ES(%r8),%es
movl PCB_FS(%r8),%fs
mov PCB_DS(%r8),%ds
mov PCB_ES(%r8),%es
mov PCB_FS(%r8),%fs
jmp restore_fsbase
/* Restore userland %gs while preserving kernel gsbase */
2: movq PCPU(GS32P),%rax

View File

@ -328,8 +328,8 @@ freebsd4_ia32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
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 @@ ia32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
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;

View File

@ -45,8 +45,8 @@ ia32_sigcode:
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 @@ freebsd4_ia32_sigcode:
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 */

View File

@ -482,7 +482,7 @@ static __inline u_int
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 @@ static __inline u_int
rgs(void)
{
u_int sel;
__asm __volatile("movl %%gs,%0" : "=rm" (sel));
__asm __volatile("mov %%gs,%0" : "=rm" (sel));
return (sel);
}
@ -498,20 +498,20 @@ static __inline u_int
rss(void)
{
u_int sel;
__asm __volatile("movl %%ss,%0" : "=rm" (sel));
__asm __volatile("mov %%ss,%0" : "=rm" (sel));
return (sel);
}
static __inline void
load_ds(u_int sel)
{
__asm __volatile("movl %0,%%ds" : : "rm" (sel));
__asm __volatile("mov %0,%%ds" : : "rm" (sel));
}
static __inline void
load_es(u_int sel)
{
__asm __volatile("movl %0,%%es" : : "rm" (sel));
__asm __volatile("mov %0,%%es" : : "rm" (sel));
}
static inline void
@ -539,7 +539,7 @@ load_fs(u_int sel)
/* Preserve the fsbase value across the selector load */
fsbase = MSR_FSBASE;
__asm __volatile("rdmsr; movl %0,%%fs; wrmsr"
__asm __volatile("rdmsr; mov %0,%%fs; wrmsr"
: : "rm" (sel), "c" (fsbase) : "eax", "edx");
}
@ -557,7 +557,7 @@ load_gs(u_int sel)
* 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
@ -565,13 +565,13 @@ load_gs(u_int sel)
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

View File

@ -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() */
@ -24,8 +24,8 @@ linux_rt_sigcode:
call *LINUX_RT_SIGF_HANDLER(%esp)
leal LINUX_RT_SIGF_UC(%esp),%ebx /* linux ucp */
leal LINUX_RT_SIGF_SC(%ebx),%ecx /* linux sigcontext */
movl LINUX_SC_ES(%ecx),%es
movl LINUX_SC_DS(%ecx),%ds
mov LINUX_SC_ES(%ecx),%es
mov LINUX_SC_DS(%ecx),%ds
push %eax /* fake ret addr */
movl $LINUX_SYS_linux_rt_sigreturn,%eax /* linux_rt_sigreturn() */
int $0x80 /* enter kernel with args */

View File

@ -351,9 +351,9 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
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;
@ -485,8 +485,8 @@ linux_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
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;

View File

@ -369,7 +369,7 @@ ENTRY(x86_getfs)
ret
ENTRY(x86_setfs)
movl 4(%esp),%fs
mov 4(%esp),%fs
ret
ENTRY(x86_gettid)

View File

@ -338,7 +338,7 @@ NON_GPROF_ENTRY(sigcode)
pushl %eax
testl $PSL_VM,UC_EFLAGS(%eax)
jne 1f
movl UC_GS(%eax),%gs /* restore %gs */
mov UC_GS(%eax),%gs /* restore %gs */
1:
movl $SYS_sigreturn,%eax
pushl %eax /* junk to fake return addr. */
@ -355,7 +355,7 @@ freebsd4_sigcode:
pushl %eax
testl $PSL_VM,UC4_EFLAGS(%eax)
jne 1f
movl UC4_GS(%eax),%gs /* restore %gs */
mov UC4_GS(%eax),%gs /* restore %gs */
1:
movl $344,%eax /* 4.x SYS_sigreturn */
pushl %eax /* junk to fake return addr. */
@ -373,7 +373,7 @@ osigcode:
pushl %eax
testl $PSL_VM,SC_PS(%eax)
jne 9f
movl SC_GS(%eax),%gs /* restore %gs */
mov SC_GS(%eax),%gs /* restore %gs */
9:
movl $103,%eax /* 3.x SYS_sigreturn */
pushl %eax /* junk to fake return addr. */

View File

@ -130,7 +130,7 @@ ENTRY(cpu_switch)
movl %ebp,PCB_EBP(%edx)
movl %esi,PCB_ESI(%edx)
movl %edi,PCB_EDI(%edx)
movl %gs,PCB_GS(%edx)
mov %gs,PCB_GS(%edx)
pushfl /* PSL */
popl PCB_PSL(%edx)
/* Test if debug registers should be saved. */
@ -313,7 +313,7 @@ sw1:
/* This must be done after loading the user LDT. */
.globl cpu_switch_load_gs
cpu_switch_load_gs:
movl PCB_GS(%edx),%gs
mov PCB_GS(%edx),%gs
/* Test if debug registers should be restored. */
testl $PCB_DBREGS,PCB_FLAGS(%edx)
@ -383,7 +383,7 @@ ENTRY(savectx)
movl %ebp,PCB_EBP(%ecx)
movl %esi,PCB_ESI(%ecx)
movl %edi,PCB_EDI(%ecx)
movl %gs,PCB_GS(%ecx)
mov %gs,PCB_GS(%ecx)
pushfl
popl PCB_PSL(%ecx)

View File

@ -497,7 +497,7 @@ static __inline u_int
rfs(void)
{
u_int sel;
__asm __volatile("movl %%fs,%0" : "=rm" (sel));
__asm __volatile("mov %%fs,%0" : "=rm" (sel));
return (sel);
}
@ -513,7 +513,7 @@ static __inline u_int
rgs(void)
{
u_int sel;
__asm __volatile("movl %%gs,%0" : "=rm" (sel));
__asm __volatile("mov %%gs,%0" : "=rm" (sel));
return (sel);
}
@ -537,7 +537,7 @@ static __inline u_int
rss(void)
{
u_int sel;
__asm __volatile("movl %%ss,%0" : "=rm" (sel));
__asm __volatile("mov %%ss,%0" : "=rm" (sel));
return (sel);
}
@ -552,13 +552,13 @@ rtr(void)
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));
}
static __inline void

View File

@ -8,7 +8,7 @@
NON_GPROF_ENTRY(linux_sigcode)
call *LINUX_SIGF_HANDLER(%esp)
leal LINUX_SIGF_SC(%esp),%ebx /* linux scp */
movl LINUX_SC_GS(%ebx),%gs
mov LINUX_SC_GS(%ebx),%gs
movl %esp, %ebx /* pass sigframe */
push %eax /* fake ret addr */
movl $LINUX_SYS_linux_sigreturn,%eax /* linux_sigreturn() */
@ -20,7 +20,7 @@ linux_rt_sigcode:
call *LINUX_RT_SIGF_HANDLER(%esp)
leal LINUX_RT_SIGF_UC(%esp),%ebx /* linux ucp */
leal LINUX_RT_SIGF_SC(%ebx),%ecx /* linux sigcontext */
movl LINUX_SC_GS(%ecx),%gs
mov LINUX_SC_GS(%ecx),%gs
push %eax /* fake ret addr */
movl $LINUX_SYS_linux_rt_sigreturn,%eax /* linux_rt_sigreturn() */
int $0x80 /* enter kernel with args */

View File

@ -14,7 +14,7 @@ NON_GPROF_ENTRY(svr4_sigcode)
testl $PSL_VM,SVR4_UC_EFLAGS(%eax)
jnz 1f
#endif
movl SVR4_UC_GS(%eax),%gs
mov SVR4_UC_GS(%eax),%gs
1: pushl %eax # pointer to ucontext
pushl $1 # set context
movl $svr4_sys_context,%eax