BINARY_SQ(xorq, "%s ^ %s")
BINARY_SQ(addq, "%s + %s")
BINARY_SQ(subq, "%s - %s")
+BINARY_SQ(shlq, "%s << %s")
+BINARY_SQ(shrsq, "%s >> %s")
+BINARY_UQ(shruq, "((orc_uint64)%s) >> %s")
UNARY_BW(convsbw, "%s")
UNARY_BW(convubw, "(orc_uint8)%s")
}
void
+emulate_shlq (OrcOpcodeExecutor *ex, int offset, int n)
+{
+ int i;
+ orc_union64 * ORC_RESTRICT ptr0;
+ const orc_union64 * ORC_RESTRICT ptr4;
+ orc_union64 var32;
+ orc_union64 var33;
+
+ ptr0 = (orc_union64 *)ex->dest_ptrs[0];
+ ptr4 = (orc_union64 *)ex->src_ptrs[0];
+
+
+ for (i = 0; i < n; i++) {
+ /* 0: loadq */
+ var32 = ptr4[i];
+ /* 1: shlq */
+ var33.i = var32.i << ((orc_union32 *)(ex->src_ptrs[1]))->i;
+ /* 2: storeq */
+ ptr0[i] = var33;
+ }
+
+}
+
+void
+emulate_shrsq (OrcOpcodeExecutor *ex, int offset, int n)
+{
+ int i;
+ orc_union64 * ORC_RESTRICT ptr0;
+ const orc_union64 * ORC_RESTRICT ptr4;
+ orc_union64 var32;
+ orc_union64 var33;
+
+ ptr0 = (orc_union64 *)ex->dest_ptrs[0];
+ ptr4 = (orc_union64 *)ex->src_ptrs[0];
+
+
+ for (i = 0; i < n; i++) {
+ /* 0: loadq */
+ var32 = ptr4[i];
+ /* 1: shrsq */
+ var33.i = var32.i >> ((orc_union32 *)(ex->src_ptrs[1]))->i;
+ /* 2: storeq */
+ ptr0[i] = var33;
+ }
+
+}
+
+void
+emulate_shruq (OrcOpcodeExecutor *ex, int offset, int n)
+{
+ int i;
+ orc_union64 * ORC_RESTRICT ptr0;
+ const orc_union64 * ORC_RESTRICT ptr4;
+ orc_union64 var32;
+ orc_union64 var33;
+
+ ptr0 = (orc_union64 *)ex->dest_ptrs[0];
+ ptr4 = (orc_union64 *)ex->src_ptrs[0];
+
+
+ for (i = 0; i < n; i++) {
+ /* 0: loadq */
+ var32 = ptr4[i];
+ /* 1: shruq */
+ var33.i = ((orc_uint64)var32.i) >> ((orc_union32 *)(ex->src_ptrs[1]))->i;
+ /* 2: storeq */
+ ptr0[i] = var33;
+ }
+
+}
+
+void
emulate_convsbw (OrcOpcodeExecutor *ex, int offset, int n)
{
int i;
void emulate_xorq (OrcOpcodeExecutor *ex, int i, int n);
void emulate_addq (OrcOpcodeExecutor *ex, int i, int n);
void emulate_subq (OrcOpcodeExecutor *ex, int i, int n);
+void emulate_shlq (OrcOpcodeExecutor *ex, int i, int n);
+void emulate_shrsq (OrcOpcodeExecutor *ex, int i, int n);
+void emulate_shruq (OrcOpcodeExecutor *ex, int i, int n);
void emulate_convsbw (OrcOpcodeExecutor *ex, int i, int n);
void emulate_convubw (OrcOpcodeExecutor *ex, int i, int n);
void emulate_splatbw (OrcOpcodeExecutor *ex, int i, int n);
{ "xorq", 0, { 8 }, { 8, 8 }, emulate_xorq },
{ "addq", 0, { 8 }, { 8, 8 }, emulate_addq },
{ "subq", 0, { 8 }, { 8, 8 }, emulate_subq },
+ { "shlq", ORC_STATIC_OPCODE_SCALAR, { 8 }, { 8, 8 }, emulate_shlq },
+ { "shrsq", ORC_STATIC_OPCODE_SCALAR, { 8 }, { 8, 8 }, emulate_shrsq },
+ { "shruq", ORC_STATIC_OPCODE_SCALAR, { 8 }, { 8, 8 }, emulate_shruq },
{ "convsbw", 0, { 2 }, { 1 }, emulate_convsbw },
{ "convubw", 0, { 2 }, { 1 }, emulate_convubw },