joachimschmidt557
2ba1ef165a
stage2 AArch64: implement genSetReg for ptr_stack_offset
2022-02-21 22:54:14 +01:00
joachimschmidt557
ec62e76455
stage2 AArch64: replace genMulConstant with binOp
2022-02-21 22:54:09 +01:00
joachimschmidt557
19c683fab0
stage2 AArch64: distinguish between sp/wsp and xzr/wzr
2022-02-21 22:44:47 +01:00
joachimschmidt557
a9154a7eaf
stage2 AArch64: implement storing to memory
2022-02-21 22:44:40 +01:00
Steven Fackler
2c8541bdde
Support -Wl,--soname
2022-02-20 13:56:12 -05:00
David John
bdb5713941
stage2: fix typo in riscv64/Emit.zig
2022-02-20 19:10:54 +01:00
Luuk de Gram
bb05a8a08a
stage2: Fix 32bit builds
2022-02-20 18:16:28 +01:00
Andrew Kelley
7d9e3840bb
Sema: fix inline break from a non-comptime scope to outer one
...
Prior to this, the compiler would hit an assertion because the
break_inline would not successfully move the compile-time control flow.
2022-02-20 00:20:29 -07:00
Andrew Kelley
01638c250f
Sema: implement readFromMemory for arrays
2022-02-20 00:08:05 -07:00
Andrew Kelley
bfff8544e1
AstGen: emit break_inline for corresponding inline loops
...
Prior to this commit there would be a `break` ZIR instruction to break
from a `block_inline` which is a mismatch.
2022-02-19 20:26:57 -07:00
Andrew Kelley
8841a71aa6
AstGen: evaluate comptime var init expressions in a comptime context
2022-02-19 15:11:18 -07:00
Andrew Kelley
746435a954
Sema: implement @typeInfo for list literals
2022-02-19 15:11:18 -07:00
Jakub Konka
539bb8a2d7
Merge pull request #10927 from ziglang/x64-idiv-imul
...
stage2,x64: implement integer division
2022-02-19 17:35:58 +01:00
Jakub Konka
da86839af0
x64: clean up implementation of divs, mod, rem for integers
2022-02-19 14:24:03 +01:00
Jakub Konka
bd396d7e07
x64: add unsigned div and move logic into a helper fn
2022-02-19 14:24:03 +01:00
Jakub Konka
2c13a4b87e
x64: implement div_exact for ints (signed+unsigned)
2022-02-19 14:24:03 +01:00
Jakub Konka
1f4aa5ef78
x64: add lowering for single operand imul and idiv
2022-02-19 14:24:03 +01:00
joachimschmidt557
669603029e
stage2 ARM: implement airCmp with binOp lowering mechanism
2022-02-19 12:12:29 +01:00
joachimschmidt557
c29bf2f51a
stage2 ARM: move shl, shr to binOp lowering mechanism
2022-02-19 12:06:34 +01:00
joachimschmidt557
3b1762bb47
stage2 ARM: fix boolean and bitwise not
2022-02-19 12:06:34 +01:00
joachimschmidt557
7b833b2fba
stage2 ARM: move {bool,bit}_{or,and} to binOp lowering mechanism
2022-02-19 12:06:34 +01:00
joachimschmidt557
985a442f46
stage2 ARM: move mul to binOp lowering mechanism
2022-02-19 12:06:34 +01:00
joachimschmidt557
67e3346633
stage2 ARM: move add and sub to new binOp lowering mechanism
2022-02-19 12:06:30 +01:00
joachimschmidt557
23915c2c44
stage2 ARM: simplify invocations of genInlineMemcpy
2022-02-19 12:04:54 +01:00
Andrew Kelley
2e1c16d649
Merge pull request #10924 from ziglang/air-independence-day
...
AIR independence day
2022-02-19 02:57:48 -05:00
Andrew Kelley
4e1e5ab622
stage2: make AIR not reference ZIR for inline assembly
...
Instead it stores all the information it needs to into AIR.
closes #10784
2022-02-18 19:41:32 -07:00
Andrew Kelley
32edb9b55d
stage2: eliminate ZIR arg instruction references to ZIR
...
Prior to this commit, the AIR arg instruction kept a reference to a ZIR
string index for the corresponding parameter name. This is used by DWARF
emitting code. However, this is a design flaw because we want AIR
objects to be independent from ZIR.
This commit saves the parameter names into memory managed by
`Module.Fn`. This is sub-optimal because we should be able to get the
parameter names from the ZIR for a function without having them
redundantly stored along with `Fn` memory. However the current way that
ZIR param instructions are encoded does not support this case. They
appear in the same ZIR body as the function instruction, just before it.
Instead, they should be embedded within the function instruction, which
will allow this TODO to be solved. That improvement is too big for this
commit, however.
After this there is one last dependency to untangle, which is for inline
assembly. The issue for that is #10784 .
2022-02-18 16:56:12 -07:00
Cody Tapscott
db80dff4e0
Add backend-specific skips for bitreverse, byteswap tests
2022-02-18 14:28:32 -07:00
Cody Tapscott
ef417f19e1
stage2: Implement @bitReverse and @byteSwap
...
This change implements the above built-ins for Sema and the LLVM
backend. Other backends have had placeholders added for lowering.
2022-02-18 14:28:32 -07:00
Andrew Kelley
60bb1d4e1c
Merge pull request #10906 from topolarity/cbe-array-support
...
stage2 CBE: Implement 2D array support
2022-02-18 14:08:06 -05:00
Andrew Kelley
736b9dcdd6
Merge pull request #10858 from topolarity/stage2-bitcast
...
stage2 sema: Fix sign handling of exotic integers in `@bitCast`
2022-02-18 13:49:00 -05:00
Jakub Konka
5af9d0c603
Merge pull request #10916 from ziglang/x64-args-stack-debug
...
stage2,x64: pass all args on stack in debug and if not extern fn
2022-02-18 15:18:01 +01:00
Jakub Konka
0f0bb7e5ea
x64: ensure 16byte stack alignment across calls
2022-02-18 13:02:08 +01:00
Veikka Tuominen
53241f288e
Merge pull request #10913 from Vexu/err
...
further parser error improvements
2022-02-18 13:53:47 +02:00
Jakub Konka
d74e9b2d98
x64: rename copyToNewRegister to copyToRegisterWithInstTracking for impr clarity
2022-02-18 09:14:15 +01:00
Jakub Konka
83744b92a1
x64: fix wrong regalloc with inst tracking in airCmp
...
We return compare flags rather than a register which than wrongly
cheats the regalloc into thinking we carry the instruction in the
register which we do not.
2022-02-18 09:14:15 +01:00
Jakub Konka
97c25fb8d0
x64: implement array_elem_val when array is stored in memory
2022-02-18 09:14:15 +01:00
Jakub Konka
abfaf8382b
x64: implement array_elem_val when array fits in register
2022-02-18 09:14:15 +01:00
Jakub Konka
085c606b87
x64: implement slice_elem_ptr
2022-02-18 09:14:15 +01:00
Jakub Konka
6d3c7bd436
x64: pass all args on stack in debug and if not extern fn
...
If the function call is not extern and we are compiling in debug,
pass function params always on stack. This will improve debugging
capabilities since the params will not be volatile and possibly
clobbered by the procedure code.
Finish implementation of `imul_complex`.
2022-02-18 09:14:15 +01:00
Andrew Kelley
dd12a7b1e5
ci: linux: re-use cmake config for finding LLVM
2022-02-17 23:42:48 -07:00
Andrew Kelley
6f42876e74
CLI: resolve system libs into static libraries
...
using the provided -L directories before checking if we need to integrate
with system library paths. This prevents false positive of invoking
system cc to find native paths when in fact all dependencies are
satisfied by -L (or --search-prefix to zig build).
2022-02-17 23:42:48 -07:00
Andrew Kelley
9ea253b9c4
Sema: implement type info for structs
2022-02-17 20:48:09 -07:00
Andrew Kelley
0bb22600bd
Sema: fix typeinfo for enums with no declarations
2022-02-17 20:48:09 -07:00
Andrew Kelley
feb4b01b38
Sema: fix typeinfo for sentinels of array and pointer
2022-02-17 20:48:09 -07:00
Andrew Kelley
5aa35f62c3
Revert "reduce build error noise"
...
This reverts commit baead472d7641bdd96130354bafadc1fb1ed223b.
Let's go through the proposal process on this one. I want to push back
on this. My position is that, at the very least, a full trace of command
lines of sub-processes should be printed on failure, with the exception
of opt-in flags such as `--prominent-compile-errors`.
2022-02-17 14:30:12 -07:00
Veikka Tuominen
6235afc632
stage1: fix f80 negation
2022-02-17 23:06:46 +02:00
Veikka Tuominen
6b65590715
parser: add notes to decl_between_fields error
2022-02-17 22:16:26 +02:00
Andrew Kelley
f20929bd8b
stage2: fix crash using -femit-bin
2022-02-17 13:12:31 -07:00
Luuk de Gram
ced958e8a8
wasm-linker: Simplify symbol names
...
No longer duplicate the symbol name and instead take the pointer from the decl itself.
Also fix 32bit build
2022-02-17 18:11:48 +01:00