aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
AgeCommit message (Collapse)Author
2017-10-15disable byval parameters on windows to work around llvm bugAndrew Kelley
See #536
2017-10-14build-exe allows direct export of WinMainCRTStartupAndrew Kelley
2017-10-10add module flag to emit CodeView for COFF object filesAndrew Kelley
see #516
2017-10-03use __chkstk_ms compiler-rt functions for __chkstkAndrew Kelley
I had to revert the target native features thing because there is still some incorrect behavior with f128. Reopens #508 partially reverts b5054625093ef22b3f228199b6fbf70e1c50b703 See #302
2017-10-03replace __chkstk function with a stub that does not crashAndrew Kelley
Closes #508 See #302
2017-10-03add @setAlignStack builtinAndrew Kelley
2017-10-02windows: alignstack=16 on every functionAndrew Kelley
See #302
2017-10-01implement standard library path searchAndrew Kelley
closes #463 See #302
2017-10-01fix implementation of --zig-std-dirAndrew Kelley
see #463
2017-10-01fix codegen on windowsAndrew Kelley
2017-09-30remove zigrtAndrew Kelley
adds test case for #394 partially reverts a32b5929ccf8cbf79396d8924097a1a911985dac
2017-09-30don't try to use cold calling convention on windowsAndrew Kelley
it just causes a segfault
2017-09-30better divTrunc codegenAndrew Kelley
branch and phi instead of select instruction fixes division test for windows. See #302
2017-09-30workaround for invalid binary created on windowsAndrew Kelley
when target native features are used. See #508
2017-09-24fix i386 windows stdcallAndrew Kelley
2017-09-24windows gui hello worldAndrew Kelley
2017-09-20Merge branch 'master' into c-to-zigAndrew Kelley
2017-09-17add -mllvm supportAndrew Kelley
useful for debugging crashes in llvm optimizer
2017-09-13fix up msvc stuff to make it work on linux and macos tooAndrew Kelley
2017-09-12fix error messagesAndrew Kelley
2017-09-11Add support for MSVCJonathan Marler
2017-09-05rename parseh to parsecAndrew Kelley
2017-09-05add OpaqueType builtinAndrew Kelley
closes #326
2017-08-31Opaque ptr patchRaul Leal
2017-08-30successfully cross-building behavior tests for windowsAndrew Kelley
2017-08-30codegen: all stores specify align valueAndrew Kelley
See #37
2017-08-30set alignment on all loads and globalsAndrew Kelley
See #37
2017-08-29more alignment improvementsAndrew Kelley
* add alignment capability for fn protos * add @alignCast * fix some ast rendering code * fix some ir rendering code * add error for pointer cast increasing alignment * update allocators in std to correctly align See #37
2017-08-29pass all tests without triggering assertionsAndrew Kelley
fixes tests when targeting darwin
2017-08-29introduce align keywordAndrew Kelley
* remove `@setGlobalAlign` * add align keyword for setting alignment on functions and variables. * loads and stores use alignment from pointer * memcpy, memset use alignment from pointer * add syntax for pointer alignment * slices can have volatile * add u2, i2 primitives * ignore preferred align and use abi align everywhere * back to only having alignOf builtin. preferredAlignOf is too tricky to be useful. See #432. Partial revert of e726925e802eddab53cbfd9aacbc5eefe95c356f. See #37
2017-08-28Merge branch 'embed-lld'Andrew Kelley
Zig now depends on LLVM 5.0.0. For the latest version that supports LLVM 4.0.1, use 2a49c876be76dc98996a3251310728ad32b22363. Unfortunately we had to embed LLD into Zig due to some MACH-O related LLD bugs. One of them is already upstream and another is awaiting feedback on the llvm-dev mailing list. You can use cmake option -DZIG_FORCE_EXTERNAL_LLD=ON to still use external LLD if you want to live with the MACH-O bugs or if your system LLD is patched. Closes #273
2017-08-28remove remnants of depending on darwin system linkerAndrew Kelley
2017-08-27macos updatesAndrew Kelley
* try some macos travis stuff * put c in the link libs for macos since we always link with libSystem * for non-native targets on macos, allow runtime symbol resolution - it's causing an infinite loop in LLD. * for macos, always build compiler_rt and turn on LinkOnce because compiler_rt on darwin is missing some stuff.
2017-08-26audit alignment for functionsAndrew Kelley
see #37
2017-08-26codegen for enums chooses best order of tag and union fieldsAndrew Kelley
closes #396
2017-08-26use most_aligned_member+padding to represent enum unionsscurest
2017-08-26remove @alignOf and add @cAbiAlignOf and @preferredAlignOfAndrew Kelley
See #396
2017-08-26fix invalid llvm IR for const enumAndrew Kelley
closes #394
2017-08-25float division by zero check only when FloatMode.OptimzedAndrew Kelley
closes #395
2017-08-25refactor - codegen llvm functions lazilyAndrew Kelley
2017-08-25unreachable still codegens to unreachable in ReleaseFast test modeAndrew Kelley
closes #430
2017-08-22fix compiler test errorsAndrew Kelley
closes #428 Thanks Marc Tiehuis for diagnosing this bug
2017-08-20compile-time f32, f64 operations are now correctly lossyAndrew Kelley
previously we used the bigfloat abstraction to do all compile-time float math. but runtime code and comptime code are supposed to get the same result. so now if you add a f32 to a f32 at compile time it does it with f32 math instead of the bigfloat. float literals still get the bigfloat math. closes #424
2017-08-19add setEvalBranchQuota builtin functionAndrew Kelley
2017-08-19bit shifting safetyAndrew Kelley
* add u3, u4, u5, u6, u7 and i3, i4, i5, i6, i7 * shift operations shift amount parameter type is integer with log2 bit width of other param - This enforces not violating undefined behavior on shift amount >= bit width with the type system * clean up math.log, math.ln, math.log2, math.log10 closes #403
2017-08-17fix big integer shifting by large numberAndrew Kelley
2017-08-17fix wrong value for clz, ctz at compile timeAndrew Kelley
closes #418 also make clz, ctz return smaller integer bit widths and use smaller integer bit widths for enum tag types
2017-08-16compiler_rt implementations for __fixuns* functionsAndrew Kelley
* add u128 and i128 integer types * add f128 floating point type * implement big integer multiplication (See #405)
2017-08-09more intuitive left shift and right shift operatorsAndrew Kelley
Before: * << is left shift, not allowed to shift 1 bits out * <<% is left shift, allowed to shift 1 bits out * >> is right shift, allowed to shift 1 bits out After: * << is left shift, allowed to shift 1 bits out * >> is right shift, allowed to shift 1 bits out * @shlExact is left shift, not allowed to shift 1 bits out * @shrExact is right shift, not allowed to shift 1 bits out Closes #413
2017-08-08add ptrToInt builtin, remove usize(ptr) castAndrew Kelley
closes #415