From: Dong, E. <edd...@in...> - 2008-03-05 02:36:34
|
Isaku Yamahata wrote: > On Wed, Mar 05, 2008 at 08:16:36AM +0800, Dong, Eddie wrote: >> Remove rest mailinglist since it is an implementation detail >> argument that may confuse more people. > > kvm-ia64-devel-request seems to be accidentaly added. I dropped it. > > >>> In fact specifying "out0", "out1", ... as clobbered registers >>> in inline assembler code, gcc allocates them. and we can clobber >>> those registers. >>> >>> However we can't clobber stacked registers out of specified ones >>> so that its conversion differs from C function calling one. >>> For example >>> func() >>> // out0 and out1 are allocated. >>> paravirt_get_cpuid(index); >>> // asm volatile ("..." >> >> We can add "mov out0=out0" here, >> I saw it works using a simple code for reference. >> >> >> Or we can use following code more effectively: >> >> .pushsection .parasections;\t .long ...; mov out0=out0;; .long >> ...;\t.popsection > > Great. Clever idea. > > >> It seems there is a bug in AS binutil. > > That's bad. How about inserting dummy labels before .pushsection and > after .popsection? Or make the dummy instruction explicitly occupy > full one bundle like { mov out0=out0;;nop;nop; }. > Does it make difference? Using dummy instruction with label works (the special section can have the label address). So we can solve the issue. If AS bug is fixed, that is perfect, otherwise we pay with a dummy instruction in text section. Let us move focus to complete the whole proposal and our roadmap to push patch out. I will share some more details thinking with your guys tomorrow. Eddie |