summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-03-11 07:29:07 -0400
committermidipix <writeonce@midipix.org>2019-03-12 02:53:39 -0400
commit5f10cda1cd800017cac6f3fd7b4c9d88d306bb2d (patch)
tree757405bb0e359127abef9984994b330aa0200e78
parenteb6ea6e659f8c46a2730866a8ec9f01cbe856a43 (diff)
downloadcbb-gcc-4.6.4-5f10cda1cd800017cac6f3fd7b4c9d88d306bb2d.tar.bz2
cbb-gcc-4.6.4-5f10cda1cd800017cac6f3fd7b4c9d88d306bb2d.tar.xz
midipix targets: finalized and integrated SEH support.
-rw-r--r--gcc/config.gcc5
-rw-r--r--gcc/config/i386/midipix.c7
-rw-r--r--gcc/config/i386/midipix.h12
-rw-r--r--gcc/config/i386/t-midipix-eh28
4 files changed, 51 insertions, 1 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 945789738..3121d534e 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2820,7 +2820,10 @@ m32c-*-elf*)
xm_defines=
tm_defines=
- tmake_file="i386/t-midipix t-slibgcc i386/t-gmm_malloc i386/t-i386 i386/t-fprules-softfp soft-fp/t-softfp"
+ tmake_eh_file=i386/t-midipix-eh
+ tmake_file="${tmake_file} ${tmake_eh_file} i386/t-midipix"
+ tmake_file="${tmake_file} t-slibgcc i386/t-gmm_malloc"
+ tmake_file="${tmake_file} i386/t-i386 i386/t-fprules-softfp soft-fp/t-softfp"
target_gtfiles="\$(srcdir)/config/i386/winnt.c \$(srcdir)/config/i386/midipix.c"
diff --git a/gcc/config/i386/midipix.c b/gcc/config/i386/midipix.c
index 1636911b5..a8a1b615f 100644
--- a/gcc/config/i386/midipix.c
+++ b/gcc/config/i386/midipix.c
@@ -406,6 +406,13 @@ void midipix_i386_pe_seh_unwind_emit(
}
+enum unwind_info_type midipix_except_unwind_info(struct gcc_options * opts)
+{
+ (void)opts;
+ return UI_SEH;
+}
+
+
section * midipix_i386_pe_function_section (
tree decl,
enum node_frequency freq,
diff --git a/gcc/config/i386/midipix.h b/gcc/config/i386/midipix.h
index f87cdc5c5..73d5a3a62 100644
--- a/gcc/config/i386/midipix.h
+++ b/gcc/config/i386/midipix.h
@@ -57,6 +57,15 @@
#undef TARGET_SEH
#define TARGET_SEH (TARGET_NT64 && flag_unwind_tables)
+#undef TARGET_EXCEPT_UNWIND_INFO
+#define TARGET_EXCEPT_UNWIND_INFO midipix_except_unwind_info
+
+#undef TARGET_PERSONALITY_FUNCTION
+#define TARGET_PERSONALITY_FUNCTION
+
+#undef TARGET_PERSONALITY_FUNCTION_MIDIPIX
+#define TARGET_PERSONALITY_FUNCTION_MIDIPIX
+
#undef MAX_OFILE_ALIGNMENT
#define MAX_OFILE_ALIGNMENT (8 * (2 * 4096))
@@ -406,6 +415,9 @@ extern void midipix_asm_output_dwarf_offset (FILE * asmout, unsigned size, cons
extern unsigned int midipix_dbx_get_register_number (unsigned int n);
extern unsigned int midipix_dbx_get_dwarf_frame_register_number (unsigned int n);
+extern enum unwind_info_type midipix_except_unwind_info(
+ struct gcc_options * opts);
+
extern section * midipix_i386_pe_function_section(
tree decl,
enum node_frequency freq,
diff --git a/gcc/config/i386/t-midipix-eh b/gcc/config/i386/t-midipix-eh
new file mode 100644
index 000000000..9bca6ec38
--- /dev/null
+++ b/gcc/config/i386/t-midipix-eh
@@ -0,0 +1,28 @@
+###############################################################################
+## ##
+## midipix target-specific build recipes ##
+## ##
+## Copyright (C) 2014--2019 Z. Gilboa ##
+## ##
+## This program is free software: you can redistribute it and/or modify ##
+## it under the terms of the GNU General Public License as published by ##
+## the Free Software Foundation, either version 3 of the License, or ##
+## (at your option) any later version. ##
+## ##
+## This program is distributed in the hope that it will be useful, ##
+## but WITHOUT ANY WARRANTY; without even the implied warranty of ##
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ##
+## GNU General Public License for more details. ##
+## ##
+## You should have received a copy of the GNU General Public License ##
+## along with this program. If not, see <http://www.gnu.org/licenses/>. ##
+## ##
+###############################################################################
+
+# framework-provided exception handling used by all midipix targets, no suffix
+EH_MODEL =
+
+# midipix exception handling
+UNWIND_H = $(srcdir)/unwind-midipix.h
+LIB2ADDEH = $(srcdir)/unwind-midipix.c
+LIB2ADDEHDEP = $(srcdir)/unwind-midipix.h $(srcdir)/unwind-c.c