aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2021-04-25 16:40:41 +0200
committerLemonBoy <thatlemon@gmail.com>2021-04-25 16:40:41 +0200
commit50a8124f45cd0994b52af3fd166dd3bda48f4b99 (patch)
tree1e5c4a6bcd6a9b233f9aa198a07663aa9a9ddb37 /lib
parent37b05742ff1544bccf7c8ae9b12c6707a5a54df2 (diff)
downloadzig-50a8124f45cd0994b52af3fd166dd3bda48f4b99.tar.gz
zig-50a8124f45cd0994b52af3fd166dd3bda48f4b99.zip
stage1: Change how the Frame alignment is computed
The code would previously assume every function would start at addresses being multiples of 16, this is not true beside some specific cases. Moreover LLVM picks different alignment values depending on whether it's trying to generate dense or fast code. Let's use the minimum guaranteed alignment as base value, computed according to how big the opcodes are. The alignment of function pointers is always 1, a safe value that won't cause any error at runtime. Note that this was already the case before this commit, here we're making this choice explicit. Let the 'alignment' field for TypeInfo of fn types reflect the ABI alignment used by the compiler, make this field behave similarly to the 'alignment' one for pointers.
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions