This is the mail archive of the
mailing list for the libc-ports project.
Re: Add CFI information for MIPS assembly sources
- From: Roland McGrath <roland at hack dot frob dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: <libc-ports at sourceware dot org>, <macro at codesourcery dot com>
- Date: Thu, 7 Feb 2013 16:07:54 -0800 (PST)
- Subject: Re: Add CFI information for MIPS assembly sources
- References: <Pine.LNX.email@example.com>
> For SETUP_GP64 and RESTORE_GP64, the cfi_* directives are in the
> individual .S files rather than the macro definitions because the
> macros can be used to save the old gp value in either a register or a
> stack slot, and those need different CFI directives, so a single macro
> SETUP_GP64 can't handle both cases and generate CFI at the same time.
It seems much cleaner to define two pairs of macros for the two cases,
so that the macros can contain the CFI details too. Separating the code
from the CFI like you've done will always be error-prone. Using separate
macros is less total text, as well as less duplication of magic numbers.