summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseExprCXX.cpp
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-07-26 21:08:34 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-07-26 21:08:34 +0000
commit15a906cf37481c4897942f267c41ada2af44414b (patch)
treeb7fbaf3be6181a94b8186df634d7727e3d2445bd /clang/lib/Parse/ParseExprCXX.cpp
parent6c9ee7b0c8560250fcc0c023529ec9753851729a (diff)
downloadbcm5719-llvm-15a906cf37481c4897942f267c41ada2af44414b.tar.gz
bcm5719-llvm-15a906cf37481c4897942f267c41ada2af44414b.zip
builtins: correct constant alignments
MMX/SSE instructions expect 128-bit alignment (16-byte) for constants that they reference. Correct the alignment on the constant values. Although it is quite possible for the data to end up aligned, there is no guarantee that this will occur unless it is explicitly aligned to the desired location. If the data ends up being unaligned, the resultant binary would fault at runtime due to the unaligned access. As an example, the follow would fault previously: cc -c lib/builtins/x86_64/floatundidf.S -o floatundidf.o cc -c test/builtins/Unit/floatundidf_test.c -o floatundidf_test.c ld -m elf_x86_64 floatundidf.o floatundidf_test.o -lc -o floatundidf However, if the object files were reversed, the data would end up aligned and the problem would go unnoticed. llvm-svn: 214033
Diffstat (limited to 'clang/lib/Parse/ParseExprCXX.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud