diff options
author | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-02-09 21:18:45 +0000 |
---|---|---|
committer | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-02-09 21:18:45 +0000 |
commit | 26093bf40b849dded0768685f8bf129d627a51b9 (patch) | |
tree | 7bf9232584860975a8b2d86f90808c9c7d818aa7 /gcc/except.c | |
parent | 671e5971ca634e3036bc5bd2cc72efef84782809 (diff) | |
download | gcc-26093bf40b849dded0768685f8bf129d627a51b9.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77554 138bc75d-0d04-0410-961f-82ee72b054a4
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 8c4c726cf1e..5d85e512358 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: |