Commit Graph

4 Commits

Author SHA1 Message Date
grischka
380597704e tccpe: tls on windows (i386 / x86-64 / arm64)
Also:
- arm64-gen.c: cleanup load/store
  fixes a problem with bound-check test1b with
  ./configure --cc=tcc

  Also, do not use 'long' or 'ul' suffix in tcc because
  for example on win32-arm64
      (uint64_t) ~0xffful == 0x00000000fffff000
  but on linux-arm64
      (uint64_t) ~0xffful == 0xfffffffffffff000

Also:
- tccpe.c: cleanup "quoted dll nanes in def" parse
- tests2: enable some threaded tests on windows
2026-07-28 23:46:30 +02:00
Mounir IDRASSI
97a6d8c75f tls: fix local-exec addresses and external symbols
Some checks failed
build and test / test-x86_64-linux (push) Has been cancelled
build and test / test-x86_64-osx (push) Has been cancelled
build and test / test-aarch64-osx (push) Has been cancelled
build and test / test-x86_64-win32 (push) Has been cancelled
build and test / test-i386-win32 (push) Has been cancelled
build and test / test-arm64-win32 (push) Has been cancelled
build and test / test-armv7-linux (push) Has been cancelled
build and test / test-aarch64-linux (push) Has been cancelled
build and test / test-riscv64-linux (push) Has been cancelled
build and test / test-i386-linux (push) Has been cancelled
Preserve symbolic offsets when materializing i386 TLS addresses, generate ARM64 TLS addresses from the thread pointer, and carry RISC-V addends on both halves of the TPREL relocation pair.

Keep undefined ELF TLS symbols typed as STT_TLS so objects produced by TCC can be linked by the system linker. Extend the TLS regression coverage for narrow signed and unsigned accesses, address-taking, runtime indexing, thread isolation, large RISC-V offsets, unsupported runtimes, and external TLS definitions.
2026-07-10 23:58:23 +09:00
herman ten brugge
04206d2903 Some more TLS changes
Some checks failed
build and test / test-x86_64-linux (push) Has been cancelled
build and test / test-x86_64-osx (push) Has been cancelled
build and test / test-aarch64-osx (push) Has been cancelled
build and test / test-x86_64-win32 (push) Has been cancelled
build and test / test-i386-win32 (push) Has been cancelled
build and test / test-arm64-win32 (push) Has been cancelled
build and test / test-armv7-linux (push) Has been cancelled
build and test / test-aarch64-linux (push) Has been cancelled
build and test / test-riscv64-linux (push) Has been cancelled
build and test / test-i386-linux (push) Has been cancelled
tccgen.c:
  remove VT_TLS in gen_cast
libtcc.c:
  remove warning for gcc 16

i386-gen.c:
  fix gen_modrm for VT_LDOUBLE
riscv64-gen.c:
  add fc to TLS address
x86_64-gen.c:
  add TLS prefix in gen_opf

tests2/144_tls.c/tests2/144_tls.expect:
  updated test case
tests/tests2/Makefile
  skip TLS test for BSD
2026-07-09 07:54:16 +02:00
Meng Zhuo
ea26b85ac0 feat(x86_64): add TLS Local Exec support with tests 2026-05-13 09:07:31 +08:00