1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-28 16:43:09 +00:00

Segment registers can be read(write) to(from) memory locations as well as

general registers.
This commit is contained in:
Luoqi Chen 1999-11-15 19:45:19 +00:00
parent a02d4a1bb5
commit e870e9b278
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=53189
2 changed files with 8 additions and 8 deletions

View File

@ -437,7 +437,7 @@ static __inline u_int
rfs(void) rfs(void)
{ {
u_int sel; u_int sel;
__asm __volatile("movl %%fs,%0" : "=r" (sel)); __asm __volatile("movl %%fs,%0" : "=rm" (sel));
return (sel); return (sel);
} }
@ -445,20 +445,20 @@ static __inline u_int
rgs(void) rgs(void)
{ {
u_int sel; u_int sel;
__asm __volatile("movl %%gs,%0" : "=r" (sel)); __asm __volatile("movl %%gs,%0" : "=rm" (sel));
return (sel); return (sel);
} }
static __inline void static __inline void
load_fs(u_int sel) load_fs(u_int sel)
{ {
__asm __volatile("movl %0,%%fs" : : "r" (sel)); __asm __volatile("movl %0,%%fs" : : "rm" (sel));
} }
static __inline void static __inline void
load_gs(u_int sel) load_gs(u_int sel)
{ {
__asm __volatile("movl %0,%%gs" : : "r" (sel)); __asm __volatile("movl %0,%%gs" : : "rm" (sel));
} }
#else /* !__GNUC__ */ #else /* !__GNUC__ */

View File

@ -437,7 +437,7 @@ static __inline u_int
rfs(void) rfs(void)
{ {
u_int sel; u_int sel;
__asm __volatile("movl %%fs,%0" : "=r" (sel)); __asm __volatile("movl %%fs,%0" : "=rm" (sel));
return (sel); return (sel);
} }
@ -445,20 +445,20 @@ static __inline u_int
rgs(void) rgs(void)
{ {
u_int sel; u_int sel;
__asm __volatile("movl %%gs,%0" : "=r" (sel)); __asm __volatile("movl %%gs,%0" : "=rm" (sel));
return (sel); return (sel);
} }
static __inline void static __inline void
load_fs(u_int sel) load_fs(u_int sel)
{ {
__asm __volatile("movl %0,%%fs" : : "r" (sel)); __asm __volatile("movl %0,%%fs" : : "rm" (sel));
} }
static __inline void static __inline void
load_gs(u_int sel) load_gs(u_int sel)
{ {
__asm __volatile("movl %0,%%gs" : : "r" (sel)); __asm __volatile("movl %0,%%gs" : : "rm" (sel));
} }
#else /* !__GNUC__ */ #else /* !__GNUC__ */