| 
									
										
										
										
											2007-05-02 19:27:06 +02:00
										 |  |  | /* const.h: Macros for dealing with constants.  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-05-08 00:31:11 -07:00
										 |  |  | #ifndef _LINUX_CONST_H
 | 
					
						
							|  |  |  | #define _LINUX_CONST_H
 | 
					
						
							| 
									
										
										
										
											2007-05-02 19:27:06 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | /* Some constant macros are used in both assembler and
 | 
					
						
							|  |  |  |  * C code.  Therefore we cannot annotate them always with | 
					
						
							| 
									
										
										
										
											2007-05-08 00:31:11 -07:00
										 |  |  |  * 'UL' and other type specifiers unilaterally.  We | 
					
						
							| 
									
										
										
										
											2007-05-02 19:27:06 +02:00
										 |  |  |  * use the following macros to deal with this. | 
					
						
							| 
									
										
										
										
											2008-01-30 13:32:42 +01:00
										 |  |  |  * | 
					
						
							|  |  |  |  * Similarly, _AT() will cast an expression with a type in C, but | 
					
						
							|  |  |  |  * leave it unchanged in asm. | 
					
						
							| 
									
										
										
										
											2007-05-02 19:27:06 +02:00
										 |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifdef __ASSEMBLY__
 | 
					
						
							|  |  |  | #define _AC(X,Y)	X
 | 
					
						
							| 
									
										
										
										
											2008-01-30 13:32:42 +01:00
										 |  |  | #define _AT(T,X)	X
 | 
					
						
							| 
									
										
										
										
											2007-05-02 19:27:06 +02:00
										 |  |  | #else
 | 
					
						
							|  |  |  | #define __AC(X,Y)	(X##Y)
 | 
					
						
							|  |  |  | #define _AC(X,Y)	__AC(X,Y)
 | 
					
						
							| 
									
										
										
										
											2008-01-30 13:32:42 +01:00
										 |  |  | #define _AT(T,X)	((T)(X))
 | 
					
						
							| 
									
										
										
										
											2007-05-02 19:27:06 +02:00
										 |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-04-27 16:07:49 -07:00
										 |  |  | #define _BITUL(x)	(_AC(1,UL) << (x))
 | 
					
						
							|  |  |  | #define _BITULL(x)	(_AC(1,ULL) << (x))
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-05-08 00:31:11 -07:00
										 |  |  | #endif /* !(_LINUX_CONST_H) */
 |