base/asm-common.h, *.S: Add `INTFUNC' macro for internal subroutines.
[catacomb] / math / mpx-mul4-x86-sse2.S
index 922de33..8f69a55 100644 (file)
 ///--------------------------------------------------------------------------
 /// Primitive multipliers and related utilities.
 
-       .p2align 4
-carryprop:
+INTFUNC(carryprop)
        // On entry, XMM4, XMM5, and XMM6 hold a 144-bit carry in an expanded
        // form.  Store the low 128 bits of the represented carry to [EDI] as
        // a packed 128-bit value, and leave the remaining 16 bits in the low
@@ -322,8 +321,9 @@ carryprop:
        endprop [edi + 12], xmm6, xmm4
        ret
 
-       .p2align 4
-dmul4:
+ENDFUNC
+
+INTFUNC(dmul4)
        // On entry, EDI points to the destination buffer; EAX and EBX point
        // to the packed operands U and X; ECX and EDX point to the expanded
        // operands V and Y; and XMM4, XMM5, XMM6 hold the incoming carry
@@ -351,8 +351,9 @@ dmul4:
 
        ret
 
-       .p2align 4
-dmla4:
+ENDFUNC
+
+INTFUNC(dmla4)
        // On entry, EDI points to the destination buffer, which also
        // contains an addend A to accumulate; EAX and EBX point to the
        // packed operands U and X; ECX and EDX point to the expanded
@@ -384,8 +385,9 @@ dmla4:
 
        ret
 
-       .p2align 4
-mul4zc:
+ENDFUNC
+
+INTFUNC(mul4zc)
        // On entry, EDI points to the destination buffer; EBX points to a
        // packed operand X; and EDX points to an expanded operand Y.
        //
@@ -407,8 +409,9 @@ mul4zc:
 
        ret
 
-       .p2align 4
-mul4:
+ENDFUNC
+
+INTFUNC(mul4)
        // On entry, EDI points to the destination buffer; EBX points to a
        // packed operand X; EDX points to an expanded operand Y; and XMM4,
        // XMM5, XMM6 hold the incoming carry registers c0, c1, and c2,
@@ -432,8 +435,9 @@ mul4:
 
        ret
 
-       .p2align 4
-mla4zc:
+ENDFUNC
+
+INTFUNC(mla4zc)
        // On entry, EDI points to the destination buffer, which also
        // contains an addend A to accumulate; EBX points to a packed operand
        // X; and EDX points to an expanded operand Y.
@@ -461,8 +465,9 @@ mla4zc:
 
        ret
 
-       .p2align 4
-mla4:
+ENDFUNC
+
+INTFUNC(mla4)
        // On entry, EDI points to the destination buffer, which also
        // contains an addend A to accumulate; EBX points to a packed operand
        // X; EDX points to an expanded operand Y; and XMM4, XMM5, XMM6 hold
@@ -489,8 +494,9 @@ mla4:
 
        ret
 
-       .p2align 4
-mmul4:
+ENDFUNC
+
+INTFUNC(mmul4)
        // On entry, EDI points to the destination buffer; EAX and EBX point
        // to the packed operands U and N; ECX and ESI point to the expanded
        // operands V and M; and EDX points to a place to store an expanded
@@ -510,8 +516,9 @@ mmul4:
        propout [edi +  0],      xmm4, xmm5
        jmp     5f
 
-       .p2align 4
-mmla4:
+ENDFUNC
+
+INTFUNC(mmla4)
        // On entry, EDI points to the destination buffer, which also
        // contains an addend A to accumulate; EAX and EBX point
        // to the packed operands U and N; ECX and ESI point to the expanded
@@ -595,8 +602,9 @@ mmla4:
        add     esp, 64
        ret
 
-       .p2align 4
-mont4:
+ENDFUNC
+
+INTFUNC(mont4)
        // On entry, EDI points to the destination buffer holding a packed
        // value A; EBX points to a packed operand N; ESI points to an
        // expanded operand M; and EDX points to a place to store an expanded
@@ -650,6 +658,8 @@ mont4:
        // And, with that, we're done.
        ret
 
+ENDFUNC
+
 ///--------------------------------------------------------------------------
 /// Bulk multipliers.