* Merged in twisti-branch.
[cacao.git] / src / vm / jit / alpha / md.c
index 8fdd0d3c871b6329665b0ae812c63724b616cca3..7613ebc2b6a34792cceac8b2bda5257464ff7ce8 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md.c 7520 2007-03-14 21:16:04Z twisti $
+   $Id: md.c 7565 2007-03-23 23:48:34Z twisti $
 
 */
 
@@ -47,7 +47,6 @@ extern void ieee_set_fp_control(unsigned long fp_control);
 #include "vm/stringlocal.h"
 
 #include "vm/jit/asmpart.h"
-#include "vm/jit/codegen-common.h" /* REMOVE ME: for codegendata */
 #include "vm/jit/stacktrace.h"
 
 #if !defined(NDEBUG) && defined(ENABLE_DISASSEMBLER)
@@ -90,42 +89,6 @@ void md_init(void)
 }
 
 
-/* md_codegen_patch_branch *****************************************************
-
-   Back-patches a branch instruction.
-
-*******************************************************************************/
-
-void md_codegen_patch_branch(codegendata *cd, s4 branchmpc, s4 targetmpc)
-{
-       s4 *mcodeptr;
-       s4  mcode;
-       s4  disp;                           /* branch displacement                */
-
-       /* calculate the patch position */
-
-       mcodeptr = (s4 *) (cd->mcodebase + branchmpc);
-
-       /* get the instruction before the exception point */
-
-       mcode = mcodeptr[-1];
-
-       /* Calculate the branch displacement.  For branches we need a
-          displacement relative and shifted to the branch PC. */
-
-       disp = (targetmpc - branchmpc) >> 2;
-
-       /* check branch displacement */
-
-       if ((disp < (s4) 0xffe00000) || (disp > (s4) 0x001fffff))
-               vm_abort("branch displacement is out of range: %d > +/-%d", disp, 0x001fffff);
-
-       /* patch the branch instruction before the mcodeptr */
-
-       mcodeptr[-1] |= (disp & 0x001fffff);
-}
-
-
 /* md_stacktrace_get_returnaddress *********************************************
 
    Returns the return address of the current stackframe, specified by
@@ -361,6 +324,7 @@ void md_patch_replacement_point(codeinfo *code, s4 index, rplpoint *rp, u1 *save
 }
 #endif /* defined(ENABLE_REPLACEMENT) */
 
+
 /*
  * 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