623 Commits

Author SHA1 Message Date
LemonBoy
a11c20e26a Fix TLS for VariantI arches with a twist 2019-09-21 19:53:39 -04:00
Andrew Kelley
f663bcd6b2
add more RISCV64 linux bits to std lib 2019-09-20 15:24:50 -04:00
Andrew Kelley
aab1ec5c43
fix typo 2019-09-20 15:02:47 -04:00
daurnimator
2a8facafde
std: update for linux 5.3 2019-09-20 15:01:47 -04:00
daurnimator
edea0d431b
std: update riscv64 syscalls 2019-09-20 15:01:47 -04:00
Andrew Kelley
c4416b224d
Merge remote-tracking branch 'origin/master' into llvm9 2019-09-15 20:59:53 -04:00
Andrew Kelley
c15e464320
Merge branch 'uefi' of https://github.com/nrdmn/zig into nrdmn-uefi 2019-09-13 14:10:42 -04:00
LemonBoy
774f770056 Correct AT_FDCWD definition 2019-09-12 13:15:50 -04:00
Andrew Kelley
cf4bccf765
improvements targeted at improving async functions
* Reuse bytes of async function frames when non-async functions
   make `noasync` calls. This prevents explosive stack growth.
 * Zig now passes a stack size argument to the linker when linking ELF
   binaries. Linux ignores this value, but it is available as a program
   header called GNU_STACK. I prototyped some code that memory maps
   extra space to the stack using this program header, but there was
   still a problem when accessing stack memory very far down. Stack
   probing is needed or not working or something. I also prototyped
   using `@newStackCall` to call main and that does work around the
   issue but it also brings its own issues. That code is commented out
   for now in std/special/start.zig. I'm on a plane with no Internet,
   but I plan to consult with the musl community for advice when I get a
   chance.
 * Added `noasync` to a bunch of function calls in std.debug. It's very
   messy but it's a workaround that makes stack traces functional with
   evented I/O enabled. Eventually these will be cleaned up as the root
   bugs are found and fixed. Programs built in blocking mode are
   unaffected.
 * Lowered the default stack size of std.io.InStream (for the async
   version) to 1 MiB instead of 4. Until we figure out how to get
   choosing a stack size working (see 2nd bullet point above), 4 MiB
   tends to cause segfaults due to stack size running out, or usage of
   stack memory too far apart, or something like that.
 * Default thread stack size is bumped from 8 MiB to 16 to match the
   size we give for the main thread. It's planned to eventually remove
   this hard coded value and have Zig able to determine this value
   during semantic analysis, with call graph analysis and function
   pointer annotations and extern function annotations.
2019-09-12 01:40:58 -04:00
Andrew Kelley
185cb13278
Merge remote-tracking branch 'origin/master' into llvm9 2019-09-10 13:00:35 -04:00
LemonBoy
fec795cd29 Adjust the stdlib to be 32bit compatible 2019-09-09 16:16:13 -04:00
LemonBoy
e4c3067617 Fix typo in TLS initialization code 2019-09-09 13:54:31 -04:00
Andrew Kelley
a7fd14096c
fix typo with tls initialization
I tested that hello world cross compiles to armv7 now.

closes #3167
2019-09-04 14:44:16 -04:00
Robin Voetter
df06976e73 Only check for TLS support on arm if TLS segment exists 2019-09-04 17:48:01 +02:00
Robin Voetter
77d04c03e3 Implement remaining requested changes
- Replace @intCast with a checked version (std/debug.zig)
- Replace @intCast with i64() when casting from a smaller type (std/fs/file.zig)
- Replace `nakedcc` with appropriate calling convention for linking with c (std/os/linux/arm-eabi.zig)
- Only check if hwcap contains TLS when the hwcap field actually exists (std/os/linux/tls.zig)
2019-09-04 16:23:25 +02:00
Robin Voetter
6a76298740 Add missing clobbers on arm-eabi and arm64 syscall conventions 2019-09-04 15:59:51 +02:00
Andrew Kelley
058050f22c
Merge remote-tracking branch 'origin/master' into llvm9 2019-09-02 20:56:31 -04:00
Nick Erdmann
5e874a89b9
std/os/uefi: fix ordering of packed bit fields 2019-09-02 22:31:59 +02:00
Nick Erdmann
8db41b7adb
std/os/uefi: add support for getting memory map 2019-09-02 22:10:50 +02:00
Nick Erdmann
03abc6edf4
std/os/uefi: add global_variable guid 2019-09-02 20:34:00 +02:00
Robin Voetter
d62f7c6b60 Merge remote-tracking branch 'upstream/master' into arm-support-improvement 2019-09-01 23:45:51 +02:00
Robin Voetter
e7912dee9b Fix up preadv, preadv2, pwritev and pwritev2 2019-09-01 16:10:36 +02:00
Robin Voetter
e9d795b025 Fix up seteuid and setegid 2019-09-01 12:08:02 +02:00
Robin Voetter
e39c93a2f3 Replace legacy 16-bit syscalls with 32-bit versions when appropriate 2019-09-01 11:54:57 +02:00
Andrew Kelley
8b1900e5df
Revert "Merge pull request #2991 from emekoi/mingw-ci"
This reverts commit ec7d7a5b14540ea3b2bab9f11318630338467965, reversing
changes made to 81c441f8855d4c58f0b2ff86d3d007cf0bf395d3.

It looks like this broke colors in Windows Command Prompt (#3147)
and this method of detecting native C ABI isn't working well (#3121).
2019-09-01 00:33:02 -04:00
Robin Voetter
4b8325f381 Remove unneeded os check 2019-08-30 13:02:15 +02:00
Robin Voetter
c1f8b201a1 Improve comments near un-implemented functionality 2019-08-30 12:58:44 +02:00
Robin Voetter
2323da3a68 add __aeabi_read_tp 2019-08-29 18:12:58 +02:00
Robin Voetter
108a51b110 fix issues with debug.zig
- Use sys_*stat*64 instead of sys_*stat* where appropriate
- Fix overflow when calculating atime, ctime and mtime on File.stat()
- Fix compilation error casting getEndPos to usize.
2019-08-29 10:34:05 +02:00
Robin Voetter
b3ac323a44 TLS initialization, clone definition and _start functionality 2019-08-29 01:14:43 +02:00
Robin Voetter
57de61084e Make mmap use SYS_mmap2 if it exists 2019-08-29 00:55:22 +02:00
Robin Voetter
223b773e03 Add more syscall constants 2019-08-29 00:54:57 +02:00
Andrew Kelley
928ce5e326
Merge remote-tracking branch 'origin/master' into llvm9 2019-08-28 16:59:35 -04:00
Robin Voetter
50c37c75d1 add arm32 syscall conventions 2019-08-28 17:41:49 +02:00
Robin Voetter
32f4606cec add arm32 linux bits definitions 2019-08-28 16:35:23 +02:00
Andrew Kelley
ec7d7a5b14
Merge pull request #2991 from emekoi/mingw-ci
mingw improvements
2019-08-21 12:29:42 -04:00
Andrew Kelley
5f3d59f0ac
Merge branch 'master' into llvm9 2019-08-20 19:09:52 -04:00
Andrew Kelley
3dce41b61a
improvements to std lib for event-based I/O 2019-08-16 21:29:29 -04:00
Andrew Kelley
6529658ad8
Merge remote-tracking branch 'origin/master' into llvm9 2019-08-16 16:43:56 -04:00
Andrew Kelley
7e75e1075e
zig fmt 2019-08-15 18:19:04 -04:00
Nick Erdmann
70e62b8612
std/os/uefi: some more events 2019-08-11 15:50:03 +02:00
Nick Erdmann
47ce736abe
std/os/uefi: add basic Event support 2019-08-10 19:14:47 +02:00
Nick Erdmann
9445b3f057
std/os/uefi: change type of Handle from @OpaqueType to *@OpaqueType 2019-08-10 19:14:31 +02:00
Euan Torano
f2bef0447a
Remove unneeded casts. 2019-08-07 22:19:25 +01:00
Euan Torano
2d25348f63
Fix function signature and use a loop to ensure buffer is filled. 2019-08-06 19:32:22 +01:00
Nick Erdmann
88fdb303ff
std/os/uefi: replace init() with default values 2019-08-06 18:06:18 +02:00
Nick Erdmann
20ce0b9952
std/os/uefi: replace integer bit fields with packed structs 2019-08-05 18:26:13 +02:00
Euan T
8aa87ec441 Add misisng newline 2019-08-05 09:23:15 -07:00
Euan Torano
0157365872 Add missing S_IS* for NetBSD 2019-08-05 09:23:15 -07:00
Nick Erdmann
b979fc1bcd
initial work torwards std lib support for uefi 2019-08-04 21:53:49 +02:00