patch-2.1.105 linux/include/asm-alpha/io.h
Next file: linux/include/asm-alpha/lca.h
Previous file: linux/include/asm-alpha/cia.h
Back to the patch index
Back to the overall index
-  Lines: 26
-  Date:
Sat Jun  6 18:52:04 1998
-  Orig file: 
v2.1.104/linux/include/asm-alpha/io.h
-  Orig date: 
Wed Apr  1 20:11:53 1998
diff -u --recursive --new-file v2.1.104/linux/include/asm-alpha/io.h linux/include/asm-alpha/io.h
@@ -76,6 +76,25 @@
 #endif /* !__KERNEL__ */
 
 /*
+ * EGCS 1.1 does a good job of using insxl.  Expose this bit of
+ * the I/O process to the compiler.
+ */
+
+#if __GNUC__ > 2 || __GNUC_MINOR__ >= 91
+# define __kernel_insbl(val, shift)  (((val) & 0xfful) << ((shift) * 8))
+# define __kernel_inswl(val, shift)  (((val) & 0xfffful) << ((shift) * 8))
+#else
+# define __kernel_insbl(val, shift)					\
+  ({ unsigned long __kir;						\
+     __asm__("insbl %2,%1,%0" : "=r"(__kir) : "ri"(shift), "r"(val));	\
+     __kir; })
+# define __kernel_inswl(val, shift)					\
+  ({ unsigned long __kir;						\
+     __asm__("inswl %2,%1,%0" : "=r"(__kir) : "ri"(shift), "r"(val));	\
+     __kir; })
+#endif
+	
+/*
  * There are different chipsets to interface the Alpha CPUs to the world.
  */
 #if defined(CONFIG_ALPHA_LCA)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov