projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
83fdec0
)
nir: Add urol and uror opcodes
author
Sagar Ghuge
<sagar.ghuge@intel.com>
Thu, 30 May 2019 21:11:58 +0000
(14:11 -0700)
committer
Sagar Ghuge
<sagar.ghuge@intel.com>
Mon, 1 Jul 2019 17:14:22 +0000
(10:14 -0700)
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/compiler/nir/nir_opcodes.py
patch
|
blob
|
history
diff --git
a/src/compiler/nir/nir_opcodes.py
b/src/compiler/nir/nir_opcodes.py
index 26e26797585662e44785e4f1f6cacfcf3e9b7717..7854faec15f4fc579236bb0779a4e03da5a171e5 100644
(file)
--- a/
src/compiler/nir/nir_opcodes.py
+++ b/
src/compiler/nir/nir_opcodes.py
@@
-687,6
+687,17
@@
opcode("ishr", 0, tint, [0, 0], [tint, tuint32], False, "",
opcode("ushr", 0, tuint, [0, 0], [tuint, tuint32], False, "",
"src0 >> (src1 & (sizeof(src0) * 8 - 1))")
opcode("ushr", 0, tuint, [0, 0], [tuint, tuint32], False, "",
"src0 >> (src1 & (sizeof(src0) * 8 - 1))")
+opcode("urol", 0, tuint, [0, 0], [tuint, tuint32], False, "", """
+ uint32_t rotate_mask = sizeof(src0) * 8 - 1;
+ dst = (src0 << (src1 & rotate_mask)) |
+ (src0 >> (-src1 & rotate_mask));
+""")
+opcode("uror", 0, tuint, [0, 0], [tuint, tuint32], False, "", """
+ uint32_t rotate_mask = sizeof(src0) * 8 - 1;
+ dst = (src0 >> (src1 & rotate_mask)) |
+ (src0 << (-src1 & rotate_mask));
+""")
+
# bitwise logic operators
#
# These are also used as boolean and, or, xor for hardware supporting
# bitwise logic operators
#
# These are also used as boolean and, or, xor for hardware supporting