OSDN Git Service

* except.c (expand_start_all_catch): If the machine needs a
[pf3gnuchains/gcc-fork.git] / gcc / bi-run.h
index ff4b083..dc9192f 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions for Bytecode Interpreter.
-   Copyright (C) 1993 Free Software Foundation, Inc.
+   Copyright (C) 1993, 1994 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -15,7 +15,8 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with GNU CC; see the file COPYING.  If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
 
 #define MAXLITERALS 5
 
@@ -101,7 +102,7 @@ struct bytecode
    The above applies to BYTE_LOW_ENDIAN machines. In BYTE_BIG_ENDIAN machines, the
    bit numbering is reversed (i.e. bit 0 is the sign bit).
 
-   (Alright, so I drew this to keep my tongue in cheek while writing the code below,
+   (Alright, so I drew this to keep my tongue in cheek while writing the code below,
     not because I'm into ASCII art.) */
 
 
@@ -124,30 +125,23 @@ struct bytecode
    DEST offset by OFFSET bits. */
 
 
-#ifdef BYTES_BIG_ENDIAN
-
 #define SHIFT_IN_BITS(DEST, SOURCE, OFFSET, NBITS)             \
   (DEST = ((DEST) << (NBITS))                                  \
    | (LM ((NBITS))                                             \
-      & ((SOURCE) >> (INTERP_BPC - (OFFSET) - (NBITS)))))
+      & ((SOURCE)                                              \
+        >> (BYTES_BIG_ENDIAN                                   \
+            ? (INTERP_BPC - (OFFSET) - (NBITS))                \
+            : (OFFSET)))))
 
 #define OR_IN_BITS(DEST, VALUE, OFFSET, NBITS)                 \
-  (DEST = ((DEST) & ~(LM ((NBITS)) << (INTERP_BPC - (OFFSET) - (NBITS))))      \
-   | (((VALUE) & LM ((NBITS))) << (INTERP_BPC - (OFFSET) - (NBITS))))
-
-#else
-
-#define SHIFT_IN_BITS(DEST, SOURCE, OFFSET, NBITS)             \
-  (DEST = ((DEST) << (NBITS))                                  \
-   | (LM ((NBITS))                                             \
-      & ((SOURCE) >> (OFFSET))))
-
-#define OR_IN_BITS(DEST, VALUE, OFFSET, NBITS)                 \
-  (DEST = ((DEST) & ~(LM ((NBITS)) << (OFFSET)))               \
-   | (((VALUE) & LM ((NBITS))) << (OFFSET)))
-
-#endif
-
+  (DEST = ((DEST) & ~(LM ((NBITS))                             \
+                     << (BIG_ENDIAN                            \
+                         ? (INTERP_BPC - (OFFSET) - (NBITS))   \
+                         : (OFFSET)))                          \
+   | (((VALUE) & LM ((NBITS)))                                 \
+      << (BIG_ENDIAN                                           \
+         ? (INTERP_BPC - (OFFSET) - (NBITS))                   \
+         : (OFFSET)))))
 
 /* Procedure call; arguments are a pointer to the function to be called,
    a pointer to a place to store the return value, a pointer to a vector