Messages in this thread | | | Subject | Re: [PATCH v13 8/9] Add 32 bit VDSO time support for 32 bit kernel | From | Stefani Seibold <> | Date | Sun, 09 Feb 2014 09:15:33 +0100 |
| |
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
| |