* src/vm/jit/mips/md.c (sys/cachectl.h): Added.
[cacao.git] / src / vm / jit / mips / codegen.h
index a9dc001211215e0a651d4f01abd672fa7b12c027..bc5db736d37c113511ce1bf6a8abd2de1f649e8e 100644 (file)
@@ -1,9 +1,9 @@
 /* src/vm/jit/mips/codegen.h - code generation macros and definitions for MIPS
 
-   Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates,
-   R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
-   C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, J. Wenninger,
-   Institut f. Computersprachen - TU Wien
+   Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
+   C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
+   E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
+   J. Wenninger, Institut f. Computersprachen - TU Wien
 
    This file is part of CACAO.
 
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA.
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
 
-   Contact: cacao@complang.tuwien.ac.at
+   Contact: cacao@cacaojvm.org
 
    Authors: Andreas Krall
 
-   $Id: codegen.h 3476 2005-10-21 12:03:33Z twisti $
+   $Id: codegen.h 4640 2006-03-16 17:24:18Z twisti $
 
 */
 
@@ -37,6 +37,8 @@
 #include "config.h"
 #include "vm/types.h"
 
+#include "vm/jit/jit.h"
+
 
 /* some defines ***************************************************************/
 
 
 /* additional functions and macros to generate code ***************************/
 
-#ifdef STATISTICS
-#define COUNT_SPILLS count_spills++
-#else
-#define COUNT_SPILLS
-#endif
-
-
-/* gen_nullptr_check(objreg) */
-
 #define gen_nullptr_check(objreg) \
     if (checknull) { \
-        M_BEQZ((objreg), 0); \
-        codegen_addxnullrefs(cd, mcodeptr); \
+        M_BEQZ(objreg, 0); \
+        codegen_add_nullpointerexception_ref(cd, mcodeptr); \
         M_NOP; \
     }
 
         M_ILD(REG_ITMP3, s1, OFFSET(java_arrayheader, size)); \
         M_CMPULT(s2, REG_ITMP3, REG_ITMP3); \
         M_BEQZ(REG_ITMP3, 0); \
-        codegen_addxboundrefs(cd, mcodeptr, s2); \
+        codegen_add_arrayindexoutofboundsexception_ref(cd, mcodeptr, s2); \
         M_NOP; \
     }
 
 #define gen_div_check(r) \
-    M_BEQZ((r), 0); \
-    codegen_addxdivrefs(cd, mcodeptr); \
-    M_NOP;
+    do { \
+        M_BEQZ((r), 0); \
+        codegen_add_arithmeticexception_ref(cd, mcodeptr); \
+        M_NOP; \
+    } while (0)
 
 
 /* MCODECHECK(icnt) */