mlugg
b355893438
compiler: correct unnecessary uses of 'var'
2023-11-19 11:11:49 +00:00
Jacob Young
0c6cb8d8c8
x86_64: actually track state during @divFloor of i128
...
Closes #17998
2023-11-14 22:50:05 -05:00
Jacob Young
80b73e3e8f
x86_64: resolve tlv references on first use and spill to the stack
...
This avoids any arbitrary memory operand possibly clobbering rax and
sometime rdi with no warning.
2023-11-12 18:12:41 -05:00
Jakub Konka
3d3153c58e
x86_64: use .rax for local exec as prescribed by the spec
2023-11-12 18:12:41 -05:00
Jakub Konka
c6833e6273
x86_64: remove unreachable Elf prong
2023-11-12 18:12:41 -05:00
Jakub Konka
575c29e5c4
elf: set symbol flags such as needs_zig_got in ZigObject
2023-11-12 18:12:41 -05:00
Jakub Konka
412519dd49
x86_64: seems like we will need to keep track of rax and reserve rax+rdi for TLS
2023-11-12 18:12:41 -05:00
Jakub Konka
984c598590
x86_64: emit TLS local dynamic model when PIC
2023-11-12 18:12:41 -05:00
Jakub Konka
1afc6917f5
x86_64: get something going for the local exec model
2023-11-12 18:12:41 -05:00
Jacob Young
2eeb735822
Dwarf: improve x86_64 backend debug info
...
Closes #17811
2023-11-12 03:21:52 -05:00
Jacob Young
e387d30b26
x86_64: fix signed not of more than 64 bits
2023-11-08 08:49:34 -05:00
Jacob Young
8f2aa72af7
x86_64: fix optional comparison
2023-11-08 07:24:48 -05:00
kcbanner
1acb6a53d0
wasm: support rendering unions using their backing type if they have no defined tag type
2023-11-07 00:49:39 +00:00
Jacob Young
9ced27dace
x86_64: fix passing register-sized payload as non-reigster-sized union
...
Closes #17885
2023-11-06 14:11:31 -05:00
Jacob Young
8311fac7e8
x86_64: fix indirect return of f80
2023-11-05 06:09:06 -05:00
Jacob Young
803ea10107
x86_64: fix tracking during br
2023-11-05 06:08:06 -05:00
Jakub Konka
f24ceec35a
Merge pull request #17844 from ziglang/elf-object
...
elf: handle emitting relocatables and static libraries - humble beginnings
2023-11-04 20:58:15 +01:00
Jacob Young
095c4294aa
x86_64: fix miscompilations
...
Closes #17618
2023-11-04 09:15:05 -04:00
Jacob Young
6553359f39
x86_64: fix ub that the llvm backend was hiding
2023-11-04 08:13:13 -04:00
Jakub Konka
912a774a15
x86_64: rewrite call r/m64 to call rel32 for .got.zig refs when object
2023-11-04 09:12:35 +01:00
Jakub Konka
481ee1b598
elf: enable static-lib flush path
2023-11-04 09:11:47 +01:00
Jakub Konka
d2c4597eb5
x86_64: rewrite .got.zig movs to standard loads when emitting objects
2023-11-04 09:11:37 +01:00
Jakub Konka
ccb2afacc0
elf: postpone creation of .got.zig entry until code emit
2023-11-04 09:11:29 +01:00
Jakub Konka
8055f68765
elf: make sure we never emit .got.zig relocs when linking object files
2023-11-04 09:10:23 +01:00
Jacob Young
46d3e5bb04
x86_64: reduce RegisterManager performance regression
...
This reduces the regression from 0.11.0 by 95%.
Closes #17678
2023-11-03 23:18:23 -04:00
Jacob Young
509be7cf1f
x86_64: fix std test failures
2023-11-03 23:18:21 -04:00
Luuk de Gram
2c2bc9c8df
wasm: fix bitcasting to -and from arrays
...
Arrays are currently always passed by reference, this means that we
always keep the value in linear memory and never load it to Wasm's
stack. Scalar values however do get lowered to Wasm's stack.
This means when bitcasting from an array to a scalar value, we must
load the memory of the array as such scalar type. To bitcast
a scalar type to an array, we allocate a new temporary in the
linear data segment, and then store the scalar value there.
2023-11-01 19:47:15 +01:00
Andrew Kelley
3fc6fc6812
std.builtin.Endian: make the tags lower case
...
Let's take this breaking change opportunity to fix the style of this
enum.
2023-10-31 21:37:35 -04:00
Jacob Young
d890e81761
mem: fix ub in writeInt
...
Use inline to vastly simplify the exposed API. This allows a
comptime-known endian parameter to be propogated, making extra functions
for a specific endianness completely unnecessary.
2023-10-31 21:37:35 -04:00
Jakub Konka
9bdbb6312f
elf: move incremental codegen bits into ZigObject.zig
2023-10-30 19:09:13 +01:00
Jakub Konka
b2e847a41a
elf: rename ZigModule to ZigObject
2023-10-30 19:09:13 +01:00
Jakub Konka
324a93e673
coff: implement enough of extern handling to pass comptime export tests
2023-10-30 12:44:50 +01:00
Jakub Konka
2e690f5c74
macho: implement enough of extern handling to pass comptime export tests
2023-10-30 00:09:32 +01:00
Jacob Young
f6f2708d82
x86_64: fix compiler rt test failures
2023-10-29 07:20:36 -04:00
Jacob Young
1fecf86ebf
x86_64: refactor codegen memory repr
...
Also refactor linker reloc lowering.
2023-10-29 05:17:43 -04:00
Jacob Young
f133bcba9f
x86_64: fix hazard between pic call and sysv cc
2023-10-29 05:15:35 -04:00
Jacob Young
12b5c8156a
x86_64: handle .load_symbol in more places
2023-10-28 03:51:05 -04:00
Jakub Konka
20a3664153
x86_64: handle .load_symbol in mul_with_overflow and mul_div
2023-10-28 03:48:18 -04:00
Jakub Konka
396003fb06
x86_64: assert fixes are ._ for linker_reloc
2023-10-28 03:48:18 -04:00
Jakub Konka
493f786b38
x86_64: refactor Lower.zig
2023-10-28 03:48:18 -04:00
Jakub Konka
df7db0c4be
x86_64: pass behavior tests PIC and non-PIC
2023-10-28 03:48:18 -04:00
Jakub Konka
2be1250f24
x86_64: no more load/lea_symbol weirdness
2023-10-28 03:48:18 -04:00
Jakub Konka
0d00b7c585
elf: set needs_got on generated extern vars
2023-10-28 03:48:18 -04:00
Jakub Konka
9a1fbb2705
x86_64: rename load/lea_memory to load/lea_symbol
2023-10-28 03:48:18 -04:00
Jakub Konka
a6a10d9c2b
x86_64: do not hardcode memory passed by Elf linker
2023-10-28 03:48:18 -04:00
Jacob Young
a440cf6d44
x86_64: fix c abi test failures
2023-10-27 23:31:20 -04:00
Jacob Young
b0cf620fe3
x86_64: fix cond_br
2023-10-27 03:33:49 -04:00
Jacob Young
42bca3e2ee
x86_64: fix @memset
2023-10-27 01:40:27 -04:00
Jacob Young
434a7db986
x86_64: add missing spill
2023-10-27 01:40:27 -04:00
Jacob Young
6ad22cd964
x86_64: add missing spills
2023-10-26 22:35:38 -04:00