Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: md.c 7483 2007-03-08 13:17:40Z michi $
+ $Id: md.c 7596 2007-03-28 21:05:53Z twisti $
*/
}
-/* md_codegen_patch_branch *****************************************************
-
- Back-patches a branch instruction.
-
-*******************************************************************************/
-
-void md_codegen_patch_branch(codegendata *cd, s4 branchmpc, s4 targetmpc)
-{
- s4 *mcodeptr;
- s4 disp; /* branch displacement */
-
- /* calculate the patch position */
-
- mcodeptr = (s4 *) (cd->mcodebase + branchmpc);
-
- /* Calculate the branch displacement. */
-
- disp = targetmpc - branchmpc;
-
- /* I don't think we have to check for branch-displacement
- overflow. +/-2GB should be enough. */
-
- /* patch the branch instruction before the mcodeptr */
-
- mcodeptr[-1] = disp;
-}
-
-
/* md_stacktrace_get_returnaddress *********************************************
Returns the return address of the current stackframe, specified by