Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jun 2011 23:44:29 GMT
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ia64/158547: [ia64] Epilog counter (ar.ec) needs to be saved and restored for exceptions
Message-ID:  <201106302344.p5UNiTXv055671@red.freebsd.org>
Resent-Message-ID: <201106302350.p5UNo4Z4084213@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         158547
>Category:       ia64
>Synopsis:       [ia64] Epilog counter (ar.ec) needs to be saved and restored for exceptions
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ia64
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 30 23:50:04 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Marcel Moolenaar
>Release:        -CURRENT
>Organization:
>Environment:
FreeBSD eris.freebsd.org 9.0-CURRENT FreeBSD 9.0-CURRENT #1 r223702M: Thu Jun 30 23:04:04 UTC 2011     marcel@eris.freebsd.org:/usr/obj/tank/usr/src/sys/ERIS  ia64
>Description:
The epilog counter (ar.ec) is implicitly saved and restored across function calls. The counter is saved in the previous frame register. Consequently, synchronous context switches do not need to save/restore this register.

For asynchronous context switches this is obviously not the case. Currently we do not save ar.ec in "exception_save" and we do not restore ar.ec in "exception_restore". SInce the GCC version in the source tree does not generate modulo-scheduled loops with the default options, ar.ec is typically not used. But as soon as GCC generates these loops are a different compiler is used, programs will misbehave and generally fail unless we save and restore ar.ec.

>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106302344.p5UNiTXv055671>