Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Linux/arch/riscv/lib/   (Open Source Betriebssystem Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 1 kB image not shown  

Quelle  clear_page.S   Sprache: Sparc

 
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2023 Ventana Micro Systems Inc.
 */


#include <linux/linkage.h>
#include <linux/export.h>
#include <asm/asm.h>
#include <asm/alternative-macros.h>
#include <asm/hwcap.h>
#include <asm/insn-def.h>
#include <asm/page.h>

#define CBOZ_ALT(order, old, new)    \
 ALTERNATIVE(old, new, 0,    \
      ((order) << 16) | RISCV_ISA_EXT_ZICBOZ, \
      CONFIG_RISCV_ISA_ZICBOZ)

/* void clear_page(void *page) */
SYM_FUNC_START(clear_page)
 li a2, PAGE_SIZE

 /*
 * If Zicboz isn't present, or somehow has a block
 * size larger than 4K, then fallback to memset.
 */

 CBOZ_ALT(12, "j .Lno_zicboz""nop")

 lw a1, riscv_cboz_block_size
 add a2, a0, a2
.Lzero_loop:
 CBO_ZERO(a0)
 add a0, a0, a1
 CBOZ_ALT(11, "bltu a0, a2, .Lzero_loop; ret""nop; nop")
 CBO_ZERO(a0)
 add a0, a0, a1
 CBOZ_ALT(10, "bltu a0, a2, .Lzero_loop; ret""nop; nop")
 CBO_ZERO(a0)
 add a0, a0, a1
 CBO_ZERO(a0)
 add a0, a0, a1
 CBOZ_ALT(9, "bltu a0, a2, .Lzero_loop; ret""nop; nop")
 CBO_ZERO(a0)
 add a0, a0, a1
 CBO_ZERO(a0)
 add a0, a0, a1
 CBO_ZERO(a0)
 add a0, a0, a1
 CBO_ZERO(a0)
 add a0, a0, a1
 CBOZ_ALT(8, "bltu a0, a2, .Lzero_loop; ret""nop; nop")
 CBO_ZERO(a0)
 add a0, a0, a1
 CBO_ZERO(a0)
 add a0, a0, a1
 CBO_ZERO(a0)
 add a0, a0, a1
 CBO_ZERO(a0)
 add a0, a0, a1
 CBO_ZERO(a0)
 add a0, a0, a1
 CBO_ZERO(a0)
 add a0, a0, a1
 CBO_ZERO(a0)
 add a0, a0, a1
 CBO_ZERO(a0)
 add a0, a0, a1
 bltu a0, a2, .Lzero_loop
 ret
.Lno_zicboz:
 li a1, 0
 tail __memset
SYM_FUNC_END(clear_page)
EXPORT_SYMBOL(clear_page)

Messung V0.5
C=96 H=88 G=91

¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.