summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/llvm-mc
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-10-10 21:37:21 +0000
committerdim <dim@FreeBSD.org>2012-10-10 21:37:21 +0000
commit181fd8e457cf876d0944c1736fafce944d874bd9 (patch)
treeed6249b71b01a87646940c026cac6d822982113f /contrib/llvm/tools/llvm-mc
parent38198ecb8af50337c780a861dae2d99add15e451 (diff)
downloadFreeBSD-src-181fd8e457cf876d0944c1736fafce944d874bd9.zip
FreeBSD-src-181fd8e457cf876d0944c1736fafce944d874bd9.tar.gz
Pull in r164132 from upstream llvm trunk:
When creating MCAsmBackend pass the CPU string as well. In X86AsmBackend store this and use it to not emit long nops when the CPU is geode which doesnt support them. Fixes PR11212. Pull in r164133 from upstream clang trunk: Follow up on llvm r164132. This should prevent illegal instructions when building world on Geode CPUs (e.g. Soekris). MFC after: 3 days
Diffstat (limited to 'contrib/llvm/tools/llvm-mc')
-rw-r--r--contrib/llvm/tools/llvm-mc/llvm-mc.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/llvm/tools/llvm-mc/llvm-mc.cpp b/contrib/llvm/tools/llvm-mc/llvm-mc.cpp
index 3bceb14..756221b 100644
--- a/contrib/llvm/tools/llvm-mc/llvm-mc.cpp
+++ b/contrib/llvm/tools/llvm-mc/llvm-mc.cpp
@@ -409,7 +409,7 @@ int main(int argc, char **argv) {
MCAsmBackend *MAB = 0;
if (ShowEncoding) {
CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, *STI, Ctx);
- MAB = TheTarget->createMCAsmBackend(TripleName);
+ MAB = TheTarget->createMCAsmBackend(TripleName, MCPU);
}
Str.reset(TheTarget->createAsmStreamer(Ctx, FOS, /*asmverbose*/true,
/*useLoc*/ true,
@@ -422,7 +422,7 @@ int main(int argc, char **argv) {
} else {
assert(FileType == OFT_ObjectFile && "Invalid file type!");
MCCodeEmitter *CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, *STI, Ctx);
- MCAsmBackend *MAB = TheTarget->createMCAsmBackend(TripleName);
+ MCAsmBackend *MAB = TheTarget->createMCAsmBackend(TripleName, MCPU);
Str.reset(TheTarget->createMCObjectStreamer(TripleName, Ctx, *MAB,
FOS, CE, RelaxAll,
NoExecStack));
OpenPOWER on IntegriCloud