Repository navigation
compiler-builtins subtree update - #165730
Open
kleinesfilmroellchen wants to merge 9 commits into
Open
kleinesfilmroellchen wants to merge 9 commits into
kleinesfilmroellchen wants to merge 9 commits into
Conversation
… core+alloc This (probably?) requires rebuilding compiler_intrinsics via build_std.
Note that this code is trivially correct, as it simply turns maybe-ifs into never-ifs.
On thumbv8m.main-none-eabi with -Os, this reduces memcpy from 324 bytes to 30 bytes. The assembly is so short, I can include it in the commit message:
```arm-assembly
0000152a <__aeabi_memcpy>:
152a: 1883 adds r3, r0, r2
152c: 4298 cmp r0, r3
152e: bf28 it cs
1530: 4770 bxcs lr
1532: b580 push {r7, lr}
1534: 466f mov r7, sp
1536: ,-> f811 3b01 ldrb.w r3, [r1], rust-lang#1
153a: | 3a01 subs r2, rust-lang#1
153c: | f800 3b01 strb.w r3, [r0], rust-lang#1
1540: '-- d1f9 bne.n 1536 <__aeabi_memcpy+0xc>
1542: e8bd 4080 ldmia.w sp!, {r7, lr}
1546: 4770 bx lr
```
memset is reduced from 100 to 26 bytes at least in simple tests.
This hides the much slower versions of memcpy/memset. The regular flag is still kept in case it gets used in the future by other code.
The trailing 1 was a typo.
…memset-size Optimize memset/memcpy size
Collaborator
|
cc @tgross35 |
Collaborator
|
Member
|
The additions aren't yet tested, I don't want to do a sync without that @rustbot blocked |
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Subtree update of
compiler-builtinsto rust-lang/compiler-builtins@099953f.Created using https://github.com/rust-lang/josh-sync.
r? @ghost