From 51356f864933f664f7dfbf6e25ddcd97b587441a Mon Sep 17 00:00:00 2001 From: ian Date: Wed, 16 Nov 1994 21:10:09 +0000 Subject: Check target endianness at run time, not compile time git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@8470 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/bytecode.h | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) (limited to 'gcc/bytecode.h') diff --git a/gcc/bytecode.h b/gcc/bytecode.h index 87030bef698..e2dc73a5fff 100644 --- a/gcc/bytecode.h +++ b/gcc/bytecode.h @@ -24,28 +24,17 @@ extern int max_stack_depth; /* Emit DI constant according to target machine word ordering */ -#if WORDS_BIG_ENDIAN - #define bc_emit_bytecode_DI_const(CST) \ { int opcode; \ - opcode = TREE_INT_CST_HIGH (CST); \ + opcode = (WORDS_BIG_ENDIAN \ + ? TREE_INT_CST_HIGH (CST) \ + : TREE_INT_CST_LOW (CST)); \ bc_emit_bytecode_const ((char *) &opcode, sizeof opcode); \ - opcode = TREE_INT_CST_LOW (CST); \ + opcode = (WORDS_BIG_ENDIAN \ + ? TREE_INT_CST_LOW (CST) \ + : TREE_INT_CST_HIGH (CST)); \ bc_emit_bytecode_const ((char *) &opcode, sizeof opcode); \ } - -#else - -#define bc_emit_bytecode_DI_const(CST) \ -{ int opcode; \ - opcode = TREE_INT_CST_LOW (CST); \ - bc_emit_bytecode_const ((char *) &opcode, sizeof opcode); \ - opcode = TREE_INT_CST_HIGH (CST); \ - bc_emit_bytecode_const ((char *) &opcode, sizeof opcode); \ -} - -#endif - extern void bc_expand_expr (); extern void bc_output_data_constructor (); -- cgit v1.2.1