summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2009-01-31 11:37:21 +0000
committerobrien <obrien@FreeBSD.org>2009-01-31 11:37:21 +0000
commit7a153194ec575997818d16f6ee3e0c909e8be1f8 (patch)
treefa33158175bc2ce89cbc4c08ceb6b91986a5f004
parentf922834f0ff4f9828f5d96879cb808391ec87b82 (diff)
downloadFreeBSD-src-7a153194ec575997818d16f6ee3e0c909e8be1f8.zip
FreeBSD-src-7a153194ec575997818d16f6ee3e0c909e8be1f8.tar.gz
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
-rw-r--r--sys/amd64/amd64/cpu_switch.S16
-rw-r--r--sys/amd64/ia32/ia32_signal.c8
-rw-r--r--sys/amd64/ia32/ia32_sigtramp.S8
-rw-r--r--sys/amd64/include/cpufunc.h18
-rw-r--r--sys/amd64/linux32/linux32_locore.s8
-rw-r--r--sys/amd64/linux32/linux32_sysvec.c8
-rw-r--r--sys/compat/ndis/winx32_wrap.S2
-rw-r--r--sys/i386/i386/locore.s6
-rw-r--r--sys/i386/i386/swtch.s6
-rw-r--r--sys/i386/include/cpufunc.h10
-rw-r--r--sys/i386/linux/linux_locore.s4
-rw-r--r--sys/i386/svr4/svr4_locore.s2
12 files changed, 48 insertions, 48 deletions
diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S
index baca2db..bc1a4bb 100644
--- a/sys/amd64/amd64/cpu_switch.S
+++ b/sys/amd64/amd64/cpu_switch.S
@@ -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
diff --git a/sys/amd64/ia32/ia32_signal.c b/sys/amd64/ia32/ia32_signal.c
index 162dcf9..d3b9ae3 100644
--- a/sys/amd64/ia32/ia32_signal.c
+++ b/sys/amd64/ia32/ia32_signal.c
@@ -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;
diff --git a/sys/amd64/ia32/ia32_sigtramp.S b/sys/amd64/ia32/ia32_sigtramp.S
index 7b20bc4..1cd220a 100644
--- a/sys/amd64/ia32/ia32_sigtramp.S
+++ b/sys/amd64/ia32/ia32_sigtramp.S
@@ -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 */
diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h
index a4a84b7..cec9b4a 100644
--- a/sys/amd64/include/cpufunc.h
+++ b/sys/amd64/include/cpufunc.h
@@ -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
diff --git a/sys/amd64/linux32/linux32_locore.s b/sys/amd64/linux32/linux32_locore.s
index 9183374..6045925 100644
--- a/sys/amd64/linux32/linux32_locore.s
+++ b/sys/amd64/linux32/linux32_locore.s
@@ -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 */
diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c
index aaa7458..33012f6 100644
--- a/sys/amd64/linux32/linux32_sysvec.c
+++ b/sys/amd64/linux32/linux32_sysvec.c
@@ -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;
diff --git a/sys/compat/ndis/winx32_wrap.S b/sys/compat/ndis/winx32_wrap.S
index 065d409..c051504 100644
--- a/sys/compat/ndis/winx32_wrap.S
+++ b/sys/compat/ndis/winx32_wrap.S
@@ -369,7 +369,7 @@ ENTRY(x86_getfs)
ret
ENTRY(x86_setfs)
- movl 4(%esp),%fs
+ mov 4(%esp),%fs
ret
ENTRY(x86_gettid)
diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s
index 7ca2493..94ac670 100644
--- a/sys/i386/i386/locore.s
+++ b/sys/i386/i386/locore.s
@@ -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. */
diff --git a/sys/i386/i386/swtch.s b/sys/i386/i386/swtch.s
index 27a0094..0c07871 100644
--- a/sys/i386/i386/swtch.s
+++ b/sys/i386/i386/swtch.s
@@ -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)
diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h
index 4bf93b1..ad5fc4c 100644
--- a/sys/i386/include/cpufunc.h
+++ b/sys/i386/include/cpufunc.h
@@ -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
diff --git a/sys/i386/linux/linux_locore.s b/sys/i386/linux/linux_locore.s
index 044e8e2..a3e0e7dc 100644
--- a/sys/i386/linux/linux_locore.s
+++ b/sys/i386/linux/linux_locore.s
@@ -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 */
diff --git a/sys/i386/svr4/svr4_locore.s b/sys/i386/svr4/svr4_locore.s
index 6274ad2..8c0c60a 100644
--- a/sys/i386/svr4/svr4_locore.s
+++ b/sys/i386/svr4/svr4_locore.s
@@ -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
OpenPOWER on IntegriCloud