InstEmitAlu.cs 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708
  1. using Ryujinx.Graphics.Shader.Decoders;
  2. using Ryujinx.Graphics.Shader.IntermediateRepresentation;
  3. using Ryujinx.Graphics.Shader.Translation;
  4. using System;
  5. using static Ryujinx.Graphics.Shader.Instructions.InstEmitHelper;
  6. using static Ryujinx.Graphics.Shader.Instructions.InstEmitAluHelper;
  7. using static Ryujinx.Graphics.Shader.IntermediateRepresentation.OperandHelper;
  8. namespace Ryujinx.Graphics.Shader.Instructions
  9. {
  10. static partial class InstEmit
  11. {
  12. public static void Bfe(EmitterContext context)
  13. {
  14. OpCodeAlu op = (OpCodeAlu)context.CurrOp;
  15. bool isReverse = op.RawOpCode.Extract(40);
  16. bool isSigned = op.RawOpCode.Extract(48);
  17. Operand srcA = GetSrcA(context);
  18. Operand srcB = GetSrcB(context);
  19. if (isReverse)
  20. {
  21. srcA = context.BitfieldReverse(srcA);
  22. }
  23. Operand position = context.BitwiseAnd(srcB, Const(0xff));
  24. Operand size = context.BitfieldExtractU32(srcB, Const(8), Const(8));
  25. Operand res = isSigned
  26. ? context.BitfieldExtractS32(srcA, position, size)
  27. : context.BitfieldExtractU32(srcA, position, size);
  28. context.Copy(GetDest(context), res);
  29. // TODO: CC, X, corner cases
  30. }
  31. public static void Csetp(EmitterContext context)
  32. {
  33. OpCodePsetp op = (OpCodePsetp)context.CurrOp;
  34. // TODO: Implement that properly
  35. Operand p0Res = Const(IrConsts.True);
  36. Operand p1Res = context.BitwiseNot(p0Res);
  37. Operand pred = GetPredicate39(context);
  38. p0Res = GetPredLogicalOp(context, op.LogicalOp, p0Res, pred);
  39. p1Res = GetPredLogicalOp(context, op.LogicalOp, p1Res, pred);
  40. context.Copy(Register(op.Predicate3), p0Res);
  41. context.Copy(Register(op.Predicate0), p1Res);
  42. }
  43. public static void Iadd(EmitterContext context)
  44. {
  45. OpCodeAlu op = (OpCodeAlu)context.CurrOp;
  46. bool negateA = false, negateB = false;
  47. if (!(op is OpCodeAluImm32))
  48. {
  49. negateB = op.RawOpCode.Extract(48);
  50. negateA = op.RawOpCode.Extract(49);
  51. }
  52. else
  53. {
  54. // TODO: Other IADD32I variant without the negate.
  55. negateA = op.RawOpCode.Extract(56);
  56. }
  57. Operand srcA = context.INegate(GetSrcA(context), negateA);
  58. Operand srcB = context.INegate(GetSrcB(context), negateB);
  59. Operand res = context.IAdd(srcA, srcB);
  60. bool isSubtraction = negateA || negateB;
  61. if (op.Extended)
  62. {
  63. // Add carry, or subtract borrow.
  64. res = context.IAdd(res, isSubtraction
  65. ? context.BitwiseNot(GetCF(context))
  66. : context.BitwiseAnd(GetCF(context), Const(1)));
  67. }
  68. SetIaddFlags(context, res, srcA, srcB, op.SetCondCode, op.Extended, isSubtraction);
  69. context.Copy(GetDest(context), res);
  70. }
  71. public static void Iadd3(EmitterContext context)
  72. {
  73. OpCodeAlu op = (OpCodeAlu)context.CurrOp;
  74. IntegerHalfPart partC = (IntegerHalfPart)op.RawOpCode.Extract(31, 2);
  75. IntegerHalfPart partB = (IntegerHalfPart)op.RawOpCode.Extract(33, 2);
  76. IntegerHalfPart partA = (IntegerHalfPart)op.RawOpCode.Extract(35, 2);
  77. IntegerShift mode = (IntegerShift)op.RawOpCode.Extract(37, 2);
  78. bool negateC = op.RawOpCode.Extract(49);
  79. bool negateB = op.RawOpCode.Extract(50);
  80. bool negateA = op.RawOpCode.Extract(51);
  81. Operand Extend(Operand src, IntegerHalfPart part)
  82. {
  83. if (!(op is OpCodeAluReg) || part == IntegerHalfPart.B32)
  84. {
  85. return src;
  86. }
  87. if (part == IntegerHalfPart.H0)
  88. {
  89. return context.BitwiseAnd(src, Const(0xffff));
  90. }
  91. else if (part == IntegerHalfPart.H1)
  92. {
  93. return context.ShiftRightU32(src, Const(16));
  94. }
  95. else
  96. {
  97. // TODO: Warning.
  98. }
  99. return src;
  100. }
  101. Operand srcA = context.INegate(Extend(GetSrcA(context), partA), negateA);
  102. Operand srcB = context.INegate(Extend(GetSrcB(context), partB), negateB);
  103. Operand srcC = context.INegate(Extend(GetSrcC(context), partC), negateC);
  104. Operand res = context.IAdd(srcA, srcB);
  105. if (op is OpCodeAluReg && mode != IntegerShift.NoShift)
  106. {
  107. if (mode == IntegerShift.ShiftLeft)
  108. {
  109. res = context.ShiftLeft(res, Const(16));
  110. }
  111. else if (mode == IntegerShift.ShiftRight)
  112. {
  113. res = context.ShiftRightU32(res, Const(16));
  114. }
  115. else
  116. {
  117. // TODO: Warning.
  118. }
  119. }
  120. res = context.IAdd(res, srcC);
  121. context.Copy(GetDest(context), res);
  122. // TODO: CC, X, corner cases
  123. }
  124. public static void Imnmx(EmitterContext context)
  125. {
  126. OpCodeAlu op = (OpCodeAlu)context.CurrOp;
  127. bool isSignedInt = op.RawOpCode.Extract(48);
  128. Operand srcA = GetSrcA(context);
  129. Operand srcB = GetSrcB(context);
  130. Operand resMin = isSignedInt
  131. ? context.IMinimumS32(srcA, srcB)
  132. : context.IMinimumU32(srcA, srcB);
  133. Operand resMax = isSignedInt
  134. ? context.IMaximumS32(srcA, srcB)
  135. : context.IMaximumU32(srcA, srcB);
  136. Operand pred = GetPredicate39(context);
  137. Operand dest = GetDest(context);
  138. context.Copy(dest, context.ConditionalSelect(pred, resMin, resMax));
  139. SetZnFlags(context, dest, op.SetCondCode);
  140. // TODO: X flags.
  141. }
  142. public static void Iscadd(EmitterContext context)
  143. {
  144. OpCodeAlu op = (OpCodeAlu)context.CurrOp;
  145. bool negateA = false, negateB = false;
  146. if (!(op is OpCodeAluImm32))
  147. {
  148. negateB = op.RawOpCode.Extract(48);
  149. negateA = op.RawOpCode.Extract(49);
  150. }
  151. int shift = op is OpCodeAluImm32
  152. ? op.RawOpCode.Extract(53, 5)
  153. : op.RawOpCode.Extract(39, 5);
  154. Operand srcA = GetSrcA(context);
  155. Operand srcB = GetSrcB(context);
  156. srcA = context.ShiftLeft(srcA, Const(shift));
  157. srcA = context.INegate(srcA, negateA);
  158. srcB = context.INegate(srcB, negateB);
  159. Operand res = context.IAdd(srcA, srcB);
  160. context.Copy(GetDest(context), res);
  161. // TODO: CC, X
  162. }
  163. public static void Iset(EmitterContext context)
  164. {
  165. OpCodeSet op = (OpCodeSet)context.CurrOp;
  166. bool boolFloat = op.RawOpCode.Extract(44);
  167. bool isSigned = op.RawOpCode.Extract(48);
  168. IntegerCondition cmpOp = (IntegerCondition)op.RawOpCode.Extract(49, 3);
  169. Operand srcA = GetSrcA(context);
  170. Operand srcB = GetSrcB(context);
  171. Operand res = GetIntComparison(context, cmpOp, srcA, srcB, isSigned);
  172. Operand pred = GetPredicate39(context);
  173. res = GetPredLogicalOp(context, op.LogicalOp, res, pred);
  174. Operand dest = GetDest(context);
  175. if (boolFloat)
  176. {
  177. context.Copy(dest, context.ConditionalSelect(res, ConstF(1), Const(0)));
  178. }
  179. else
  180. {
  181. context.Copy(dest, res);
  182. }
  183. // TODO: CC, X
  184. }
  185. public static void Isetp(EmitterContext context)
  186. {
  187. OpCodeSet op = (OpCodeSet)context.CurrOp;
  188. bool isSigned = op.RawOpCode.Extract(48);
  189. IntegerCondition cmpOp = (IntegerCondition)op.RawOpCode.Extract(49, 3);
  190. Operand srcA = GetSrcA(context);
  191. Operand srcB = GetSrcB(context);
  192. Operand p0Res = GetIntComparison(context, cmpOp, srcA, srcB, isSigned);
  193. Operand p1Res = context.BitwiseNot(p0Res);
  194. Operand pred = GetPredicate39(context);
  195. p0Res = GetPredLogicalOp(context, op.LogicalOp, p0Res, pred);
  196. p1Res = GetPredLogicalOp(context, op.LogicalOp, p1Res, pred);
  197. context.Copy(Register(op.Predicate3), p0Res);
  198. context.Copy(Register(op.Predicate0), p1Res);
  199. }
  200. public static void Lop(EmitterContext context)
  201. {
  202. IOpCodeLop op = (IOpCodeLop)context.CurrOp;
  203. Operand srcA = context.BitwiseNot(GetSrcA(context), op.InvertA);
  204. Operand srcB = context.BitwiseNot(GetSrcB(context), op.InvertB);
  205. Operand res = srcB;
  206. switch (op.LogicalOp)
  207. {
  208. case LogicalOperation.And: res = context.BitwiseAnd (srcA, srcB); break;
  209. case LogicalOperation.Or: res = context.BitwiseOr (srcA, srcB); break;
  210. case LogicalOperation.ExclusiveOr: res = context.BitwiseExclusiveOr(srcA, srcB); break;
  211. }
  212. EmitLopPredWrite(context, op, res);
  213. Operand dest = GetDest(context);
  214. context.Copy(dest, res);
  215. SetZnFlags(context, dest, op.SetCondCode, op.Extended);
  216. }
  217. public static void Lop3(EmitterContext context)
  218. {
  219. IOpCodeLop op = (IOpCodeLop)context.CurrOp;
  220. Operand srcA = GetSrcA(context);
  221. Operand srcB = GetSrcB(context);
  222. Operand srcC = GetSrcC(context);
  223. bool regVariant = op is OpCodeLopReg;
  224. int truthTable = regVariant
  225. ? op.RawOpCode.Extract(28, 8)
  226. : op.RawOpCode.Extract(48, 8);
  227. Operand res = Lop3Expression.GetFromTruthTable(context, srcA, srcB, srcC, truthTable);
  228. if (regVariant)
  229. {
  230. EmitLopPredWrite(context, op, res);
  231. }
  232. Operand dest = GetDest(context);
  233. context.Copy(dest, res);
  234. SetZnFlags(context, dest, op.SetCondCode, op.Extended);
  235. }
  236. public static void Psetp(EmitterContext context)
  237. {
  238. OpCodePsetp op = (OpCodePsetp)context.CurrOp;
  239. bool invertA = op.RawOpCode.Extract(15);
  240. bool invertB = op.RawOpCode.Extract(32);
  241. Operand srcA = context.BitwiseNot(Register(op.Predicate12), invertA);
  242. Operand srcB = context.BitwiseNot(Register(op.Predicate29), invertB);
  243. Operand p0Res = GetPredLogicalOp(context, op.LogicalOpAB, srcA, srcB);
  244. Operand p1Res = context.BitwiseNot(p0Res);
  245. Operand pred = GetPredicate39(context);
  246. p0Res = GetPredLogicalOp(context, op.LogicalOp, p0Res, pred);
  247. p1Res = GetPredLogicalOp(context, op.LogicalOp, p1Res, pred);
  248. context.Copy(Register(op.Predicate3), p0Res);
  249. context.Copy(Register(op.Predicate0), p1Res);
  250. }
  251. public static void Rro(EmitterContext context)
  252. {
  253. // This is the range reduction operator,
  254. // we translate it as a simple move, as it
  255. // should be always followed by a matching
  256. // MUFU instruction.
  257. OpCodeAlu op = (OpCodeAlu)context.CurrOp;
  258. bool negateB = op.RawOpCode.Extract(45);
  259. bool absoluteB = op.RawOpCode.Extract(49);
  260. Operand srcB = GetSrcB(context);
  261. srcB = context.FPAbsNeg(srcB, absoluteB, negateB);
  262. context.Copy(GetDest(context), srcB);
  263. }
  264. public static void Shl(EmitterContext context)
  265. {
  266. OpCodeAlu op = (OpCodeAlu)context.CurrOp;
  267. bool isMasked = op.RawOpCode.Extract(39);
  268. Operand srcB = GetSrcB(context);
  269. if (isMasked)
  270. {
  271. srcB = context.BitwiseAnd(srcB, Const(0x1f));
  272. }
  273. Operand res = context.ShiftLeft(GetSrcA(context), srcB);
  274. if (!isMasked)
  275. {
  276. // Clamped shift value.
  277. Operand isLessThan32 = context.ICompareLessUnsigned(srcB, Const(32));
  278. res = context.ConditionalSelect(isLessThan32, res, Const(0));
  279. }
  280. // TODO: X, CC
  281. context.Copy(GetDest(context), res);
  282. }
  283. public static void Shr(EmitterContext context)
  284. {
  285. OpCodeAlu op = (OpCodeAlu)context.CurrOp;
  286. bool isMasked = op.RawOpCode.Extract(39);
  287. bool isReverse = op.RawOpCode.Extract(40);
  288. bool isSigned = op.RawOpCode.Extract(48);
  289. Operand srcA = GetSrcA(context);
  290. Operand srcB = GetSrcB(context);
  291. if (isReverse)
  292. {
  293. srcA = context.BitfieldReverse(srcA);
  294. }
  295. if (isMasked)
  296. {
  297. srcB = context.BitwiseAnd(srcB, Const(0x1f));
  298. }
  299. Operand res = isSigned
  300. ? context.ShiftRightS32(srcA, srcB)
  301. : context.ShiftRightU32(srcA, srcB);
  302. if (!isMasked)
  303. {
  304. // Clamped shift value.
  305. Operand resShiftBy32;
  306. if (isSigned)
  307. {
  308. resShiftBy32 = context.ShiftRightS32(srcA, Const(31));
  309. }
  310. else
  311. {
  312. resShiftBy32 = Const(0);
  313. }
  314. Operand isLessThan32 = context.ICompareLessUnsigned(srcB, Const(32));
  315. res = context.ConditionalSelect(isLessThan32, res, resShiftBy32);
  316. }
  317. // TODO: X, CC
  318. context.Copy(GetDest(context), res);
  319. }
  320. public static void Xmad(EmitterContext context)
  321. {
  322. OpCodeAlu op = (OpCodeAlu)context.CurrOp;
  323. bool signedA = context.CurrOp.RawOpCode.Extract(48);
  324. bool signedB = context.CurrOp.RawOpCode.Extract(49);
  325. bool highA = context.CurrOp.RawOpCode.Extract(53);
  326. bool highB = false;
  327. XmadCMode mode;
  328. if (op is OpCodeAluReg)
  329. {
  330. highB = context.CurrOp.RawOpCode.Extract(35);
  331. mode = (XmadCMode)context.CurrOp.RawOpCode.Extract(50, 3);
  332. }
  333. else
  334. {
  335. mode = (XmadCMode)context.CurrOp.RawOpCode.Extract(50, 2);
  336. if (!(op is OpCodeAluImm))
  337. {
  338. highB = context.CurrOp.RawOpCode.Extract(52);
  339. }
  340. }
  341. Operand srcA = GetSrcA(context);
  342. Operand srcB = GetSrcB(context);
  343. Operand srcC = GetSrcC(context);
  344. // XMAD immediates are 16-bits unsigned integers.
  345. if (srcB.Type == OperandType.Constant)
  346. {
  347. srcB = Const(srcB.Value & 0xffff);
  348. }
  349. Operand Extend16To32(Operand src, bool high, bool signed)
  350. {
  351. if (signed && high)
  352. {
  353. return context.ShiftRightS32(src, Const(16));
  354. }
  355. else if (signed)
  356. {
  357. return context.BitfieldExtractS32(src, Const(0), Const(16));
  358. }
  359. else if (high)
  360. {
  361. return context.ShiftRightU32(src, Const(16));
  362. }
  363. else
  364. {
  365. return context.BitwiseAnd(src, Const(0xffff));
  366. }
  367. }
  368. srcA = Extend16To32(srcA, highA, signedA);
  369. srcB = Extend16To32(srcB, highB, signedB);
  370. bool productShiftLeft = false;
  371. bool merge = false;
  372. if (!(op is OpCodeAluRegCbuf))
  373. {
  374. productShiftLeft = context.CurrOp.RawOpCode.Extract(36);
  375. merge = context.CurrOp.RawOpCode.Extract(37);
  376. }
  377. bool extended;
  378. if ((op is OpCodeAluReg) || (op is OpCodeAluImm))
  379. {
  380. extended = context.CurrOp.RawOpCode.Extract(38);
  381. }
  382. else
  383. {
  384. extended = context.CurrOp.RawOpCode.Extract(54);
  385. }
  386. Operand res = context.IMultiply(srcA, srcB);
  387. if (productShiftLeft)
  388. {
  389. res = context.ShiftLeft(res, Const(16));
  390. }
  391. switch (mode)
  392. {
  393. case XmadCMode.Cfull: break;
  394. case XmadCMode.Clo: srcC = Extend16To32(srcC, high: false, signed: false); break;
  395. case XmadCMode.Chi: srcC = Extend16To32(srcC, high: true, signed: false); break;
  396. case XmadCMode.Cbcc:
  397. {
  398. srcC = context.IAdd(srcC, context.ShiftLeft(GetSrcB(context), Const(16)));
  399. break;
  400. }
  401. case XmadCMode.Csfu:
  402. {
  403. Operand signAdjustA = context.ShiftLeft(context.ShiftRightU32(srcA, Const(31)), Const(16));
  404. Operand signAdjustB = context.ShiftLeft(context.ShiftRightU32(srcB, Const(31)), Const(16));
  405. srcC = context.ISubtract(srcC, context.IAdd(signAdjustA, signAdjustB));
  406. break;
  407. }
  408. default: /* TODO: Warning */ break;
  409. }
  410. Operand product = res;
  411. if (extended)
  412. {
  413. // Add with carry.
  414. res = context.IAdd(res, context.BitwiseAnd(GetCF(context), Const(1)));
  415. }
  416. else
  417. {
  418. // Add (no carry in).
  419. res = context.IAdd(res, srcC);
  420. }
  421. SetIaddFlags(context, res, product, srcC, op.SetCondCode, extended);
  422. if (merge)
  423. {
  424. res = context.BitwiseAnd(res, Const(0xffff));
  425. res = context.BitwiseOr(res, context.ShiftLeft(GetSrcB(context), Const(16)));
  426. }
  427. context.Copy(GetDest(context), res);
  428. }
  429. private static Operand GetIntComparison(
  430. EmitterContext context,
  431. IntegerCondition cond,
  432. Operand srcA,
  433. Operand srcB,
  434. bool isSigned)
  435. {
  436. Operand res;
  437. if (cond == IntegerCondition.Always)
  438. {
  439. res = Const(IrConsts.True);
  440. }
  441. else if (cond == IntegerCondition.Never)
  442. {
  443. res = Const(IrConsts.False);
  444. }
  445. else
  446. {
  447. Instruction inst;
  448. switch (cond)
  449. {
  450. case IntegerCondition.Less: inst = Instruction.CompareLessU32; break;
  451. case IntegerCondition.Equal: inst = Instruction.CompareEqual; break;
  452. case IntegerCondition.LessOrEqual: inst = Instruction.CompareLessOrEqualU32; break;
  453. case IntegerCondition.Greater: inst = Instruction.CompareGreaterU32; break;
  454. case IntegerCondition.NotEqual: inst = Instruction.CompareNotEqual; break;
  455. case IntegerCondition.GreaterOrEqual: inst = Instruction.CompareGreaterOrEqualU32; break;
  456. default: throw new InvalidOperationException($"Unexpected condition \"{cond}\".");
  457. }
  458. if (isSigned)
  459. {
  460. switch (cond)
  461. {
  462. case IntegerCondition.Less: inst = Instruction.CompareLess; break;
  463. case IntegerCondition.LessOrEqual: inst = Instruction.CompareLessOrEqual; break;
  464. case IntegerCondition.Greater: inst = Instruction.CompareGreater; break;
  465. case IntegerCondition.GreaterOrEqual: inst = Instruction.CompareGreaterOrEqual; break;
  466. }
  467. }
  468. res = context.Add(inst, Local(), srcA, srcB);
  469. }
  470. return res;
  471. }
  472. private static void EmitLopPredWrite(EmitterContext context, IOpCodeLop op, Operand result)
  473. {
  474. if (op is OpCodeLop opLop && !opLop.Predicate48.IsPT)
  475. {
  476. Operand pRes;
  477. if (opLop.CondOp == ConditionalOperation.False)
  478. {
  479. pRes = Const(IrConsts.False);
  480. }
  481. else if (opLop.CondOp == ConditionalOperation.True)
  482. {
  483. pRes = Const(IrConsts.True);
  484. }
  485. else if (opLop.CondOp == ConditionalOperation.Zero)
  486. {
  487. pRes = context.ICompareEqual(result, Const(0));
  488. }
  489. else /* if (opLop.CondOp == ConditionalOperation.NotZero) */
  490. {
  491. pRes = context.ICompareNotEqual(result, Const(0));
  492. }
  493. context.Copy(Register(opLop.Predicate48), pRes);
  494. }
  495. }
  496. private static void SetIaddFlags(
  497. EmitterContext context,
  498. Operand res,
  499. Operand srcA,
  500. Operand srcB,
  501. bool setCC,
  502. bool extended,
  503. bool isSubtraction = false)
  504. {
  505. if (!setCC)
  506. {
  507. return;
  508. }
  509. if (!extended || isSubtraction)
  510. {
  511. // C = d < a
  512. context.Copy(GetCF(context), context.ICompareLessUnsigned(res, srcA));
  513. }
  514. else
  515. {
  516. // C = (d == a && CIn) || d < a
  517. Operand tempC0 = context.ICompareEqual (res, srcA);
  518. Operand tempC1 = context.ICompareLessUnsigned(res, srcA);
  519. tempC0 = context.BitwiseAnd(tempC0, GetCF(context));
  520. context.Copy(GetCF(context), context.BitwiseOr(tempC0, tempC1));
  521. }
  522. // V = (d ^ a) & ~(a ^ b) < 0
  523. Operand tempV0 = context.BitwiseExclusiveOr(res, srcA);
  524. Operand tempV1 = context.BitwiseExclusiveOr(srcA, srcB);
  525. tempV1 = context.BitwiseNot(tempV1);
  526. Operand tempV = context.BitwiseAnd(tempV0, tempV1);
  527. context.Copy(GetVF(context), context.ICompareLess(tempV, Const(0)));
  528. SetZnFlags(context, res, setCC: true, extended: extended);
  529. }
  530. }
  531. }