Pre 2.95-2
[fw/sdcc] / src / SDCCsymt.h
index ad908cf918c85006f944926fb1c375096361db33..36e361d88e12ab42a0f40767a3f36a736a800dbb 100644 (file)
@@ -101,7 +101,8 @@ typedef struct specifier {
     unsigned   _typedef :1  ;  /* is typedefed               */
     unsigned   _isregparm:1 ;  /* is the first parameter     */
     unsigned   _isenum   :1 ;  /* is an enumerated type      */
-    unsigned    nonbanked   :1  ;  /* function has the nonbanked attribute */
+    unsigned   nonbanked   :1  ;  /* function has the nonbanked attribute */
+    unsigned   banked   :1  ;  /* function has the banked attribute */
     unsigned   _IntNo       ;  /* 1=Interrupt svc routine    */
     short      _regbank     ;  /* register bank 2b used      */
     unsigned   _addr        ;  /* address of symbol          */
@@ -280,6 +281,7 @@ typedef struct symbol {
 #define SPEC_TYPEDEF(x) x->select.s._typedef
 #define SPEC_REGPARM(x) x->select.s._isregparm
 #define SPEC_NONBANKED(x) x->select.s.nonbanked
+#define SPEC_BANKED(x) x->select.s.banked
 
 /* type check macros */
 #define IS_DECL(x)   ( x && x->class == DECLARATOR     )
@@ -324,11 +326,11 @@ typedef struct symbol {
 #define IS_ARITHMETIC(x) (IS_INTEGRAL(x) || IS_FLOAT(x))
 #define IS_AGGREGATE(x) (IS_ARRAY(x) || IS_STRUCT(x))
 #define IS_LITERAL(x)   (IS_SPEC(x)  && x->select.s.sclass == S_LITERAL)
-#define IS_ISR(x)              (IS_SPEC(x)  && SPEC_INTRTN(x))
+#define IS_ISR(x)      (IS_SPEC(x)  && SPEC_INTRTN(x))
 #define IS_REGPARM(x)   (IS_SPEC(x) && SPEC_REGPARM(x))
-#define IS_NONBANKED(x)   (IS_SPEC(x) && SPEC_NONBANKED(x))
-/* Note that !IS_BANKED is not IS_NONBANKED */
-#define IS_BANKED(x)   (IS_SPEC(x) && !SPEC_NONBANKED(x) && !SPEC_STAT(x))
+#define IS_NONBANKED(x) (IS_SPEC(x) && SPEC_NONBANKED(x))
+#define IS_BANKED(x)   (IS_SPEC(x) && SPEC_BANKED(x))
+#define IS_BANKEDCALL(x) (IS_SPEC(x) && !SPEC_NONBANKED(x) && !SPEC_STAT(x) && (options.model == MODEL_LARGE || options.model == MODEL_MEDIUM || SPEC_BANKED(x)))
 
 /* forward declaration for the global vars */
 extern bucket *SymbolTab[] ;