From 2e48a94389778ba2bd6de468479680f297e5c4e5 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 25 Oct 2004 15:47:52 +0000 Subject: [PATCH] 2004-10-25 David Mosberger-Tang * config/tc-ia64.c (fixup_unw_records): Don't let the "t" value in an epilogue directive go negative. --- gas/ChangeLog | 5 +++++ gas/config/tc-ia64.c | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 0840103a32..22fe267b7a 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2004-10-25 David Mosberger-Tang + + * config/tc-ia64.c (fixup_unw_records): Don't let the "t" value + in an epilogue directive go negative. + 2004-10-25 H.J. Lu PR 474 diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c index b18b0ea0c8..fb1be78f53 100644 --- a/gas/config/tc-ia64.c +++ b/gas/config/tc-ia64.c @@ -2747,7 +2747,13 @@ fixup_unw_records (list, before_relax) break; } case epilogue: - ptr->r.record.b.t = rlen - 1 - t; + if (t < rlen) + ptr->r.record.b.t = rlen - 1 - t; + else + /* This happens when a memory-stack-less procedure uses a + ".restore sp" directive at the end of a region to pop + the frame state. */ + ptr->r.record.b.t = 0; break; case mem_stack_f: -- 2.11.0