From 7384101fef0cd443aa7bbc1ac079dd575f97b0f0 Mon Sep 17 00:00:00 2001 From: "Guillermo J. Rozas" Date: Fri, 20 Nov 1992 03:11:14 +0000 Subject: [PATCH] Add CC_BLOCK_ENTRY_DISTANCE for the C back end. --- v7/src/microcode/cmpint.c | 11 +++++++++-- v8/src/microcode/cmpint.c | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/v7/src/microcode/cmpint.c b/v7/src/microcode/cmpint.c index b528fa7bb..f96651e03 100644 --- a/v7/src/microcode/cmpint.c +++ b/v7/src/microcode/cmpint.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: cmpint.c,v 1.55 1992/11/18 05:18:24 gjr Exp $ +$Id: cmpint.c,v 1.56 1992/11/20 03:11:14 gjr Exp $ Copyright (c) 1989-1992 Massachusetts Institute of Technology @@ -2140,6 +2140,13 @@ DEFUN (compiled_entry_to_block, /* Returns the offset from the block to the entry point. */ +#ifndef CC_BLOCK_DISTANCE + +#define CC_BLOCK_DISTANCE(block,entry) \ + (((char *) (entry)) - ((char *) (block))) + +#endif /* CC_BLOCK_DISTANCE */ + C_UTILITY long DEFUN (compiled_entry_to_block_offset, (entry), @@ -2149,7 +2156,7 @@ DEFUN (compiled_entry_to_block_offset, entry_address = (OBJECT_ADDRESS (entry)); Get_Compiled_Block (block_address, entry_address); - return (((char *) entry_address) - ((char *) block_address)); + return (CC_BLOCK_DISTANCE (block_address, entry_address)); } /* diff --git a/v8/src/microcode/cmpint.c b/v8/src/microcode/cmpint.c index b528fa7bb..f96651e03 100644 --- a/v8/src/microcode/cmpint.c +++ b/v8/src/microcode/cmpint.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: cmpint.c,v 1.55 1992/11/18 05:18:24 gjr Exp $ +$Id: cmpint.c,v 1.56 1992/11/20 03:11:14 gjr Exp $ Copyright (c) 1989-1992 Massachusetts Institute of Technology @@ -2140,6 +2140,13 @@ DEFUN (compiled_entry_to_block, /* Returns the offset from the block to the entry point. */ +#ifndef CC_BLOCK_DISTANCE + +#define CC_BLOCK_DISTANCE(block,entry) \ + (((char *) (entry)) - ((char *) (block))) + +#endif /* CC_BLOCK_DISTANCE */ + C_UTILITY long DEFUN (compiled_entry_to_block_offset, (entry), @@ -2149,7 +2156,7 @@ DEFUN (compiled_entry_to_block_offset, entry_address = (OBJECT_ADDRESS (entry)); Get_Compiled_Block (block_address, entry_address); - return (((char *) entry_address) - ((char *) block_address)); + return (CC_BLOCK_DISTANCE (block_address, entry_address)); } /* -- 2.25.1