aboutsummaryrefslogtreecommitdiff
path: root/src/arch
AgeCommit message (Collapse)Author
2023-10-16elf: create new synthetic section ZigGotSectionJakub Konka
2023-10-15wasm: lower min/max for floats to compiler_rtRobin Voetter
The min and max builtins in Zig have some intricate behavior related to floats, that is not replicated with the min and max wasm instructions or using simple select operations. By lowering these instructions to compiler_rt, handling around NaNs is done correctly. See also https://github.com/WebAssembly/design/issues/214
2023-10-14codegen/wasm: fix non-byte-sized signed integer comparisonXavier Bouchoux
2023-10-14codegen/wasm: fix tuple member offset computationXavier Bouchoux
It didn't account for field alignement.
2023-10-09Merge pull request #17391 from xxxbxxx/load-i4Andrew Kelley
codegen/llvm: truncate padding bits when loading a non-byte-sized value
2023-10-09x86_64: implement 128-bit integer multiply and divideJacob Young
2023-10-09x86_64: implement `@min` and `@max` for 128-bit integersJacob Young
2023-10-09x86_64: implement `@abs` of 128-bit integersJacob Young
2023-10-09x86_64: implement struct field value for register pairsJacob Young
2023-10-09x86_64: implement 128-bit integer shifts in registersJacob Young
2023-10-08Merge pull request #17438 from Luukdegram/issue-17436Luuk de Gram
wasm - fix `@tagName` for signed enums
2023-10-08wasm: correctly lower signed value in `@tagName`Luuk de Gram
2023-10-08codegen/wasm: fix intcast accross 32-bits boundaryXavier Bouchoux
2023-10-08x86_64: implement `@mulAdd` of floats for baselineJacob Young
2023-10-08x86_64: implement `@rem` for floatsJacob Young
2023-10-08x86_64: fix `@divTrunc` and `@divFloor` of `f16`Jacob Young
2023-10-08x86_64: fix undersized vector binary operationsJacob Young
2023-10-08x86_64: fix conversions between floats and 128-bit integersJacob Young
2023-10-08x86_64: implement `@abs` for some integer vector typesJacob Young
2023-10-08x86_64: fix bitcast from `f80`Jacob Young
2023-10-07x86_64: hack around silent `f80` miscompilationsJacob Young
The x87 kind sucks.
2023-10-07x86_64: improve inline assembly supportJacob Young
* instruction prefixes * mnemonic fixes * labels * memory operands * read-write constraint modifier * register and memory alternative constraint
2023-10-07x86_64: implement C var argsJacob Young
2023-10-07x86_64: implement negation and `@abs` for `f80`Jacob Young
Also implement live-outs since the x87 requires so much care around liveness tracking.
2023-10-07x86_64: implement `f80` movementJacob Young
2023-10-07x86_64: fix C abi typosJacob Young
2023-10-05x86_64: implement C abi for everything elseJacob Young
2023-10-05x86_64: implement C abi for f128Jacob Young
2023-10-05x86_64: refactor calling convention checksJacob Young
2023-10-05plan9: refactor debug infoJacob Young
The main goal is to stop depending on `emit.lower.target`.
2023-10-05x86_64: fix abi bit/byte mixupsJacob Young
2023-10-04x86_64: implement 128-bit integer comparisonsJacob Young
2023-10-04x86_64: implement C abi for 128-bit integersJacob Young
2023-10-04x86_64: fix various crashesJacob Young
2023-10-03wasm: implement lowering anon declsLuuk de Gram
2023-10-03compiler: start handling anonymous decls differentlyAndrew Kelley
Instead of explicitly creating a `Module.Decl` object for each anonymous declaration, each `InternPool.Index` value is implicitly understood to be an anonymous declaration when encountered by backend codegen. The memory management strategy for these anonymous decls then becomes to garbage collect them along with standard InternPool garbage. In the interest of a smooth transition, this commit only implements this new scheme for string literals and leaves all the previous mechanisms in place.
2023-10-03codegen: fix byte-aligned field offsets in unaligned nested packed structsXavier Bouchoux
2023-10-03codegen: fix field offsets in packed structsXavier Bouchoux
* add nested packed struct/union behavior tests * use ptr_info.packed_offset rather than trying to duplicate the logic from Sema.structFieldPtrByIndex() * use the container_ptr_info.packed_offset to account for non-aligned nested structs. * dedup type.packedStructFieldBitOffset() and module.structPackedFieldBitOffset()
2023-10-01x86_64: implement float `@sqrt` builtinJacob Young
2023-10-01x86_64: implement float arithmetic builtinsJacob Young
2023-10-01x86_64: implement float round builtinsJacob Young
2023-10-01x86_64: add missing caller preserved regsJacob Young
All allocatable registers have to be either callee preserved or caller preserved.
2023-10-01x86_64: implement float compare and cast builtinsJacob Young
2023-10-01behavior: cleanup floatop testsJacob Young
2023-10-01x86_64: implement and test unary float builtinsJacob Young
2023-10-01x86_64: emit R_X86_64_GOT32 for non-PIC GOT referencesJakub Konka
2023-09-27Revert "compiler: don't use `@abs` builtin yet"Andrew Kelley
This reverts commit 21780899eb17a0cb795ff40e5fae6556c38ea13e. After this commit, a version of the compiler which supports the new `@abs` builtin is required.
2023-09-27compiler: don't use `@abs` builtin yetAndrew Kelley
This commit can be used to rebuild zig1.wasm
2023-09-27Rename `@fabs` to `@abs` and accept integersantlilja
Replaces the @fabs builtin with a new @abs builtins which accepts floats, signed integers and vectors of said types.
2023-09-21wasm: fix regression of C ABIAndrew Kelley
It seems the webassembly backend does not want the exception that `structFieldAlignmentExtern` makes for 128-bit integers. Perhaps that logic should be modified to check if the target is wasm. Without this, this branch fails the C ABI tests for wasm, causing this: ``` wasm-ld: warning: function signature mismatch: zig_struct_u128 >>> defined as (i64, i64) -> void in cfuncs.o >>> defined as (i32) -> void in test-c-abi-wasm32-wasi-musl-ReleaseFast.wasm.o ```