It can't be a register prefix, anyway. This is consistent with the masm
docs on MSDN: https://msdn.microsoft.com/en-us/library/t4ax90d2.aspx
This is a straight-forward extension of our support for "MOD"
implemented in https://reviews.llvm.org/D33876 / r306425
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317011
91177308-0d34-0410-b5e6-
96231b3b80d8
case AsmToken::Tilde: SM.onNot(); break;
case AsmToken::Star: SM.onStar(); break;
case AsmToken::Slash: SM.onDivide(); break;
+ case AsmToken::Percent: SM.onMod(); break;
case AsmToken::Pipe: SM.onOr(); break;
case AsmToken::Caret: SM.onXor(); break;
case AsmToken::Amp: SM.onAnd(); break;
mov eax, ~(5 mod 3)
// CHECK: movl $-2, %eax
mov eax, (-5 mod 3)
-
+// CHECK: movl $-3, %eax
+ mov eax, ~(5 % 3)
+// CHECK: movl $-2, %eax
+ mov eax, (-5 % 3)
+// CHECK: movl $-2, %eax
+ mov eax, -5 % 3