lkml.org 
[lkml]   [2014]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v13 8/9] Add 32 bit VDSO time support for 32 bit kernel
From
Date
Am Samstag, den 08.02.2014, 23:21 -0800 schrieb Andi Kleen:
> On Sat, Feb 08, 2014 at 09:22:30PM -0800, Andi Kleen wrote:
> > > +notrace static long vdso_fallback_gettime(long clock, struct timespec *ts)
> > > +{
> > > + long ret;
> > > +
> > > + asm(
> > > + "push %%ebx \n"
> > > + "mov %2,%%ebx \n"
> > > + "call VDSO32_vsyscall \n"
> > > + "pop %%ebx \n"
> > > + : "=a" (ret)
> > > + : "0" (__NR_clock_gettime), "d" (clock), "c" (ts)
> > > + : "memory");
> >
> > The push/mov/pop could be just replaced with "b"?
>
> Actually thinking about it more you likely did that to avoid errors
> with -fPIC right? In this case you still need to supply correct dwarf2
> unwind annotations.
>

Right... But i have no idea why and how to supply dwarf2 unwind
annotations. Can you give my some hints?

> Also this change is still needed:
>
> > Also I if this calls syscall.S:__kernel_vsyscall it clobbers more registers
> > (ecx at least?) and you need to describe that to gcc with a +
> >
> > Same in the other sys calls.
> >

ECX is still marked as clobberd as is in use for the second parameter.

All other registers will be saved by __kernel_vsyscall, expect the EAX
which is marked as in and out register in the asm() directive.

- Stefani




\
 
 \ /
  Last update: 2014-02-09 09:41    [W:0.063 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site