repo_id
string
size
int64
file_path
string
content
string
kushdevteam/bunproj
833
.local/share/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/compiler_builtins-0.1.158/src/hexagon/dfminmax.s
.text .global __hexagon_mindf3 .global __hexagon_maxdf3 .type __hexagon_mindf3,@function .type __hexagon_maxdf3,@function .global __qdsp_mindf3 ; .set __qdsp_mindf3, __hexagon_mindf3 .global __qdsp_maxdf3 ; .set __qdsp_maxdf3, __hexagon_maxdf3 .p2align 5 __hexagon_mindf3: { p0 = dfclass(r1:0,#0x10) p1 = df...
kushdevteam/bunproj
3,885
.local/share/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/compiler_builtins-0.1.158/src/hexagon/fastmath2_ldlib_asm.s
.text .global __hexagon_fast2ldadd_asm .type __hexagon_fast2ldadd_asm, @function __hexagon_fast2ldadd_asm: .falign { R4 = memw(r29+#8) R5 = memw(r29+#24) r7 = r0 } { R6 = sub(R4, R5):sat P0 = CMP.GT(R4, R5); if ( P0.new) R...
kushdevteam/bunproj
872
.local/share/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/compiler_builtins-0.1.158/src/hexagon/sfsqrt_opt.s
FUNCTION_BEGIN __hexagon_sqrtf { r3,p0 = sfinvsqrta(r0) r5 = sffixupr(r0) r4 = ##0x3f000000 r1:0 = combine(#0,#0) } { r0 += sfmpy(r3,r5):lib r1 += sfmpy(r3,r4):lib r2 = r4 r3 = r5 } { r2 -= sfmpy(r0,r1):lib p1 = sfclass(r5,#1) } { r0 += sfmpy(r0,r2):lib r1 ...
kushdevteam/bunproj
7,228
.local/share/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lzma-sys-0.1.20/xz-5.2/src/liblzma/check/crc32_x86.S
/* * Speed-optimized CRC32 using slicing-by-eight algorithm * * This uses only i386 instructions, but it is optimized for i686 and later * (including e.g. Pentium II/III/IV, Athlon XP, and Core 2). For i586 * (e.g. Pentium), slicing-by-four would be better, and even the C version * of slicing-by-eight built with ...
kushdevteam/bunproj
6,761
.local/share/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lzma-sys-0.1.20/xz-5.2/src/liblzma/check/crc64_x86.S
/* * Speed-optimized CRC64 using slicing-by-four algorithm * * This uses only i386 instructions, but it is optimized for i686 and later * (including e.g. Pentium II/III/IV, Athlon XP, and Core 2). * * Authors: Igor Pavlov (original CRC32 assembly code) * Lasse Collin (CRC64 adaptation of the modified CR...
kushdevteam/bunproj
15,150
.local/share/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/zstd-sys-2.0.16+zstd.1.5.7/zstd/lib/decompress/huf_decompress_amd64.S
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). * You may...
L0czek/aosp-virt-package
2,102
guest/vmbase_example/idmap.S
/* * Copyright 2022 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
L0czek/aosp-virt-package
976
guest/vmbase_example/image.ld.S
/* * Copyright 2022 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
L0czek/aosp-virt-package
1,745
guest/pvmfw/idmap.S
/* * Copyright 2022 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
L0czek/aosp-virt-package
2,161
guest/rialto/idmap.S
/* * Copyright 2022 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
L0czek/aosp-virt-package
5,154
libs/libvmbase/entry.S
/* * Copyright 2022 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
L0czek/aosp-virt-package
4,679
libs/libvmbase/exceptions.S
/* * Copyright 2022 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
L0czek/aosp-virt-package
1,788
libs/libvmbase/exceptions_panic.S
/* * Copyright 2022 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
l2-riderft68/kyberlib
4,063
src/avx2/ntt.S
#include "consts.h" .include "shuffle.inc" .macro mul rh0,rh1,rh2,rh3,zl0=15,zl1=15,zh0=2,zh1=2 vpmullw %ymm\zl0,%ymm\rh0,%ymm12 vpmullw %ymm\zl0,%ymm\rh1,%ymm13 vpmullw %ymm\zl1,%ymm\rh2,%ymm14 vpmullw %ymm\zl1,%ymm\rh3,%ymm15 vpmulhw %ymm\zh0,%ymm\rh0,%ymm\rh0 vpmulhw %ymm\zh0,%ymm\rh1,%ymm\rh1 vpmulhw %ym...
l2-riderft68/kyberlib
2,604
src/avx2/basemul.S
#include "consts.h" .macro schoolbook off vmovdqa _16XQINV*2(%rcx),%ymm0 vmovdqa (64*\off+ 0)*2(%rsi),%ymm1 # a0 vmovdqa (64*\off+16)*2(%rsi),%ymm2 # b0 vmovdqa (64*\off+32)*2(%rsi),%ymm3 # a1 vmovdqa (64*\off+48)*2(%rsi),%ymm4 # b1 vpmullw %ymm0,%ymm1,%ymm9 # a0.lo vpmullw %ymm0,%ymm2,%ymm10 # b0.lo v...
l2-riderft68/kyberlib
4,672
src/avx2/invntt.S
#include "consts.h" .include "shuffle.inc" .include "fq.inc" .macro butterfly rl0,rl1,rl2,rl3,rh0,rh1,rh2,rh3,zl0=2,zl1=2,zh0=3,zh1=3 vpsubw %ymm\rl0,%ymm\rh0,%ymm12 vpaddw %ymm\rh0,%ymm\rl0,%ymm\rl0 vpsubw %ymm\rl1,%ymm\rh1,%ymm13 vpmullw %ymm\zl0,%ymm12,%ymm\rh0 vpaddw %ymm\rh1,%ymm\rl1,%ymm\rl1 vpsubw %ymm\r...
l2-riderft68/kyberlib
1,566
src/avx2/fq.S
#include "consts.h" .include "fq.inc" .text reduce128_avx: #load vmovdqa (%rdi),%ymm2 vmovdqa 32(%rdi),%ymm3 vmovdqa 64(%rdi),%ymm4 vmovdqa 96(%rdi),%ymm5 vmovdqa 128(%rdi),%ymm6 vmovdqa 160(%rdi),%ymm7 vmovdqa 192(%rdi),%ymm8 vmovdqa 224(%rdi),%ymm9 red16 2 red16 3 red16 4 red16 5 red16 6 red16 7 red16...
l2-riderft68/kyberlib
4,329
src/avx2/shuffle.S
#include "consts.h" .include "fq.inc" .include "shuffle.inc" /* nttpack_avx: #load vmovdqa (%rdi),%ymm4 vmovdqa 32(%rdi),%ymm5 vmovdqa 64(%rdi),%ymm6 vmovdqa 96(%rdi),%ymm7 vmovdqa 128(%rdi),%ymm8 vmovdqa 160(%rdi),%ymm9 vmovdqa 192(%rdi),%ymm10 vmovdqa 224(%rdi),%ymm11 shuffle1 4,5,3,5 shuffle1 6,7,4,7 shuff...
l3gacyb3ta/compiler-book-following
451
out.s
.globl main main: pushq %rbp movq %rsp, %rbp subq $32, %rsp movq $20, %r10 movq $20, -4(%rbp) movl $3, %r10d movslq %r10d,%r11 movq %r11, -8(%rbp) movq -4(%rbp), %r10 movq -4(%rbp), %r10 movq %r10, -16(%rbp) movq -8(%rbp), %r10 addq %r10, -16(%rbp) movl -16(%rbp), %r10d movl %r10d, -24(%rbp) movl -24(...
laduiw/rcore-lab
676
os/src/task/switch.S
.altmacro .macro SAVE_SN n sd s\n, (\n+2)*8(a0) .endm .macro LOAD_SN n ld s\n, (\n+2)*8(a1) .endm .section .text .globl __switch __switch: # __switch( # current_task_cx_ptr: *mut TaskContext, # next_task_cx_ptr: *const TaskContext # ) # save kernel stack of current task s...
laduiw/rcore-lab
2,218
os/src/trap/trap.S
.altmacro .macro SAVE_GP n sd x\n, \n*8(sp) .endm .macro LOAD_GP n ld x\n, \n*8(sp) .endm .section .text.trampoline .globl __alltraps .globl __restore .globl __alltraps_k .globl __restore_k .align 2 __alltraps: csrrw sp, sscratch, sp # now sp->*TrapContext in user space, sscratch...
lal-buturabi/zkp-other-works
8,449
sp1s/sp1/zkvm/entrypoint/src/memset.s
// This is musl-libc memset commit 37e18b7bf307fa4a8c745feebfcba54a0ba74f30: // // src/string/memset.c // // This was compiled into assembly with: // // clang-14 -target riscv32 -march=rv32im -O3 -S memset.c -nostdlib -fno-builtin -funroll-loops // // and labels manually updated to not conflict. // // musl as a wh...
lal-buturabi/zkp-other-works
11,854
sp1s/sp1/zkvm/entrypoint/src/memcpy.s
// This is musl-libc commit 37e18b7bf307fa4a8c745feebfcba54a0ba74f30: // // src/string/memcpy.c // // This was compiled into assembly with: // // clang-14 -target riscv32 -march=rv32im -O3 -S memcpy.c -nostdlib -fno-builtin -funroll-loops // // and labels manually updated to not conflict. // // musl as a whole is ...
lambbear/wlambch3
676
os/src/task/switch.S
.altmacro .macro SAVE_SN n sd s\n, (\n+2)*8(a0) .endm .macro LOAD_SN n ld s\n, (\n+2)*8(a1) .endm .section .text .globl __switch __switch: # __switch( # current_task_cx_ptr: *mut TaskContext, # next_task_cx_ptr: *const TaskContext # ) # save kernel stack of current task s...
lambbear/wlambch3
1,488
os/src/trap/trap.S
.altmacro .macro SAVE_GP n sd x\n, \n*8(sp) .endm .macro LOAD_GP n ld x\n, \n*8(sp) .endm .section .text .globl __alltraps .globl __restore .align 2 __alltraps: csrrw sp, sscratch, sp # now sp->kernel stack, sscratch->user stack # allocate a TrapContext on kernel stack addi sp, s...
lambdaclass/sp1_poc_forger
8,449
crates/zkvm/entrypoint/src/memset.s
// This is musl-libc memset commit 37e18b7bf307fa4a8c745feebfcba54a0ba74f30: // // src/string/memset.c // // This was compiled into assembly with: // // clang-14 -target riscv32 -march=rv32im -O3 -S memset.c -nostdlib -fno-builtin -funroll-loops // // and labels manually updated to not conflict. // // musl as a wh...
lambdaclass/sp1_poc_forger
11,854
crates/zkvm/entrypoint/src/memcpy.s
// This is musl-libc commit 37e18b7bf307fa4a8c745feebfcba54a0ba74f30: // // src/string/memcpy.c // // This was compiled into assembly with: // // clang-14 -target riscv32 -march=rv32im -O3 -S memcpy.c -nostdlib -fno-builtin -funroll-loops // // and labels manually updated to not conflict. // // musl as a whole is ...
Lanthanum1/jyy-os
622
minimal/minimal.S
#include <sys/syscall.h> // The x86-64 system call Application Binary Interface (ABI): // System call number: RAX // Arguments: RDI, RSI, RDX, RCX, R8, R9 // Return value: RAX // See also: syscall(2) syscalls(2) #define syscall3(id, a1, a2, a3) \ movq $SYS_##id, %rax; \ movq $a1, %rdi; \ movq ...
lantos1618/asm_test
101
program.s
.section __DATA,__data L0: .asciz "Hello, World! " .section __TEXT,__text .global _start _start:
Lanxas1018/Lab_sdram
6,209
firmware/start_pico.S
/* * Copyright 2018, Serge Bazanski <serge@bazanski.pl> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted. */ #include "../extraops.S" /* * Interrupt vector. */ .global _start _start: .org 0x00000000 # Reset j _crt0 .org 0x00000010 ...
Lanxas1018/Lab_sdram
2,655
firmware/extraops.S
// This is free and unencumbered software released into the public domain. // // Anyone is free to copy, modify, publish, use, compile, sell, or // distribute this software, either in source code form or as a compiled // binary, for any purpose, commercial or non-commercial, and by any // means. #define regnum_q0 0 ...
Lanxas1018/Lab_sdram
1,582
firmware/crt0_vex.S
.global main .global isr .global _start _start: j crt_init nop nop nop nop nop nop nop .global trap_entry trap_entry: sw x1, - 1*4(sp) sw x5, - 2*4(sp) sw x6, - 3*4(sp) sw x7, - 4*4(sp) sw x10, - 5*4(sp) sw x11, - 6*4(sp) sw x12, - 7*4(sp) sw x13, - 8*4(sp) sw x14, - 9*4(sp) s...
Lanxas1018/Lab_sdram
1,803
firmware/crt0_ibex.S
# Copyright lowRISC contributors. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 #include "simple_system_regs.h" .section .text default_exc_handler: jal x0, simple_exc_handler timer_handler: jal x0, simple_timer_handler reset_handler: /* set a...
Lanxas1018/Lab_sdram
3,215
firmware/start_caravel_vexriscv.s
# SPDX-FileCopyrightText: 2020 Efabless Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
Lanxas1018/Lab_sdram
3,199
firmware/start_caravel_ibex.s
# SPDX-FileCopyrightText: 2020 Efabless Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
Lanxas1018/Lab_sdram
6,209
firmware/start.S
/* * Copyright 2018, Serge Bazanski <serge@bazanski.pl> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted. */ #include "../extraops.S" /* * Interrupt vector. */ .global _start _start: .org 0x00000000 # Reset j _crt0 .org 0x00000010 ...
LauraRosaMedina/Prueba1
853
tests/syntax-tests/source/ARM Assembly/test.S
.data .balign 4 red: .word 0 green: .word 0 blue: .word 0 .text .global grayscale .func grayscale grayscale: assign: /* some comment */ ldr ip, addr_red str r3, [ip] ldr ip, addr_green ldmfd r13!, {r3} str r3, [ip] ldr ip, addr_blue ldmfd r13!, {r3} str r3, [ip] stmfd r13!, {r4-r8} ldr ip, addr...
LauraRosaMedina/Prueba1
7,962
tests/syntax-tests/highlighted/ARM Assembly/test.S
.data .balign 4 red: .word 0 green: .word 0 [...
lciga/TyumenCTF-2025-Writeups
1,268
reverse/E4syP01nts/E4syP01nts.s
# E4syP01nts BY #▄▄▄ ▪ ▐▄• ▄ ▄• ▄▌ ▐ ▄ ▐ ▄ ▪ ▪▪▪▪▪ ▄▄▌ ▄▄· #▀▄ █·██ █▌█▌▪█▪██▌•█▌▐█•█▌▐███ ▪▪▪▪ ██• ▐█ ▌▪ #▐▀▀▄ ▐█· ·██· █▌▐█▌▐█▐▐▌▐█▐▐▌▐█· ▪▪▪▪ ██▪ ██ ▄ #▐█•█▌▐█▌▪▐█·█▌▐█▄█▌██▐█▌██▐█▌▐█▌ ▪▪▪▪ ▐█▌▐▌▐███▌ #.▀ ▀▀▀▀•▀▀ ▀▀ ▀▀▀ ▀▀ █▪▀▀ █▪▀▀▀ ▪▪▪▪ .▀▀▀ ·▀▀▀ .section .text .globl _start _start: ...
LearningOS/osbiglab-2024s-npudrv
1,598
modules/axhal/linker.lds.S
OUTPUT_ARCH(%ARCH%) BASE_ADDRESS = %KERNEL_BASE%; ENTRY(_start) SECTIONS { . = BASE_ADDRESS; _skernel = .; .text : ALIGN(4K) { _stext = .; *(.text.boot) *(.text .text.*) . = ALIGN(4K); _etext = .; } .rodata : ALIGN(4K) { _srodata = .; *(.ro...
LearningOS/osbiglab-2024s-npudrv
1,672
modules/axhal/src/arch/riscv/trap.S
.macro SAVE_REGS, from_user addi sp, sp, -{trapframe_size} PUSH_GENERAL_REGS csrr t0, sepc csrr t1, sstatus csrrw t2, sscratch, zero // save sscratch (sp) and zero it STR t0, sp, 31 // tf.sepc STR t1, sp, 32 // tf.sstatus STR...
LearningOS/osbiglab-2024s-npudrv
2,415
modules/axhal/src/arch/aarch64/trap.S
.macro SAVE_REGS sub sp, sp, 34 * 8 stp x0, x1, [sp] stp x2, x3, [sp, 2 * 8] stp x4, x5, [sp, 4 * 8] stp x6, x7, [sp, 6 * 8] stp x8, x9, [sp, 8 * 8] stp x10, x11, [sp, 10 * 8] stp x12, x13, [sp, 12 * 8] stp x14, x15, [sp, 14 * 8] stp x16, x...
LearningOS/osbiglab-2024s-npudrv
1,505
modules/axhal/src/arch/x86_64/trap.S
.equ NUM_INT, 256 .altmacro .macro DEF_HANDLER, i .Ltrap_handler_\i: .if \i == 8 || (\i >= 10 && \i <= 14) || \i == 17 # error code pushed by CPU push \i # interrupt vector jmp .Ltrap_common .else push 0 # fill in error code in TrapFrame push \i # interrupt ...
LearningOS/osbiglab-2024s-npudrv
1,965
modules/axhal/src/platform/x86_pc/ap_start.S
# Boot application processors into the protected mode. # Each non-boot CPU ("AP") is started up in response to a STARTUP # IPI from the boot CPU. Section B.4.2 of the Multi-Processor # Specification says that the AP will start in real mode with CS:IP # set to XY00:0000, where XY is an 8-bit value sent with the # STAR...
LearningOS/osbiglab-2024s-npudrv
4,307
modules/axhal/src/platform/x86_pc/multiboot.S
# Bootstrapping from 32-bit with the Multiboot specification. # See https://www.gnu.org/software/grub/manual/multiboot/multiboot.html .section .text.boot .code32 .global _start _start: mov edi, eax # arg1: magic: 0x2BADB002 mov esi, ebx # arg2: multiboot info jmp bsp_entry32 .bal...
LearningOS/rust_shyper
4,068
src/arch/riscv64/exception.S
.equ RA, 8 .equ SP, 16 .equ GP, 24 .equ TP, 32 .equ T0, 40 .equ T1, 48 .equ T2, 56 .equ S0, 64 .equ S1, 72 .equ A0, 80 .equ A1, 88 .equ A2, 96 .equ A3, 104 .equ A4, 112 .equ A5, 120 .equ A6, 128 .equ A7, 136 .equ S2, 144 .equ S3, 152 .equ S4, 160 .equ S5, 168 .equ S6, 176 .equ S7, 184 .equ S8, 192 .equ S9, 200 .equ S10...
LearningOS/rust_shyper
668
src/arch/aarch64/cache.S
// void cache_invalidate_d(u64 start, u64 length); .global cache_invalidate_d cache_invalidate_d: add x2, x0, x1 /* calculate the end address */ bic x0, x0, #(64 - 1) /* align the start with a cache line */ 1: dc ivac, x0 /* invalidate cache to PoC by VA */ add x0, x0, #64 cmp x0, x2 blt 1b mov x0, xzr dsb sy ...
LearningOS/rust_shyper
2,026
src/arch/aarch64/fpsimd.S
/* SPDX-License-Identifier: GPL-2.0-only */ /* * FP/SIMD state saving and restoring macros * * Copyright (C) 2012 ARM Ltd. * Author: Catalin Marinas <catalin.marinas@arm.com> */ .macro fpsimd_save state, tmpnr stp q0, q1, [\state, #16 * 0] stp q2, q3, [\state, #16 * 2] stp q4, q5, [\state, #16 * 4] stp q6, q7...
LearningOS/rust_shyper
2,657
src/arch/aarch64/exception.S
.macro VECTOR handler sub sp, sp, #(0x110) stp x0, x1, [sp, #(0 * 16)] stp x2, x3, [sp, #(1 * 16)] stp x4, x5, [sp, #(2 * 16)] stp x6, x7, [sp, #(3 * 16)] stp x8, x9, [sp, #(4 * 16)] stp x10,x11, [sp, #(5 * 16)] stp x12,x13, [sp, #(6 * 16)] stp x14,x15, [sp, #(7 * 16)] stp x...
Leinnan/ulang
260
samples/return_2.s
.globl _main _main: push %rbp mov %rsp, %rbp subq $8, %rsp movl $2, -4(%rbp) movl -4(%rbp), %r11d imull $3, %r11d movl %r11d, -4(%rbp) movl $5, -8(%rbp) movl -4(%rbp), %r10d addl %r10d, -8(%rbp) movl -8(%rbp), %eax movq %rbp, %rsp popq %rbp ret
LemonFan-maker/PulsarOS
2,493
src/exceptions.s
/* src/exceptions.s - CORRECT VERSION */ .section ".text._start" .global _start _start: // 1. 设置栈指针 // 从链接脚本中加载栈顶地址 ldr x0, =_stack_top mov sp, x0 // 2. 清空 .bss section (可选但推荐) // ldr x0, =_bss_start // ldr x1, =_bss_end // b clear_bss_loop_check // clear_bss_loop: // str xzr, [x0...
lemonsuqing/arceos_ftp
2,001
modules/axhal/linker.lds.S
OUTPUT_ARCH(%ARCH%) BASE_ADDRESS = %KERNEL_BASE%; ENTRY(_start) SECTIONS { . = BASE_ADDRESS; _skernel = .; .text : ALIGN(4K) { _stext = .; *(.text.boot) *(.text .text.*) . = ALIGN(4K); _etext = .; } _srodata = .; .rodata : ALIGN(4K) { *(.rodata...
lemonsuqing/arceos_ftp
1,965
modules/axhal/src/platform/x86_pc/ap_start.S
# Boot application processors into the protected mode. # Each non-boot CPU ("AP") is started up in response to a STARTUP # IPI from the boot CPU. Section B.4.2 of the Multi-Processor # Specification says that the AP will start in real mode with CS:IP # set to XY00:0000, where XY is an 8-bit value sent with the # STAR...
lemonsuqing/arceos_ftp
4,325
modules/axhal/src/platform/x86_pc/multiboot.S
# Bootstrapping from 32-bit with the Multiboot specification. # See https://www.gnu.org/software/grub/manual/multiboot/multiboot.html .section .text.boot .code32 .global _start _start: mov edi, eax # arg1: magic: 0x2BADB002 mov esi, ebx # arg2: multiboot info jmp bsp_entry32 .bal...
lemonsuqing/arceos_ftp
2,544
tools/raspi4/chainloader/src/_arch/aarch64/cpu/boot.s
// SPDX-License-Identifier: MIT OR Apache-2.0 // // Copyright (c) 2021-2022 Andre Richter <andre.o.richter@gmail.com> //-------------------------------------------------------------------------------------------------- // Definitions //-----------------------------------------------------------------------------------...
LeonRust/StarryE1000Driver
1,771
modules/axhal/linker.lds.S
OUTPUT_ARCH(%ARCH%) BASE_ADDRESS = %KERNEL_BASE%; ENTRY(_start) SECTIONS { . = BASE_ADDRESS; _skernel = .; .text : ALIGN(4K) { _stext = .; *(.text.boot) . = ALIGN(4K); *(.text.signal_trampoline) . = ALIGN(4K); *(.text .text.*) . = ALIGN(4K); ...
LeonRust/StarryE1000Driver
121
modules/axdriver/image.S
.section .data .global img_start .global img_end .align 16 img_start: .incbin "./disk.img" img_end:
LeonRust/StarryE1000Driver
210
modules/axhal/src/arch/riscv/signal.S
# To create the sigreturn trampoline .equ __NR_sigreturn, 139 .section .text.signal_trampoline .balign 4 .global start_signal_trampoline start_signal_trampoline: li a7, __NR_sigreturn li a0, 0 ecall
LeonRust/StarryE1000Driver
2,325
modules/axhal/src/arch/riscv/trap.S
.macro SAVE_REGS, from_user addi sp, sp, -{trapframe_size} PUSH_GENERAL_REGS csrr t0, sepc csrr t1, sstatus csrrw t2, sscratch, zero // save sscratch (sp) and zero it STR t0, sp, 31 // tf.sepc STR t1, sp, 32 // tf.sstatus STR...
LeonRust/StarryE1000Driver
223
modules/axhal/src/arch/aarch64/signal.S
# To create the sigreturn trampoline .equ __NR_sigreturn, 139 .section .text.signal_trampoline .balign 4 .global start_signal_trampoline start_signal_trampoline: mov x8, #139 // 设置系统调用号为 139 svc #0 // 触发系统调用
LeonRust/StarryE1000Driver
4,138
modules/axhal/src/arch/aarch64/trap.S
.macro clear_gp_regs .irp n,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29 mov x\n, xzr .endr .endm .macro SAVE_REGS, el stp x0, x1, [sp] stp x2, x3, [sp, 2 * 8] stp x4, x5, [sp, 4 * 8] stp x6, x7, [sp, 6 * 8] stp x8, x9, [sp, 8 * 8] ...
LeonRust/StarryE1000Driver
190
modules/axhal/src/arch/x86_64/signal.S
# To create the sigreturn trampoline .section .text.signal_trampoline .code64 .global start_signal_trampoline start_signal_trampoline: # syscall id rdi = 15 mov rax, 0xf syscall
LeonRust/StarryE1000Driver
1,143
modules/axhal/src/arch/x86_64/syscall.S
.section .text syscall_entry: swapgs mov gs:[offset __PERCPU_USER_RSP_OFFSET], rsp mov rsp, gs:[offset __PERCPU_KERNEL_RSP_OFFSET] sub rsp, 8 // skip user_ss push gs:[offset __PERCPU_USER_RSP_OFFSET] // user_rsp push r11 // rflags ...
LeonRust/StarryE1000Driver
1,505
modules/axhal/src/arch/x86_64/trap.S
.equ NUM_INT, 256 .altmacro .macro DEF_HANDLER, i .Ltrap_handler_\i: .if \i == 8 || (\i >= 10 && \i <= 14) || \i == 17 # error code pushed by CPU push \i # interrupt vector jmp .Ltrap_common .else push 0 # fill in error code in TrapFrame push \i # interrupt ...
LeonRust/StarryE1000Driver
1,965
modules/axhal/src/platform/x86_pc/ap_start.S
# Boot application processors into the protected mode. # Each non-boot CPU ("AP") is started up in response to a STARTUP # IPI from the boot CPU. Section B.4.2 of the Multi-Processor # Specification says that the AP will start in real mode with CS:IP # set to XY00:0000, where XY is an 8-bit value sent with the # STAR...
LeonRust/StarryE1000Driver
4,307
modules/axhal/src/platform/x86_pc/multiboot.S
# Bootstrapping from 32-bit with the Multiboot specification. # See https://www.gnu.org/software/grub/manual/multiboot/multiboot.html .section .text.boot .code32 .global _start _start: mov edi, eax # arg1: magic: 0x2BADB002 mov esi, ebx # arg2: multiboot info jmp bsp_entry32 .bal...
LeonRust/Starry-FastDDS
1,771
modules/axhal/linker.lds.S
OUTPUT_ARCH(%ARCH%) BASE_ADDRESS = %KERNEL_BASE%; ENTRY(_start) SECTIONS { . = BASE_ADDRESS; _skernel = .; .text : ALIGN(4K) { _stext = .; *(.text.boot) . = ALIGN(4K); *(.text.signal_trampoline) . = ALIGN(4K); *(.text .text.*) . = ALIGN(4K); ...
LeonRust/Starry-FastDDS
121
modules/axdriver/image.S
.section .data .global img_start .global img_end .align 16 img_start: .incbin "./disk.img" img_end:
LeonRust/Starry-FastDDS
210
modules/axhal/src/arch/riscv/signal.S
# To create the sigreturn trampoline .equ __NR_sigreturn, 139 .section .text.signal_trampoline .balign 4 .global start_signal_trampoline start_signal_trampoline: li a7, __NR_sigreturn li a0, 0 ecall
LeonRust/Starry-FastDDS
2,325
modules/axhal/src/arch/riscv/trap.S
.macro SAVE_REGS, from_user addi sp, sp, -{trapframe_size} PUSH_GENERAL_REGS csrr t0, sepc csrr t1, sstatus csrrw t2, sscratch, zero // save sscratch (sp) and zero it STR t0, sp, 31 // tf.sepc STR t1, sp, 32 // tf.sstatus STR...
LeonRust/Starry-FastDDS
223
modules/axhal/src/arch/aarch64/signal.S
# To create the sigreturn trampoline .equ __NR_sigreturn, 139 .section .text.signal_trampoline .balign 4 .global start_signal_trampoline start_signal_trampoline: mov x8, #139 // 设置系统调用号为 139 svc #0 // 触发系统调用
LeonRust/Starry-FastDDS
4,138
modules/axhal/src/arch/aarch64/trap.S
.macro clear_gp_regs .irp n,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29 mov x\n, xzr .endr .endm .macro SAVE_REGS, el stp x0, x1, [sp] stp x2, x3, [sp, 2 * 8] stp x4, x5, [sp, 4 * 8] stp x6, x7, [sp, 6 * 8] stp x8, x9, [sp, 8 * 8] ...
LeonRust/Starry-FastDDS
190
modules/axhal/src/arch/x86_64/signal.S
# To create the sigreturn trampoline .section .text.signal_trampoline .code64 .global start_signal_trampoline start_signal_trampoline: # syscall id rdi = 15 mov rax, 0xf syscall
LeonRust/Starry-FastDDS
1,143
modules/axhal/src/arch/x86_64/syscall.S
.section .text syscall_entry: swapgs mov gs:[offset __PERCPU_USER_RSP_OFFSET], rsp mov rsp, gs:[offset __PERCPU_KERNEL_RSP_OFFSET] sub rsp, 8 // skip user_ss push gs:[offset __PERCPU_USER_RSP_OFFSET] // user_rsp push r11 // rflags ...
LeonRust/Starry-FastDDS
1,505
modules/axhal/src/arch/x86_64/trap.S
.equ NUM_INT, 256 .altmacro .macro DEF_HANDLER, i .Ltrap_handler_\i: .if \i == 8 || (\i >= 10 && \i <= 14) || \i == 17 # error code pushed by CPU push \i # interrupt vector jmp .Ltrap_common .else push 0 # fill in error code in TrapFrame push \i # interrupt ...
LeonRust/Starry-FastDDS
1,965
modules/axhal/src/platform/x86_pc/ap_start.S
# Boot application processors into the protected mode. # Each non-boot CPU ("AP") is started up in response to a STARTUP # IPI from the boot CPU. Section B.4.2 of the Multi-Processor # Specification says that the AP will start in real mode with CS:IP # set to XY00:0000, where XY is an 8-bit value sent with the # STAR...
LeonRust/Starry-FastDDS
4,307
modules/axhal/src/platform/x86_pc/multiboot.S
# Bootstrapping from 32-bit with the Multiboot specification. # See https://www.gnu.org/software/grub/manual/multiboot/multiboot.html .section .text.boot .code32 .global _start _start: mov edi, eax # arg1: magic: 0x2BADB002 mov esi, ebx # arg2: multiboot info jmp bsp_entry32 .bal...
leowang000/ACore-2025
722
os/src/timer/timer_trap.S
.section .text .globl __timer_trap .align 2 __timer_trap: csrrw sp, mscratch, sp # Store t0, t1, t2. sd t0, 0 * 8(sp) sd t1, 1 * 8(sp) sd t2, 2 * 8(sp) # Load the address of MTIMERCMP into t0. ld t0, 3 * 8(sp) # Load the time interval into t1. ld t1, 4 * 8(sp) # Load ...
leowang000/ACore-2025
1,638
os/src/trap/trap.S
.altmacro .macro SAVE_GPR id sd x\id, \id * 8(sp) .endm .macro LOAD_GPR id ld x\id, \id * 8(sp) .endm .section .text.trampoline .globl __alltraps .align 2 __alltraps: # now in user address space # sp->user_sp, sscratch->TRAP_CONTEXT csrrw sp, sscratch, sp # now sp->TRAP_CONTEXT, s...
leowang000/ACore-2025
412
os/src/task/scheduler/switch.S
.altmacro .macro SAVE_SREG id sd s\id, (\id + 2) * 8(a0) .endm .macro LOAD_SREG id ld s\id, (\id + 2) * 8(a1) .endm .section .text .globl __switch __switch: sd sp, 0(a0) sd ra, 8(a0) .set n, 0 .rept 12 SAVE_SREG %n .set n, n + 1 .endr ld sp, 0(a1) ld ra, 8(...
li1553770945/gyp-mirror
296
test/assembly/src/lib1.S
#if PLATFORM_WINDOWS || PLATFORM_MAC # define IDENTIFIER(n) _##n #else /* Linux */ # define IDENTIFIER(n) n #endif .globl IDENTIFIER(lib1_function) IDENTIFIER(lib1_function): #if !defined(PLATFORM_ANDROID) movl $42, %eax ret #else /* Android (assuming ARM) */ mov r0, #42 bx lr #endif
li1553770945/gyp-mirror
38
test/ninja/s-needs-no-depfiles/empty.s
# This file intentionally left blank.
li1553770945/gyp-mirror
18
test/mac/lto/asmfile.S
.globl _asfun ret
li041/RocketOS-mirror
1,209
os/src/arch/riscv64/entry.S
.section .text.entry .globl _start _start: # a0 = hart id # pc = 0x8020_0000 slli t0, a0, 16 la sp, boot_stack_top sub sp, sp, t0 # since the kernel base addr is 0xffff_ffc0_8020_0000 # we need to activate pagetable here # satp: 8 << 60 | boot_pagetable la t0, boot_p...
li041/RocketOS-mirror
1,912
os/src/arch/la64/entry.S
.section .text.entry .global _start .equ CSR_CRMD, 0x0 .equ CSR_CPUID, 0x20 .equ CSR_DMW0, 0x180 .equ CSR_DMW1, 0x181 _start: 0: # 获取当前 CPU ID 并放入 a0 csrrd $a0, CSR_CPUID # 为每个核设置栈 li.d $t0, 4096 * 16 mul.d $t1, $a0, $t0 la.global $sp, boot_stack_top sub.d $sp, $sp, $t1 # 先读CSR.CRMD看...
li041/RocketOS-mirror
1,271
os/src/arch/la64/tlb_refill.S
.section .text.__rfill .globl __rfill .equ TLBRSAVE, 0x8b # PGD是当前上下文中出错虚地址对应的全局目录基址 .equ PGD, 0x1b .equ TLBRELO0, 0x8c .equ TLBRELO1, 0x8d .equ TLBREHI, 0x8e .equ CRMD, 0x0 # 触发TLB重填例外的出错虚地址 .equ TLBRBADV, 0x89 .equ TLBIDX, 0x10 .equ TLBEHI, 0x11 .equ TLBELO0, 0x12 .equ TLBELO1, 0x13 # __rfill在遍历过程中会检查页表项的有效性,...
li041/RocketOS-mirror
142
os/src/arch/la64/load_img.S
.section .data .global simg .global eimg .align 12 simg: .incbin "../easy-fs-fuse/rootfs-ubifs-ze.img" eimg: .align 12
li041/RocketOS-mirror
1,032
os/src/arch/riscv64/switch/switch.S
.altmacro .macro SAVE_CALLEE n sd s\n, (\n+2)*8(sp) .endm .macro LOAD_CALLEE n ld s\n, (\n+2)*8(a0) .endm .section .text .globl __switch __switch: # __swtich( # next_task_kernel_stack: *const usize, # ) # a0 -> next_task_kernel_stack # 硬编码, 这里在现任务的内核栈中分配一块空间大小为`TaskContext`的空间 ...
li041/RocketOS-mirror
4,146
os/src/arch/riscv64/trap/trap.S
# sscratch 寄存器 在用户态时保存用户的内核栈指针, 在内核态时保存内核的用户栈指针 # 在trap中不需要修改TCB中的sp, 因为在__switch中当前任务的内核栈是根据现在的sp来确定的, 这个sp的值已经减去了TrapContext的大小 # 但在__swtich中, 需要修改当前TCB中的sp, 因为在__switch中下个任务的内核栈位置是通过TCB中的sp来确定的 # 2025-03-31 更改 # 由于用户态下会更新tp寄存器的值,因此在-8(sp)的位置保存了内核tp # 2025-04-11 更改 # 由于clone会产生新的子进程,新子进程的tp无法在-8(sp)的位置保存,因此将trap_c...
li041/RocketOS-mirror
177
os/src/arch/riscv64/trampoline/trampoline.S
.section .text.trampoline .align 12 .globl sigreturn_trampoline # 在用户注册了信号处理程序并执行结束后,用户的信号处理程序会返回到该函数来调用sigreturn回到内核态 sigreturn_trampoline: li a7,139 ecall
li041/RocketOS-mirror
1,067
os/src/arch/la64/switch/switch.S
.altmacro .macro SAVE_SN n st.d $s\n, $sp, (\n+2)*8 .endm .macro LOAD_SN n ld.d $s\n, $a0, (\n+2)*8 .endm .section .text .globl __switch .equ CSR_PGDL, 0x19 __switch: # __swtich( # next_task_kernel_stack: *const usize, #) # a0 -> next_task_kernel_stack # 硬编码, 这里在现任务的内核栈中分配一块空间大小为`T...
li041/RocketOS-mirror
3,601
os/src/arch/la64/trap/trap.S
# SAVE数据保存寄存器在用户态时保存用户的内核栈指针 # 2025-04-06 更改 # 由于用户态下会更新tp寄存器的值,因此在-8(sp)的位置保存了内核tp # 2025-04-11 更改 # 由于clone会产生新的子进程,新子进程的tp无法在-8(sp)的位置保存,因此将trap_context更新 # 注:last-a0保存原先用户传递参数(用于signal处理SA_RESTART),只在__trap_from_user中保存即可,由handle_signal来恢复 # # 0 ---------------------- # | ketnal_tp ...
li041/RocketOS-mirror
199
os/src/arch/la64/trampoline/trampoline.S
.section .text.trampoline .align 12 .globl sigreturn_trampoline # 在用户注册了信号处理程序并执行结束后,用户的信号处理程序会返回到该函数来调用sigreturn回到内核态 sigreturn_trampoline: li.w $a7, 139 syscall 0
li1553770945/gyp-mirror
192
test/rules/src/an_asm.S
// Copyright (c) 2012 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Fake asm file. int main() {}
LiamStanDev/mini-os
1,309
os/src/task/switch.S
# ----------------------------------------------------------------------------- # switch.S - Task context switch routines for RISC-V # # This file implements the low-level context switch routine (__switch) for RISC-V. # It saves the current task's context (registers) to memory and restores the next # task's context fro...
LiamStanDev/mini-os
4,500
os/src/trap/trap.S
# ----------------------------------------------------------------------------- # trap.S - Trap entry and context switch routines for RISC-V # # This file implements the low-level trap entry (__alltraps) and context restore # (__restore) routines for RISC-V, handling the saving and restoring of all # general-purpose re...
Liber1917/INCOME_smartcar
12,541
ref/STM32F103_Encoder_demo/CORE/startup_stm32f10x_md.s
;******************** (C) COPYRIGHT 2011 STMicroelectronics ******************** ;* File Name : startup_stm32f10x_md.s ;* Author : MCD Application Team ;* Version : V3.5.0 ;* Date : 11-March-2011 ;* Description : STM32F10x Medium Density Devices vector table for MDK-...
Liber1917/INCOME_smartcar
12,160
ref/STM32F103_Encoder_demo/CORE/startup_stm32f10x_ld.s
;******************** (C) COPYRIGHT 2011 STMicroelectronics ******************** ;* File Name : startup_stm32f10x_ld.s ;* Author : MCD Application Team ;* Version : V3.5.0 ;* Date : 11-March-2011 ;* Description : STM32F10x Low Density Devices vector table for MDK-ARM...
Liber1917/INCOME_smartcar
15,145
ref/STM32F103_Encoder_demo/CORE/startup_stm32f10x_hd.s
;******************** (C) COPYRIGHT 2011 STMicroelectronics ******************** ;* File Name : startup_stm32f10x_hd.s ;* Author : MCD Application Team ;* Version : V3.5.0 ;* Date : 11-March-2011 ;* Description : STM32F10x High Density Devices vector table for MDK-AR...
Lind-Project/wasmtime
4,165
crates/fiber/src/unix/s390x.S
// A WORD OF CAUTION // // This entire file basically needs to be kept in sync with itself. It's not // really possible to modify just one bit of this file without understanding // all the other bits. Documentation tries to reference various bits here and // there but try to make sure to read over everything before twe...