* src/pic16/device.h,
[fw/sdcc] / src / SDCCval.h
index 906bc7e5b603d198ff94c1d72b2b6cf5007c787e..fbb0dbcc8c0bc57cb0efbdf47fd06fc35613e2a6 100644 (file)
@@ -70,21 +70,39 @@ typedef struct initList
   }
 initList;
 
+/* return values from checkConstantRange */
+typedef enum
+  {
+    CCR_OK,           /* evaluate at runtime */
+    CCR_OVL,
+    CCR_ALWAYS_FALSE,
+    CCR_ALWAYS_TRUE
+  }
+CCR_RESULT;
+
 #define  IS_VARG(x)            (x->vArgs)
 
 /* forward definitions for the symbol table related functions */
 void initValue ();
 value *newValue ();
-value *constVal (char *);
+value *constVal (const char *);
 value *reverseVal (value *);
 value *reverseValWithType (value *);
 value *copyValue (value *);
 value *copyValueChain (value *);
-value *strVal (char *);
-value *charVal (char *);
+value *strVal (const char *);
+value *charVal (const char *);
 value *symbolVal (symbol *);
 void printVal (value *);
 double floatFromVal (value *);
+
+/* convert a fixed16x16 type to double */
+double doubleFromFixed16x16(TYPE_TARGET_ULONG value);
+
+/* convert a double type to fixed16x16 */
+TYPE_TARGET_ULONG fixed16x16FromDouble(double value);
+
+CCR_RESULT checkConstantRange (sym_link *var, sym_link *lit, int op, bool exchangeOps);
 value *array2Ptr (value *);
 value *valUnaryPM (value *);
 value *valComplement (value *);