-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: don't align the bump pointer for allocations which's size happe…
…ns to be a multiple of `MIN_ALIGN` (#15)
- Loading branch information
Showing
6 changed files
with
97 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
crates/inspect-asm/out/x86-64/alloc_overaligned_but_size_matches/down.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
inspect_asm::alloc_overaligned_but_size_matches::down: | ||
push rbx | ||
mov rcx, qword ptr [rdi] | ||
mov rax, qword ptr [rcx] | ||
add rax, -4 | ||
cmp rax, qword ptr [rcx + 8] | ||
jb .LBB_2 | ||
mov qword ptr [rcx], rax | ||
mov dword ptr [rax], esi | ||
pop rbx | ||
ret | ||
.LBB_2: | ||
mov ebx, esi | ||
call bump_scope::bump_scope::BumpScope<A,_,_,_>::do_alloc_sized_in_another_chunk | ||
mov esi, ebx | ||
mov dword ptr [rax], esi | ||
pop rbx | ||
ret |
24 changes: 24 additions & 0 deletions
24
crates/inspect-asm/out/x86-64/alloc_overaligned_but_size_matches/down_big.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
inspect_asm::alloc_overaligned_but_size_matches::down_big: | ||
push rbx | ||
mov rcx, qword ptr [rdi] | ||
mov rax, qword ptr [rcx] | ||
mov rdx, rax | ||
sub rdx, qword ptr [rcx + 8] | ||
cmp rdx, 40 | ||
jb .LBB_2 | ||
add rax, -40 | ||
mov qword ptr [rcx], rax | ||
.LBB_3: | ||
mov rcx, qword ptr [rsi + 32] | ||
mov qword ptr [rax + 32], rcx | ||
movups xmm0, xmmword ptr [rsi] | ||
movups xmm1, xmmword ptr [rsi + 16] | ||
movups xmmword ptr [rax + 16], xmm1 | ||
movups xmmword ptr [rax], xmm0 | ||
pop rbx | ||
ret | ||
.LBB_2: | ||
mov rbx, rsi | ||
call bump_scope::bump_scope::BumpScope<A,_,_,_>::do_alloc_sized_in_another_chunk | ||
mov rsi, rbx | ||
jmp .LBB_3 |
20 changes: 20 additions & 0 deletions
20
crates/inspect-asm/out/x86-64/alloc_overaligned_but_size_matches/up.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
inspect_asm::alloc_overaligned_but_size_matches::up: | ||
push rbx | ||
mov rcx, qword ptr [rdi] | ||
mov rax, qword ptr [rcx] | ||
mov rdx, qword ptr [rcx + 8] | ||
sub rdx, rax | ||
cmp rdx, 4 | ||
jb .LBB_2 | ||
lea rdx, [rax + 4] | ||
mov qword ptr [rcx], rdx | ||
mov dword ptr [rax], esi | ||
pop rbx | ||
ret | ||
.LBB_2: | ||
mov ebx, esi | ||
call bump_scope::bump_scope::BumpScope<A,_,_,_>::do_alloc_sized_in_another_chunk | ||
mov esi, ebx | ||
mov dword ptr [rax], esi | ||
pop rbx | ||
ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters