summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/builtins/arm/udivsi3.S
Commit message (Collapse)AuthorAgeFilesLines
* [builtins] Use single line C++/C99 comment stylePetr Hosek2019-04-281-40/+38
| | | | | | | | | | | Use the uniform single line C++/99 style for code comments. This is part of the cleanup proposed in "[RFC] compiler-rt builtins cleanup and refactoring". Differential Revision: https://reviews.llvm.org/D60352 llvm-svn: 359411
* Update more file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | | to reflect the new license. These used slightly different spellings that defeated my regular expressions. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351648
* [builtins][ARM] Select correct code fragments when compiling for ↵Weiming Zhao2017-08-141-19/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Thumb1/Thum2/ARM ISA Summary: Value of __ARM_ARCH_ISA_THUMB isn't based on the actual compilation mode (-mthumb, -marm), it reflect's capability of given CPU. Due to this: •use tbumb and thumb2 insteand of __ARM_ARCH_ISA_THUMB •use '.thumb' directive consistently in all affected files •decorate all thumb functions using DEFINE_COMPILERRT_THUMB_FUNCTION() (This is based off Michal's patch https://reviews.llvm.org/D30938) Reviewers: dim, rengolin, compnerd, strejda Reviewed By: compnerd Subscribers: peter.smith, kubamracek, mgorny, javed.absar, kristof.beyls, jamesduley, aemerson, llvm-commits Differential Revision: https://reviews.llvm.org/D31220 llvm-svn: 310884
* [Builtins] Fix div0 error in udivsi3Weiming Zhao2017-04-061-12/+14
| | | | | | | | | | | | | | Summary: Need to save `lr` before bl to aeabi_div0 Reviewers: rengolin, compnerd Reviewed By: compnerd Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31716 llvm-svn: 299628
* Revert "builtins: Select correct code fragments when compiling for ↵Weiming Zhao2017-03-241-14/+15
| | | | | | | | | Thumb1/Thum2/ARM ISA." This reverts commit c3709191b6d36c4c936173f4a9a29a734b12cb15. (commit by mistake) llvm-svn: 298715
* builtins: Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA.Weiming Zhao2017-03-241-15/+14
| | | | | | | | | | | | | | | | | | | | | | | Summary: Value of __ARM_ARCH_ISA_THUMB isn't based on the actual compilation mode (-mthumb, -marm), it reflect's capability of given CPU. Due to this: - use __tbumb__ and __thumb2__ insteand of __ARM_ARCH_ISA_THUMB - use '.thumb' directive consistently in all affected files - decorate all thumb functions using DEFINE_COMPILERRT_THUMB_FUNCTION() --------- Note: This patch doesn't fix broken Thumb1 variant of __udivsi3 ! Reviewers: weimingz, rengolin, compnerd Subscribers: aemerson, dim Differential Revision: https://reviews.llvm.org/D30938 llvm-svn: 298713
* builtins: Add ARM Thumb1 implementation for uidiv and uidivmodWeiming Zhao2016-12-061-19/+114
| | | | | | This is a resubmit of r288710 due to breakage of Darwin armv7em. llvm-svn: 288777
* Revert "builtins: Add ARM Thumb1 implementation for uidiv and uidivmod"Chris Bieneman2016-12-061-107/+22
| | | | | | | | | | | This reverts commit r288710. r288710 breaks building the builtin libraries on Darwin for armv7em. Build logs may still be avaialable here: http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_build/12035/console llvm-svn: 288773
* builtins: Add ARM Thumb1 implementation for uidiv and uidivmodWeiming Zhao2016-12-051-22/+107
| | | | | | | | | | | | | | Summary: The current uidiv supports archs without clz. However, the asm is for thumb2/arm. For uidivmod, the existing code calls the C version of uidivmodsi4, which then calls uidiv. The extra push/pop/bl makes it less efficient. Reviewers: jmolloy, jroelofs, joerg, compnerd, rengolin Subscribers: llvm-commits, aemerson Differential Revision: https://reviews.llvm.org/D27309 llvm-svn: 288710
* builtins: tag with noexecstackSaleem Abdulrasool2016-06-221-0/+3
| | | | | | | | | | | | These routines do not require executable stacks. However, by default ELFish linkers may assume an executable stack on GNUish environments (and some non-GNU ones too!). The GNU extension to add a note to indicate a non-executable stack is honoured by these environments to mark the stack as non-executable (the compiler normally emits this directive on appropriate targets whenever possible). This allows normal builds from getting executable stacks due to linking to the compiler rt builtins. llvm-svn: 273500
* builtins: rework use of DEFINE_COMPILERRT_THUMB_FUNCTIONSaleem Abdulrasool2014-10-071-0/+4
| | | | | | | | | | | | | | | This is simply to help clarity of the code. The functions are built as thumb only if Thumb2 is available (__ARM_ARCH_ISA_THUMB == 2). Sink the selection into the location of the definition and make DEFINE_COMPILERRT_THUMB_FUNCTION always define a thumb function while DEFINE_COMPILERRT_FUNCTION always selects the default. Since the .thumb_func directive is always available (at least on Linux, Windows, and BSD), sinking the macro right into the macro works just as well. No functional change intended. llvm-svn: 219182
* Fix the armv7 thumb builtins on darwinSteven Wu2014-10-041-1/+1
| | | | | | | | | | The arm builtins converted into thumb in r213481 are not working on darwin. On apple platforms, .thumb_func directive is required to generated correct symbols for thumb functions. <rdar://problem/18523605> llvm-svn: 219040
* builtins: add signature to some assembly routinesSaleem Abdulrasool2014-08-091-0/+4
| | | | | | | Add a helpful description and a signature for the functions implemented in assembly for the integral math routines. NFC. llvm-svn: 215296
* builtins: correct __umodsi3, __udivsi3 on ARMSaleem Abdulrasool2014-08-091-3/+1
| | | | | | | | | | | | | When building the builtins for a modern CPU (idiv support), __umodsi3 was completely incorrect as it would behave as __udivmosi3, which takes a tertiary parameter which is a pointer. __udivsi3 was also incorrect, returning the remainder in r1. Although this would not result in any crash or invalid behaviour as r1 is a caller saved register in AAPCS, this is unnecessary. Simply perform the division ignoring the remainder. llvm-svn: 215295
* builtins: make ARM compilation with GAS work againSaleem Abdulrasool2014-07-271-2/+2
| | | | | | | | | | The LLVM IAS seems to accept wide instructions for add and sub in ARM mode even though it is not permitted. This uses a macro to ensure that the wide modifier is only applied when building in THUMB mode. This repairs building with GCC/GAS in ARM mode. llvm-svn: 214046
* builtins: move macro definitions into assembly.hSaleem Abdulrasool2014-07-271-8/+0
| | | | | | | The macro definitions are shared across multiple files. Define them once in the assembly.h header rather than redefining it in each file. llvm-svn: 214045
* builtins: whitespaceSaleem Abdulrasool2014-07-271-4/+4
| | | | llvm-svn: 214044
* Redo THUMB support.Joerg Sonnenberger2014-07-201-2/+26
| | | | | | Discussed with and tested by: Saleem Abdulrasool llvm-svn: 213481
* Revert r213467, it breaks non-thumb mode.Joerg Sonnenberger2014-07-201-58/+7
| | | | llvm-svn: 213479
* ARM: fix division in some casesSaleem Abdulrasool2014-07-201-7/+58
| | | | | | | | | | | | | | | | | | | | | | | | For ARM cores that are ARMv6T2+ but not ARMv7ve or ARMv7-r and not an updated ARMv7-a that has the idiv extension (chips with clz but not idiv), an incorrect jump would be calculated due to the preference to thumb instructions over ARM. Rather than computing the target at runtime, use a jumptable instead. This trades a bit of storage for performance. The overhead is 32-bytes for each of the three routines, but avoid the calculation of the offset. Because clz was introduced in ARMv6T2 and idiv in certain versions of ARMv7, the non-clz, non-idiv case implies a target which does not support Thumb-2, and thus we cannot use Thumb on those targets (as it is unlikely that the assembly will assemble). Take the opportunity to refactor the IT block macros into assembly.h rather than redefining them in the TUs where they are used. Existing tests cover the full change already, so no new tests are added. This effectively reverts SVN r213309. llvm-svn: 213467
* Revert Thumb-2 conversion of some ARM builtins.Stephen Hines2014-07-171-18/+3
| | | | | | | | | The udivmodsi4/modsi3/umodsi3 code computes jump targets based on ARM encodings (if CLZ is present and IDIV is not present). Reverts parts of r211032 and r211035. llvm-svn: 213309
* builtins: add it blocks for Thumb-2Saleem Abdulrasool2014-06-161-3/+15
| | | | | | | Add the missing IT-blocks for Thumb-2 compilation for code paths exercised by older ARM CPUs. This should fix the buildbots. llvm-svn: 211035
* compiler-rt: prefer thumb over ARMSaleem Abdulrasool2014-06-161-0/+3
| | | | | | | | | | | When possible, use Thumb or Thumb-2 over ARM instructions. This is particularly important for pure-Thumb environments (e.g. Windows on ARM). Although, it is possible to conditionalise this for that target specifically, this is available on most newer ARM CPUs, and the code remains compatible with older CPUs with no adverse effects. It therefore feels better to always prefer Thumb when possible. llvm-svn: 211032
* compiler-rt: whitespace and uniformity for armSaleem Abdulrasool2014-06-011-1/+1
| | | | | | | | | Make the whitespace a bit more uniform in the various assembly routines. This also makes the assembly files a bit more uniform on the ARM side by explicitly stating that it is using the unified syntax and that the contents of the code is in the text section (or segment). No functional change. llvm-svn: 209985
* Move original compiler-rt functions (libgcc replacement) to lib/builtins ↵Alexey Samsonov2014-02-141-0/+148
directory llvm-svn: 201393
OpenPOWER on IntegriCloud