From owner-freebsd-ia64@FreeBSD.ORG Thu Jun 30 23:50:05 2011 Return-Path: Delivered-To: freebsd-ia64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 292FF1065674 for ; Thu, 30 Jun 2011 23:50:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E13CE8FC15 for ; Thu, 30 Jun 2011 23:50:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p5UNo4mM084214 for ; Thu, 30 Jun 2011 23:50:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p5UNo4Z4084213; Thu, 30 Jun 2011 23:50:04 GMT (envelope-from gnats) Resent-Date: Thu, 30 Jun 2011 23:50:04 GMT Resent-Message-Id: <201106302350.p5UNo4Z4084213@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ia64@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Marcel Moolenaar Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF4DC1065670 for ; Thu, 30 Jun 2011 23:44:29 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 9F67C8FC0A for ; Thu, 30 Jun 2011 23:44:29 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p5UNiTBi055672 for ; Thu, 30 Jun 2011 23:44:29 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p5UNiTXv055671; Thu, 30 Jun 2011 23:44:29 GMT (envelope-from nobody) Message-Id: <201106302344.p5UNiTXv055671@red.freebsd.org> Date: Thu, 30 Jun 2011 23:44:29 GMT From: Marcel Moolenaar To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ia64/158547: [ia64] Epilog counter (ar.ec) needs to be saved and restored for exceptions X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jun 2011 23:50:05 -0000 >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: