MFi386: move rss() from db_interface.c to cpufunc.h

This commit is contained in:
Peter Wemm 2004-04-07 00:41:05 +00:00
parent 2bf11a9911
commit cd0149e39b
2 changed files with 8 additions and 12 deletions

View File

@ -57,18 +57,6 @@ db_regs_t ddb_regs;
static jmp_buf db_global_jmpbuf;
static __inline u_short
rss(void)
{
u_short ss;
#ifdef __GNUC__
__asm __volatile("mov %%ss,%0" : "=r" (ss));
#else
ss = 0; /* XXXX Fix for other compilers. */
#endif
return ss;
}
/*
* kdb_trap - field a TRACE or BPT trap
*/

View File

@ -498,6 +498,14 @@ rgs(void)
return (sel);
}
static __inline u_int
rss(void)
{
u_int sel;
__asm __volatile("movl %%ss,%0" : "=rm" (sel));
return (sel);
}
static __inline void
load_ds(u_int sel)
{