-
Notifications
You must be signed in to change notification settings - Fork 149
Optimize bounds checking by validating metadata against maximum #3123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,44 +1,40 @@ | ||
| bench_new_vec_zeroed: | ||
| mov rax, rdi | ||
| movabs rcx, 1537228672809129301 | ||
| cmp rsi, rcx | ||
| ja .LBB5_5 | ||
| test rsi, rsi | ||
| je .LBB5_2 | ||
| push r15 | ||
| push r14 | ||
| push r12 | ||
| push rbx | ||
| push rax | ||
| mov rbx, rdi | ||
| movabs r12, 9223372036854775805 | ||
| mov ecx, 6 | ||
| mov rax, rsi | ||
| mul rcx | ||
| jo .LBB5_6 | ||
| cmp rax, r12 | ||
| jbe .LBB5_2 | ||
| .LBB5_6: | ||
| add r12, 3 | ||
| mov qword ptr [rbx], r12 | ||
| jmp .LBB5_7 | ||
| .LBB5_2: | ||
| mov r14, rsi | ||
| test rax, rax | ||
| je .LBB5_3 | ||
| mov r15, rax | ||
| lea rcx, [rsi + rsi] | ||
| lea rbx, [rcx + 2*rcx] | ||
| mov r14, rax | ||
| mov r15, rsi | ||
| call qword ptr [rip + __rustc::__rust_no_alloc_shim_is_unstable_v2@GOTPCREL] | ||
| mov esi, 2 | ||
| mov rdi, r15 | ||
| mov rdi, rbx | ||
| call qword ptr [rip + __rustc::__rust_alloc_zeroed@GOTPCREL] | ||
| test rax, rax | ||
| jne .LBB5_5 | ||
| jmp .LBB5_6 | ||
| .LBB5_3: | ||
| mov eax, 2 | ||
| .LBB5_5: | ||
| mov qword ptr [rbx], r14 | ||
| mov qword ptr [rbx + 8], rax | ||
| mov qword ptr [rbx + 16], r14 | ||
| .LBB5_7: | ||
| mov rax, rbx | ||
| add rsp, 8 | ||
| mov rsi, r15 | ||
| mov rcx, rax | ||
| mov rax, r14 | ||
| test rcx, rcx | ||
| pop rbx | ||
| pop r12 | ||
| pop r14 | ||
| pop r15 | ||
| je .LBB5_5 | ||
| mov qword ptr [rax], rsi | ||
| mov qword ptr [rax + 8], rcx | ||
| mov qword ptr [rax + 16], rsi | ||
| ret | ||
| .LBB5_5: | ||
| movabs rcx, -9223372036854775808 | ||
| mov qword ptr [rax], rcx | ||
| ret | ||
| .LBB5_2: | ||
| mov ecx, 2 | ||
| mov qword ptr [rax], rsi | ||
| mov qword ptr [rax + 8], rcx | ||
| mov qword ptr [rax + 16], rsi | ||
| ret |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.