docs: mulhsw, mulhsw shifts by 16, not 8
authorWilliam Manley <will@williammanley.net>
Tue, 28 Jan 2014 15:02:57 +0000 (15:02 +0000)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 29 Jan 2014 19:20:44 +0000 (20:20 +0100)
The documentation said that mulhsw and mulsuw was equivalent to:

    (a * b) >> 8

when the implementation actually shifts by 16 bits.

https://bugzilla.gnome.org/show_bug.cgi?id=723170

testsuite/generate_xml_table2.c

index 4d7d6ce..d9e0a50 100644 (file)
@@ -116,8 +116,8 @@ struct a ops[] = {
   { "minsw", "(a &lt; b) ? a : b", "signed minimum" },
   { "minuw", "(a &lt; b) ? a : b", "unsigned minimum" },
   { "mullw", "a * b", "low bits of multiply" },
-  { "mulhsw", "(a * b) &gt;&gt; 8", "high bits of signed multiply" },
-  { "mulhuw", "(a * b) &gt;&gt; 8", "high bits of unsigned multiply" },
+  { "mulhsw", "(a * b) &gt;&gt; 16", "high bits of signed multiply" },
+  { "mulhuw", "(a * b) &gt;&gt; 16", "high bits of unsigned multiply" },
   { "orw", "a | b", "bitwise or" },
   { "shlw", "a &lt;&lt; b", "shift left" },
   { "shrsw", "a &gt;&gt; b", "signed shift right" },