freemyipod r6 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r5‎ | r6 | r7 >
Date:22:11, 29 July 2010
Author:theseven
Status:new
Tags:
Comment:
Fix shifter operand overflow on ARMv6 by combining division helpers and tables into a single section
Modified paths:
  • /embios/trunk/arm-support.S (modified) (history)

Diff [purge]

Index: embios/trunk/arm-support.S
@@ -652,24 +652,21 @@
653653 .byte 22, 0, 12, 0, 0, 3, 28, 0, 23, 0, 4, 29, 0, 0, 30, 31
654654 .size __clzsi2, .-__clzsi2
655655
 656+ .section .text.__divisionhelpers
656657 #ifndef __ARM_EABI__
657 - .section .text.__udivsi3
658658 __udivsi3:
659659 ARMV4_UDIV32_BODY r0, r1, r0, "", r2, r3, __div0_wrap, 1
660660 .size __udivsi3, . - __udivsi3
661661
662 - .section .text._divsi3
663662 __divsi3:
664663 ARMV4_SDIV32_BODY r0, r1, r0, "", r2, r3, __div0_wrap, 1
665664 .size __divsi3, . - __divsi3
666665
667666 #else
668 - .section .text.__aeabi_uidivmod
669667 __aeabi_uidivmod:
670668 ARMV4_UDIV32_BODY r0, r1, r0, r1, r2, r3, __div0_wrap, 1
671669 .size __aeabi_uidivmod, . - __aeabi_uidivmo
672670
673 - .section .text.__aeabi_idivmod
674671 __aeabi_idivmod:
675672 ARMV4_SDIV32_BODY r0, r1, r0, r1, r2, r3, __div0_wrap, 1
676673 .size __aeabi_idivmod, . - __aeabi_idivmod
@@ -677,12 +674,10 @@
678675
679676 #else
680677 #ifndef __ARM_EABI__
681 - .section .text.__udivsi3
682678 __udivsi3:
683679 ARMV5_UDIV32_BODY r0, r1, r0, "", r2, r3, ip, __div0_wrap, 1
684680 .size __udivsi3, . - __udivsi3
685681
686 - .section .text.__divsi3
687682 __divsi3:
688683 str lr, [sp, #-4]
689684 ARMV5_SDIV32_BODY r0, r1, r0, "", r2, lr, ip, r3, __div0_wrap_s, "ldr pc, [sp, #-4]"
@@ -689,12 +684,10 @@
690685 .size __divsi3, . - __divsi3
691686
692687 #else
693 - .section .text.__aeabi_uidivmod
694688 __aeabi_uidivmod:
695689 ARMV5_UDIV32_BODY r0, r1, r0, r1, r2, r3, ip, __div0_wrap, 1
696690 .size __aeabi_uidivmod, . - __aeabi_uidivmo
697691
698 - .section .text.__aeabi_idivmod
699692 __aeabi_idivmod:
700693 str lr, [sp, #-4]
701694 ARMV5_SDIV32_BODY r0, r1, r0, r1, r2, lr, ip, r3, __div0_wrap_s, "ldr pc, [sp, #-4]"
@@ -701,7 +694,6 @@
702695 .size __aeabi_idivmod, . - __aeabi_idivmod
703696 #endif
704697
705 - .section .text._L_udiv_est_table
706698 .L_udiv_est_table:
707699 .byte 0xff, 0xfc, 0xf8, 0xf4, 0xf0, 0xed, 0xea, 0xe6
708700 .byte 0xe3, 0xe0, 0xdd, 0xda, 0xd7, 0xd4, 0xd2, 0xcf