MFi386: move rss() from db_interface.c to cpufunc.h
This commit is contained in:
parent
2bf11a9911
commit
cd0149e39b
@ -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
|
||||
*/
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user