* src/vm/jit/emit-common.c: Moved to .cpp.
authorChristian Thalinger <twisti@complang.tuwien.ac.at>
Tue, 26 Aug 2008 09:11:11 +0000 (11:11 +0200)
committerChristian Thalinger <twisti@complang.tuwien.ac.at>
Tue, 26 Aug 2008 09:11:11 +0000 (11:11 +0200)
* src/vm/jit/emit-common.h: Likewise.
* src/vm/jit/emit-common.cpp: New file.
* src/vm/jit/emit-common.hpp: Likewise.
* src/vm/jit/Makefile.am,
src/vm/jit/alpha/codegen.c,
src/vm/jit/alpha/emit.c,
src/vm/jit/arm/codegen.c,
src/vm/jit/arm/emit.c,
src/vm/jit/codegen-common.c,
src/vm/jit/i386/codegen.c,
src/vm/jit/i386/emit.c,
src/vm/jit/m68k/codegen.c,
src/vm/jit/m68k/emit.c,
src/vm/jit/mips/codegen.c,
src/vm/jit/mips/emit.c,
src/vm/jit/powerpc/codegen.c,
src/vm/jit/powerpc/emit.c,
src/vm/jit/powerpc64/codegen.c,
src/vm/jit/powerpc64/emit.c,
src/vm/jit/s390/codegen.c,
src/vm/jit/s390/emit.c,
src/vm/jit/sparc64/codegen.c,
src/vm/jit/sparc64/emit.c,
src/vm/jit/stubs.cpp,
src/vm/jit/x86_64/codegen.c,
src/vm/jit/x86_64/emit.c: Related changes.

--HG--
rename : src/vm/jit/emit-common.c => src/vm/jit/emit-common.cpp
rename : src/vm/jit/emit-common.h => src/vm/jit/emit-common.hpp

27 files changed:
src/vm/jit/Makefile.am
src/vm/jit/alpha/codegen.c
src/vm/jit/alpha/emit.c
src/vm/jit/arm/codegen.c
src/vm/jit/arm/emit.c
src/vm/jit/codegen-common.c
src/vm/jit/emit-common.c [deleted file]
src/vm/jit/emit-common.cpp [new file with mode: 0644]
src/vm/jit/emit-common.h [deleted file]
src/vm/jit/emit-common.hpp [new file with mode: 0644]
src/vm/jit/i386/codegen.c
src/vm/jit/i386/emit.c
src/vm/jit/m68k/codegen.c
src/vm/jit/m68k/emit.c
src/vm/jit/mips/codegen.c
src/vm/jit/mips/emit.c
src/vm/jit/powerpc/codegen.c
src/vm/jit/powerpc/emit.c
src/vm/jit/powerpc64/codegen.c
src/vm/jit/powerpc64/emit.c
src/vm/jit/s390/codegen.c
src/vm/jit/s390/emit.c
src/vm/jit/sparc64/codegen.c
src/vm/jit/sparc64/emit.c
src/vm/jit/stubs.cpp
src/vm/jit/x86_64/codegen.c
src/vm/jit/x86_64/emit.c

index 3e9b34e4cc862b79cea5da263eb64b9d190c60f7..ca4879870cd7d3885861fdd940d171391db22be1 100644 (file)
@@ -161,8 +161,8 @@ libjit_la_SOURCES = \
        $(DISASS_SOURCES) \
        dseg.c \
        dseg.h \
-       emit-common.c \
-       emit-common.h \
+       emit-common.cpp \
+       emit-common.hpp \
        exceptiontable.c \
        exceptiontable.h \
        executionstate.c \
index 369567029f8ccca068699cfa20d98d3022f77fea..ef63f752e25f9c676a06da877faf905d05336a33 100644 (file)
@@ -54,7 +54,7 @@
 #include "vm/jit/asmpart.h"
 #include "vm/jit/codegen-common.h"
 #include "vm/jit/dseg.h"
-#include "vm/jit/emit-common.h"
+#include "vm/jit/emit-common.hpp"
 #include "vm/jit/jit.hpp"
 #include "vm/jit/linenumbertable.h"
 #include "vm/jit/parse.h"
index 0fc5314db299e38c0761620a8cb75d4897214d79..cdb00c327c6c4e1a6d77401a3634465dca88aa90 100644 (file)
@@ -43,7 +43,7 @@
 #include "vm/jit/abi-asm.h"
 #include "vm/jit/asmpart.h"
 #include "vm/jit/dseg.h"
-#include "vm/jit/emit-common.h"
+#include "vm/jit/emit-common.hpp"
 #include "vm/jit/jit.hpp"
 #include "vm/jit/patcher-common.h"
 #include "vm/jit/replace.hpp"
index 19ca2733fd2149ec973080dd017303147b7862a5..caf895697f69f249d82e36d1342cdb4057f264ff 100644 (file)
@@ -53,7 +53,7 @@
 #include "vm/jit/asmpart.h"
 #include "vm/jit/codegen-common.h"
 #include "vm/jit/dseg.h"
-#include "vm/jit/emit-common.h"
+#include "vm/jit/emit-common.hpp"
 #include "vm/jit/jit.hpp"
 #include "vm/jit/linenumbertable.h"
 #include "vm/jit/methodheader.h"
index b3efb40d288e15c6d6f6a7e4879df61c8f69a96a..3fffcdb2ba7a9658c0f96f6fb281172b18ee0e30 100644 (file)
@@ -42,7 +42,7 @@
 
 #include "vm/jit/abi.h"
 #include "vm/jit/asmpart.h"
-#include "vm/jit/emit-common.h"
+#include "vm/jit/emit-common.hpp"
 #include "vm/jit/jit.hpp"
 #include "vm/jit/patcher-common.h"
 #include "vm/jit/replace.hpp"
index 6c006a9a321572c498973037716fb09f9f916d3e..a5f830bbcb15d1fec192b6fb6a60b153624c1fa8 100644 (file)
@@ -82,7 +82,7 @@
 #endif
 
 #include "vm/jit/dseg.h"
-#include "vm/jit/emit-common.h"
+#include "vm/jit/emit-common.hpp"
 #include "vm/jit/jit.hpp"
 #include "vm/jit/linenumbertable.h"
 #include "vm/jit/methodheader.h"
diff --git a/src/vm/jit/emit-common.c b/src/vm/jit/emit-common.c
deleted file mode 100644 (file)
index 32001de..0000000
+++ /dev/null
@@ -1,731 +0,0 @@
-/* src/vm/jit/emit-common.c - common code emitter functions
-
-   Copyright (C) 2006, 2007, 2008
-   CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
-
-   This file is part of CACAO.
-
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2, or (at
-   your option) any later version.
-
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
-
-   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., 51 Franklin Street, Fifth Floor, Boston, MA
-   02110-1301, USA.
-
-*/
-
-
-#include "config.h"
-
-#include <assert.h>
-#include <stdint.h>
-
-#include "vm/types.h"
-
-#include "arch.h"
-#include "codegen.h"
-
-#include "vm/options.h"
-#include "vm/statistics.h"
-
-#include "vm/jit/emit-common.h"
-#include "vm/jit/jit.hpp"
-#include "vm/jit/patcher-common.h"
-
-
-/* emit_load_s1 ****************************************************************
-
-   Emits a possible load of the first source operand.
-
-*******************************************************************************/
-
-s4 emit_load_s1(jitdata *jd, instruction *iptr, s4 tempreg)
-{
-       varinfo *src;
-       s4       reg;
-
-       src = VAROP(iptr->s1);
-
-       reg = emit_load(jd, iptr, src, tempreg);
-
-       return reg;
-}
-
-
-/* emit_load_s2 ****************************************************************
-
-   Emits a possible load of the second source operand.
-
-*******************************************************************************/
-
-s4 emit_load_s2(jitdata *jd, instruction *iptr, s4 tempreg)
-{
-       varinfo *src;
-       s4       reg;
-
-       src = VAROP(iptr->sx.s23.s2);
-
-       reg = emit_load(jd, iptr, src, tempreg);
-
-       return reg;
-}
-
-
-/* emit_load_s3 ****************************************************************
-
-   Emits a possible load of the third source operand.
-
-*******************************************************************************/
-
-s4 emit_load_s3(jitdata *jd, instruction *iptr, s4 tempreg)
-{
-       varinfo *src;
-       s4       reg;
-
-       src = VAROP(iptr->sx.s23.s3);
-
-       reg = emit_load(jd, iptr, src, tempreg);
-
-       return reg;
-}
-
-
-/* emit_load_s1_low ************************************************************
-
-   Emits a possible load of the low 32-bits of the first long source
-   operand.
-
-*******************************************************************************/
-
-#if SIZEOF_VOID_P == 4
-s4 emit_load_s1_low(jitdata *jd, instruction *iptr, s4 tempreg)
-{
-       varinfo *src;
-       s4       reg;
-
-       src = VAROP(iptr->s1);
-
-       reg = emit_load_low(jd, iptr, src, tempreg);
-
-       return reg;
-}
-#endif
-
-
-/* emit_load_s2_low ************************************************************
-
-   Emits a possible load of the low 32-bits of the second long source
-   operand.
-
-*******************************************************************************/
-
-#if SIZEOF_VOID_P == 4
-s4 emit_load_s2_low(jitdata *jd, instruction *iptr, s4 tempreg)
-{
-       varinfo *src;
-       s4       reg;
-
-       src = VAROP(iptr->sx.s23.s2);
-
-       reg = emit_load_low(jd, iptr, src, tempreg);
-
-       return reg;
-}
-#endif
-
-
-/* emit_load_s3_low ************************************************************
-
-   Emits a possible load of the low 32-bits of the third long source
-   operand.
-
-*******************************************************************************/
-
-#if SIZEOF_VOID_P == 4
-s4 emit_load_s3_low(jitdata *jd, instruction *iptr, s4 tempreg)
-{
-       varinfo *src;
-       s4       reg;
-
-       src = VAROP(iptr->sx.s23.s3);
-
-       reg = emit_load_low(jd, iptr, src, tempreg);
-
-       return reg;
-}
-#endif
-
-
-/* emit_load_s1_high ***********************************************************
-
-   Emits a possible load of the high 32-bits of the first long source
-   operand.
-
-*******************************************************************************/
-
-#if SIZEOF_VOID_P == 4
-s4 emit_load_s1_high(jitdata *jd, instruction *iptr, s4 tempreg)
-{
-       varinfo *src;
-       s4       reg;
-
-       src = VAROP(iptr->s1);
-
-       reg = emit_load_high(jd, iptr, src, tempreg);
-
-       return reg;
-}
-#endif
-
-
-/* emit_load_s2_high ***********************************************************
-
-   Emits a possible load of the high 32-bits of the second long source
-   operand.
-
-*******************************************************************************/
-
-#if SIZEOF_VOID_P == 4
-s4 emit_load_s2_high(jitdata *jd, instruction *iptr, s4 tempreg)
-{
-       varinfo *src;
-       s4       reg;
-
-       src = VAROP(iptr->sx.s23.s2);
-
-       reg = emit_load_high(jd, iptr, src, tempreg);
-
-       return reg;
-}
-#endif
-
-
-/* emit_load_s3_high ***********************************************************
-
-   Emits a possible load of the high 32-bits of the third long source
-   operand.
-
-*******************************************************************************/
-
-#if SIZEOF_VOID_P == 4
-s4 emit_load_s3_high(jitdata *jd, instruction *iptr, s4 tempreg)
-{
-       varinfo *src;
-       s4       reg;
-
-       src = VAROP(iptr->sx.s23.s3);
-
-       reg = emit_load_high(jd, iptr, src, tempreg);
-
-       return reg;
-}
-#endif
-
-
-/* emit_store_dst **************************************************************
-
-   This function generates the code to store the result of an
-   operation back into a spilled pseudo-variable.  If the
-   pseudo-variable has not been spilled in the first place, this
-   function will generate nothing.
-    
-*******************************************************************************/
-
-void emit_store_dst(jitdata *jd, instruction *iptr, s4 d)
-{
-       emit_store(jd, iptr, VAROP(iptr->dst), d);
-}
-
-
-/* emit_patcher_traps **********************************************************
-
-   Generates the code for the patcher traps.
-
-*******************************************************************************/
-
-void emit_patcher_traps(jitdata *jd)
-{
-       codegendata *cd;
-       codeinfo    *code;
-       patchref_t  *pr;
-       u1          *savedmcodeptr;
-       u1          *tmpmcodeptr;
-       uint32_t     mcode;
-
-       /* get required compiler data */
-
-       cd   = jd->cd;
-       code = jd->code;
-
-       /* generate patcher traps code */
-
-       for (pr = list_first(code->patchers); pr != NULL; pr = list_next(code->patchers, pr)) {
-
-               /* Calculate the patch position where the original machine
-                  code is located and the trap should be placed. */
-
-               tmpmcodeptr = (u1 *) (cd->mcodebase + pr->mpc);
-
-               /* Patch in the trap to call the signal handler (done at
-                  compile time). */
-
-               savedmcodeptr = cd->mcodeptr;   /* save current mcodeptr          */
-               cd->mcodeptr  = tmpmcodeptr;    /* set mcodeptr to patch position */
-
-               mcode = emit_trap(cd);
-
-               cd->mcodeptr = savedmcodeptr;   /* restore the current mcodeptr   */
-
-               /* Remember the original machine code which is patched
-                  back in later (done at runtime). */
-
-               pr->mcode = mcode;
-       }
-}
-
-
-/* emit_bccz *******************************************************************
-
-   Emit conditional and unconditional branch instructions on integer
-   regiseters.
-
-*******************************************************************************/
-
-void emit_bccz(codegendata *cd, basicblock *target, s4 condition, s4 reg, u4 options)
-{
-       s4 branchmpc;
-       s4 disp;
-
-       /* Target basic block already has an PC, so we can generate the
-          branch immediately. */
-
-       if ((target->mpc >= 0)) {
-               STATISTICS(count_branches_resolved++);
-
-               /* calculate the mpc of the branch instruction */
-
-               branchmpc = cd->mcodeptr - cd->mcodebase;
-               disp      = target->mpc - branchmpc;
-
-#if defined(ENABLE_STATISTICS)
-               count_emit_branch++;
-               if ((int8_t)disp == disp)  count_emit_branch_8bit++; 
-               else if ((int16_t)disp == disp) count_emit_branch_16bit++;
-               else if ((int32_t)disp == disp) count_emit_branch_32bit++;
-# if SIZEOF_VOID_P == 8
-               else if ((int64_t)disp == disp) count_emit_branch_64bit++;
-# endif
-#endif
-
-               emit_branch(cd, disp, condition, reg, options);
-       }
-       else {
-               /* current mcodeptr is the correct position,
-                  afterwards emit the NOPs */
-
-               codegen_add_branch_ref(cd, target, condition, reg, options);
-
-               /* generate NOPs as placeholder for branch code */
-
-               BRANCH_NOPS;
-       }
-}
-
-
-/* emit_bcc ********************************************************************
-
-   Emit conditional and unconditional branch instructions on condition
-   codes.
-
-*******************************************************************************/
-
-void emit_bcc(codegendata *cd, basicblock *target, s4 condition, u4 options)
-{
-       emit_bccz(cd, target, condition, -1, options);
-}
-
-
-/* emit_br *********************************************************************
-
-   Wrapper for unconditional branches.
-
-*******************************************************************************/
-
-void emit_br(codegendata *cd, basicblock *target)
-{
-       emit_bcc(cd, target, BRANCH_UNCONDITIONAL, BRANCH_OPT_NONE);
-}
-
-
-/* emit_bxxz *******************************************************************
-
-   Wrappers for branches on one integer register.
-
-*******************************************************************************/
-
-#if SUPPORT_BRANCH_CONDITIONAL_ONE_INTEGER_REGISTER
-
-void emit_beqz(codegendata *cd, basicblock *target, s4 reg)
-{
-       emit_bccz(cd, target, BRANCH_EQ, reg, BRANCH_OPT_NONE);
-}
-
-void emit_bnez(codegendata *cd, basicblock *target, s4 reg)
-{
-       emit_bccz(cd, target, BRANCH_NE, reg, BRANCH_OPT_NONE);
-}
-
-void emit_bltz(codegendata *cd, basicblock *target, s4 reg)
-{
-       emit_bccz(cd, target, BRANCH_LT, reg, BRANCH_OPT_NONE);
-}
-
-void emit_bgez(codegendata *cd, basicblock *target, s4 reg)
-{
-       emit_bccz(cd, target, BRANCH_GE, reg, BRANCH_OPT_NONE);
-}
-
-void emit_bgtz(codegendata *cd, basicblock *target, s4 reg)
-{
-       emit_bccz(cd, target, BRANCH_GT, reg, BRANCH_OPT_NONE);
-}
-
-void emit_blez(codegendata *cd, basicblock *target, s4 reg)
-{
-       emit_bccz(cd, target, BRANCH_LE, reg, BRANCH_OPT_NONE);
-}
-
-#endif /* SUPPORT_BRANCH_CONDITIONAL_ONE_INTEGER_REGISTER */
-
-
-/* emit_bxx ********************************************************************
-
-   Wrappers for branches on two integer registers.
-
-   We use PACK_REGS here, so we don't have to change the branchref
-   data structure and the emit_bccz function.
-
-*******************************************************************************/
-
-#if SUPPORT_BRANCH_CONDITIONAL_TWO_INTEGER_REGISTERS
-
-void emit_beq(codegendata *cd, basicblock *target, s4 s1, s4 s2)
-{
-       emit_bccz(cd, target, BRANCH_EQ, PACK_REGS(s1, s2), BRANCH_OPT_NONE);
-}
-
-void emit_bne(codegendata *cd, basicblock *target, s4 s1, s4 s2)
-{
-       emit_bccz(cd, target, BRANCH_NE, PACK_REGS(s1, s2), BRANCH_OPT_NONE);
-}
-
-#endif /* SUPPORT_BRANCH_CONDITIONAL_TWO_INTEGER_REGISTERS */
-
-
-/* emit_bxx ********************************************************************
-
-   Wrappers for branches on condition codes.
-
-*******************************************************************************/
-
-#if SUPPORT_BRANCH_CONDITIONAL_CONDITION_REGISTER
-
-void emit_beq(codegendata *cd, basicblock *target)
-{
-       emit_bcc(cd, target, BRANCH_EQ, BRANCH_OPT_NONE);
-}
-
-void emit_bne(codegendata *cd, basicblock *target)
-{
-       emit_bcc(cd, target, BRANCH_NE, BRANCH_OPT_NONE);
-}
-
-void emit_blt(codegendata *cd, basicblock *target)
-{
-       emit_bcc(cd, target, BRANCH_LT, BRANCH_OPT_NONE);
-}
-
-void emit_bge(codegendata *cd, basicblock *target)
-{
-       emit_bcc(cd, target, BRANCH_GE, BRANCH_OPT_NONE);
-}
-
-void emit_bgt(codegendata *cd, basicblock *target)
-{
-       emit_bcc(cd, target, BRANCH_GT, BRANCH_OPT_NONE);
-}
-
-void emit_ble(codegendata *cd, basicblock *target)
-{
-       emit_bcc(cd, target, BRANCH_LE, BRANCH_OPT_NONE);
-}
-
-#if SUPPORT_BRANCH_CONDITIONAL_UNSIGNED_CONDITIONS
-void emit_bult(codegendata *cd, basicblock *target)
-{
-       emit_bcc(cd, target, BRANCH_ULT, BRANCH_OPT_NONE);
-}
-
-void emit_bule(codegendata *cd, basicblock *target)
-{
-       emit_bcc(cd, target, BRANCH_ULE, BRANCH_OPT_NONE);
-}
-
-void emit_buge(codegendata *cd, basicblock *target)
-{
-       emit_bcc(cd, target, BRANCH_UGE, BRANCH_OPT_NONE);
-}
-
-void emit_bugt(codegendata *cd, basicblock *target)
-{
-       emit_bcc(cd, target, BRANCH_UGT, BRANCH_OPT_NONE);
-}
-#endif
-
-#if defined(__POWERPC__) || defined(__POWERPC64__)
-void emit_bnan(codegendata *cd, basicblock *target)
-{
-       emit_bcc(cd, target, BRANCH_NAN, BRANCH_OPT_NONE);
-}
-#endif
-
-#endif /* SUPPORT_BRANCH_CONDITIONAL_CONDITION_REGISTER */
-
-
-/* emit_label_bccz *************************************************************
-
-   Emit a branch to a label.  Possibly emit the branch, if it is a
-   backward branch.
-
-*******************************************************************************/
-
-void emit_label_bccz(codegendata *cd, s4 label, s4 condition, s4 reg, u4 options)
-{
-       list_t             *list;
-       branch_label_ref_t *br;
-       s4                  mpc;
-       s4                  disp;
-
-       /* get the label list */
-
-       list = cd->brancheslabel;
-
-       /* search if the label is already in the list */
-
-       for (br = list_first(list); br != NULL; br = list_next(list, br)) {
-               /* is this entry the correct label? */
-
-               if (br->label == label)
-                       break;
-       }
-
-       if (br == NULL) {
-               /* current mcodeptr is the correct position,
-                  afterwards emit the NOPs */
-
-               codegen_branch_label_add(cd, label, condition, reg, options);
-
-               /* generate NOPs as placeholder for branch code */
-
-               BRANCH_NOPS;
-               return;
-       }
-
-       /* Branch reference was found. */
-
-       /* calculate the mpc of the branch instruction */
-
-       mpc  = cd->mcodeptr - cd->mcodebase;
-       disp = br->mpc - mpc;
-
-#if defined(ENABLE_STATISTICS)
-       count_emit_branch++;
-       if ((int8_t)disp == disp)  count_emit_branch_8bit++; 
-       else if ((int16_t)disp == disp) count_emit_branch_16bit++;
-       else if ((int32_t)disp == disp) count_emit_branch_32bit++;
-# if SIZEOF_VOID_P == 8
-       else if ((int64_t)disp == disp) count_emit_branch_64bit++;
-# endif
-#endif
-
-       emit_branch(cd, disp, condition, reg, options);
-
-       /* now remove the branch reference */
-
-       list_remove(list, br);
-}
-
-
-/* emit_label ******************************************************************
-
-   Emit a label for a branch.  Possibly emit the branch, if it is a
-   forward branch.
-
-*******************************************************************************/
-
-void emit_label(codegendata *cd, s4 label)
-{
-       list_t             *list;
-       branch_label_ref_t *br;
-       s4                  mpc;
-       s4                  disp;
-       u1                 *mcodeptr;
-
-       /* get the label list */
-
-       list = cd->brancheslabel;
-
-       /* search if the label is already in the list */
-
-       for (br = list_first(list); br != NULL; br = list_next(list, br)) {
-               /* is this entry the correct label? */
-
-               if (br->label == label)
-                       break;
-       }
-
-       if (br == NULL) {
-               /* No branch reference found, add the label to the list (use
-                  invalid values for condition and register). */
-
-               codegen_branch_label_add(cd, label, -1, -1, BRANCH_OPT_NONE );
-               return;
-       }
-
-       /* Branch reference was found. */
-
-       /* calculate the mpc of the branch instruction */
-
-       mpc  = cd->mcodeptr - cd->mcodebase;
-       disp = mpc - br->mpc;
-
-       /* temporary set the mcodeptr */
-
-       mcodeptr     = cd->mcodeptr;
-       cd->mcodeptr = cd->mcodebase + br->mpc;
-
-#if defined(ENABLE_STATISTICS)
-       count_emit_branch++;
-       if ((int8_t)disp == disp)  count_emit_branch_8bit++; 
-       else if ((int16_t)disp == disp) count_emit_branch_16bit++;
-       else if ((int32_t)disp == disp) count_emit_branch_32bit++;
-# if SIZEOF_VOID_P == 8
-       else if ((int64_t)disp == disp) count_emit_branch_64bit++;
-# endif
-#endif
-
-       emit_branch(cd, disp, br->condition, br->reg, br->options);
-
-       /* restore mcodeptr */
-
-       cd->mcodeptr = mcodeptr;
-
-       /* now remove the branch reference */
-
-       list_remove(list, br);
-}
-
-
-/* emit_label_bcc **************************************************************
-
-   Emit conditional and unconditional label-branch instructions on
-   condition codes.
-
-*******************************************************************************/
-
-void emit_label_bcc(codegendata *cd, s4 label, s4 condition, u4 options)
-{
-       emit_label_bccz(cd, label, condition, -1, options);
-}
-
-
-/* emit_label_br ***************************************************************
-
-   Wrapper for unconditional label-branches.
-
-*******************************************************************************/
-
-void emit_label_br(codegendata *cd, s4 label)
-{
-       emit_label_bcc(cd, label, BRANCH_UNCONDITIONAL, BRANCH_OPT_NONE);
-}
-
-
-/* emit_label_bxxz *************************************************************
-
-   Wrappers for label-branches on one integer register.
-
-*******************************************************************************/
-
-#if SUPPORT_BRANCH_CONDITIONAL_ONE_INTEGER_REGISTER
-
-void emit_label_beqz(codegendata *cd, s4 label, s4 reg)
-{
-       emit_label_bccz(cd, label, BRANCH_EQ, reg, BRANCH_OPT_NONE);
-}
-
-#endif /* SUPPORT_BRANCH_CONDITIONAL_ONE_INTEGER_REGISTER */
-
-
-/* emit_label_bxx **************************************************************
-
-   Wrappers for label-branches on condition codes.
-
-*******************************************************************************/
-
-#if SUPPORT_BRANCH_CONDITIONAL_CONDITION_REGISTER
-
-void emit_label_beq(codegendata *cd, s4 label)
-{
-       emit_label_bcc(cd, label, BRANCH_EQ, BRANCH_OPT_NONE);
-}
-
-void emit_label_bne(codegendata *cd, s4 label)
-{
-       emit_label_bcc(cd, label, BRANCH_NE, BRANCH_OPT_NONE);
-}
-
-void emit_label_blt(codegendata *cd, s4 label)
-{
-       emit_label_bcc(cd, label, BRANCH_LT, BRANCH_OPT_NONE);
-}
-
-void emit_label_bge(codegendata *cd, s4 label)
-{
-       emit_label_bcc(cd, label, BRANCH_GE, BRANCH_OPT_NONE);
-}
-
-void emit_label_bgt(codegendata *cd, s4 label)
-{
-       emit_label_bcc(cd, label, BRANCH_GT, BRANCH_OPT_NONE);
-}
-
-void emit_label_ble(codegendata *cd, s4 label)
-{
-       emit_label_bcc(cd, label, BRANCH_LE, BRANCH_OPT_NONE);
-}
-
-#endif /* SUPPORT_BRANCH_CONDITIONAL_CONDITION_REGISTER */
-
-
-/*
- * 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:
- * vim:noexpandtab:sw=4:ts=4:
- */
diff --git a/src/vm/jit/emit-common.cpp b/src/vm/jit/emit-common.cpp
new file mode 100644 (file)
index 0000000..0535e02
--- /dev/null
@@ -0,0 +1,731 @@
+/* src/vm/jit/emit-common.cpp - common code emitter functions
+
+   Copyright (C) 2006, 2007, 2008
+   CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
+
+   This file is part of CACAO.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2, or (at
+   your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   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., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+*/
+
+
+#include "config.h"
+
+#include <assert.h>
+#include <stdint.h>
+
+#include "vm/types.h"
+
+#include "arch.h"
+#include "codegen.h"
+
+#include "vm/options.h"
+#include "vm/statistics.h"
+
+#include "vm/jit/emit-common.hpp"
+#include "vm/jit/jit.hpp"
+#include "vm/jit/patcher-common.h"
+
+
+/* emit_load_s1 ****************************************************************
+
+   Emits a possible load of the first source operand.
+
+*******************************************************************************/
+
+s4 emit_load_s1(jitdata *jd, instruction *iptr, s4 tempreg)
+{
+       varinfo *src;
+       s4       reg;
+
+       src = VAROP(iptr->s1);
+
+       reg = emit_load(jd, iptr, src, tempreg);
+
+       return reg;
+}
+
+
+/* emit_load_s2 ****************************************************************
+
+   Emits a possible load of the second source operand.
+
+*******************************************************************************/
+
+s4 emit_load_s2(jitdata *jd, instruction *iptr, s4 tempreg)
+{
+       varinfo *src;
+       s4       reg;
+
+       src = VAROP(iptr->sx.s23.s2);
+
+       reg = emit_load(jd, iptr, src, tempreg);
+
+       return reg;
+}
+
+
+/* emit_load_s3 ****************************************************************
+
+   Emits a possible load of the third source operand.
+
+*******************************************************************************/
+
+s4 emit_load_s3(jitdata *jd, instruction *iptr, s4 tempreg)
+{
+       varinfo *src;
+       s4       reg;
+
+       src = VAROP(iptr->sx.s23.s3);
+
+       reg = emit_load(jd, iptr, src, tempreg);
+
+       return reg;
+}
+
+
+/* emit_load_s1_low ************************************************************
+
+   Emits a possible load of the low 32-bits of the first long source
+   operand.
+
+*******************************************************************************/
+
+#if SIZEOF_VOID_P == 4
+s4 emit_load_s1_low(jitdata *jd, instruction *iptr, s4 tempreg)
+{
+       varinfo *src;
+       s4       reg;
+
+       src = VAROP(iptr->s1);
+
+       reg = emit_load_low(jd, iptr, src, tempreg);
+
+       return reg;
+}
+#endif
+
+
+/* emit_load_s2_low ************************************************************
+
+   Emits a possible load of the low 32-bits of the second long source
+   operand.
+
+*******************************************************************************/
+
+#if SIZEOF_VOID_P == 4
+s4 emit_load_s2_low(jitdata *jd, instruction *iptr, s4 tempreg)
+{
+       varinfo *src;
+       s4       reg;
+
+       src = VAROP(iptr->sx.s23.s2);
+
+       reg = emit_load_low(jd, iptr, src, tempreg);
+
+       return reg;
+}
+#endif
+
+
+/* emit_load_s3_low ************************************************************
+
+   Emits a possible load of the low 32-bits of the third long source
+   operand.
+
+*******************************************************************************/
+
+#if SIZEOF_VOID_P == 4
+s4 emit_load_s3_low(jitdata *jd, instruction *iptr, s4 tempreg)
+{
+       varinfo *src;
+       s4       reg;
+
+       src = VAROP(iptr->sx.s23.s3);
+
+       reg = emit_load_low(jd, iptr, src, tempreg);
+
+       return reg;
+}
+#endif
+
+
+/* emit_load_s1_high ***********************************************************
+
+   Emits a possible load of the high 32-bits of the first long source
+   operand.
+
+*******************************************************************************/
+
+#if SIZEOF_VOID_P == 4
+s4 emit_load_s1_high(jitdata *jd, instruction *iptr, s4 tempreg)
+{
+       varinfo *src;
+       s4       reg;
+
+       src = VAROP(iptr->s1);
+
+       reg = emit_load_high(jd, iptr, src, tempreg);
+
+       return reg;
+}
+#endif
+
+
+/* emit_load_s2_high ***********************************************************
+
+   Emits a possible load of the high 32-bits of the second long source
+   operand.
+
+*******************************************************************************/
+
+#if SIZEOF_VOID_P == 4
+s4 emit_load_s2_high(jitdata *jd, instruction *iptr, s4 tempreg)
+{
+       varinfo *src;
+       s4       reg;
+
+       src = VAROP(iptr->sx.s23.s2);
+
+       reg = emit_load_high(jd, iptr, src, tempreg);
+
+       return reg;
+}
+#endif
+
+
+/* emit_load_s3_high ***********************************************************
+
+   Emits a possible load of the high 32-bits of the third long source
+   operand.
+
+*******************************************************************************/
+
+#if SIZEOF_VOID_P == 4
+s4 emit_load_s3_high(jitdata *jd, instruction *iptr, s4 tempreg)
+{
+       varinfo *src;
+       s4       reg;
+
+       src = VAROP(iptr->sx.s23.s3);
+
+       reg = emit_load_high(jd, iptr, src, tempreg);
+
+       return reg;
+}
+#endif
+
+
+/* emit_store_dst **************************************************************
+
+   This function generates the code to store the result of an
+   operation back into a spilled pseudo-variable.  If the
+   pseudo-variable has not been spilled in the first place, this
+   function will generate nothing.
+    
+*******************************************************************************/
+
+void emit_store_dst(jitdata *jd, instruction *iptr, s4 d)
+{
+       emit_store(jd, iptr, VAROP(iptr->dst), d);
+}
+
+
+/* emit_patcher_traps **********************************************************
+
+   Generates the code for the patcher traps.
+
+*******************************************************************************/
+
+void emit_patcher_traps(jitdata *jd)
+{
+       codegendata *cd;
+       codeinfo    *code;
+       patchref_t  *pr;
+       u1          *savedmcodeptr;
+       u1          *tmpmcodeptr;
+       uint32_t     mcode;
+
+       /* get required compiler data */
+
+       cd   = jd->cd;
+       code = jd->code;
+
+       /* generate patcher traps code */
+
+       for (pr = (patchref_t*) list_first(code->patchers); pr != NULL; pr = (patchref_t*) list_next(code->patchers, pr)) {
+
+               /* Calculate the patch position where the original machine
+                  code is located and the trap should be placed. */
+
+               tmpmcodeptr = (u1 *) (cd->mcodebase + pr->mpc);
+
+               /* Patch in the trap to call the signal handler (done at
+                  compile time). */
+
+               savedmcodeptr = cd->mcodeptr;   /* save current mcodeptr          */
+               cd->mcodeptr  = tmpmcodeptr;    /* set mcodeptr to patch position */
+
+               mcode = emit_trap(cd);
+
+               cd->mcodeptr = savedmcodeptr;   /* restore the current mcodeptr   */
+
+               /* Remember the original machine code which is patched
+                  back in later (done at runtime). */
+
+               pr->mcode = mcode;
+       }
+}
+
+
+/* emit_bccz *******************************************************************
+
+   Emit conditional and unconditional branch instructions on integer
+   regiseters.
+
+*******************************************************************************/
+
+void emit_bccz(codegendata *cd, basicblock *target, s4 condition, s4 reg, u4 options)
+{
+       s4 branchmpc;
+       s4 disp;
+
+       /* Target basic block already has an PC, so we can generate the
+          branch immediately. */
+
+       if ((target->mpc >= 0)) {
+               STATISTICS(count_branches_resolved++);
+
+               /* calculate the mpc of the branch instruction */
+
+               branchmpc = cd->mcodeptr - cd->mcodebase;
+               disp      = target->mpc - branchmpc;
+
+#if defined(ENABLE_STATISTICS)
+               count_emit_branch++;
+               if ((int8_t)disp == disp)  count_emit_branch_8bit++; 
+               else if ((int16_t)disp == disp) count_emit_branch_16bit++;
+               else if ((int32_t)disp == disp) count_emit_branch_32bit++;
+# if SIZEOF_VOID_P == 8
+               else if ((int64_t)disp == disp) count_emit_branch_64bit++;
+# endif
+#endif
+
+               emit_branch(cd, disp, condition, reg, options);
+       }
+       else {
+               /* current mcodeptr is the correct position,
+                  afterwards emit the NOPs */
+
+               codegen_add_branch_ref(cd, target, condition, reg, options);
+
+               /* generate NOPs as placeholder for branch code */
+
+               BRANCH_NOPS;
+       }
+}
+
+
+/* emit_bcc ********************************************************************
+
+   Emit conditional and unconditional branch instructions on condition
+   codes.
+
+*******************************************************************************/
+
+void emit_bcc(codegendata *cd, basicblock *target, s4 condition, u4 options)
+{
+       emit_bccz(cd, target, condition, -1, options);
+}
+
+
+/* emit_br *********************************************************************
+
+   Wrapper for unconditional branches.
+
+*******************************************************************************/
+
+void emit_br(codegendata *cd, basicblock *target)
+{
+       emit_bcc(cd, target, BRANCH_UNCONDITIONAL, BRANCH_OPT_NONE);
+}
+
+
+/* emit_bxxz *******************************************************************
+
+   Wrappers for branches on one integer register.
+
+*******************************************************************************/
+
+#if SUPPORT_BRANCH_CONDITIONAL_ONE_INTEGER_REGISTER
+
+void emit_beqz(codegendata *cd, basicblock *target, s4 reg)
+{
+       emit_bccz(cd, target, BRANCH_EQ, reg, BRANCH_OPT_NONE);
+}
+
+void emit_bnez(codegendata *cd, basicblock *target, s4 reg)
+{
+       emit_bccz(cd, target, BRANCH_NE, reg, BRANCH_OPT_NONE);
+}
+
+void emit_bltz(codegendata *cd, basicblock *target, s4 reg)
+{
+       emit_bccz(cd, target, BRANCH_LT, reg, BRANCH_OPT_NONE);
+}
+
+void emit_bgez(codegendata *cd, basicblock *target, s4 reg)
+{
+       emit_bccz(cd, target, BRANCH_GE, reg, BRANCH_OPT_NONE);
+}
+
+void emit_bgtz(codegendata *cd, basicblock *target, s4 reg)
+{
+       emit_bccz(cd, target, BRANCH_GT, reg, BRANCH_OPT_NONE);
+}
+
+void emit_blez(codegendata *cd, basicblock *target, s4 reg)
+{
+       emit_bccz(cd, target, BRANCH_LE, reg, BRANCH_OPT_NONE);
+}
+
+#endif /* SUPPORT_BRANCH_CONDITIONAL_ONE_INTEGER_REGISTER */
+
+
+/* emit_bxx ********************************************************************
+
+   Wrappers for branches on two integer registers.
+
+   We use PACK_REGS here, so we don't have to change the branchref
+   data structure and the emit_bccz function.
+
+*******************************************************************************/
+
+#if SUPPORT_BRANCH_CONDITIONAL_TWO_INTEGER_REGISTERS
+
+void emit_beq(codegendata *cd, basicblock *target, s4 s1, s4 s2)
+{
+       emit_bccz(cd, target, BRANCH_EQ, PACK_REGS(s1, s2), BRANCH_OPT_NONE);
+}
+
+void emit_bne(codegendata *cd, basicblock *target, s4 s1, s4 s2)
+{
+       emit_bccz(cd, target, BRANCH_NE, PACK_REGS(s1, s2), BRANCH_OPT_NONE);
+}
+
+#endif /* SUPPORT_BRANCH_CONDITIONAL_TWO_INTEGER_REGISTERS */
+
+
+/* emit_bxx ********************************************************************
+
+   Wrappers for branches on condition codes.
+
+*******************************************************************************/
+
+#if SUPPORT_BRANCH_CONDITIONAL_CONDITION_REGISTER
+
+void emit_beq(codegendata *cd, basicblock *target)
+{
+       emit_bcc(cd, target, BRANCH_EQ, BRANCH_OPT_NONE);
+}
+
+void emit_bne(codegendata *cd, basicblock *target)
+{
+       emit_bcc(cd, target, BRANCH_NE, BRANCH_OPT_NONE);
+}
+
+void emit_blt(codegendata *cd, basicblock *target)
+{
+       emit_bcc(cd, target, BRANCH_LT, BRANCH_OPT_NONE);
+}
+
+void emit_bge(codegendata *cd, basicblock *target)
+{
+       emit_bcc(cd, target, BRANCH_GE, BRANCH_OPT_NONE);
+}
+
+void emit_bgt(codegendata *cd, basicblock *target)
+{
+       emit_bcc(cd, target, BRANCH_GT, BRANCH_OPT_NONE);
+}
+
+void emit_ble(codegendata *cd, basicblock *target)
+{
+       emit_bcc(cd, target, BRANCH_LE, BRANCH_OPT_NONE);
+}
+
+#if SUPPORT_BRANCH_CONDITIONAL_UNSIGNED_CONDITIONS
+void emit_bult(codegendata *cd, basicblock *target)
+{
+       emit_bcc(cd, target, BRANCH_ULT, BRANCH_OPT_NONE);
+}
+
+void emit_bule(codegendata *cd, basicblock *target)
+{
+       emit_bcc(cd, target, BRANCH_ULE, BRANCH_OPT_NONE);
+}
+
+void emit_buge(codegendata *cd, basicblock *target)
+{
+       emit_bcc(cd, target, BRANCH_UGE, BRANCH_OPT_NONE);
+}
+
+void emit_bugt(codegendata *cd, basicblock *target)
+{
+       emit_bcc(cd, target, BRANCH_UGT, BRANCH_OPT_NONE);
+}
+#endif
+
+#if defined(__POWERPC__) || defined(__POWERPC64__)
+void emit_bnan(codegendata *cd, basicblock *target)
+{
+       emit_bcc(cd, target, BRANCH_NAN, BRANCH_OPT_NONE);
+}
+#endif
+
+#endif /* SUPPORT_BRANCH_CONDITIONAL_CONDITION_REGISTER */
+
+
+/* emit_label_bccz *************************************************************
+
+   Emit a branch to a label.  Possibly emit the branch, if it is a
+   backward branch.
+
+*******************************************************************************/
+
+void emit_label_bccz(codegendata *cd, s4 label, s4 condition, s4 reg, u4 options)
+{
+       list_t             *list;
+       branch_label_ref_t *br;
+       s4                  mpc;
+       s4                  disp;
+
+       /* get the label list */
+
+       list = cd->brancheslabel;
+
+       /* search if the label is already in the list */
+
+       for (br = (branch_label_ref_t*) list_first(list); br != NULL; br = (branch_label_ref_t*) list_next(list, br)) {
+               /* is this entry the correct label? */
+
+               if (br->label == label)
+                       break;
+       }
+
+       if (br == NULL) {
+               /* current mcodeptr is the correct position,
+                  afterwards emit the NOPs */
+
+               codegen_branch_label_add(cd, label, condition, reg, options);
+
+               /* generate NOPs as placeholder for branch code */
+
+               BRANCH_NOPS;
+               return;
+       }
+
+       /* Branch reference was found. */
+
+       /* calculate the mpc of the branch instruction */
+
+       mpc  = cd->mcodeptr - cd->mcodebase;
+       disp = br->mpc - mpc;
+
+#if defined(ENABLE_STATISTICS)
+       count_emit_branch++;
+       if ((int8_t)disp == disp)  count_emit_branch_8bit++; 
+       else if ((int16_t)disp == disp) count_emit_branch_16bit++;
+       else if ((int32_t)disp == disp) count_emit_branch_32bit++;
+# if SIZEOF_VOID_P == 8
+       else if ((int64_t)disp == disp) count_emit_branch_64bit++;
+# endif
+#endif
+
+       emit_branch(cd, disp, condition, reg, options);
+
+       /* now remove the branch reference */
+
+       list_remove(list, br);
+}
+
+
+/* emit_label ******************************************************************
+
+   Emit a label for a branch.  Possibly emit the branch, if it is a
+   forward branch.
+
+*******************************************************************************/
+
+void emit_label(codegendata *cd, s4 label)
+{
+       list_t             *list;
+       branch_label_ref_t *br;
+       s4                  mpc;
+       s4                  disp;
+       u1                 *mcodeptr;
+
+       /* get the label list */
+
+       list = cd->brancheslabel;
+
+       /* search if the label is already in the list */
+
+       for (br = (branch_label_ref_t*) list_first(list); br != NULL; br = (branch_label_ref_t*) list_next(list, br)) {
+               /* is this entry the correct label? */
+
+               if (br->label == label)
+                       break;
+       }
+
+       if (br == NULL) {
+               /* No branch reference found, add the label to the list (use
+                  invalid values for condition and register). */
+
+               codegen_branch_label_add(cd, label, -1, -1, BRANCH_OPT_NONE );
+               return;
+       }
+
+       /* Branch reference was found. */
+
+       /* calculate the mpc of the branch instruction */
+
+       mpc  = cd->mcodeptr - cd->mcodebase;
+       disp = mpc - br->mpc;
+
+       /* temporary set the mcodeptr */
+
+       mcodeptr     = cd->mcodeptr;
+       cd->mcodeptr = cd->mcodebase + br->mpc;
+
+#if defined(ENABLE_STATISTICS)
+       count_emit_branch++;
+       if ((int8_t)disp == disp)  count_emit_branch_8bit++; 
+       else if ((int16_t)disp == disp) count_emit_branch_16bit++;
+       else if ((int32_t)disp == disp) count_emit_branch_32bit++;
+# if SIZEOF_VOID_P == 8
+       else if ((int64_t)disp == disp) count_emit_branch_64bit++;
+# endif
+#endif
+
+       emit_branch(cd, disp, br->condition, br->reg, br->options);
+
+       /* restore mcodeptr */
+
+       cd->mcodeptr = mcodeptr;
+
+       /* now remove the branch reference */
+
+       list_remove(list, br);
+}
+
+
+/* emit_label_bcc **************************************************************
+
+   Emit conditional and unconditional label-branch instructions on
+   condition codes.
+
+*******************************************************************************/
+
+void emit_label_bcc(codegendata *cd, s4 label, s4 condition, u4 options)
+{
+       emit_label_bccz(cd, label, condition, -1, options);
+}
+
+
+/* emit_label_br ***************************************************************
+
+   Wrapper for unconditional label-branches.
+
+*******************************************************************************/
+
+void emit_label_br(codegendata *cd, s4 label)
+{
+       emit_label_bcc(cd, label, BRANCH_UNCONDITIONAL, BRANCH_OPT_NONE);
+}
+
+
+/* emit_label_bxxz *************************************************************
+
+   Wrappers for label-branches on one integer register.
+
+*******************************************************************************/
+
+#if SUPPORT_BRANCH_CONDITIONAL_ONE_INTEGER_REGISTER
+
+void emit_label_beqz(codegendata *cd, s4 label, s4 reg)
+{
+       emit_label_bccz(cd, label, BRANCH_EQ, reg, BRANCH_OPT_NONE);
+}
+
+#endif /* SUPPORT_BRANCH_CONDITIONAL_ONE_INTEGER_REGISTER */
+
+
+/* emit_label_bxx **************************************************************
+
+   Wrappers for label-branches on condition codes.
+
+*******************************************************************************/
+
+#if SUPPORT_BRANCH_CONDITIONAL_CONDITION_REGISTER
+
+void emit_label_beq(codegendata *cd, s4 label)
+{
+       emit_label_bcc(cd, label, BRANCH_EQ, BRANCH_OPT_NONE);
+}
+
+void emit_label_bne(codegendata *cd, s4 label)
+{
+       emit_label_bcc(cd, label, BRANCH_NE, BRANCH_OPT_NONE);
+}
+
+void emit_label_blt(codegendata *cd, s4 label)
+{
+       emit_label_bcc(cd, label, BRANCH_LT, BRANCH_OPT_NONE);
+}
+
+void emit_label_bge(codegendata *cd, s4 label)
+{
+       emit_label_bcc(cd, label, BRANCH_GE, BRANCH_OPT_NONE);
+}
+
+void emit_label_bgt(codegendata *cd, s4 label)
+{
+       emit_label_bcc(cd, label, BRANCH_GT, BRANCH_OPT_NONE);
+}
+
+void emit_label_ble(codegendata *cd, s4 label)
+{
+       emit_label_bcc(cd, label, BRANCH_LE, BRANCH_OPT_NONE);
+}
+
+#endif /* SUPPORT_BRANCH_CONDITIONAL_CONDITION_REGISTER */
+
+
+/*
+ * 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:
+ * vim:noexpandtab:sw=4:ts=4:
+ */
diff --git a/src/vm/jit/emit-common.h b/src/vm/jit/emit-common.h
deleted file mode 100644 (file)
index 3fec792..0000000
+++ /dev/null
@@ -1,212 +0,0 @@
-/* src/vm/jit/emit-common.h - common code emitter functions
-
-   Copyright (C) 2006, 2007 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.
-
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2, or (at
-   your option) any later version.
-
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
-
-   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., 51 Franklin Street, Fifth Floor, Boston, MA
-   02110-1301, USA.
-
-*/
-
-
-#ifndef _EMIT_COMMON_H
-#define _EMIT_COMMON_H
-
-#include "config.h"
-#include "vm/types.h"
-
-#include "arch.h"
-
-#include "vm/jit/codegen-common.h"
-#include "vm/jit/jit.hpp"
-
-
-/* branch labels **************************************************************/
-
-#define BRANCH_LABEL_1    1
-#define BRANCH_LABEL_2    2
-#define BRANCH_LABEL_3    3
-#define BRANCH_LABEL_4    4
-#define BRANCH_LABEL_5    5
-#define BRANCH_LABEL_6    6
-
-
-/* constant range macros ******************************************************/
-
-#if SIZEOF_VOID_P == 8
-
-# define IS_IMM8(c) \
-    (((s8) (c) >= -128) && ((s8) (c) <= 127))
-
-# define IS_IMM32(c) \
-    (((s8) (c) >= (-2147483647-1)) && ((s8) (c) <= 2147483647))
-
-#else
-
-# define IS_IMM8(c) \
-    (((s4) (c) >= -128) && ((s4) (c) <= 127))
-
-# define IS_IMM16(c) \
-    (((s4) (c) >= -32768) && ((s4) (c) <= 32767))
-
-#endif
-
-
-/* code generation functions **************************************************/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-s4 emit_load(jitdata *jd, instruction *iptr, varinfo *src, s4 tempreg);
-s4 emit_load_s1(jitdata *jd, instruction *iptr, s4 tempreg);
-s4 emit_load_s2(jitdata *jd, instruction *iptr, s4 tempreg);
-s4 emit_load_s3(jitdata *jd, instruction *iptr, s4 tempreg);
-
-#if SIZEOF_VOID_P == 4
-s4 emit_load_low(jitdata *jd, instruction *iptr, varinfo *src, s4 tempreg);
-s4 emit_load_s1_low(jitdata *jd, instruction *iptr, s4 tempreg);
-s4 emit_load_s2_low(jitdata *jd, instruction *iptr, s4 tempreg);
-s4 emit_load_s3_low(jitdata *jd, instruction *iptr, s4 tempreg);
-
-s4 emit_load_high(jitdata *jd, instruction *iptr, varinfo *src, s4 tempreg);
-s4 emit_load_s1_high(jitdata *jd, instruction *iptr, s4 tempreg);
-s4 emit_load_s2_high(jitdata *jd, instruction *iptr, s4 tempreg);
-s4 emit_load_s3_high(jitdata *jd, instruction *iptr, s4 tempreg);
-#endif
-
-void emit_store(jitdata *jd, instruction *iptr, varinfo *dst, s4 d);
-void emit_store_dst(jitdata *jd, instruction *iptr, s4 d);
-
-#if SIZEOF_VOID_P == 4
-void emit_store_low(jitdata *jd, instruction *iptr, varinfo *dst, s4 d);
-void emit_store_high(jitdata *jd, instruction *iptr, varinfo *dst, s4 d);
-#endif
-
-void emit_copy(jitdata *jd, instruction *iptr);
-
-void emit_iconst(codegendata *cd, s4 d, s4 value);
-void emit_lconst(codegendata *cd, s4 d, s8 value);
-
-/* branch-emitting functions */
-void emit_bccz(codegendata *cd, basicblock *target, s4 condition, s4 reg, u4 options);
-void emit_bcc(codegendata *cd, basicblock *target, s4 condition, u4 options);
-
-/* wrapper for unconditional branches */
-void emit_br(codegendata *cd, basicblock *target);
-
-/* wrappers for branches on one integer register */
-
-#if SUPPORT_BRANCH_CONDITIONAL_ONE_INTEGER_REGISTER
-void emit_beqz(codegendata *cd, basicblock *target, s4 reg);
-void emit_bnez(codegendata *cd, basicblock *target, s4 reg);
-void emit_bltz(codegendata *cd, basicblock *target, s4 reg);
-void emit_bgez(codegendata *cd, basicblock *target, s4 reg);
-void emit_bgtz(codegendata *cd, basicblock *target, s4 reg);
-void emit_blez(codegendata *cd, basicblock *target, s4 reg);
-#endif
-
-/* wrappers for branches on two integer registers */
-
-#if SUPPORT_BRANCH_CONDITIONAL_TWO_INTEGER_REGISTERS
-void emit_beq(codegendata *cd, basicblock *target, s4 s1, s4 s2);
-void emit_bne(codegendata *cd, basicblock *target, s4 s1, s4 s2);
-#endif
-
-/* wrappers for branches on condition codes */
-
-#if SUPPORT_BRANCH_CONDITIONAL_CONDITION_REGISTER
-void emit_beq(codegendata *cd, basicblock *target);
-void emit_bne(codegendata *cd, basicblock *target);
-void emit_blt(codegendata *cd, basicblock *target);
-void emit_bge(codegendata *cd, basicblock *target);
-void emit_bgt(codegendata *cd, basicblock *target);
-void emit_ble(codegendata *cd, basicblock *target);
-#endif
-
-#if SUPPORT_BRANCH_CONDITIONAL_UNSIGNED_CONDITIONS
-void emit_bult(codegendata *cd, basicblock *target);
-void emit_bule(codegendata *cd, basicblock *target);
-void emit_buge(codegendata *cd, basicblock *target);
-void emit_bugt(codegendata *cd, basicblock *target);
-#endif
-
-#if defined(__POWERPC__) || defined(__POWERPC64__)
-void emit_bnan(codegendata *cd, basicblock *target);
-#endif
-
-/* label-branches */
-void emit_label_bccz(codegendata *cd, s4 label, s4 condition, s4 reg, u4 options);
-void emit_label(codegendata *cd, s4 label);
-void emit_label_bcc(codegendata *cd, s4 label, s4 condition, u4 options);
-
-void emit_label_br(codegendata *cd, s4 label);
-
-#if SUPPORT_BRANCH_CONDITIONAL_ONE_INTEGER_REGISTER
-void emit_label_beqz(codegendata *cd, s4 label, s4 reg);
-#endif
-
-#if SUPPORT_BRANCH_CONDITIONAL_CONDITION_REGISTER
-void emit_label_beq(codegendata *cd, s4 label);
-void emit_label_bne(codegendata *cd, s4 label);
-void emit_label_blt(codegendata *cd, s4 label);
-void emit_label_bge(codegendata *cd, s4 label);
-void emit_label_bgt(codegendata *cd, s4 label);
-void emit_label_ble(codegendata *cd, s4 label);
-#endif
-
-/* machine dependent branch-emitting function */
-void emit_branch(codegendata *cd, s4 disp, s4 condition, s4 reg, u4 options);
-
-void emit_arithmetic_check(codegendata *cd, instruction *iptr, s4 reg);
-void emit_arrayindexoutofbounds_check(codegendata *cd, instruction *iptr, s4 s1, s4 s2);
-void emit_arraystore_check(codegendata *cd, instruction *iptr);
-void emit_classcast_check(codegendata *cd, instruction *iptr, s4 condition, s4 reg, s4 s1);
-void emit_nullpointer_check(codegendata *cd, instruction *iptr, s4 reg);
-void emit_exception_check(codegendata *cd, instruction *iptr);
-
-void emit_trap_compiler(codegendata *cd);
-void emit_trap_countdown(codegendata *cd, s4 *counter);
-uint32_t emit_trap(codegendata *cd);
-
-void emit_patcher_traps(jitdata *jd);
-
-void emit_verbosecall_enter(jitdata *jd);
-void emit_verbosecall_exit(jitdata *jd);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _EMIT_COMMON_H */
-
-
-/*
- * 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:
- * vim:noexpandtab:sw=4:ts=4:
- */
diff --git a/src/vm/jit/emit-common.hpp b/src/vm/jit/emit-common.hpp
new file mode 100644 (file)
index 0000000..f5d350f
--- /dev/null
@@ -0,0 +1,212 @@
+/* src/vm/jit/emit-common.hpp - common code emitter functions
+
+   Copyright (C) 2006, 2007 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.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2, or (at
+   your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   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., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+*/
+
+
+#ifndef _EMIT_COMMON_H
+#define _EMIT_COMMON_H
+
+#include "config.h"
+#include "vm/types.h"
+
+#include "arch.h"
+
+#include "vm/jit/codegen-common.h"
+#include "vm/jit/jit.hpp"
+
+
+/* branch labels **************************************************************/
+
+#define BRANCH_LABEL_1    1
+#define BRANCH_LABEL_2    2
+#define BRANCH_LABEL_3    3
+#define BRANCH_LABEL_4    4
+#define BRANCH_LABEL_5    5
+#define BRANCH_LABEL_6    6
+
+
+/* constant range macros ******************************************************/
+
+#if SIZEOF_VOID_P == 8
+
+# define IS_IMM8(c) \
+    (((s8) (c) >= -128) && ((s8) (c) <= 127))
+
+# define IS_IMM32(c) \
+    (((s8) (c) >= (-2147483647-1)) && ((s8) (c) <= 2147483647))
+
+#else
+
+# define IS_IMM8(c) \
+    (((s4) (c) >= -128) && ((s4) (c) <= 127))
+
+# define IS_IMM16(c) \
+    (((s4) (c) >= -32768) && ((s4) (c) <= 32767))
+
+#endif
+
+
+/* code generation functions **************************************************/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+s4 emit_load(jitdata *jd, instruction *iptr, varinfo *src, s4 tempreg);
+s4 emit_load_s1(jitdata *jd, instruction *iptr, s4 tempreg);
+s4 emit_load_s2(jitdata *jd, instruction *iptr, s4 tempreg);
+s4 emit_load_s3(jitdata *jd, instruction *iptr, s4 tempreg);
+
+#if SIZEOF_VOID_P == 4
+s4 emit_load_low(jitdata *jd, instruction *iptr, varinfo *src, s4 tempreg);
+s4 emit_load_s1_low(jitdata *jd, instruction *iptr, s4 tempreg);
+s4 emit_load_s2_low(jitdata *jd, instruction *iptr, s4 tempreg);
+s4 emit_load_s3_low(jitdata *jd, instruction *iptr, s4 tempreg);
+
+s4 emit_load_high(jitdata *jd, instruction *iptr, varinfo *src, s4 tempreg);
+s4 emit_load_s1_high(jitdata *jd, instruction *iptr, s4 tempreg);
+s4 emit_load_s2_high(jitdata *jd, instruction *iptr, s4 tempreg);
+s4 emit_load_s3_high(jitdata *jd, instruction *iptr, s4 tempreg);
+#endif
+
+void emit_store(jitdata *jd, instruction *iptr, varinfo *dst, s4 d);
+void emit_store_dst(jitdata *jd, instruction *iptr, s4 d);
+
+#if SIZEOF_VOID_P == 4
+void emit_store_low(jitdata *jd, instruction *iptr, varinfo *dst, s4 d);
+void emit_store_high(jitdata *jd, instruction *iptr, varinfo *dst, s4 d);
+#endif
+
+void emit_copy(jitdata *jd, instruction *iptr);
+
+void emit_iconst(codegendata *cd, s4 d, s4 value);
+void emit_lconst(codegendata *cd, s4 d, s8 value);
+
+/* branch-emitting functions */
+void emit_bccz(codegendata *cd, basicblock *target, s4 condition, s4 reg, u4 options);
+void emit_bcc(codegendata *cd, basicblock *target, s4 condition, u4 options);
+
+/* wrapper for unconditional branches */
+void emit_br(codegendata *cd, basicblock *target);
+
+/* wrappers for branches on one integer register */
+
+#if SUPPORT_BRANCH_CONDITIONAL_ONE_INTEGER_REGISTER
+void emit_beqz(codegendata *cd, basicblock *target, s4 reg);
+void emit_bnez(codegendata *cd, basicblock *target, s4 reg);
+void emit_bltz(codegendata *cd, basicblock *target, s4 reg);
+void emit_bgez(codegendata *cd, basicblock *target, s4 reg);
+void emit_bgtz(codegendata *cd, basicblock *target, s4 reg);
+void emit_blez(codegendata *cd, basicblock *target, s4 reg);
+#endif
+
+/* wrappers for branches on two integer registers */
+
+#if SUPPORT_BRANCH_CONDITIONAL_TWO_INTEGER_REGISTERS
+void emit_beq(codegendata *cd, basicblock *target, s4 s1, s4 s2);
+void emit_bne(codegendata *cd, basicblock *target, s4 s1, s4 s2);
+#endif
+
+/* wrappers for branches on condition codes */
+
+#if SUPPORT_BRANCH_CONDITIONAL_CONDITION_REGISTER
+void emit_beq(codegendata *cd, basicblock *target);
+void emit_bne(codegendata *cd, basicblock *target);
+void emit_blt(codegendata *cd, basicblock *target);
+void emit_bge(codegendata *cd, basicblock *target);
+void emit_bgt(codegendata *cd, basicblock *target);
+void emit_ble(codegendata *cd, basicblock *target);
+#endif
+
+#if SUPPORT_BRANCH_CONDITIONAL_UNSIGNED_CONDITIONS
+void emit_bult(codegendata *cd, basicblock *target);
+void emit_bule(codegendata *cd, basicblock *target);
+void emit_buge(codegendata *cd, basicblock *target);
+void emit_bugt(codegendata *cd, basicblock *target);
+#endif
+
+#if defined(__POWERPC__) || defined(__POWERPC64__)
+void emit_bnan(codegendata *cd, basicblock *target);
+#endif
+
+/* label-branches */
+void emit_label_bccz(codegendata *cd, s4 label, s4 condition, s4 reg, u4 options);
+void emit_label(codegendata *cd, s4 label);
+void emit_label_bcc(codegendata *cd, s4 label, s4 condition, u4 options);
+
+void emit_label_br(codegendata *cd, s4 label);
+
+#if SUPPORT_BRANCH_CONDITIONAL_ONE_INTEGER_REGISTER
+void emit_label_beqz(codegendata *cd, s4 label, s4 reg);
+#endif
+
+#if SUPPORT_BRANCH_CONDITIONAL_CONDITION_REGISTER
+void emit_label_beq(codegendata *cd, s4 label);
+void emit_label_bne(codegendata *cd, s4 label);
+void emit_label_blt(codegendata *cd, s4 label);
+void emit_label_bge(codegendata *cd, s4 label);
+void emit_label_bgt(codegendata *cd, s4 label);
+void emit_label_ble(codegendata *cd, s4 label);
+#endif
+
+/* machine dependent branch-emitting function */
+void emit_branch(codegendata *cd, s4 disp, s4 condition, s4 reg, u4 options);
+
+void emit_arithmetic_check(codegendata *cd, instruction *iptr, s4 reg);
+void emit_arrayindexoutofbounds_check(codegendata *cd, instruction *iptr, s4 s1, s4 s2);
+void emit_arraystore_check(codegendata *cd, instruction *iptr);
+void emit_classcast_check(codegendata *cd, instruction *iptr, s4 condition, s4 reg, s4 s1);
+void emit_nullpointer_check(codegendata *cd, instruction *iptr, s4 reg);
+void emit_exception_check(codegendata *cd, instruction *iptr);
+
+void emit_trap_compiler(codegendata *cd);
+void emit_trap_countdown(codegendata *cd, s4 *counter);
+uint32_t emit_trap(codegendata *cd);
+
+void emit_patcher_traps(jitdata *jd);
+
+void emit_verbosecall_enter(jitdata *jd);
+void emit_verbosecall_exit(jitdata *jd);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _EMIT_COMMON_H */
+
+
+/*
+ * 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:
+ * vim:noexpandtab:sw=4:ts=4:
+ */
index 55b34cb9891b085d81ad87c14aefd4b05854723b..96986f91deae92a8f9258d7bc087222bd93d7489 100644 (file)
@@ -56,7 +56,7 @@
 #include "vm/jit/asmpart.h"
 #include "vm/jit/codegen-common.h"
 #include "vm/jit/dseg.h"
-#include "vm/jit/emit-common.h"
+#include "vm/jit/emit-common.hpp"
 #include "vm/jit/jit.hpp"
 #include "vm/jit/linenumbertable.h"
 #include "vm/jit/parse.h"
index 2d63231c68fa0ac7a2fc0a3fd22d9bb7ae0237a5..5a1f886e3ce4d96504efc1c35b356bdefa26bcd0 100644 (file)
@@ -43,7 +43,7 @@
 #include "vm/jit/abi.h"
 #include "vm/jit/asmpart.h"
 #include "vm/jit/dseg.h"
-#include "vm/jit/emit-common.h"
+#include "vm/jit/emit-common.hpp"
 #include "vm/jit/jit.hpp"
 #include "vm/jit/patcher-common.h"
 #include "vm/jit/replace.hpp"
index 1087c6273fa91aeffc182f9bf9ad05df83389aee..67c554329aef650a081cf1dcbe16940946cf22af 100644 (file)
@@ -54,7 +54,7 @@
 #include "vm/jit/patcher-common.h"
 #include "vm/jit/dseg.h"
 #include "vm/jit/linenumbertable.h"
-#include "vm/jit/emit-common.h"
+#include "vm/jit/emit-common.hpp"
 #include "vm/jit/jit.hpp"
 #include "vm/jit/abi.h"
 #include "vm/jit/parse.h"
index 258fa6f17f729939d7c7d321609c8edcfe5e9c94..81fc1288f2d5ac61e799535cf29cbfecaccc7ccd 100644 (file)
@@ -35,7 +35,7 @@
 #include "vm/jit/builtin.hpp"
 
 #include "vm/jit/asmpart.h"
-#include "vm/jit/emit-common.h"
+#include "vm/jit/emit-common.hpp"
 #include "vm/jit/trace.hpp"
 #include "vm/jit/trap.h"
 
index 57b6002931b8f2f62cf5130ab110bf182a9ebe9c..19f1706a90b3b9edabdcf718d845540e0a313e2b 100644 (file)
@@ -52,7 +52,7 @@
 #include "vm/jit/asmpart.h"
 #include "vm/jit/codegen-common.h"
 #include "vm/jit/dseg.h"
-#include "vm/jit/emit-common.h"
+#include "vm/jit/emit-common.hpp"
 #include "vm/jit/jit.hpp"
 #include "vm/jit/linenumbertable.h"
 #include "vm/jit/patcher-common.h"
index 917733138144181f1a7bfa876c24481dd9411257..c7eea5e8d5fee42fc5c23f95ce7640301e40d701 100644 (file)
@@ -43,7 +43,7 @@
 #include "vm/jit/abi-asm.h"
 #include "vm/jit/asmpart.h"
 #include "vm/jit/dseg.h"
-#include "vm/jit/emit-common.h"
+#include "vm/jit/emit-common.hpp"
 #include "vm/jit/jit.hpp"
 #include "vm/jit/patcher-common.h"
 #include "vm/jit/replace.hpp"
index f4f0cf0bd67fee150596d206f21603b68b20e55b..0d29184276c0a9ec5180f5b98bfa69678bd48a84 100644 (file)
@@ -55,7 +55,7 @@
 #include "vm/jit/asmpart.h"
 #include "vm/jit/codegen-common.h"
 #include "vm/jit/dseg.h"
-#include "vm/jit/emit-common.h"
+#include "vm/jit/emit-common.hpp"
 #include "vm/jit/jit.hpp"
 #include "vm/jit/linenumbertable.h"
 #include "vm/jit/methodheader.h"
index 2ef0d7d1c6133cb654eb395c9e8f1cc5aa415786..c52c86146ef926c1d28f0f4eebb76dfe7fda543a 100644 (file)
@@ -44,7 +44,7 @@
 #include "vm/jit/asmpart.h"
 #include "vm/jit/codegen-common.h"
 #include "vm/jit/dseg.h"
-#include "vm/jit/emit-common.h"
+#include "vm/jit/emit-common.hpp"
 #include "vm/jit/jit.hpp"
 #include "vm/jit/replace.hpp"
 #include "vm/jit/trace.hpp"
index af3f008bf6fe92a612e31a2dd047cb23b4ec7a86..d3a5ba495239b477a3bfafdee797c43440221119 100644 (file)
@@ -56,7 +56,7 @@
 #include "vm/jit/asmpart.h"
 #include "vm/jit/codegen-common.h"
 #include "vm/jit/dseg.h"
-#include "vm/jit/emit-common.h"
+#include "vm/jit/emit-common.hpp"
 #include "vm/jit/jit.hpp"
 #include "vm/jit/linenumbertable.h"
 #include "vm/jit/parse.h"
index 088eeb75040ce1feda90c2bb74cc47dcf6a24f59..5eb86886a48b5e44af1061d0ca692fc198e4a9b3 100644 (file)
@@ -41,7 +41,7 @@
 
 #include "vm/jit/abi.h"
 #include "vm/jit/asmpart.h"
-#include "vm/jit/emit-common.h"
+#include "vm/jit/emit-common.hpp"
 #include "vm/jit/jit.hpp"
 #include "vm/jit/trace.hpp"
 #include "vm/jit/trap.h"
index 26daf82bb927c2072588c27d47a101f9732a8427..7b42a7e8f71a05a27366bbe1a4e9a6af79d3a399 100644 (file)
@@ -57,7 +57,7 @@
 #include "vm/jit/asmpart.h"
 #include "vm/jit/codegen-common.h"
 #include "vm/jit/dseg.h"
-#include "vm/jit/emit-common.h"
+#include "vm/jit/emit-common.hpp"
 #include "vm/jit/jit.hpp"
 #include "vm/jit/linenumbertable.h"
 #include "vm/jit/methodheader.h"
index 46ffbc4303df94a8cfcddb895218b2b31c20592e..e5b049a8be94d9638dec69d843eb22c50092ecbc 100644 (file)
@@ -44,7 +44,7 @@
 #include "vm/jit/abi-asm.h"
 #include "vm/jit/asmpart.h"
 #include "vm/jit/codegen-common.h"
-#include "vm/jit/emit-common.h"
+#include "vm/jit/emit-common.hpp"
 #include "vm/jit/jit.hpp"
 #include "vm/jit/patcher-common.h"
 #include "vm/jit/replace.hpp"
index 91d3025ae92b86ffc5223e4b1a3449d46d7cd594..e8dd622a706e8dd857d6096ed1bb0d5244775f49 100644 (file)
@@ -52,7 +52,7 @@
 #include "vm/jit/asmpart.h"
 #include "vm/jit/codegen-common.h"
 #include "vm/jit/dseg.h"
-#include "vm/jit/emit-common.h"
+#include "vm/jit/emit-common.hpp"
 #include "vm/jit/jit.hpp"
 #include "vm/jit/linenumbertable.h"
 #include "vm/jit/parse.h"
index 0b4f66491a762a6104fc6e2c2a174b36e14a307e..e7f8f379e6b21bfebf2ecf4a2e1fb8b8d7bcd2dd 100644 (file)
@@ -42,7 +42,7 @@
 #include "vm/jit/abi-asm.h"
 #include "vm/jit/asmpart.h"
 #include "vm/jit/dseg.h"
-#include "vm/jit/emit-common.h"
+#include "vm/jit/emit-common.hpp"
 #include "vm/jit/jit.hpp"
 #include "vm/jit/replace.hpp"
 
index 6827c385948a39c52cdb96378eecc18399219d2f..98e00bb584273a567fe5976dd9314993fd223d8a 100644 (file)
@@ -40,7 +40,7 @@
 #include "vm/jit/code.h"
 #include "vm/jit/codegen-common.h"
 #include "vm/jit/disass.h"
-#include "vm/jit/emit-common.h"
+#include "vm/jit/emit-common.hpp"
 #include "vm/jit/jit.hpp"
 #include "vm/jit/show.h"
 #include "vm/jit/stubs.hpp"
index 8934b6d83fd76e64e809b3bae7ae02fff266c37f..6835e08860de4197d7ff60db3178aa18b43389aa 100644 (file)
@@ -59,7 +59,7 @@
 #include "vm/jit/code.h"
 #include "vm/jit/codegen-common.h"
 #include "vm/jit/dseg.h"
-#include "vm/jit/emit-common.h"
+#include "vm/jit/emit-common.hpp"
 #include "vm/jit/jit.hpp"
 #include "vm/jit/linenumbertable.h"
 #include "vm/jit/methodheader.h"
index fe9a944d9db07e2396710efb5e808038cd10f8b5..0395d09b1bf4ebec9a9f0f80c62b87d8cd0b6889 100644 (file)
@@ -43,7 +43,7 @@
 #include "vm/jit/abi-asm.h"
 #include "vm/jit/asmpart.h"
 #include "vm/jit/codegen-common.h"
-#include "vm/jit/emit-common.h"
+#include "vm/jit/emit-common.hpp"
 #include "vm/jit/jit.hpp"
 #include "vm/jit/patcher-common.h"
 #include "vm/jit/replace.hpp"