Changes: Edwin Steiner
- $Id: parse.h 5079 2006-07-06 11:36:01Z twisti $
+ $Id: parse.h 5181 2006-07-26 13:27:54Z twisti $
*/
#define NEW_OP_STORE_ONEWORD(o,index) \
do { \
INDEX_ONEWORD(index); \
- NEW_OP_LOCALINDEX(o,index); \
+ NEW_OP_PREPARE_ZEROFLAGS(o); \
+ iptr->dst.localindex = (index); \
+ PINC; \
} while (0)
#define NEW_OP_STORE_TWOWORD(o,index) \
do { \
INDEX_TWOWORD(index); \
- NEW_OP_LOCALINDEX(o,index); \
+ NEW_OP_PREPARE_ZEROFLAGS(o); \
+ iptr->dst.localindex = (index); \
+ PINC; \
} while (0)
#define NEW_OP_BUILTIN_CHECK_EXCEPTION(bte) \
- code->isleafmethod = false; \
+ jd->isleafmethod = false; \
NEW_OP_PREPARE_ZEROFLAGS(ICMD_BUILTIN); \
iptr->sx.s23.s3.bte = (bte); \
PINC
#define NEW_OP_BUILTIN_NO_EXCEPTION(bte) \
- code->isleafmethod = false; \
+ jd->isleafmethod = false; \
NEW_OP_PREPARE(ICMD_BUILTIN); \
iptr->sx.s23.s3.bte = (bte); \
iptr->flags.bits = INS_FLAG_NOCHECK; \
PINC
#define NEW_OP_BUILTIN_ARITHMETIC(opcode, bte) \
- code->isleafmethod = false; \
+ jd->isleafmethod = false; \
NEW_OP_PREPARE_ZEROFLAGS(opcode); \
iptr->sx.s23.s3.bte = (bte); \
PINC
PINC
#define BUILTIN(v,o1,t,l) \
- code->isleafmethod = false; \
- iptr->opc = ICMD_BUILTIN; \
- iptr->op1 = (o1); \
- iptr->val.a = (v); \
- iptr->target = (t); \
- iptr->line = (l); \
+ jd->isleafmethod = false; \
+ iptr->opc = ICMD_BUILTIN; \
+ iptr->op1 = (o1); \
+ iptr->val.a = (v); \
+ iptr->target = (t); \
+ iptr->line = (l); \
PINC
#define OP1LOAD_ONEWORD(o,o1) \
} while (0)
-/* macros for byte code fetching ***********************************************
-
- fetch a byte code of given size from position p in code array jcode
-
-*******************************************************************************/
-
-#define code_get_u1(p,m) m->jcode[p]
-#define code_get_s1(p,m) ((s1)m->jcode[p])
-#define code_get_u2(p,m) ((((u2)m->jcode[p]) << 8) + m->jcode[p + 1])
-#define code_get_s2(p,m) ((s2)((((u2)m->jcode[p]) << 8) + m->jcode[p + 1]))
-#define code_get_u4(p,m) ((((u4)m->jcode[p]) << 24) + (((u4)m->jcode[p + 1]) << 16) \
- +(((u4)m->jcode[p + 2]) << 8) + m->jcode[p + 3])
-#define code_get_s4(p,m) ((s4)((((u4)m->jcode[p]) << 24) + (((u4)m->jcode[p + 1]) << 16) \
- +(((u4)m->jcode[p + 2]) << 8) + m->jcode[p + 3]))
-/* XXX read 32bit aligned big-endian values directly */
-
-
/* function prototypes ********************************************************/
bool parse(jitdata *jd);