artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea5fb92
)
Initial enablment of EMULTLS on RiscV
author
drahn
<drahn@openbsd.org>
Fri, 14 May 2021 01:15:54 +0000
(
01:15
+0000)
committer
drahn
<drahn@openbsd.org>
Fri, 14 May 2021 01:15:54 +0000
(
01:15
+0000)
Uncertain if this is 100% correct, however this enables self hosting
using clang.
gnu/llvm/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
patch
|
blob
|
history
diff --git
a/gnu/llvm/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
b/gnu/llvm/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index
03d9eef
..
17f06ab
100644
(file)
--- a/
gnu/llvm/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/
gnu/llvm/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@
-634,6
+634,10
@@
SDValue RISCVTargetLowering::getDynamicTLSAddr(GlobalAddressSDNode *N,
SDValue RISCVTargetLowering::lowerGlobalTLSAddress(SDValue Op,
SelectionDAG &DAG) const {
+ const GlobalAddressSDNode *GA = cast<GlobalAddressSDNode>(Op);
+ if (DAG.getTarget().useEmulatedTLS())
+ return LowerToTLSEmulatedModel(GA, DAG);
+
SDLoc DL(Op);
EVT Ty = Op.getValueType();
GlobalAddressSDNode *N = cast<GlobalAddressSDNode>(Op);