-/* -*- mode: c; tab-width: 4; c-basic-offset: 4 -*- */
-/****************************** headers.c **************************************
+/* headers.c *******************************************************************
Copyright (c) 1997 A. Krall, R. Grafl, M. Gschwind, M. Probst
void asm_calljavamethod () { }
void asm_dumpregistersandcall () { }
-s4 new_builtin_idiv (s4 a, s4 b) {return 0;}
-s4 new_builtin_irem (s4 a, s4 b) {return 0;}
-s8 new_builtin_ldiv (s8 a, s8 b) {return 0;}
-s8 new_builtin_lrem (s8 a, s8 b) {return 0;}
+s4 asm_builtin_idiv (s4 a, s4 b) {return 0;}
+s4 asm_builtin_irem (s4 a, s4 b) {return 0;}
+s8 asm_builtin_ldiv (s8 a, s8 b) {return 0;}
+s8 asm_builtin_lrem (s8 a, s8 b) {return 0;}
-void new_builtin_monitorenter (java_objectheader *o) {}
-void new_builtin_monitorexit (java_objectheader *o) {}
+void asm_builtin_monitorenter (java_objectheader *o) {}
+void asm_builtin_monitorexit (java_objectheader *o) {}
-s4 new_builtin_checkcast(java_objectheader *o, classinfo *c)
- {return 0;}
-s4 new_builtin_checkclasscast(java_objectheader *o, classinfo *c)
- {return 0;}
-s4 new_builtin_checkintercast(java_objectheader *o, classinfo *c)
- {return 0;}
-s4 new_builtin_checkarraycast
+s4 asm_builtin_checkarraycast
(java_objectheader *o, constant_arraydescriptor *d)
{return 0;}
-void new_builtin_aastore (java_objectarray *a, s4 index, java_objectheader *o) {}
+void asm_builtin_aastore (java_objectarray *a, s4 index, java_objectheader *o) {}
u1 *createcompilerstub (methodinfo *m) {return NULL;}
u1 *createnativestub (functionptr f, methodinfo *m) {return NULL;}
-u1 *ncreatenativestub (functionptr f, methodinfo *m) {return NULL;}
+u1 *oldcreatenativestub (functionptr f, methodinfo *m) {return NULL;}
void removecompilerstub (u1 *stub) {}
void removenativestub (u1 *stub) {}
-void perform_alpha_threadswitch (u1 **from, u1 **to) {}
-u1* initialize_thread_stack (void *func, u1 *stack) { return NULL; }
+void asm_perform_threadswitch (u1 **from, u1 **to) {}
+u1* asm_initialize_thread_stack (void *func, u1 *stack) { return NULL; }
void asm_switchstackandcall () { }
java_objectheader *native_new_and_init (void *p) { return NULL; }
log_init (NULL);
log_text ("Java - header-generator started");
+ file = fopen("sysdep/offsets.h", "w");
+ if (file == NULL)
+ panic ("Can not open file 'sysdep/offsets.h' for write");
+
+ fprintf (file, "/* This file is machine generated, don't edit it !*/\n\n");
+
+ fprintf (file, "#define offobjvftbl %3d\n", (int) OFFSET(java_objectheader, vftbl));
+ fprintf (file, "#define offarraysize %3d\n", (int) OFFSET(java_arrayheader, size));
+ fprintf (file, "#define offobjarrdata %3d\n\n", (int) OFFSET(java_objectarray, data[0]));
+ fprintf (file, "#define offbaseval %3d\n", (int) OFFSET(vftbl, baseval));
+ fprintf (file, "#define offdiffval %3d\n", (int) OFFSET(vftbl, diffval));
+
+ fclose (file);
suck_init (classpath);
}
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ */