================ @@ -3664,12 +3680,18 @@ static void RenderSSPOptions(const Driver &D, const ToolChain &TC, << A->getOption().getName() << Value; return; } + if (EffectiveTriple.isRISCV() && (Offset <= -2048 || Offset >= 2048)) { ---------------- keith-packard wrote:
Yeah, this is used as an offset from the TLS base register (tp). GCC doesn't allow arbitrary offsets for this value, permitting only a value that can be encoded as an immediate value in the load instruction. I mirrored those limits (slightly incorrectly) in my patch. Given that llvm can support arbitrary values as the compiler is happy to use multiple instructions as required, I think it's probably best to just remove this test instead of introducing an artificial limit to match gcc's behavior? https://github.com/llvm/llvm-project/pull/108942 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits