aboutsummaryrefslogtreecommitdiff
path: root/src/arch/x86_64/CodeGen.zig
AgeCommit message (Collapse)Author
2023-10-21x86_64: fix crashesJacob Young
2023-10-18x86_64: improve inline assembly supportJacob Young
* C++-style comments * indirect call operands * fix misleading immediate debug formatting
2023-10-17Merge pull request #17556 from ziglang/elf-link-zig-properJakub Konka
elf: port 99% of zld ELF linker to Zig proper
2023-10-17x86_64: fix C abi argument passing in memoryJacob Young
2023-10-16codegen: refactor .actual_got into .extern_gotJakub Konka
2023-10-16codegen+elf: lower imported data refsJakub Konka
2023-10-16x86_64: add -fPIC support targeting ELFJakub Konka
2023-10-16elf: create new synthetic section ZigGotSectionJakub Konka
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-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-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-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: 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-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-21compiler: fix compilation for 32-bit targetsAndrew Kelley
2023-09-21compiler: move struct types into InternPool properAndrew Kelley
Structs were previously using `SegmentedList` to be given indexes, but were not actually backed by the InternPool arrays. After this, the only remaining uses of `SegmentedList` in the compiler are `Module.Decl` and `Module.Namespace`. Once those last two are migrated to become backed by InternPool arrays as well, we can introduce state serialization via writing these arrays to disk all at once. Unfortunately there are a lot of source code locations that touch the struct type API, so this commit is still work-in-progress. Once I get it compiling and passing the test suite, I can provide some interesting data points such as how it affected the InternPool memory size and performance comparison against master branch. I also couldn't resist migrating over a bunch of alignment API over to use the log2 Alignment type rather than a mismash of u32 and u64 byte units with 0 meaning something implicitly different and special at every location. Turns out you can do all the math you need directly on the log2 representation of alignments.
2023-09-19x86 backend: don't read bogus safety flagAndrew Kelley
Safety is not a global flag that should be enabled or disabled for all stores - it's lowered by the frontend directly into AIR instruction semantics. The flag for this is communicated via the `store` vs `store_safe` AIR instructions, and whether to write 0xaa bytes or not should be decided in `airStore` and passed down via function parameters. This commit is a step backwards since it removes functionality but it aims our feet towards a better mountain to climb.
2023-09-13elf: do not store Symbol's index in SymbolJakub Konka
2023-09-12elf: add simplistic reloc scanning mechanismJakub Konka
2023-09-11elf: emit relocation to an extern functionJakub Konka
2023-09-08elf: store GOT index in symbol extra array; use GotSection for GOTJakub Konka
2023-09-06elf: make everything upside down - track by Symbol.Index rather than Atom.IndexJakub Konka
2023-09-04elf: simplify accessors to symbols, atoms, etcJakub Konka