(no commit message)
authorlkcl <lkcl@web>
Fri, 25 Dec 2020 22:12:45 +0000 (22:12 +0000)
committerIkiWiki <ikiwiki.info>
Fri, 25 Dec 2020 22:12:45 +0000 (22:12 +0000)
openpower/sv/bitmanip.mdwn

index c2e5d1ed09339f5d0dff6e265ad92d48662547b8..ef0dc7eab06724c8966c537046b74039f0396462 100644 (file)
@@ -94,3 +94,10 @@ if (shamt & 1) x |= ((x & 0x5555555555555555LL) << 1) |
 return x;
 ((x & 0xFFFFFFFF00000000LL) >> 32);
 ```
+
+# cmix
+
+```
+uint_xlen_t cmix(uint_xlen_t rs1, uint_xlen_t rs2, uint_xlen_t rs3) { return (rs1 & rs2) | (rs3 & ~rs2);
+}
+```