Bug 369851 - Calling movnti without sfence
Calling movnti without sfence
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
7
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
http://sources.redhat.com/ml/libc-alp...
:
Depends On:
Blocks: 418441
  Show dependency treegraph
 
Reported: 2007-11-07 11:45 EST by H.J. Lu
Modified: 2008-04-10 07:20 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-10 07:20:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
A patch to add sfence after movnti (343 bytes, patch)
2007-11-07 11:45 EST, H.J. Lu
no flags Details | Diff

  None (edit)
Description H.J. Lu 2007-11-07 11:45:54 EST
While working on improving x86-64 memset, I noticed that movnti
is called without sfence:

11: 
        movnti  %r8,(%rcx)
        movnti  %r8,0x8(%rcx)
        movnti  %r8,0x10(%rcx)
        movnti  %r8,0x18(%rcx)
        movnti  %r8,0x20(%rcx)
        movnti  %r8,0x28(%rcx)
        movnti  %r8,0x30(%rcx)
        movnti  %r8,0x38(%rcx)
        add     $0x40,%rcx
        dec     %rax
        jne     11b
        jmp     4b

It should be

11: 
        movnti  %r8,(%rcx)
        movnti  %r8,0x8(%rcx)
        movnti  %r8,0x10(%rcx)
        movnti  %r8,0x18(%rcx)
        movnti  %r8,0x20(%rcx)
        movnti  %r8,0x28(%rcx)
        movnti  %r8,0x30(%rcx)
        movnti  %r8,0x38(%rcx)
        add     $0x40,%rcx
        dec     %rax
        jne     11b
	sfence
        jmp     4b
Comment 1 H.J. Lu 2007-11-07 11:45:54 EST
Created attachment 250381 [details]
A patch to add sfence after movnti
Comment 2 Ulrich Drepper 2007-11-07 20:07:17 EST
Added upstream.
Comment 3 Jakub Jelinek 2008-04-10 07:20:18 EDT
And fixed in rawhide too.

Note You need to log in before you can comment on or make changes to this bug.