Jacob Young
fd13e44e0c
x86_64: cleanup debug mir dumping
2023-03-27 05:58:00 -04:00
Jacob Young
802c2e4fae
x86_64: fix popcnt and disable regressed test
2023-03-27 05:58:00 -04:00
Jacob Young
6c54428415
x86_64: implement trunc with large source
2023-03-27 05:58:00 -04:00
Jacob Young
587eacefec
x86_64: fix 64-bit multiply by 32-bit immediate
2023-03-27 05:58:00 -04:00
Jacob Young
65838fcabe
x86_64: implement some binary ops for large values
2023-03-27 05:58:00 -04:00
Jacob Young
3a516433b0
x86_64: add live codegen debug
2023-03-27 05:58:00 -04:00
Jacob Young
abb37a7cb8
x86_64: factor out lowering from emitting
2023-03-27 05:58:00 -04:00
Jacob Young
86625c5a75
x86_64: enable mem dst bin ops, and fix uncovered bugs
2023-03-27 04:31:39 -04:00
Jakub Konka
32591c1d99
Merge pull request #15076 from jacobly0/x86_64-backend
...
x86_64: implement things
2023-03-26 17:31:42 +02:00
Veikka Tuominen
4a5628e730
Module: fix lazy srcloc resolution for new for loop syntax
...
Closes #15081
2023-03-26 15:14:03 +03:00
Jacob Young
14c0b8c548
x86_64: remove unused Mir encodings
...
This also restores the size of Mir.Inst and simplifies logic in general.
2023-03-25 21:26:18 -04:00
Jacob Young
d29c674d0d
x86_64: implement teb inline assembly for windows
2023-03-25 16:23:55 -04:00
Jacob Young
1e080e5056
x86_64: implement atomic loops
2023-03-25 16:23:55 -04:00
Jacob Young
6d9bdc8733
x86_64: fix cmpxchg
2023-03-25 16:23:55 -04:00
Jacob Young
a2f6e068b0
x86_64: implement 128-bit intcast
2023-03-25 16:23:55 -04:00
Jacob Young
d064cf639f
x86_64: implement 128-bit shifts
2023-03-25 16:23:55 -04:00
Jacob Young
77300c02d6
x86_64: implement large ptr_elem_val
2023-03-25 16:23:55 -04:00
Jacob Young
8f385e77ca
x86_64: implement struct_field_val for packed containers
2023-03-25 16:23:55 -04:00
Jacob Young
0cfc0d0d13
x86_64: implement struct_field_ptr for packed containers
2023-03-25 16:23:55 -04:00
Jacob Young
d9ce69dc39
codegen: fix ptr-like optional constants
2023-03-25 16:23:55 -04:00
Jacob Young
3ece975857
x86_64: implement saturating arithmetic
2023-03-25 16:23:55 -04:00
Jacob Young
4ab4bd04fe
x86_64: add back assume unused
...
This seems to have been asserting due to a value tracking bug that has
since been fixed.
2023-03-24 21:34:38 -04:00
Jacob Young
0987ed1970
x86_64: detect canonicalisation hazards
2023-03-24 17:57:58 -04:00
Jacob Young
5e0f091684
x86_64: try to fix br canonicalization
2023-03-24 17:57:58 -04:00
Jacob Young
935ec9ec6a
x86_64: canonicalize each br of a block
2023-03-24 17:57:58 -04:00
Jacob Young
c604111e22
x86_64: fix block result value tracking
2023-03-24 17:57:58 -04:00
Jacob Young
12c07fcf20
x86_64: fix more value tracking bugs
2023-03-24 17:57:58 -04:00
Jacob Young
dbe1b4a7e5
x86_64: fix value tracking bugs
2023-03-24 17:57:58 -04:00
Jakub Konka
dcdb878360
macho+zld: only check for alias symbols for non-extern relocations
2023-03-23 22:32:09 +01:00
Jakub Konka
dc6b05408a
Merge pull request #15041 from ziglang/fix-14923
...
macho: fix Go mislinking on aarch64-macos, and misc cleanup
2023-03-22 18:30:00 +01:00
Jakub Konka
1eb4264b7a
macho+zld: make sure we populate source section index lookup if no undefs
2023-03-22 15:13:52 +01:00
Jakub Konka
c984201ddb
macho+zld: refactor parsing of relocation target
2023-03-22 15:13:17 +01:00
Jakub Konka
8bffe87e9e
macho: collect all exports into the export trie
2023-03-21 21:31:24 +01:00
Jakub Konka
1be8621815
macho+zld: when finding by address, note the end of section symbols too
...
Previously, if we were looking for the very last symbol by address in some
section, and the next symbol happened to also have the same address value
but would reside in a different section, we would keep going finding the
wrong symbol in the wrong section.
This mechanism turns out vital for correct linking of Go binaries
where the runtime looks for specially crafted synthetic symbols
which mark the beginning and end of each section. In this case,
we had an unfortunate clash between the end of PC marked machine code
section (`_runtime.etext`) and beginning of read-only data (`_runtime.rodata`).
2023-03-21 21:27:22 +01:00
Jakub Konka
dc98009e36
macho+zld: save all defined globals in the export trie
2023-03-21 16:12:25 +01:00
Jakub Konka
cb34d6f436
macho+zld: put locals and globals in function-starts section
2023-03-21 14:43:02 +01:00
Jakub Konka
83352678d4
macho+zld: put __TEXT bound sections in __TEXT segment
2023-03-21 14:30:30 +01:00
John Schmidt
ec445fb6b8
Improve error messages for break type coercion
2023-03-21 15:09:42 +02:00
mlugg
f9b5829508
Sema: implement @export for arbitrary values
2023-03-21 15:04:39 +02:00
Xavier Bouchoux
898e4473e8
CBE: implement aggregateInit() for array of array case.
...
fixes `error(compilation): clang failed with stderr: error: array type 'uint32_t[10]' (aka 'unsigned int[10]') is not assignable`
2023-03-21 14:56:04 +02:00
Veikka Tuominen
f7204c7f37
Merge pull request #15028 from Vexu/compile-errors
...
Sema: improve error message of field access of wrapped type
2023-03-21 14:55:36 +02:00
Jakub Konka
b73159f4f5
macho: use TOOL=0x5 to mean ZIG as the build tool
2023-03-21 13:47:09 +01:00
Jakub Konka
073f9a18a9
macho+zld: return null rather than error on invalid AbbrevKind
2023-03-21 11:38:49 +01:00
Jakub Konka
a88ffa7fa9
macho+zld: save locals from section atoms to symtab too
2023-03-21 11:38:19 +01:00
Jacob Young
c58b5732f3
x86_64: implement @byteSwap and @bitReverse
2023-03-21 08:49:54 +01:00
Jacob Young
f316cb29cc
x86_64: implement atomic and fence ops
2023-03-21 08:49:54 +01:00
Jacob Young
3f4569bf18
codegen: fix backend breakage due to optional layout change
2023-03-21 08:49:54 +01:00
Jacob Young
6c453dd806
x86_64: implement some slice ops
2023-03-21 08:49:54 +01:00
Jacob Young
958c8e1ce9
x86_64: implement @popCount for older processors
...
This fixes the behavior tests when compiled for baseline.
2023-03-21 08:49:54 +01:00
Jacob Young
f95faac5ae
x86_64: (re)implement optional ops
...
Note that this commit also changes the layout of optional for all
other backends using `src/codegen.zig` without updating them!
2023-03-21 08:49:54 +01:00