]> granicus.if.org Git - clang/commit
[X86] Add checking of the scale argument to scatter/gather builtins
authorCraig Topper <craig.topper@gmail.com>
Mon, 13 Mar 2017 17:16:50 +0000 (17:16 +0000)
committerCraig Topper <craig.topper@gmail.com>
Mon, 13 Mar 2017 17:16:50 +0000 (17:16 +0000)
commit8d959ebcb6e8cc06ad1a2b6bc3ed7d6b1e9fde7c
treebc0f37ca915cb12134a266617f14bab5a8e40b79
parent379fd9aa6387953109dfc25c5d1c3f80fe994bab
[X86] Add checking of the scale argument to scatter/gather builtins

The only valid values for scale immediate of scatter/gather builtins are 1, 2, 4, or 8. This patch enforces this in the frontend otherwise we generate invalid instruction encodings in the backend.

Differential Revision: https://reviews.llvm.org/D30875

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297642 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Sema.h
lib/Sema/SemaChecking.cpp
test/Sema/builtins-x86.c