57 Commits

Author SHA1 Message Date
LemonBoy
22b5e47839 stage1: Implement @reduce builtin for vector types
The builtin folds a Vector(N,T) into a scalar T using a specified
operator.

Closes #2698
2020-10-05 04:51:45 -04:00
Andrew Kelley
ada19c498d stage2: building DLL import lib files 2020-09-28 19:20:58 -07:00
Andrew Kelley
c58e9951ef revert bogus enum keywords in zig_llvm.h 2020-09-14 10:31:34 -07:00
Andrew Kelley
c903dad915 fix zig_llvm.h not complying with C 2020-09-12 00:50:17 -07:00
Andrew Kelley
11b50e3ad8 change the default ABI of riscv64-linux-musl
Before, this would cause a link failure when mixing Zig and C code for
RISC-V targets.

Now, the ABIs match and Zig and C code can be mixed successfully.

I will file a follow-up issue for the ability to deal more explicitly
with ABIs.

closes #4863
2020-04-03 13:13:09 -04:00
Andrew Kelley
f33bf48af7
Merge remote-tracking branch 'origin/master' into llvm10 2020-02-25 16:30:40 -05:00
Andrew Kelley
61c67a9833
remove sub-arch from stage1 2020-02-21 11:47:34 -05:00
Andrew Kelley
d7968c6d33
improvements which allow zig to emit multiple things at once
example: zig build-obj test.zig -femit-llvm-ir -femit-asm

this will generate all three: test.o test.s test.ll
2020-02-18 21:59:43 -05:00
Andrew Kelley
79fb486017
link: update to llvm 10 API 2020-01-23 17:28:13 -05:00
Andrew Kelley
fb8e681ea8
update zig_llvm.h and zig_llvm.cpp to llvm 10 2020-01-22 18:43:30 -05:00
LemonBoy
435528a7c5 Use the LLVM C++ API 2020-01-02 18:57:09 +01:00
Vexu
ab7fc33c83
add zig llvm wrapper for atomicrmw 2019-12-23 11:55:00 +02:00
LemonBoy
f1407b4b7e Generate the fn pointers into the correct address space
Fixes #3645
2019-12-15 14:42:53 -05:00
Andrew Kelley
1f602fe8c5
implement @call
closes #3732
2019-12-05 17:07:15 -05:00
Vexu
8edf27343f
self hosted compiler: fix zig_llvm.h function signature 2019-11-07 10:29:44 +02:00
LemonBoy
2b624fea84 Add dlltool functionality
Don't need no patched lld --kill-at behaviour now.
2019-10-12 10:56:16 +02:00
LemonBoy
093ffe9f16 Correct stack alignment for new stack 2019-09-21 11:39:50 +02:00
Andrew Kelley
6529658ad8
Merge remote-tracking branch 'origin/master' into llvm9 2019-08-16 16:43:56 -04:00
Andrew Kelley
7b3686861f
@frameSize works via PrefixData 2019-07-25 22:24:01 -04:00
Andrew Kelley
ead2d32be8
calling an inferred async function 2019-07-25 00:03:06 -04:00
Andrew Kelley
2c1e955de7
always give the type to byval attribute 2019-07-20 13:32:50 -04:00
Andrew Kelley
8f92a49dfd
update to llvm9 trunk 2019-07-16 22:23:48 -04:00
Timon Kruiper
bbc0d440b8 Added ZigLLVMCreateTargetMachine and pass function-sections flag
Also added extra cache line

Added the ZigLVVMCreateTargetMachine to self hosted zig code
2019-07-02 19:54:29 +02:00
Timon Kruiper
7586f613d5 Added function-section functionality 2019-07-01 17:49:08 +02:00
LemonBoy
80cd142c96 Propagate DIFlags to LLVM 2019-06-04 09:05:33 +02:00
Andrew Kelley
2dcf1a2392
Merge remote-tracking branch 'origin/master' into llvm8 2019-02-28 09:19:18 -05:00
Andrew Kelley
ade10387a5
breaking changes to the way targets work in zig
* CLI: `-target [name]` instead of `--target-*` args.
   This matches clang's API.
 * `builtin.Environ` renamed to `builtin.Abi`
   - likewise `builtin.environ` renamed to `builtin.abi`
 * stop hiding the concept of sub-arch. closes #1526
 * `zig targets` only shows available targets. closes #438
 * include all targets in readme, even those that don't
   print with `zig targets` but note they are Tier 4
 * refactor target.cpp and make the naming conventions
   more consistent
 * introduce the concept of a "default C ABI" for a given
   OS/Arch combo. As a rule of thumb, if the system compiler
   is clang or gcc then the default C ABI is the gnu ABI.
2019-02-26 15:58:10 -05:00
Andrew Kelley
06be65a602
fix vector debug info tripping LLVM assertion 2019-02-04 22:16:16 -05:00
Andrew Kelley
d974afde1d
fix vector debug info tripping LLVM assertion 2019-02-04 22:14:35 -05:00
Andrew Kelley
f32f7a937f
Merge remote-tracking branch 'origin/master' into llvm8 2019-02-04 21:26:50 -05:00
Andrew Kelley
545064c1d9
introduce vector type for SIMD
See #903

 * create with `@Vector(len, ElemType)`
 * only wrapping addition is implemented

This feature is far from complete; this is only the beginning.
2019-01-30 23:39:25 -05:00
Andrew Kelley
1411df4e27 update to llvm8 trunk. all tests passing 2019-01-24 09:31:00 -05:00
Andrew Kelley
75d142c3c7 llvm8: fix ZigLLVMCreateFunction 2018-12-23 18:22:30 -05:00
Andrew Kelley
16b8467a5e llvm8: fix build errors 2018-12-23 17:36:41 -05:00
Andrew Kelley
5b96cc236c update to build against llvm trunk 2018-11-05 11:17:35 -05:00
Andrew Kelley
f8d6f5daff Merge remote-tracking branch 'origin/master' into llvm8 2018-11-05 10:56:42 -05:00
Andrew Kelley
5a3c02137e
support building static libraries
closes #1493
closes #54
2018-10-09 13:15:14 -04:00
Andrew Kelley
ce912e2964 add HermitCore target 2018-09-19 17:52:37 -04:00
Andrew Kelley
a2abdb185f
Merge remote-tracking branch 'origin/master' into llvm7 2018-09-16 10:51:58 -04:00
Andrew Kelley
014cc60a72
rename --enable-timing-info to -ftime-report to match clang
and have it print llvm's internal timing info
2018-09-11 22:46:22 -04:00
Andrew Kelley
dd9728c5a0 Merge remote-tracking branch 'origin/master' into llvm7 2018-07-24 00:43:12 -04:00
Andrew Kelley
ecf8da00c5 self-hosted: linking 2018-07-17 13:18:13 -04:00
Andrew Kelley
97bfeac13f self-hosted: create tmp dir for .o files and emit .o file for fn 2018-07-16 20:52:50 -04:00
Andrew Kelley
da3acacc14 update vendor list for newest llvm version 2018-07-11 00:46:48 -04:00
Andrew Kelley
9665cfe027 update for latest llvm 2018-07-03 03:48:47 -04:00
Andrew Kelley
bbfff46146 Merge remote-tracking branch 'origin/master' into llvm7 2018-04-26 10:55:29 -04:00
Andrew Kelley
f1f998e071 improve cmpxchg
* remove @cmpxchg, add @cmpxchgWeak and @cmpxchgStrong
   - See explanations in the langref.
 * add operand type as first parameter
 * return type is ?T where T is the operand type

closes #461
2018-04-18 12:16:42 -04:00
Alexandros Naskos
253ecd5c11 Added ReleaseSmall mode 2018-04-16 03:26:10 +03:00
Andrew Kelley
5800faa318 update to latest llvm API 2018-04-04 18:27:52 -04:00
Andrew Kelley
c541ac240c use the llvm API for creating memcpy and memset instructions 2018-03-22 20:59:26 -04:00