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

  • 61acfe9
  • /
  • arch
  • /
  • arm64
  • /
  • crypto
  • /
  • sm4-ce-core.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:af3bfbc3f4d4d44ec2b5129d2073abd94075af27
directory badge Iframe embedding
swh:1:dir:9f76c12f0d835eb45a33b6c81c6f1b71c26c93fd
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 ...
sm4-ce-core.S
// SPDX-License-Identifier: GPL-2.0

#include <linux/linkage.h>
#include <asm/assembler.h>

	.irp		b, 0, 1, 2, 3, 4, 5, 6, 7, 8
	.set		.Lv\b\().4s, \b
	.endr

	.macro		sm4e, rd, rn
	.inst		0xcec08400 | .L\rd | (.L\rn << 5)
	.endm

	/*
	 * void sm4_ce_do_crypt(const u32 *rk, u32 *out, const u32 *in);
	 */
	.text
ENTRY(sm4_ce_do_crypt)
	ld1		{v8.4s}, [x2]
	ld1		{v0.4s-v3.4s}, [x0], #64
CPU_LE(	rev32		v8.16b, v8.16b		)
	ld1		{v4.4s-v7.4s}, [x0]
	sm4e		v8.4s, v0.4s
	sm4e		v8.4s, v1.4s
	sm4e		v8.4s, v2.4s
	sm4e		v8.4s, v3.4s
	sm4e		v8.4s, v4.4s
	sm4e		v8.4s, v5.4s
	sm4e		v8.4s, v6.4s
	sm4e		v8.4s, v7.4s
	rev64		v8.4s, v8.4s
	ext		v8.16b, v8.16b, v8.16b, #8
CPU_LE(	rev32		v8.16b, v8.16b		)
	st1		{v8.4s}, [x1]
	ret
ENDPROC(sm4_ce_do_crypt)

back to top

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