aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_proc.cpp
Commit message (Collapse)AuthorAgeFilesLines
* fix wasm atomicsLaytan Laats2024-04-061-10/+5
| | | | Fixes #2745
* fix lbArg_Ignore logicLaytan Laats2024-04-041-1/+5
| | | | Fixes #2698
* fix untyped nil into c varargsLaytan Laats2024-04-021-0/+6
| | | | Fixes #2842
* fix named arguments with #c_varargLaytan Laats2024-04-021-0/+21
| | | | | | | | | Previously `args=1`, `args={}`, `args={1, 2, 3}` would all crash the compiler. Now it passes them correctly, and if given a compound literal, the values are expanded into the call so you can use a named arg while passing multiple values. Fixes #3168
* Unify min/max semantics for simd_(min|max)gingerBill2024-03-061-4/+2
|
* Merge pull request #3220 from laytan/promote-types-in-c-varargsgingerBill2024-02-281-2/+2
|\ | | | | Promote types in `#c_varargs` according to C rules
| * Promote types in `#c_varargs` according to C rulesLaytan Laats2024-02-211-2/+2
| |
* | Make `lb_type_info` use a procedure to load the global valuegingerBill2024-02-271-1/+1
|/
* Add `#load_directory(path: string) > []runtime.Load_Directory_File`gingerBill2024-02-091-15/+52
|
* Remove dead codegingerBill2024-01-281-3/+3
|
* Implement instrumentation passgingerBill2024-01-071-0/+12
|
* Fix `builtin.quaternion` generationgingerBill2024-01-051-1/+1
|
* Enforce naming the parameters with `builtin.quaternion` to reduce confusiongingerBill2024-01-051-13/+30
|
* Fix #3056korvahkh2023-12-291-1/+1
|
* Fix-up inline asm for i386 syscalls emitflysand72023-10-301-1/+1
|
* llvm: specify calling convention on callMorten Hauke Solvang2023-10-131-0/+3
| | | | | | | Looks like the compiler only was specifying the calling convention on function declarations, but not on function calls. But LLVM seems to produce "bad" code when optimizing with level -O2 unless you specify the same calling convention on the call too.
* Remove debug messagegingerBill2023-09-291-1/+0
|
* Rename simd bitwise operations from `intrinsics.simd_and` to ↵gingerBill2023-09-281-8/+8
| | | | `intrinsics.simd_bit_and` etc
* Fix `ptr != ptr` type cast problem in LLVM 17gingerBill2023-09-261-2/+15
|
* Fix build times for `-o:<string>` in LLVM-17gingerBill2023-09-211-2/+2
|
* Add attributes for sanitize_memory and sanitize_threadgingerBill2023-09-211-0/+6
|
* Add `sanitize_address` attribute to all normal packagesgingerBill2023-09-211-1/+6
|
* Fix read_cycle_counter intrinsic on arm64William Roe2023-08-071-1/+1
| | | | | | | Running this code with the hard-coded x9 register results in not returning the cycle count, but some other value. This code (using $0 as the register), works on arm64 Linux and Darwin.
* Remove #relative slices; Replace with #relative multi-pointersgingerBill2023-08-051-2/+2
|
* Fix #2699gingerBill2023-08-051-3/+9
|
* Go through loads of `TODO`sgingerBill2023-08-011-4/+1
|
* Generalize name mangling rule to have a singular definition for a name separatordev-2023-07gingerBill2023-07-071-1/+1
|
* Fix #2606gingerBill2023-06-261-1/+5
|
* Fix empty varargsgingerBill2023-06-211-0/+3
|
* Handle `#c_vararg`gingerBill2023-06-211-6/+9
|
* Correct deferred proceduresgingerBill2023-06-211-87/+109
|
* Fix constant parameter passinggingerBill2023-06-211-17/+27
|
* Correct purely named argument handlinggingerBill2023-06-211-248/+2
|
* Start work on parapoly args for new and improvedgingerBill2023-06-201-1/+1
|
* Try to get make everything work with parapolygingerBill2023-06-201-1/+6
|
* Fix line error printing for error messagesgingerBill2023-06-191-7/+7
|
* Basic support for new procedure code (non-polymorphic, non-proc-group)gingerBill2023-06-151-0/+119
|
* Merge pull request #1309 from Yawning/fix/freebsd-syscallgingerBill2023-06-071-4/+45
|\ | | | | src: "Fix" the system call intrinsic for FreeBSD
| * Merge branch 'master' into fix/freebsd-syscallgingerBill2022-07-241-278/+1004
| |\
| * | src: "Fix" the system call intrinsic for FreeBSDYawning Angel2021-11-131-5/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FreeBSD's systemcall handler clears out R8, R9, and R10 prior to `sysretq`, and additionally returns positive errno (with CF) set on error. This modifies the syscall intrinsic such that LLVM knows about the additional clobbered registers. Note that propagating CF back to the caller of the syscall intrinsic is left for a future PR. As far as I can tell, Darwin does not use the syscall intrinsic at all, and FreeBSD only uses it for SYS_GETTID, so this should be "ok" for now. See: sys/amd64/amd64/exception.S in the FreeBSD src for more details.
* | | Fix wasm intrinsics; fix `len` for strings and slicesgingerBill2023-06-061-6/+6
| | |
* | | Merge branch 'master' into separate-int-word-sizesgingerBill2023-06-061-4/+4
|\ \ \
| * | | Minor change to handling of propagation of errors with `---` as a valuegingerBill2023-05-221-4/+4
| | | |
| * | | Revert "Change `intrinsics.read_cycle_counter` on ARM64"gingerBill2023-05-121-1/+1
| | | | | | | | | | | | | | | | This reverts commit b567679eb6cf3fd1820a6163c1f17d620d88894f.
| * | | Change `intrinsics.read_cycle_counter` on ARM64gingerBill2023-05-121-1/+1
| | | |
* | | | Rename `word_size` to `ptr_size` internally to make it clearergingerBill2023-04-201-2/+2
|/ / /
* | | Merge pull request #2464 from ap29600/simd_unaligned_loadgingerBill2023-04-201-5/+19
|\ \ \ | | | | | | | | Improve code generation for `intrinsics.unaligned_load/store` on `#simd` types
| * | | improve code generation for `intrinsics.unaligned_load/store` on `#simd` typesAndrea Piseri2023-04-161-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the default implementation calls memcpy on an `alloca` constant, which seems to heavily confuse the optimizer and produces overall suboptimal code. Introducing this specialization simplifies the intermediate representation produced, resulting in more efficient code.
* | | | Merge pull request #2450 from destroycomputers/mastergingerBill2023-04-201-1/+1
|\ \ \ \ | | | | | | | | | | Fix intrinsics.alloca code generation
| * | | | Fix intrinsics.alloca code generationdestroycomputers2023-04-111-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a disconnect between the declared return type for alloca intrinsic in check_builtin.cpp (multi_pointer(t_u8)) and the generated result type in llvm_backend_proc.cpp (t_u8_ptr). This allowed slicing the return type, but in the code generation process the type of the expression wasn't sliceable, which triggered the assert. Fixes #2139