Fix LDC, LDC_W, and INSTANCEOF opcodes, more debugging
[jamvm-avr32-jem.git] / src / class.h
blob5d2497f31b71a90096f6f747032cdb828e6ee448
1 /*
2 * Copyright (C) 2003, 2004, 2005, 2006, 2007
3 * Robert Lougher <rob@lougher.org.uk>.
5 * This file is part of JamVM.
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2,
10 * or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 /* Macros for reading data values from class files - values
23 are in big endian format, and non-aligned. See arch.h
24 for READ_DBL - this is platform dependent */
26 #define READ_U1(v,p,l) v = *(p)++
27 #define READ_U2(v,p,l) v = ((p)[0]<<8)|(p)[1]; (p)+=2
28 #define READ_U4(v,p,l) v = ((p)[0]<<24)|((p)[1]<<16)|((p)[2]<<8)|(p)[3]; (p)+=4
29 #define READ_U8(v,p,l) v = ((u8)(p)[0]<<56)|((u8)(p)[1]<<48)|((u8)(p)[2]<<40) \
30 |((u8)(p)[3]<<32)|((u8)(p)[4]<<24)|((u8)(p)[5]<<16) \
31 |((u8)(p)[6]<<8)|(u8)(p)[7]; (p)+=8
33 #define READ_INDEX(v,p,l) READ_U2(v,p,l)
34 #define READ_TYPE_INDEX(v,cp,t,p,l) READ_U2(v,p,l)
36 /* The default value of the boot classpath is based on the JamVM
37 and Classpath install directories. If zip support is enabled
38 the classes will be contained in ZIP files, else they will be
39 separate class files in a directory structure */
41 #ifdef USE_ZIP
42 #define JAMVM_CLASSES INSTALL_DIR"/share/jamvm/classes.zip"
43 #define CLASSPATH_CLASSES CLASSPATH_INSTALL_DIR"/share/classpath/glibj.zip"
44 #else
45 #define JAMVM_CLASSES INSTALL_DIR"/share/jamvm/classes"
46 #define CLASSPATH_CLASSES CLASSPATH_INSTALL_DIR"/share/classpath"
47 #endif
49 #define DFLT_BCP JAMVM_CLASSES":"CLASSPATH_CLASSES