diff options
author | midipix <writeonce@midipix.org> | 2015-04-01 21:57:10 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2015-04-01 21:57:10 -0400 |
commit | 21671a3d5059b9d55cbc6a98cf879e18678a654c (patch) | |
tree | 34f4b9e4387b218171970976a2edf92cdf9d2931 /gcc/config | |
parent | 84d07b425fcf5436443630c796593832f91d98de (diff) | |
download | cbb-gcc-4.6.4-21671a3d5059b9d55cbc6a98cf879e18678a654c.tar.bz2 cbb-gcc-4.6.4-21671a3d5059b9d55cbc6a98cf879e18678a654c.tar.xz |
midipix target implementation: finalize preliminary biarch support.
+ set default arch to m32/m64 for the i686- and x86_64- toolchains, respectively.
+ temporarily disable SEH for the i686-nt32-midipix target; this is needed since
the 32-bit PE assembler rejects .seh_proc, meaning that currently we cannot
even have 32-bit SEH support as a stub (adding the necessary assembler support
should be easy, as it already exists for the 64-bit Windows targets).
signed-off by Z. Gilboa; see copying.midipix (9cd0746c) for additional information.
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/i386/midipix.c | 17 | ||||
-rw-r--r-- | gcc/config/i386/midipix.h | 8 |
2 files changed, 15 insertions, 10 deletions
diff --git a/gcc/config/i386/midipix.c b/gcc/config/i386/midipix.c index 412ebfcbb..bb05cc105 100644 --- a/gcc/config/i386/midipix.c +++ b/gcc/config/i386/midipix.c @@ -19,6 +19,7 @@ /* */ /*****************************************************************************/ + #include "config.h" #include "system.h" #include "coretypes.h" @@ -29,6 +30,7 @@ #include "flags.h" #include "target.h" #include "i386-protos.h" +#include "function.h" /* common specs */ const int TARGET_NOP_FUN_DLLIMPORT = 0; @@ -36,14 +38,8 @@ const int use_pe_aligned_common = 1; const int flag_writable_rel_rdata = 0; /* target SEH providers */ -#define TARGET_SEH_WINNT (TARGET_NT64 && flag_unwind_tables) -#define TARGET_SEH_MIDIPIX (TARGET_NT32 && flag_unwind_tables) - -#undef TARGET_SEH_WINNT -#undef TARGET_SEH_MIDIPIX - -#define TARGET_SEH_WINNT (TARGET_NT64) -#define TARGET_SEH_MIDIPIX (TARGET_NT32) +#define TARGET_SEH_WINNT (TARGET_SEH && TARGET_NT64) +#define TARGET_SEH_MIDIPIX (TARGET_SEH && TARGET_NT32) /* 64-bit seh provided by winnt */ void winnt_x86_64_pe_seh_init(FILE *); @@ -407,7 +403,10 @@ void midipix_i386_pe_start_function (FILE * gas_exhaled, const char *name, tree void midipix_i386_pe_end_function (FILE * gas_exhaled, const char * name, tree decl) { - i386_pe_end_function (gas_exhaled, name, decl); + if ((!TARGET_SEH) || (cfun->is_thunk)) + return; + + fputs ("\t.seh_endproc\n", gas_exhaled); #ifdef MIDIPIX_TARGET_DEBUG fputs ("\t# </", gas_exhaled); diff --git a/gcc/config/i386/midipix.h b/gcc/config/i386/midipix.h index 765657365..4abcda1f7 100644 --- a/gcc/config/i386/midipix.h +++ b/gcc/config/i386/midipix.h @@ -22,6 +22,12 @@ #include <stdio.h> #include "coretypes.h" +#if TARGET_64BIT_DEFAULT +#define MULTILIB_DEFAULTS { "m64" } +#else +#define MULTILIB_DEFAULTS { "m32" } +#endif + /* identify targets */ #define TARGET_NT64 (TARGET_64BIT) @@ -30,7 +36,7 @@ /* target constraints */ #undef TARGET_SEH -#define TARGET_SEH (flag_unwind_tables) +#define TARGET_SEH (TARGET_NT64 && flag_unwind_tables) #undef MAX_OFILE_ALIGNMENT #define MAX_OFILE_ALIGNMENT (8 * (2 * 4096)) |