]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Merge branch 'assembler' into ast-and-ir
authorDale Weiler <killfieldengine@gmail.com>
Sat, 28 Apr 2012 08:12:24 +0000 (04:12 -0400)
committerDale Weiler <killfieldengine@gmail.com>
Sat, 28 Apr 2012 08:12:24 +0000 (04:12 -0400)
1  2 
gmqcc.h

diff --combined gmqcc.h
index 09311cc7bdf91d75f19388a0531bbb66a9b7e3e6,eca1e156f05b3edd615dcd47fd79f9a02098e4bd..2b92f8b4c6625a411413d32e7a5406fbd61d1d58
+++ b/gmqcc.h
  #   endif
  #   endif /* !__cplusplus */
  
 +/*
 + * Of some functions which are generated we want to make sure
 + * that the result isn't ignored. To find such function calls,
 + * we use this macro.
 + */
 +#if defined(__GNUC__) || defined(__CLANG__)
 +#   define GMQCC_WARN __attribute__((warn_unused_result))
 +#else
 +#   define GMQCC_WARN
 +#endif
 +
  /*
   * stdint.h and inttypes.h -less subset
   * for systems that don't have it, which we must
  typedef char uint8_size_is_correct  [sizeof(uint8_t)  == 1?1:-1];
  typedef char uint16_size_if_correct [sizeof(uint16_t) == 2?1:-1];
  typedef char uint32_size_is_correct [sizeof(uint32_t) == 4?1:-1];
- //typedef char int8_size_is_correct   [sizeof(int8_t)   == 1?1:-1];
  typedef char int16_size_if_correct  [sizeof(int16_t)  == 2?1:-1];
  typedef char int32_size_is_correct  [sizeof(int32_t)  == 4?1:-1];
  /* intptr_t / uintptr_t correct size check */
@@@ -206,9 -194,13 +205,13 @@@ void *util_memory_a      (unsigned int
  void  util_memory_d      (void       *, unsigned int, const char *);
  void  util_meminfo       ();
  
+ bool  util_strupper      (const char *);
+ bool  util_strdigit      (const char *);
  char *util_strdup        (const char *);
  char *util_strrq         (char *);
  char *util_strrnl        (char *);
+ char *util_strsws        (const char *);
+ char *util_strchp        (const char *, const char *);
  void  util_debug         (const char *, const char *, ...);
  int   util_getline       (char **, size_t *, FILE *);
  void  util_endianswap    (void *,  int, int);
@@@ -422,14 -414,7 +425,14 @@@ enum 
      INSTR_AND,
      INSTR_OR,
      INSTR_BITAND,
 -    INSTR_BITOR
 +    INSTR_BITOR,
 +
 +    /* Virtual instructions used by the IR
 +     * Keep at the end!
 +     */
 +    VINSTR_PHI,
 +    VINSTR_JUMP,
 +    VINSTR_COND,
  };
  
  /*