Andrew Kelley
bd2154da3d
stage2: the code is compiling again
...
(with a lot of things commented out)
2021-03-18 22:48:28 -07:00
Andrew Kelley
b2682237db
stage2: get Module and Sema compiling again
...
There are some `@panic("TODO")` in there but I'm trying to get the
branch to the point where collaborators can jump in.
Next is to repair the seam between LazySrcLoc and codegen's expected
absolute file offsets.
2021-03-18 22:19:28 -07:00
Andrew Kelley
f5aca4a6a1
Merge remote-tracking branch 'origin/master' into zir-memory-layout
...
I need the enum arrays that were just merged into master.
2021-03-18 15:52:12 -07:00
Martin Wickham
96ae451bbe
Add some enum utilities
2021-03-18 14:05:01 -07:00
Andrew Kelley
5e5b35f107
stage1: small memory optimization for simple pointer types
...
Avoid storing extra IR instruction data for simple pointer types.
2021-03-18 14:04:02 -07:00
Andrew Kelley
a6f5aa71ac
stage1: small IR memory optimization on CheckSwitchProngs
2021-03-18 14:04:02 -07:00
Veikka Tuominen
ac7217e1f5
translate-c: preserve zero fractional part in float literals
2021-03-18 22:46:00 +02:00
jacob gw
7c6eb41619
cbe tests: fix test on windows
...
"\n" -> std.cstr.line_sep
2021-03-18 22:45:01 +02:00
Andrew Kelley
5cbb642525
stage1: small mem usage improvement for IR
...
move a boolean field to be represented implicitly with the enum tag.
Just borrowing one of the many strategies of stage2.
This simple change took the peak mem usage from std lib tests on
my machine from 8.21 GiB to 8.11 GiB.
2021-03-18 13:14:26 -07:00
Jakub Konka
17c066e925
Merge pull request #8282 from kubkon/zld
...
macho: upstream zld linker
2021-03-18 19:14:17 +01:00
Evan Haas
b54514d9dd
translate-c: Use [N:0] arrays when initializer is a string literal ( #8264 )
...
* translate-c: Use [N:0] arrays when initializer is a string literal
Translate incomplete arrays as [N:0] when initialized by a string literal.
This preserves a bit more of the type information from the original C program.
Fixes #8215
2021-03-18 14:41:04 +02:00
root
75a7abb0c4
std: Fix std.fs.path.joinZ
2021-03-18 14:33:38 +02:00
Veikka Tuominen
bcc97bc1ed
Merge pull request #8247 from Ersikan/fmt-fix-encoding
...
zig fmt: fix non-UTF-8 encoding #2820
2021-03-18 14:30:11 +02:00
Jakub Konka
f3b4f79c7f
zld: temporarily disable testing shared lib linking
2021-03-18 11:10:31 +01:00
Jakub Konka
2cf1c1b96b
macho: honor verbose_link when linking with zld
2021-03-18 11:10:09 +01:00
Jakub Konka
861ea64009
macho: remove now obsolete LLD fixups
2021-03-18 11:09:47 +01:00
Dimenus
dfeca48e35
@intCast takes two args
2021-03-17 22:58:52 -07:00
Andrew Kelley
66245ac834
stage2: Module and Sema are compiling again
...
Next up is reworking the seam between the LazySrcLoc emitted by Sema
and the byte offsets currently expected by codegen.
And then the big one: updating astgen.zig to use the new memory layout.
2021-03-17 22:54:56 -07:00
Jakub Konka
7516dfff83
zld: use zld when linking aarch64 by default and cross-comp
2021-03-18 00:37:13 +01:00
Jakub Konka
900658a85d
rebase with master
2021-03-17 20:05:29 +01:00
Jakub Konka
1ec620be62
zld: fix GOT loads and indirection on x86_64
2021-03-17 19:59:57 +01:00
Jakub Konka
ac0c669473
zld: add/fix more issues
...
* fix debug info for static archives
* allow handling of empty object files
* fix some relocs for GOT loads
2021-03-17 19:59:13 +01:00
Jakub Konka
de209afbba
zld: fix TLV initializers
2021-03-17 19:59:13 +01:00
Jakub Konka
349f878ecf
zld: mimick Apple and add __DATA_CONST seg
2021-03-17 19:59:13 +01:00
Jakub Konka
62f43fbc06
zld: clean up use of commands.zig module
2021-03-17 19:59:13 +01:00
Jakub Konka
d484b3b3cb
zld: use aarch64 for opcodes
2021-03-17 19:59:13 +01:00
Jakub Konka
dc34ac2b9e
zld: fix incorrect offset calc for DICE
2021-03-17 19:59:13 +01:00
Jakub Konka
5d8944edc1
Revert log.warn hack
2021-03-17 19:59:13 +01:00
Jakub Konka
a1b0ec5277
zld: start bringing x64 up to speed
2021-03-17 19:59:13 +01:00
Jakub Konka
066c1386a3
zld: demote logs from warn to debug
2021-03-17 19:59:13 +01:00
Jakub Konka
b0ee480177
zld: merge and sort sections
2021-03-17 19:59:13 +01:00
Jakub Konka
44ebf48631
zld: fix handling of section alignment
2021-03-17 19:59:13 +01:00
Jakub Konka
7c22f4f851
zld: pass test-std and test-compiler-rt
2021-03-17 19:59:13 +01:00
Jakub Konka
7cbdbab376
zld: differentiate locals from globals
2021-03-17 19:59:13 +01:00
Jakub Konka
7e32947871
zld: add nop to reloc module
2021-03-17 19:59:13 +01:00
Jakub Konka
d2008db623
zld: bullet-proof stubs for long jumps
2021-03-17 19:59:13 +01:00
Jakub Konka
14590795b1
zld: cleanup section alignment when allocating
2021-03-17 19:59:13 +01:00
Jakub Konka
586c704212
zld: pass stage2 tests linked with zld!
2021-03-17 19:59:13 +01:00
Jakub Konka
e825a15b05
zld: replace ldr with add if indivisible
2021-03-17 19:59:13 +01:00
Jakub Konka
f52f23618d
macho: start upstreaming zld
2021-03-17 19:59:13 +01:00
Jakub Konka
0f7b036eb7
Merge pull request #8281 from kubkon/macho-got-refactor
...
stage2+macho: refactor global offset table for incremental linker
2021-03-17 19:44:32 +01:00
Frank Denis
119fc318a7
std/crypto/chacha20: add round-reduced versions & cleanup internals
...
See https://eprint.iacr.org/2019/1492.pdf for justification.
8 rounds ChaCha20 provides a 2.5x speedup, and is still believed
to be safe.
Round-reduced versions are actually deployed (ex: Android filesystem
encryption), and thanks to the magic of comptime, it doesn't take much
to support them.
This also makes the ChaCha20 code more consistent with the Salsa20 code,
removing internal functions that were not part of the public API any more.
No breaking changes; the public API remains backwards compatible.
2021-03-17 11:25:51 -07:00
Andrew Kelley
587243c7a5
Merge pull request #8273 from jedisct1/pbkdf2-check
...
crypto/pbkdf2: simplify the check for the max number of iterations
2021-03-17 11:25:19 -07:00
Jakub Konka
e5234c0e9e
macho: offset table part of GOT
2021-03-17 12:16:36 +01:00
Jakub Konka
b9fa80e588
macho: use latest bind functionality
2021-03-17 12:10:39 +01:00
Jakub Konka
1181543dad
macho: extract writing stub helper preamble into fn
2021-03-17 12:10:39 +01:00
Jakub Konka
3df2ae1f9d
macho: clean up writing of stub helper section
2021-03-17 12:10:39 +01:00
Jakub Konka
643b4898f5
macho: handle all jumps in stubs on aarch64
2021-03-17 12:10:39 +01:00
Jakub Konka
3019676440
macho: apply some renames to bring closer to zld
2021-03-17 12:10:39 +01:00
Ersikan
36db4b7cc4
test-cli: Remove temporary directory after tests
2021-03-17 10:27:41 +01:00