Bug 369851 - Calling movnti without sfence
Summary: Calling movnti without sfence
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 7
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL: http://sources.redhat.com/ml/libc-alp...
Whiteboard:
Depends On:
Blocks: 418441
TreeView+ depends on / blocked
 
Reported: 2007-11-07 16:45 UTC by H.J. Lu
Modified: 2008-04-10 11:20 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-04-10 11:20:18 UTC
Type: ---
Embargoed:


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

Description H.J. Lu 2007-11-07 16:45:54 UTC
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 16:45:54 UTC
Created attachment 250381 [details]
A patch to add sfence after movnti

Comment 2 Ulrich Drepper 2007-11-08 01:07:17 UTC
Added upstream.

Comment 3 Jakub Jelinek 2008-04-10 11:20:18 UTC
And fixed in rawhide too.


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