Skip to content

Commit

Permalink
[XTENSA] Add typecast macro for constants
Browse files Browse the repository at this point in the history
Add macros (__XTENSA_UL and __XTENSA_UL_CONST) for typecasting
constants.

Signed-off-by: Chris Zankel <chris@zankel.net>
  • Loading branch information
Chris Zankel committed Aug 27, 2007
1 parent 2b8aea7 commit 24a9ab7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/asm-xtensa/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* the 1 GB requirement applies to the stack as well.
*/

#define TASK_SIZE 0x40000000
#define TASK_SIZE __XTENSA_UL_CONST(0x40000000)

/*
* General exception cause assigned to debug exceptions. Debug exceptions go
Expand Down
9 changes: 9 additions & 0 deletions include/asm-xtensa/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
#ifndef _XTENSA_TYPES_H
#define _XTENSA_TYPES_H


#ifdef __ASSEMBLY__
# define __XTENSA_UL(x) (x)
# define __XTENSA_UL_CONST(x) x
#else
# define __XTENSA_UL(x) ((unsigned long)(x))
# define __XTENSA_UL_CONST(x) x##UL
#endif

#ifndef __ASSEMBLY__

typedef unsigned short umode_t;
Expand Down

0 comments on commit 24a9ab7

Please sign in to comment.