Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Unified Diff: lib/Target/X86/X86MCInstLower.cpp

Issue 767623005: Remove workaround for call+bundle_lock under gas in LowerTlsAddr (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/Target/X86/X86MCInstLower.cpp
diff --git a/lib/Target/X86/X86MCInstLower.cpp b/lib/Target/X86/X86MCInstLower.cpp
index 8628eae7598791930ef86c7e0fd5e9227decd999..3ac7ab2982b33ca516c3bc904f48d2f038c6a95a 100644
--- a/lib/Target/X86/X86MCInstLower.cpp
+++ b/lib/Target/X86/X86MCInstLower.cpp
@@ -616,21 +616,13 @@ static void LowerTlsAddr(MCStreamer &OutStreamer,
Triple TT(STI.getTargetTriple());
// @LOCALMOD-START
- // There are 2 issues with this code. First, instead of testing the target OS
- // we should add (upstream) a method to one of the MC classes to test whether
- // bundle alignment is enabled (currently only the AsmBackend has this, which
- // can't be used when emitting asm files). That facility should be used here
- // and in MCAsmStreamer.cpp (this should be done once we are unblocked from
- // switching to gas by default, so we know exactly where we need it).
- // Secondly, a bug in gas prevents us from using .bundle_lock with the call
- // here (https://code.google.com/p/nativeclient/issues/detail?id=4008).
- // This is actually ok for nacl-clang for now because the old x86 ld linker
- // has a hack that allows it to rewrite TLS GD sequences even in the presence
- // of nop padding. For PNaCl (with gold) we do need the sequence to be bundle
- // locked, so we use !hasRawTextSupport as a proxy for that. Once bug 4008
- // is fixed we will use the bundle-locks unconditionally with NaCl.
- bool needsBundleLock = (TT.getOS() == Triple::NaCl &&
- !OutStreamer.hasRawTextSupport());
+ // TODO(dschuff): Instead of testing the target OS we should add (upstream) a
+ // method to one of the MC classes to test whether bundle alignment is enabled
+ // (currently only the AsmBackend has this, which can't be used when emitting
+ // asm files). That facility should be used here and in MCAsmStreamer.cpp
+ // (this should be done once we are unblocked from switching to gas by
+ // default, so we know exactly where we need it).
+ const bool needsBundleLock = TT.getOS() == Triple::NaCl;
if (needsBundleLock)
OutStreamer.EmitBundleLock(false);
// @LOCALMOD-END
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698