math/mpx-mul4-*: Test the `...zc' variants too.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 4 Nov 2019 11:59:28 +0000 (11:59 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 9 May 2020 13:31:19 +0000 (14:31 +0100)
math/mpx-mul4-amd64-sse2.S
math/mpx-mul4-test.c
math/mpx-mul4-x86-sse2.S
math/t/mpx-mul4

index 9146a63..94befa4 100644 (file)
@@ -1529,6 +1529,16 @@ FUNC(test_mul4)
        testepilogue
 ENDFUNC
 
+FUNC(test_mul4zc)
+       testprologue smul
+       testldcarry
+       testtop nil
+       call    mul4zc
+       testtail
+       testcarryout
+       testepilogue
+ENDFUNC
+
 FUNC(test_mla4)
        testprologue smul
        testldcarry
@@ -1539,6 +1549,16 @@ FUNC(test_mla4)
        testepilogue
 ENDFUNC
 
+FUNC(test_mla4zc)
+       testprologue smul
+       testldcarry
+       testtop nil
+       call    mla4zc
+       testtail
+       testcarryout
+       testepilogue
+ENDFUNC
+
 FUNC(test_mmul4)
        testprologue mmul
        testtop r11
index 5d5b4d5..414974b 100644 (file)
@@ -80,7 +80,9 @@ typedef struct { mpd w[6]; } carry;
   _(dmul4, NIL,  CARRY, P128, P128, P128, P128, P128, NIL,  CARRY)     \
   _(dmla4, P128, CARRY, P128, P128, P128, P128, P128, NIL,  CARRY)     \
   _(mul4,  NIL,         CARRY, NIL,  P128, NIL,  P128, P128, NIL,  CARRY)      \
+  _(mul4zc,NIL,         NIL,   NIL,  P128, NIL,  P128, P128, NIL,  CARRY)      \
   _(mla4,  P128, CARRY, NIL,  P128, NIL,  P128, P128, NIL,  CARRY)     \
+  _(mla4zc,P128, NIL,  NIL,  P128, NIL,  P128, P128, NIL,  CARRY)      \
   _(mmul4, NIL,         NIL,   P128, P128, P128, P128, P128, X128, CARRY)      \
   _(mmla4, P128, NIL,  P128, P128, P128, P128, P128, X128, CARRY)      \
   _(mont4, P128, NIL,  NIL,  P128, NIL,  P128, P128, X128, CARRY)
index f6c8167..baf7cc5 100644 (file)
@@ -1190,6 +1190,18 @@ FUNC(test_mul4)
        testepilogue
 ENDFUNC
 
+FUNC(test_mul4zc)
+       testprologue [ebp + 36]
+       testldcarry [ebp + 24]
+       testexpand nil, [ebp + 32]
+       mov     edi, [ebp + 20]
+       testtop nil, [ebp + 28]
+       call    mul4zc
+       testtail [ebp + 40]
+       testcarryout [ebp + 24]
+       testepilogue
+ENDFUNC
+
 FUNC(test_mla4)
        testprologue [ebp + 36]
        testldcarry [ebp + 24]
@@ -1202,6 +1214,18 @@ FUNC(test_mla4)
        testepilogue
 ENDFUNC
 
+FUNC(test_mla4zc)
+       testprologue [ebp + 36]
+       testldcarry [ebp + 24]
+       testexpand nil, [ebp + 32]
+       mov     edi, [ebp + 20]
+       testtop nil, [ebp + 28]
+       call    mla4zc
+       testtail [ebp + 40]
+       testcarryout [ebp + 24]
+       testepilogue
+ENDFUNC
+
 FUNC(test_mmul4)
        testprologue [ebp + 48]
        testexpand [ebp + 40], [ebp + 44]
index 1373215..69ea238 100644 (file)
@@ -29,6 +29,13 @@ mul4 {
     0002b2f3db03f8310002b880e3fffed70001d457394991000001d812a4ace8a80000ee0b505470500000efed0e0e2428; ## cc
 }
 
+mul4zc {
+  e3e2e1e0e7e6e5e4ebeae9e8efeeedec # x
+    f3f2f1f0f7f6f5f4fbfaf9f8fffefdfc # y
+    6117a200e13e737feee2b25cca449ed7 # zz
+    0002b2f3db03f8300002b880e3fffed70001d457394991000001d812a4ace8a80000ee0b505470500000efed0e0e2428; # cc
+}
+
 mla4 {
   b3b2b1b0b7b6b5b4bbbab9b8bfbebdbc # a
     0000a5a4a3a2a1a000009594939291900000abaaa9a8a7a600009b9a999897960000afaeadacabaa00009f9e9d9c9b9a # c
@@ -38,6 +45,14 @@ mla4 {
     0002b2f3db03f8320002b880e3fffed70001d457394991000001d812a4ace8a80000ee0b505470500000efed0e0e2428; ## cc
 }
 
+mla4zc {
+  b3b2b1b0b7b6b5b4bbbab9b8bfbebdbc # a
+    e3e2e1e0e7e6e5e4ebeae9e8efeeedec # x
+    f3f2f1f0f7f6f5f4fbfaf9f8fffefdfc # y
+    14ca53b098f52934aa9d6c158a035c94 # zz
+    0002b2f3db03f8310002b880e3fffed70001d457394991000001d812a4ace8a80000ee0b505470500000efed0e0e2428; # cc
+}
+
 mmul4 {
   c3c2c1c0c7c6c5c4cbcac9c8cfcecdcc # u
     acadaeafa8a9aaaba4a5a6a7a0a1a2a3 # n