Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1457965

Re: [PATCH] x86/hweight: Don't clobber %rdi

From Borislav Petkov <bp@alien8.de>
Newsgroups linux.kernel
Subject Re: [PATCH] x86/hweight: Don't clobber %rdi
Date 2016-08-08 20:10 +0200
Message-ID <s3X9U-4P8-21@gated-at.bofh.it> (permalink)
References <s3WGR-4qo-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


+ jikos.

On Mon, Aug 08, 2016 at 08:35:29PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> The caller expects %rdi to remain intact, push+pop it make that happen.

Hmm, I've been staring at asm for the last hours and my head is spinning
now, so can you please point me at the exact where this happens. I can't
find it in x86_perf_event_update().

I'm guessing even though %rdi is callee-clobbered but since we're
spelling the asm for gcc, it can't know what happens to %rdi in order to
stash it away for the caller.

In any case, it is not a good idea to do the compiler's work. :-\

Thanks.

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] x86/hweight: Don't clobber %rdi ville.syrjala@linux.intel.com - 2016-08-08 19:40 +0200
  Re: [PATCH] x86/hweight: Don't clobber %rdi Linus Torvalds <torvalds@linux-foundation.org> - 2016-08-08 20:00 +0200
    Re: [PATCH] x86/hweight: Don't clobber %rdi Peter Zijlstra <peterz@infradead.org> - 2016-08-08 20:40 +0200
      Re: [PATCH] x86/hweight: Don't clobber %rdi Jiri Kosina <jikos@kernel.org> - 2016-08-08 21:00 +0200
        Re: [PATCH] x86/hweight: Don't clobber %rdi Borislav Petkov <bp@alien8.de> - 2016-08-08 21:40 +0200
  Re: [PATCH] x86/hweight: Don't clobber %rdi Borislav Petkov <bp@alien8.de> - 2016-08-08 20:10 +0200
    Re: [PATCH] x86/hweight: Don't clobber %rdi Linus Torvalds <torvalds@linux-foundation.org> - 2016-08-08 20:30 +0200
      Re: [PATCH] x86/hweight: Don't clobber %rdi Borislav Petkov <bp@alien8.de> - 2016-08-08 20:40 +0200
        Re: [PATCH] x86/hweight: Don't clobber %rdi Linus Torvalds <torvalds@linux-foundation.org> - 2016-08-08 20:50 +0200
          Re: [PATCH] x86/hweight: Don't clobber %rdi Borislav Petkov <bp@alien8.de> - 2016-08-08 21:00 +0200

csiph-web