CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
61 lines
1.6 KiB
ArmAsm
61 lines
1.6 KiB
ArmAsm
//===-- aeabi_idivmod.S - EABI idivmod implementation ---------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "../assembly.h"
|
|
|
|
// struct { int quot, int rem} __aeabi_idivmod(int numerator, int denominator) {
|
|
// int rem, quot;
|
|
// quot = __divmodsi4(numerator, denominator, &rem);
|
|
// return {quot, rem};
|
|
// }
|
|
|
|
#if defined(__MINGW32__)
|
|
#define __aeabi_idivmod __rt_sdiv
|
|
#endif
|
|
|
|
.syntax unified
|
|
.text
|
|
DEFINE_CODE_STATE
|
|
.p2align 2
|
|
DEFINE_COMPILERRT_FUNCTION(__aeabi_idivmod)
|
|
#if defined(USE_THUMB_1)
|
|
push {r0, r1, lr}
|
|
bl SYMBOL_NAME(__divsi3)
|
|
pop {r1, r2, r3} // now r0 = quot, r1 = num, r2 = denom
|
|
muls r2, r0, r2 // r2 = quot * denom
|
|
subs r1, r1, r2
|
|
JMP (r3)
|
|
#else // defined(USE_THUMB_1)
|
|
PACBTI_LANDING
|
|
#if defined(__ARM_FEATURE_PAC_DEFAULT)
|
|
push { r12, lr }
|
|
#else
|
|
push { lr }
|
|
#endif
|
|
sub sp, sp, #4
|
|
mov r2, sp
|
|
#if defined(__MINGW32__)
|
|
mov r3, r0
|
|
mov r0, r1
|
|
mov r1, r3
|
|
#endif
|
|
bl SYMBOL_NAME(__divmodsi4)
|
|
ldr r1, [sp]
|
|
add sp, sp, #4
|
|
#if defined(__ARM_FEATURE_PAC_DEFAULT)
|
|
pop { r12, lr }
|
|
PAC_RETURN
|
|
#else
|
|
pop { pc }
|
|
#endif
|
|
#endif // defined(USE_THUMB_1)
|
|
END_COMPILERRT_FUNCTION(__aeabi_idivmod)
|
|
|
|
NO_EXEC_STACK_DIRECTIVE
|
|
|