Open Quuxplusone opened 5 years ago
The preprocessed source and build script can be downloaded here:
http://www.intricatesoftware.com/distfiles/clang++.openjdk.stubRoutines.tar.gz
Attached llvm.42584.diff
(667 bytes, text/plain): Don't skip module LowerEmuTLS
Minimal test case on platforms with emulated TLS model:
======= minimal.cpp =============
class Minimal {
private:
static __thread int *tls1;
public:
static int* get_tls1() {
return tls1;
}
};
int main() {
return (int)Minimal::get_tls1();
}
==================================
clang++ -c -O2 -mllvm -opt-bisect-limit=95 -o minimal minimal.cpp
Adjust limit so that it is before:
Add __emutls_[vt]. variables for emultated TLS model on module (minimal.cpp)
and clang++ will segfault.
Sorry I posted the wrong version of the code. Here is right one:
======= minimal.cpp ===========
class Minimal {
private:
static __thread int tls1;
public:
static int get_tls1() {
return tls1;
}
};
int main() {
return Minimal::get_tls1();
}
===============================
llvm.42584.diff
(667 bytes, text/plain)