Very small fix for llvm/clang
Alex Hornung
ahornung at gmail.com
Tue Apr 7 02:55:52 PDT 2009
This would fix compilation issues with llvm/clang due to the ugly gcc
extension that allows to specify a register to be used for a variable.
The clobber list of the inline assembly already specifies fsbase as
input to ecx.
The diff is attached and on http://gist.github.com/91146
Sincerely,
Alex
--- a/sys/cpu/amd64/include/cpufunc.h
+++ b/sys/cpu/amd64/include/cpufunc.h
@@ -633,7 +633,7 @@ load_es(u_int sel)
static __inline void
load_fs(u_int sel)
{
- register u_int32_t fsbase __asm("ecx");
+ u_int32_t fsbase;
/* Preserve the fsbase value across the selector load */
fsbase = MSR_FSBASE;
@@ -647,8 +647,7 @@ load_fs(u_int sel)
static __inline void
load_gs(u_int sel)
{
- register u_int32_t gsbase __asm("ecx");
+ u_int32_t gsbase;
/*
* Preserve the gsbase value across the selector load.
* Note that we have to disable interrupts because the gsbase
More information about the Submit
mailing list