From: Rusty Russell Subject: Re: [PATCH 4 of 7] x86/paravirt: selectively save/restore regs around pvops calls Date: Thu, 29 Jan 2009 19:17:25 +1030 Message-ID: <200901291917.26601.rusty@rustcorp.com.au> References: <5849eb6475c1bbe5a6ca.1233182104@abulafia.goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5849eb6475c1bbe5a6ca.1233182104@abulafia.goop.org> Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org To: Jeremy Fitzhardinge Cc: Ingo Molnar , linux-kernel@vger.kernel.org, Xen-devel , the arch/x86 maintainers , Ian Campbell , Zachary Amsden , Ravikiran Thirumalai List-Id: xen-devel@lists.xenproject.org On Thursday 29 January 2009 09:05:04 Jeremy Fitzhardinge wrote: > +#define PV_SAVE_REGS(set) \ > + COND_PUSH(set, CLBR_RAX, rax); \ > + COND_PUSH(set, CLBR_RCX, rcx); \ > + COND_PUSH(set, CLBR_RDX, rdx); \ > + COND_PUSH(set, CLBR_RSI, rsi); \ > + COND_PUSH(set, CLBR_RDI, rdi); \ > + COND_PUSH(set, CLBR_R8, r8); \ > + COND_PUSH(set, CLBR_R9, r9); \ > + COND_PUSH(set, CLBR_R10, r10); \ > + COND_PUSH(set, CLBR_R11, r11) It's kind of messy. Can we do something clever here with token pasting? Cheers, Rusty.