Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • a3483c2
  • /
  • ntrulpr1013
  • /
  • m4f
  • /
  • mul.S
Raw File Download
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:9435c01207398468b8ed54275825ce62ef163087
directory badge Iframe embedding
swh:1:dir:b480c36cdbf2ad99f41abd792c41e6b3b630ceee
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
mul.S

#include "macros.S"

.syntax unified
.cpu cortex-m4

.align 2
.global __asm_base_mul
.type __asm_base_mul, %function
__asm_base_mul:
    push.w {r4-r12, lr}

    add.w r14, r0, #4096
    add.w r14, r14, #4096

    vmov.w s0, s1, r0, r14
    vmov.w s2, r1

#ifdef LOOP
    vmov.w s3, r14
    _mul_loop:
#else
.rept 256
#endif

    vmov.w r0, r14, s0, s1
    ldrstr4 ldr.w, r0, r4, r5, r6, r7, #0, #4, #8, #12
    ldrstr4 ldr.w, r14, r8, r9, r10, r11, #0, #4, #8, #12

    vmov.w r12, s2
    ldr.w r1, [r12], #4
    vmov.w s2, r12

    smull r12, r14, r5, r11
    smlal r12, r14, r6, r10
    smlal r12, r14, r7, r9
    mul r0, r12, r2
    smlal r12, r14, r0, r3
    smull r12, r14, r14, r1
    smlal r12, r14, r4, r8
    mul r0, r12, r2
    smlal r12, r14, r0, r3

    vmov.w r0, s0
    str.w r14, [r0, #0]

    smull r12, r14, r6, r11
    smlal r12, r14, r7, r10
    mul r0, r12, r2
    smlal r12, r14, r0, r3
    smull r12, r14, r14, r1
    smlal r12, r14, r4, r9
    smlal r12, r14, r5, r8
    mul r0, r12, r2
    smlal r12, r14, r0, r3

    vmov.w r0, s0
    str.w r14, [r0, #4]

    smull r12, r14, r7, r11
    mul r0, r12, r2
    smlal r12, r14, r0, r3
    smull r12, r14, r14, r1
    smlal r12, r14, r4, r10
    smlal r12, r14, r5, r9
    smlal r12, r14, r6, r8
    mul r0, r12, r2
    smlal r12, r14, r0, r3

    vmov.w r0, s0
    str.w r14, [r0, #8]

    smull r12, r14, r4, r11
    smlal r12, r14, r5, r10
    smlal r12, r14, r6, r9
    smlal r12, r14, r7, r8
    mul r0, r12, r2
    smlal r12, r14, r0, r3

    vmov.w r0, s0
    str.w r14, [r0, #12]

// ================================

    vmov.w r14, s1

    ldrstr4 ldr.w, r0, r4, r5, r6, r7, #16, #20, #24, #28
    ldrstr4 ldr.w, r14, r8, r9, r10, r11, #16, #20, #24, #28

    add.w r14, r14, #32
    vmov.w s1, r14

    neg.w r1, r1

    smull r12, r14, r5, r11
    smlal r12, r14, r6, r10
    smlal r12, r14, r7, r9
    mul r0, r12, r2
    smlal r12, r14, r0, r3
    smull r12, r14, r14, r1
    smlal r12, r14, r4, r8
    mul r0, r12, r2
    smlal r12, r14, r0, r3

    vmov.w r0, s0
    str.w r14, [r0, #16]

    smull r12, r14, r6, r11
    smlal r12, r14, r7, r10
    mul r0, r12, r2
    smlal r12, r14, r0, r3
    smull r12, r14, r14, r1
    smlal r12, r14, r4, r9
    smlal r12, r14, r5, r8
    mul r0, r12, r2
    smlal r12, r14, r0, r3

    vmov.w r0, s0
    str.w r14, [r0, #20]

    smull r12, r14, r7, r11
    mul r0, r12, r2
    smlal r12, r14, r0, r3
    smull r12, r14, r14, r1
    smlal r12, r14, r4, r10
    smlal r12, r14, r5, r9
    smlal r12, r14, r6, r8
    mul r0, r12, r2
    smlal r12, r14, r0, r3

    vmov.w r0, s0
    str.w r14, [r0, #24]

    smull r12, r14, r4, r11
    smlal r12, r14, r5, r10
    smlal r12, r14, r6, r9
    smlal r12, r14, r7, r8
    mul r0, r12, r2
    smlal r12, r14, r0, r3

    vmov.w r0, s0
    str.w r14, [r0, #28]
    add.w r0, r0, #32
    vmov.w s0, r0

#ifdef LOOP
    vmov.w r12, s3
    cmp.w r0, r12
    bne.w _mul_loop
#else
.endr
#endif

    pop.w {r4-r12, pc}

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API

back to top