**/.gitignore: Push patterns downwards, and format.
[catacomb] / symm / chacha-x86ish-sse2.S
index 0989fd4..b8f72d5 100644 (file)
 ///--------------------------------------------------------------------------
 /// Main code.
 
-       .arch pentium4
        .text
 
+FUNC(chacha_core_x86ish_avx)
+       .arch   .avx
+       vzeroupper
+  endprologue
+       // drop through...
+ENDFUNC
+
+       .arch   pentium4
+
 FUNC(chacha_core_x86ish_sse2)
 
        // Initial setup.
 
 #if CPUFAM_X86
        // Arguments come in on the stack, and will need to be collected.  We
-       // we can get away with just the scratch registers for integer work,
-       // but we'll run out of XMM registers and will need some properly
-       // aligned space which we'll steal from the stack.  I don't trust the
-       // stack pointer's alignment, so I'll have to mask the stack pointer,
-       // which in turn means I'll need to keep track of the old value.
-       // Hence I'm making a full i386-style stack frame here.
+       // can get away with just the scratch registers for integer work, but
+       // we'll run out of XMM registers and will need some properly aligned
+       // space which we'll steal from the stack.  I don't trust the stack
+       // pointer's alignment, so I'll have to mask the stack pointer, which
+       // in turn means I'll need to keep track of the old value.  Hence I'm
+       // making a full i386-style stack frame here.
        //
        // The Windows and SysV ABIs are sufficiently similar that we don't
        // need to worry about the differences here.