Re: [PATCH] x86: clean up after: move entry_64.S register savingout of the macros

From: Ingo Molnar
Date: Thu Nov 20 2008 - 10:06:16 EST



* Alexander van Heukelum <heukelum@xxxxxxxxxxxxx> wrote:

> This add-on patch to x86: move entry_64.S register saving out of the
> macros visually cleans up the appearance of the code by introducing
> some basic helper macro's. It also adds some cfi annotations which
> were missing.
>
> Signed-off-by: Alexander van Heukelum <heukelum@xxxxxxxxxxx>
> ---
> arch/x86/kernel/entry_64.S | 220 ++++++++++++++++++++++----------------------
> 1 files changed, 112 insertions(+), 108 deletions(-)
>
> Hello Ingo,
>
> This patch improves the CFI-situation in entry_64.S, but restricted
> mostly to the areas touched by "x86: move entry_64.S register saving
> out of the macros". I'm sure there will be some small errors
> somewhere, but it compiles and runs fine.

very nice cleanup! This is exactly what should be done. Applied to
tip/x86/irq.

Note, i did a small rename:

cfi_pushq => pushq_cfi
cfi_popq => popq_cfi
cfi_store => movq_cfi

as the goal is to have the actual source code read mostly as regular
assembly code. The fact that the macro is equivalent to a
default-annotated pushq/popq/movq instruction is much more important
than the fact that it also does CFI annotations.

Also, while cfi_store is correct as well, the usual x86 assembly term
(and instruction used here) is movq.

Find below how the commit ended up looking like.

Thanks,

Ingo

----------------->