diff options
| author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-18 22:53:06 +0000 |
|---|---|---|
| committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-18 22:53:06 +0000 |
| commit | 3a4ac980e9bd63dcbdc812b664fd999e00e5d5d8 (patch) | |
| tree | 36973099df56b9dc18ee3e916ade49d51b6947c0 | |
| parent | 1e7251a7f5dc5d8a73d2da30ab9d68e5e93d0d3f (diff) | |
| download | ppe42-gcc-3a4ac980e9bd63dcbdc812b664fd999e00e5d5d8.tar.gz ppe42-gcc-3a4ac980e9bd63dcbdc812b664fd999e00e5d5d8.zip | |
* config/ia64/unwind-ia64.c (_Unwind_GetCFA): New.
(_Unwind_FindEnclosingFunction): Implement.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68168 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/config/ia64/unwind-ia64.c | 19 |
2 files changed, 23 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1e942f6d2a9..c78a88340de 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-06-18 Richard Henderson <rth@redhat.com> + + * config/ia64/unwind-ia64.c (_Unwind_GetCFA): New. + (_Unwind_FindEnclosingFunction): Implement. + 2003-06-18 Kazu Hirata <kazu@cs.umass.edu> * toplev.c (rest_of_handle_sched): Hide the entire function if diff --git a/gcc/config/ia64/unwind-ia64.c b/gcc/config/ia64/unwind-ia64.c index 573a84a75ce..9b6023da58a 100644 --- a/gcc/config/ia64/unwind-ia64.c +++ b/gcc/config/ia64/unwind-ia64.c @@ -1647,7 +1647,24 @@ _Unwind_GetRegionStart (struct _Unwind_Context *context) void * _Unwind_FindEnclosingFunction (void *pc) { - return NULL; + struct unw_table_entry *ent; + unsigned long segment_base, gp; + + ent = _Unwind_FindTableEntry (pc, &segment_base, &gp); + if (ent == NULL) + return NULL; + else + return (void *)(segment_base + ent->start_offset); +} + +/* Get the value of the CFA as saved in CONTEXT. In GCC/Dwarf2 parlance, + the CFA is the value of the stack pointer on entry; In IA-64 unwind + parlance, this is the PSP. */ + +_Unwind_Word +_Unwind_GetCFA (struct _Unwind_Context *context) +{ + return (_Unwind_Ptr) context->psp; } |

