This patch enables choice for accessing thread local storage pointer (like '-mtp' in gcc).
The values are:
'-mtp=soft': generate call to __aeabi_read_tp() - before this patch this was the only way to access the pointer, and it remains default.
'-mtp=cp15': read the pointer directly from coprocessor cp15, with 'mrc' instruction.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
I think this fits in better as a subtarget feature controlled by "-mattr". The implementation could then be almost all in TableGen, just using different patterns for ARMthread_pointer (giving greater symmetry with the existing path). It would also make it much neater to pipe through to clang.
test/CodeGen/ARM/readtp.ll | ||
---|---|---|
22 ↗ | (On Diff #103223) | Isn't the actual register a pretty critical ABI issue? |