From fccefb39fa0e3610d7f2641a1106cfb6a3e59de5 Mon Sep 17 00:00:00 2001 From: Clifford Matthews Date: Mon, 8 Jun 2009 11:19:51 -0600 Subject: [PATCH] Removed BROKEN_SIZE_32 (no longer needed now that we use local labels) --- runtime/native/i386/process.c | 20 -------------------- runtime/native/i386/template.c | 6 +++--- runtime/native/i386/template.h | 2 +- 3 files changed, 4 insertions(+), 24 deletions(-) diff --git a/runtime/native/i386/process.c b/runtime/native/i386/process.c index ac27921..459bd45 100644 --- a/runtime/native/i386/process.c +++ b/runtime/native/i386/process.c @@ -291,20 +291,6 @@ typedef struct long value[MAX_VALUE_SET_ENTRIES]; } value_set_t; -/* - * The addition of BROKEN_SIZE_32 (see template.h) and - * immediate_values[3] is a hacky workaround for Mac OS X's ld which - * doesn't recognize 0x80000000 (-2147483648) as a legitimate 32-bit - * relocatable offset. This prevents calls and jumps from being - * properly analyzed. - * - * For now we sacrifice the analysis of that bit pattern in the few - * template entries that would normally have it. We currently do this - * unconditionally because nobody has yet written a configure macro to - * detect this problem and then only use "BROKEN_SIZE_32" when we have - * a broken ld. - */ - static int create_asmdata (const template_t *t, int num_operands) { @@ -319,12 +305,6 @@ create_asmdata (const template_t *t, int num_operands) 0x1234, 0x8765, 0x7FFFFFFF, 0x80000000, 0x80000001, 0xFFFFFFFF, 0xFFFFFFFE, 0x871529, 0x392332, 0xFA034433, 0x12345678, 0x87654321 } }, - { 32, { 0, 1, 2, 0xFF, 0xFE, 128, -129, 127, -128, -127, 0x37, -100, - 0x12, -97, - 32767, -32768, -32767, -1, 0xFFFE, 0x871, 0xFA03, - 0x1234, 0x8765, 0x7FFFFFFF, 0x80000001, - 0xFFFFFFFF, 0xFFFFFFFE, 0x871529, 0x392332, 0xFA034433, - 0x12345678, 0x87654321 } } }; #if 0 /* Explanation of this warning: diff --git a/runtime/native/i386/template.c b/runtime/native/i386/template.c index deeef50..c23fe92 100644 --- a/runtime/native/i386/template.c +++ b/runtime/native/i386/template.c @@ -628,7 +628,7 @@ const template_t template[] = { "i386_call_abs", "", "", "", "volatile", "v", "call L%P0", { "addr" }, - { { BROKEN_SIZE_32, CONSTANT, IN } } }, + { { SIZE_32, CONSTANT, IN } } }, { "i386_cbtw", "", "", "(reg8 AL)", "(reg16 AX)", "-", "cbtw", @@ -711,7 +711,7 @@ const template_t template[] = { "i386_" op, flags, "", "", "volatile", "v", \ op " L%P0", \ { "target" }, \ - { { BROKEN_SIZE_32, CONSTANT, IN } } } + { { SIZE_32, CONSTANT, IN } } } CONDL_BRANCH ("jc", "c"), CONDL_BRANCH ("jbe", "cz"), @@ -731,7 +731,7 @@ const template_t template[] = { "i386_jmp", "", "", "", "volatile", "v", "jmp L%P0", { "target" }, - { { BROKEN_SIZE_32, CONSTANT, IN } } }, + { { SIZE_32, CONSTANT, IN } } }, { "i386_jmp_reg", "", "", "", "volatile", "-", "jmp *%0", { "target" }, diff --git a/runtime/native/i386/template.h b/runtime/native/i386/template.h index c01f1fb..df58710 100644 --- a/runtime/native/i386/template.h +++ b/runtime/native/i386/template.h @@ -21,7 +21,7 @@ typedef enum 0x80000000 (-2147483648) as a legitimate 32-bit relative offset. See the extended comment in process.c for more info */ -typedef enum { SIZE_8, SIZE_16, SIZE_32, BROKEN_SIZE_32 } byte_size_t; +typedef enum { SIZE_8, SIZE_16, SIZE_32 } byte_size_t; typedef struct {