aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/Module.cpp
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2014-04-18 23:06:39 +0000
committerKevin Enderby <enderby@apple.com>2014-04-18 23:06:39 +0000
commitb7e51f6af51d77abf3e7da8f5b35d023f42ef5ff (patch)
tree995b860969074b3308b4d185da71ac424a46c96a /clang/lib/Basic/Module.cpp
parent6bdea86cabdbd880a3adbd9328d1371af2e91035 (diff)
downloadllvm-b7e51f6af51d77abf3e7da8f5b35d023f42ef5ff.zip
llvm-b7e51f6af51d77abf3e7da8f5b35d023f42ef5ff.tar.gz
llvm-b7e51f6af51d77abf3e7da8f5b35d023f42ef5ff.tar.bz2
Change the ARM assembler to require a :lower16: or :upper16 on non-constant
expressions for mov instructions instead of silently truncating by default. For the ARM assembler, we want to avoid misleadingly allowing something like "mov r0, <symbol>" especially when we turn it into a movw and the expression <symbol> does not have a :lower16: or :upper16" as part of the expression. We don't want the behavior of silently truncating, which can be unexpected and lead to bugs that are difficult to find since this is an easy mistake to make. This does change the previous behavior of llvm but actually matches an older gnu assembler that would not allow this but print less useful errors of like “invalid constant (0x927c0) after fixup” and “unsupported relocation on symbol foo”. The error for llvm is "immediate expression for mov requires :lower16: or :upper16" with correct location information on the operand as shown in the added test cases. rdar://12342160 llvm-svn: 206669
Diffstat (limited to 'clang/lib/Basic/Module.cpp')
0 files changed, 0 insertions, 0 deletions