diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2015-01-12 13:11:33 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-01-14 21:50:03 +0000 |
commit | e2355ff432dcef946b2f0b260e0de763c31288de (patch) | |
tree | cc7df2c3066930b7005031318369b1de6b6a5f53 /core/cortex-m0/div.S | |
parent | f52ed342b952ecc4f342aadec278bc6e4372067e (diff) | |
download | chrome-ec-e2355ff432dcef946b2f0b260e0de763c31288de.tar.gz |
cortex-m0: optimize out unused assembly helpers
Put each assembly helper function in its own .text.__funcname__ section,
so the linker can remove the unused ones.
Also remove a few entrypoints used only by deprecated ABIs.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=samus
BUG=none
TEST=make buildall
check the firmware size and see we are saving 88 bytes on Zinger.
Change-Id: I6714da671c3449220652780d47993d6c919c331c
Reviewed-on: https://chromium-review.googlesource.com/240582
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Trybot-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'core/cortex-m0/div.S')
-rw-r--r-- | core/cortex-m0/div.S | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/core/cortex-m0/div.S b/core/cortex-m0/div.S index c20804e274..833465a59e 100644 --- a/core/cortex-m0/div.S +++ b/core/cortex-m0/div.S @@ -25,24 +25,13 @@ .thumb .cpu cortex-m0 - - -@ int __divsi3(int num, int denom) -@ -@ libgcc wrapper: just an alias for __aeabi_idivmod(), the remainder is ignored -@ - .thumb_func - .global __divsi3 -__divsi3: - - - @ int __aeabi_idiv(int num:r0, int denom:r1) @ @ Divide r0 by r1 and return quotient in r0 (all signed). @ Use __aeabi_uidivmod() but check signs before and change signs afterwards. @ .thumb_func + .section .text.__aeabi_idiv .global __aeabi_idiv __aeabi_idiv: @@ -77,6 +66,7 @@ L_neg_result: @ Divide r0 by r1 and return the quotient in r0 and the remainder in r1 @ .thumb_func + .section .text.__aeabi_idivmod .global __aeabi_idivmod __aeabi_idivmod: @@ -113,21 +103,12 @@ L_num_pos_bis: -@ unsigned __udivsi3(unsigned num, unsigned denom) -@ -@ libgcc wrapper: just an alias for __aeabi_uidivmod(), the remainder is ignored -@ - .thumb_func - .global __udivsi3 -__udivsi3: - - - @ unsigned __aeabi_uidiv(unsigned num, unsigned denom) @ @ Just an alias for __aeabi_uidivmod(), the remainder is ignored @ .thumb_func + .section .text.__aeabi_uidivmod .global __aeabi_uidiv __aeabi_uidiv: |