diff options
author | James E Wilson <wilson@specifixinc.com> | 2004-02-09 21:18:45 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 2004-02-09 13:18:45 -0800 |
commit | c76362b488fac9643f1ca0d549ea6151fd28ba5b (patch) | |
tree | 7bf9232584860975a8b2d86f90808c9c7d818aa7 /gcc/except.c | |
parent | d886a0416470d04610d04f4af3b401532ea9cd4f (diff) | |
download | gcc-c76362b488fac9643f1ca0d549ea6151fd28ba5b.zip gcc-c76362b488fac9643f1ca0d549ea6151fd28ba5b.tar.gz gcc-c76362b488fac9643f1ca0d549ea6151fd28ba5b.tar.bz2 |
re PR libstdc++/5625 ([mips] exception unwinding creates invalid pointer on mips)
PR libstdc++/5625
* builtin-types.def (BT_WORD, BT_FN_WORD_PTR): New.
* builtins.c (expand_builtin): Handle BUILT_IN_EXTEND_POINTER.
* builtins.def (BUILT_IN_EXTEND_POINTER): New.
* except.c (expand_builtin_extend_pointer): New.
* except.h (expand_builtin_extend_pointer): Declare.
From-SVN: r77554
Diffstat (limited to 'gcc/except.c')
-rw-r--r-- | gcc/except.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/except.c b/gcc/except.c index 8c4c726..5d85e51 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -3076,6 +3076,26 @@ expand_eh_return (void) emit_label (around_label); } + +/* Convert a ptr_mode address ADDR_TREE to a Pmode address controlled by + POINTERS_EXTEND_UNSIGNED and return it. */ + +rtx +expand_builtin_extend_pointer (tree addr_tree) +{ + rtx addr = expand_expr (addr_tree, NULL_RTX, ptr_mode, 0); + int extend; + +#ifdef POINTERS_EXTEND_UNSIGNED + extend = POINTERS_EXTEND_UNSIGNED; +#else + /* The previous EH code did an unsigned extend by default, so we do this also + for consistency. */ + extend = 1; +#endif + + return convert_modes (word_mode, ptr_mode, addr, extend); +} /* In the following functions, we represent entries in the action table as 1-based indices. Special cases are: |