* doc/sdccman.lyx: new pragma NOIV by Johannes Stezenbach <js@convergence.de>
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 10 Feb 2003 20:58:48 +0000 (20:58 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 10 Feb 2003 20:58:48 +0000 (20:58 +0000)
* src/SDCC.lex: new pragma NOIV
* src/SDCCglobl.h: new pragma NOIV
* src/SDCCmem.c: new pragma NOIV

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2241 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
doc/sdccman.lyx
src/SDCC.lex
src/SDCCglobl.h
src/SDCCmem.c

index 97f2066d92221743890f194d19447823cb204b1c..2dd05ace9629760b6589bc01876b9cb5dc7acb82 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-02-10  Bernhard Held <bernhard@bernhardheld.de>
+
+       * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js@convergence.de>
+       * src/SDCC.lex: new pragma NOIV
+       * src/SDCCglobl.h: new pragma NOIV
+       * src/SDCCmem.c: new pragma NOIV
+
 2003-02-09  Bernhard Held <bernhard@bernhardheld.de>
 
        * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
index 4fc1f3d995ce2c4de72dd9fab3b00b431f1c88fa..45a0ff2c6df8776a547868e2addea4a58365e2c8 100644 (file)
@@ -5570,6 +5570,13 @@ EXCLUDE\SpecialChar ~
 none.
 \layout Itemize
 
+NOIV - Do not generate interrupt vector table entries for all ISR functions
+ defined after the pragma. This is useful in cases where the interrupt
+ vector table must be defined manually, or when there is a secondary, manually
+ defined interrupt vector table (e.g. for the autovector feature of the Cypress
+ EZ-USB FX2).
+\layout Itemize
+
 CALLEE-SAVES function1[,function2[,function3...]] - The compiler by default
  uses a caller saves convention for register saving across function calls,
  however this can cause unneccessary register pushing & popping when calling
index a7ba72a729a170eb8f0c89a3bc2b2db134bb6685..723352b42b82d5710f9148dccb381c6ee48a5a95 100644 (file)
@@ -76,6 +76,7 @@ struct options  save_options  ;
      P_NOGCSE    ,
      P_CALLEE_SAVES,
      P_EXCLUDE   ,
+     P_NOIV      ,
      P_LOOPREV   ,
      P_OVERLAY_             /* I had a strange conflict with P_OVERLAY while */
                     /* cross-compiling for MINGW32 with gcc 3.2 */
@@ -458,6 +459,9 @@ void doPragma (int op, char *cp)
     case P_EXCLUDE:
        parseWithComma(options.excludeRegs, Safe_strdup(cp));
        break;
+    case P_NOIV:
+       options.noiv = 1;
+       break;
     case P_LOOPREV:
        optimize.noLoopReverse = 1;
        break;
@@ -543,6 +547,11 @@ int process_pragma(char *s)
        return 0;
     }
 
+    if (strncmp(cp,PRAGMA_NOIV,strlen(PRAGMA_NOIV)) == 0) {
+       doPragma(P_NOIV,cp+strlen(PRAGMA_NOIV));
+       return 0;
+    }
+
     if (strncmp(cp,PRAGMA_NOLOOPREV,strlen(PRAGMA_NOLOOPREV)) == 0) {
        doPragma(P_LOOPREV,NULL);
        return 0;
index 0a667f2bbd6e74b4e77a6bfe6a2c10a91a8b4e61..c9ce2630f28d8669aa8d3982f818069d5c18919a 100644 (file)
@@ -97,6 +97,7 @@ typedef int bool;
 #define PRAGMA_NOOVERLAY   "NOOVERLAY"
 #define PRAGMA_CALLEESAVES "CALLEE-SAVES"
 #define PRAGMA_EXCLUDE     "EXCLUDE"
+#define PRAGMA_NOIV        "NOIV"
 #define PRAGMA_OVERLAY     "OVERLAY"
 #define  SMALL_MODEL 0
 #define  LARGE_MODEL 1
@@ -236,6 +237,7 @@ struct options
     int useAccelerator;                /* use ds390 Arithmetic Accelerator */
     char *calleeSaves[128];    /* list of functions using callee save */
     char *excludeRegs[32];     /* registers excluded from saving */
+    int noiv;                  /* do not generate irq vector table entries */
     int all_callee_saves;      /* callee saves for all functions */
     int stack_probe;            /* insert call to function __stack_probe */
     int tini_libid;            /* library ID for TINI */
index b1e192e0169790a8ed915d7e3451b97fc4d00d47..0c05b2322e73f2dc728af5c66d714b162ecd27ef 100644 (file)
@@ -322,7 +322,7 @@ allocGlobal (symbol * sym)
       SPEC_OCLS (sym->etype) = code;
       /* if this is an interrupt service routine
          then put it in the interrupt service array */
-      if (FUNC_ISISR (sym->type))
+      if (FUNC_ISISR (sym->type) && !options.noiv)
        {
 
          if (interrupts[FUNC_INTNO (sym->type)])