Fixed up s51 autodetect
[fw/sdcc] / src / port.h
index 3e8339e64a759b47104cc0f4a8280c575e58c58b..2e1bab4b8a4bf1da40a594215b3167862532c185 100644 (file)
@@ -5,6 +5,8 @@
 #ifndef PORT_INCLUDE
 #define PORT_INCLUDE
 
+#include "SDCCicode.h"
+
 #define TARGET_ID_MCS51    1
 #define TARGET_ID_GBZ80    2
 #define TARGET_ID_Z80      3
 #define TARGET_IS_I186 (port->id==TARGET_ID_I186)
 #define TARGET_IS_TCLS900H (port->id==TARGET_ID_TCLS900H)
 
+#define MAX_BUILTIN_ARGS       16
+/* definition of builtin functions */
+typedef struct builtins
+{
+    char *name ;               /* name of builtin function */
+    char *rtype;               /* return type as string : see typefromStr */
+    int  nParms;               /* number of parms : max 8 */
+    char *parm_types[MAX_BUILTIN_ARGS]; /* each parm type as string : see typeFromStr */
+} builtins ;
+
 /* Processor specific names */
 typedef struct
   {
@@ -59,9 +71,9 @@ typedef struct
         const char **cmd;
         /** Alternate macro based form. */
         const char *mcmd;
-        /** Arguments for debug mode.  PENDING: ignored */
+        /** Arguments for debug mode. */
        const char *debug_opts;
-        /** Arguments for normal assembly mode.  PENDING: ignored */
+        /** Arguments for normal assembly mode. */
        const char *plain_opts;
        /* print externs as global */
        int externGlobal;
@@ -206,6 +218,11 @@ typedef struct
      */
     char *(*getMangledFunctionName) (char *szOrginial);
 
+    /** Returns true if the port can multiply the two types nativly
+        without using support functions.
+    */
+    bool (*hasNativeMulFor) (iCode *ic, sym_link *left, sym_link *right);
+
     /** If TRUE, then tprintf and !dw will be used for some initalisers
      */
     bool use_dw_for_init;
@@ -219,7 +236,9 @@ typedef struct
     bool eq_nne;               /* transform a == b --> ! (a != b)  */
 
     bool arrayInitializerSuppported;  
-      
+    
+    bool (*cseOk) (iCode *ic, iCode *pdic);
+    builtins *builtintable;    /* table of builtin functions */
 #define PORT_MAGIC 0xAC32
 /** Used at runtime to detect if this structure has been completly filled in. */
     int magic;