This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Calling movnti without sfence?


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

Is that intentional? Shouldn't it 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


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]