Bug 158547

Summary: [ia64] Epilog counter (ar.ec) needs to be saved and restored for exceptions
Product: Base System Reporter: Marcel Moolenaar <marcel>
Component: ia64Assignee: Marcel Moolenaar <marcel>
Status: Closed Overcome By Events    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Marcel Moolenaar freebsd_committer freebsd_triage 2011-07-01 00:50:04 UTC
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.
Comment 1 Marcel Moolenaar freebsd_committer freebsd_triage 2014-08-26 03:30:45 UTC
ia64 has been removed from -current.