repo_id string | size int64 | file_path string | content string |
|---|---|---|---|
guntas-13/cs330_labs | 3,233 | kern/src/init/init.s | // #define EL0 0b00
// #define EL1 0b01
// #define EL2 0b10
// #define EL3 0b11
.section .text.init
.global _start
_start:
// read cpu affinity, start core 0, halt rest
mrs x1, MPIDR_EL1
and x1, x1, #3
cbz x1, setup
halt:
// core affinity != 0, halt it
wfe
b halt
setup:... |
guntas-13/cs330_labs | 418 | boot/src/init/init.s | .section .text.init
.global _start
_start:
// read cpu affinity, start core 0, halt rest
mrs x1, mpidr_el1
and x1, x1, #3
cbz x1, 2f
1:
// core affinity != 0, halt it
wfe
b 1b
2:
// set the stack to start before our boot code
adr x1, _start
mov sp, x... |
H09X/CSCCTFv5 | 5,280 | reverse/CraigV2/chall.s | .file "chall.c"
.text
.globl getlen
.type getlen, @function
getlen:
.LFB309:
.cfi_startproc
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq %rsp, %rbp
.cfi_def_cfa_register 6
movq %rdi, -24(%rbp)
movl $0, -4(%rbp)
jmp .L2
.L3:
addl $1, -4(%rbp)
.L2:
movl -4(%rbp), %eax
movslq %eax, %rdx
movq ... |
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/sockets/udp/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/sockets/ip-name-lookup/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/sockets/instance-network/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/sockets/network/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/sockets/tcp-create-socket/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/sockets/tcp/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/sockets/udp-create-socket/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/io/error/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/io/streams/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/io/poll/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/cli/stderr/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/cli/terminal-stderr/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/cli/terminal-output/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/cli/terminal-input/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/cli/stdout/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/cli/terminal-stdout/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/cli/exit/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/cli/terminal-stdin/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/cli/environment/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/cli/stdin/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/filesystem/types/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/filesystem/preopens/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/random/insecure/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/random/random/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/random/insecure-seed/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/clocks/wall-clock/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/wasi/clocks/monotonic-clock/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hadrian-reppas/csil_arena | 194 | go_player/internal/csil/arena/api/empty.s | // This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
|
hainakus/gpu-rust-miner | 5,802 | src/keccakf1600_x86-64-osx.s | # Source: https://github.com/dot-asm/cryptogams/blob/master/x86_64/keccak1600-x86_64.pl
.text
.p2align 5
__KeccakF1600:
.cfi_startproc
.byte 0xf3,0x0f,0x1e,0xfa
movq 60(%rdi),%rax
movq 68(%rdi),%rbx
movq 76(%rdi),%rcx
movq 84(%rdi),%rdx
movq 92(%rdi),%rbp
jmp L$oop
.p2align 5
L$oop:
movq -100(%rdi),%r8
mo... |
hainakus/gpu-rust-miner | 6,073 | src/keccakf1600_x86-64.s | # Source: https://github.com/dot-asm/cryptogams/blob/master/x86_64/keccak1600-x86_64.pl
.text
.type __KeccakF1600,@function
.align 32
__KeccakF1600:
.cfi_startproc
.byte 0xf3,0x0f,0x1e,0xfa
movq 60(%rdi),%rax
movq 68(%rdi),%rbx
movq 76(%rdi),%rcx
movq 84(%rdi),%rdx
movq 92(%rdi),%rbp
jmp .Loop
.align 32
.Loo... |
hainakus/Xenomorph-miner | 5,802 | src/keccakf1600_x86-64-osx.s | # Source: https://github.com/dot-asm/cryptogams/blob/master/x86_64/keccak1600-x86_64.pl
.text
.p2align 5
__KeccakF1600:
.cfi_startproc
.byte 0xf3,0x0f,0x1e,0xfa
movq 60(%rdi),%rax
movq 68(%rdi),%rbx
movq 76(%rdi),%rcx
movq 84(%rdi),%rdx
movq 92(%rdi),%rbp
jmp L$oop
.p2align 5
L$oop:
movq -100(%rdi),%r8
mo... |
hainakus/Xenomorph-miner | 6,073 | src/keccakf1600_x86-64.s | # Source: https://github.com/dot-asm/cryptogams/blob/master/x86_64/keccak1600-x86_64.pl
.text
.type __KeccakF1600,@function
.align 32
__KeccakF1600:
.cfi_startproc
.byte 0xf3,0x0f,0x1e,0xfa
movq 60(%rdi),%rax
movq 68(%rdi),%rbx
movq 76(%rdi),%rcx
movq 84(%rdi),%rdx
movq 92(%rdi),%rbp
jmp .Loop
.align 32
.Loo... |
hainakus/xenom-miner | 5,802 | src/keccakf1600_x86-64-osx.s | # Source: https://github.com/dot-asm/cryptogams/blob/master/x86_64/keccak1600-x86_64.pl
.text
.p2align 5
__KeccakF1600:
.cfi_startproc
.byte 0xf3,0x0f,0x1e,0xfa
movq 60(%rdi),%rax
movq 68(%rdi),%rbx
movq 76(%rdi),%rcx
movq 84(%rdi),%rdx
movq 92(%rdi),%rbp
jmp L$oop
.p2align 5
L$oop:
movq -100(%rdi),%r8
mo... |
hainakus/xenom-miner | 6,073 | src/keccakf1600_x86-64.s | # Source: https://github.com/dot-asm/cryptogams/blob/master/x86_64/keccak1600-x86_64.pl
.text
.type __KeccakF1600,@function
.align 32
__KeccakF1600:
.cfi_startproc
.byte 0xf3,0x0f,0x1e,0xfa
movq 60(%rdi),%rax
movq 68(%rdi),%rbx
movq 76(%rdi),%rcx
movq 84(%rdi),%rdx
movq 92(%rdi),%rbp
jmp .Loop
.align 32
.Loo... |
hainakus/pico_kid | 5,802 | crypto/muhash/src/keccakf1600_x86-64-osx.s | # Source: https://github.com/dot-asm/cryptogams/blob/master/x86_64/keccak1600-x86_64.pl
.text
.p2align 5
__KeccakF1600:
.cfi_startproc
.byte 0xf3,0x0f,0x1e,0xfa
movq 60(%rdi),%rax
movq 68(%rdi),%rbx
movq 76(%rdi),%rcx
movq 84(%rdi),%rdx
movq 92(%rdi),%rbp
jmp L$oop
.p2align 5
L$oop:
movq -100(%rdi),%r8
mo... |
hainakus/pico_kid | 6,073 | crypto/muhash/src/keccakf1600_x86-64.s | # Source: https://github.com/dot-asm/cryptogams/blob/master/x86_64/keccak1600-x86_64.pl
.text
.type __KeccakF1600,@function
.align 32
__KeccakF1600:
.cfi_startproc
.byte 0xf3,0x0f,0x1e,0xfa
movq 60(%rdi),%rax
movq 68(%rdi),%rbx
movq 76(%rdi),%rcx
movq 84(%rdi),%rdx
movq 92(%rdi),%rbp
jmp .Loop
.align 32
.Loo... |
hainakus/pico_kid | 5,802 | crypto/hashes/src/keccakf1600_x86-64-osx.s | # Source: https://github.com/dot-asm/cryptogams/blob/master/x86_64/keccak1600-x86_64.pl
.text
.p2align 5
__KeccakF1600:
.cfi_startproc
.byte 0xf3,0x0f,0x1e,0xfa
movq 60(%rdi),%rax
movq 68(%rdi),%rbx
movq 76(%rdi),%rcx
movq 84(%rdi),%rdx
movq 92(%rdi),%rbp
jmp L$oop
.p2align 5
L$oop:
movq -100(%rdi),%r8
mo... |
hainakus/pico_kid | 6,073 | crypto/hashes/src/keccakf1600_x86-64.s | # Source: https://github.com/dot-asm/cryptogams/blob/master/x86_64/keccak1600-x86_64.pl
.text
.type __KeccakF1600,@function
.align 32
__KeccakF1600:
.cfi_startproc
.byte 0xf3,0x0f,0x1e,0xfa
movq 60(%rdi),%rax
movq 68(%rdi),%rbx
movq 76(%rdi),%rcx
movq 84(%rdi),%rdx
movq 92(%rdi),%rbp
jmp .Loop
.align 32
.Loo... |
halseth/factors-rs | 752 | src/asm/init.s | .section .text._start;
.globl _start;
_start:
.option push;
.option norelax;
la gp, __global_pointer$;
.option pop;
la sp, 0x00200400
jal ra, __start;
j _sys_halt
__start:
addi sp,sp,-32 # allocate 32 bytes on the stack
sw ra,28(sp) # store ra on the stack
sw s0,24(sp) # store s0 on the stack
a... |
halseth/zkfibonacci-rs | 752 | src/asm/init.s | .section .text._start;
.globl _start;
_start:
.option push;
.option norelax;
la gp, __global_pointer$;
.option pop;
la sp, 0x00200400
jal ra, __start;
j _sys_halt
__start:
addi sp,sp,-32 # allocate 32 bytes on the stack
sw ra,28(sp) # store ra on the stack
sw s0,24(sp) # store s0 on the stack
a... |
hanifeee535/rust_scheduler | 1,473 | context_switch.s | .syntax unified
.cpu cortex-m4
.thumb
.global PendSV_Handler
.type PendSV_Handler, %function
PendSV_Handler:
/* Save context of current task */
//1. get current running task's psp value
mrs r0, psp
//2. Using that psp value, store SF2 (R4 to R11)
stmdb r0!, {r4-r11}
push {lr}
//3. Save the ... |
hanifeee535/rust_os | 1,968 | kernel/src/os_assembly.s | .syntax unified
.cpu cortex-m4
.thumb
.fpu fpv4-sp-d16
.global PendSV_Handler
.type PendSV_Handler, %function
PendSV_Handler:
// Save current task context
//1. get current running task's psp value
mrs r0, psp
//2. Using that psp value, store SF2 (R4 to R11)
stmdb r0!, {r4-r11} ... |
Hansika-Prabodini/different-languages | 4,407 | msa.S | /*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* MIPS SIMD Architecture (MSA) context handling code for KVM.
*
* Copyright (C) 2015 Imagination Technologies Ltd.
*/
#include <asm/asm.... |
HarderHeng/Rust-Riscv | 330 | src/deprecated/_entry.S | # entry.s - RISC-V 64 裸机启动代码
.section .text.entry
.globl _start
# 假设你的 RAM 从 0x8000_0000 开始,栈从高地址向下增长
.equ STACK_START, 0x80000000 + 0x4000 # 16KB 栈空间
_start:
# 1. 初始化栈指针 sp
li sp, STACK_START
# 2. 清除 s0(帧指针)
mv s0, x0
# 3. 跳转到 Rust 入口(即你现有的 _start)
j _start_rust
# 无限循环,防止返回
hang:
wfi
... |
HaZ-K/ArceOS | 1,827 | arceos/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... |
HaZ-K/ArceOS | 3,437 | arceos/modules/riscv_vcpu/src/mem_extable.S | // Copyright (c) 2022 by Rivos Inc.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
// Very unoptimized memcpy() to/from guest memory functions, using the HLV/HSV instructions.
// Adds the instruction at 'lbl' to the exception table.
.macro add_extabl... |
HaZ-K/ArceOS | 4,857 | arceos/modules/riscv_vcpu/src/guest.S |
/// Enter the guest given in `VmCpuRegisters` from `a0`
.global _run_guest
_run_guest:
/* Save hypervisor state */
/* Save hypervisor GPRs (except T0-T6 and a0, which is GuestInfo and stashed in sscratch) */
sd ra, ({hyp_ra})(a0)
sd gp, ({hyp_gp})(a0)
sd tp, ({hyp_tp})(a0)
sd s0, ({hyp... |
HaZ-K/ArceOS | 1,839 | arceos/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... |
HaZ-K/ArceOS | 2,415 | arceos/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... |
HaZ-K/ArceOS | 1,505 | arceos/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 ... |
HaZ-K/ArceOS | 1,965 | arceos/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... |
HaZ-K/ArceOS | 4,307 | arceos/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... |
HaZ-K/ArceOS | 4,857 | arceos/tour/h_1_0/src/guest.S |
/// Enter the guest given in `VmCpuRegisters` from `a0`
.global _run_guest
_run_guest:
/* Save hypervisor state */
/* Save hypervisor GPRs (except T0-T6 and a0, which is GuestInfo and stashed in sscratch) */
sd ra, ({hyp_ra})(a0)
sd gp, ({hyp_gp})(a0)
sd tp, ({hyp_tp})(a0)
sd s0, ({hyp... |
HaZ-K/ArceOS | 2,544 | arceos/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
//-----------------------------------------------------------------------------------... |
HaZ-K/ArceOS | 4,857 | arceos/exercises/simple_hv/src/guest.S |
/// Enter the guest given in `VmCpuRegisters` from `a0`
.global _run_guest
_run_guest:
/* Save hypervisor state */
/* Save hypervisor GPRs (except T0-T6 and a0, which is GuestInfo and stashed in sscratch) */
sd ra, ({hyp_ra})(a0)
sd gp, ({hyp_gp})(a0)
sd tp, ({hyp_tp})(a0)
sd s0, ({hyp... |
hboissel/kfs1 | 453 | arch/x86/start.s | .set ALIGN, 1<<0
.set MEMINFO, 1<<1
.set FLAGS, ALIGN | MEMINFO
.set MAGIC, 0x1BADB002
.set CHECKSUM, -(MAGIC + FLAGS)
.section .multiboot
.align 4
.long MAGIC
.long FLAGS
.long CHECKSUM
.section .bss
.align 16
stack_bottom:
.skip 16384 # 16 KiB
stack_top:
.section .text
.global _start
.type _start, @funct... |
hbuxiaofei/Starry-old | 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);
... |
hbuxiaofei/Starry-old | 121 | modules/axdriver/image.S |
.section .data
.global img_start
.global img_end
.align 16
img_start:
.incbin "./disk.img"
img_end:
|
hbuxiaofei/Starry-old | 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 |
hbuxiaofei/Starry-old | 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... |
hbuxiaofei/Starry-old | 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 // 触发系统调用 |
hbuxiaofei/Starry-old | 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]
... |
hbuxiaofei/Starry-old | 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 |
hbuxiaofei/Starry-old | 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
... |
hbuxiaofei/Starry-old | 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 ... |
hbuxiaofei/Starry-old | 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... |
hbuxiaofei/Starry-old | 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... |
HectorGetFree/OSTEP | 510 | homework/threads-locks/yield.s | .var mutex
.var count
.main
.top
.acquire
mov $1, %ax
xchg %ax, mutex # atomic swap of 1 and mutex
test $0, %ax # if we get 0 back: lock is free!
je .acquire_done
yield # if not, yield and try again
j .acquire
.acquire_done
# critical section
mov count, %ax # get the value... |
HectorGetFree/OSTEP | 461 | homework/threads-locks/ticket.s | .var ticket
.var turn
.var count
.main
.top
.acquire
mov $1, %ax
fetchadd %ax, ticket # grab a ticket
.tryagain
mov turn, %cx # check if it's your turn
test %cx, %ax
jne .tryagain
# critical section
mov count, %ax # get the value at the address
add $1, %ax # increment it
mov %ax, count ... |
HectorGetFree/OSTEP | 121 | homework/threads-locks/simple-race.s | .main
mov 2000, %ax # get the value at the address
add $1, %ax # increment it
mov %ax, 2000 # store it back
halt
|
HectorGetFree/OSTEP | 1,210 | homework/threads-locks/peterson.s | # array of 2 integers (each size 4 bytes)
# load address of flag into fx register
# access flag[] with 0(%fx,%index,4)
# where %index is a register holding 0 or 1
# index reg contains 0 -> flag[0], if 1->flag[1]
.var flag 2
# global turn variable
.var turn
# global count
.var count
.main
# put address of fla... |
HectorGetFree/OSTEP | 454 | homework/threads-locks/test-and-set.s | .var mutex
.var count
.main
.top
.acquire
mov $1, %ax
xchg %ax, mutex # atomic swap of 1 and mutex
test $0, %ax # if we get 0 back: lock is free!
jne .acquire # if not, try again
# critical section
mov count, %ax # get the value at the address
add $1, %ax # increment it
mov ... |
HectorGetFree/OSTEP | 496 | homework/threads-locks/test-and-test-and-set.s | .var mutex
.var count
.main
.top
.acquire
mov mutex, %ax
test $0, %ax
jne .acquire
mov $1, %ax
xchg %ax, mutex # atomic swap of 1 and mutex
test $0, %ax # if we get 0 back: lock is free!
jne .acquire # if not, try again
# critical section
mov count, %ax # get the value at the addres... |
HectorGetFree/OSTEP | 480 | homework/threads-locks/flag.s | .var flag
.var count
.main
.top
.acquire
mov flag, %ax # get flag
test $0, %ax # if we get 0 back: lock is free!
jne .acquire # if not, try again
mov $1, flag # store 1 into flag
# critical section
mov count, %ax # get the value at the address
add $1, %ax # increment it
mov %... |
HectorGetFree/OSTEP | 727 | homework/threads-locks/flag-withcallret.s | .var mutex
.var count
.main
.top
mov %sp, %bp
lea mutex, %ax
push %ax
call .lock
pop
# critical section
mov count, %ax # get the value at the address
add $1, %ax # increment it
mov %ax, count # store it back
# release lock
lea mutex, %ax
push %ax
call .unlock
pop
# see if we're still looping
su... |
HectorGetFree/OSTEP | 65 | homework/threads-locks/loop.s | .main
.top
sub $1,%dx
test $0,%dx
jgt .top
halt
|
HectorGetFree/OSTEP | 641 | homework/threads-locks/looping-race-withlock-withcallret.s | .var mutex
.var count
.main
.top
push mutex
call .lock
pop
# critical section
mov count, %ax # get the value at the address
add $1, %ax # increment it
mov %ax, count # store it back
# release lock
push mutex
call .unlock
pop
# see if we're still looping
sub $1, %bx
test $0, %bx
jgt .top
halt
... |
HectorGetFree/OSTEP | 654 | homework/threads-locks/test-mov.s | .var flag 2
.var turn
.var count
.main
# put address of flag into %cx
lea flag, %cx
# assume thread ID is in %cx (0 or 1, scale by 4 to get proper flag address)
mov %ax, %bx # ax: self
sub $1, %bx # bx: 1 - self
.acquire
mov 16(%dx,%cx),%bx
mov 16(%dx,%cx,4),%bx
mov 16 ( %dx , %cx,3) , %bx
mov 16(%dx,%c... |
HectorGetFree/OSTEP | 245 | homework/threads-intro/looping-race-nolock.s | # assumes %bx has loop count in it
.main
.top
# critical section
mov 2000, %ax # get 'value' at address 2000
add $1, %ax # increment it
mov %ax, 2000 # store it back
# see if we're still looping
sub $1, %bx
test $0, %bx
jgt .top
halt
|
HectorGetFree/OSTEP | 165 | homework/threads-intro/simple-race.s | .main
# this is a critical section
mov 2000(%bx), %ax # get the value at the address
add $1, %ax # increment it
mov %ax, 2000(%bx) # store it back
halt
|
HectorGetFree/OSTEP | 166 | homework/threads-intro/wait-for-me.s | .main
test $1, %ax # ax should be 1 (signaller) or 0 (waiter)
je .signaller
.waiter
mov 2000, %cx
test $1, %cx
jne .waiter
halt
.signaller
mov $1, 2000
halt
|
HectorGetFree/OSTEP | 64 | homework/threads-intro/loop.s | .main
.top
sub $1,%dx
test $0,%dx
jgte .top
halt
|
Heliosly/LingOS | 17,376 | os/riscv/asm.S | #include "asm.h"
.section .text.__ebreak
.global __ebreak
__ebreak:
ebreak
ret
.section .text.__wfi
.global __wfi
__wfi:
wfi
ret
.section .text.__sfence_vma_all
.global __sfence_vma_all
__sfence_vma_all:
sfence.vma
ret
.section .text.__sfence_vma
.global __sfence_vma
__sfence_vma:
sfence... |
Heliosly/LingOS | 1,964 | os/src/polyhal-boot/src/arch/x86_64/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... |
Heliosly/LingOS | 5,404 | os/src/polyhal-boot/src/arch/x86_64/multiboot.S | # Bootstrapping from 32-bit with the Multiboot specification.
# See https://www.gnu.org/software/grub/manual/multiboot/multiboot.html
# Build the 2M Table Mapper.
.macro Page2MTable base
.set n, \base
.rept 512
.quad n + 0x83
.set n, n + 0x200000
.endr
.endm
.macro MapAll2MPage name, a... |
Heliosly/LingOS | 249 | os/src/arch/riscv64/signal.S | # To create the sigreturn trampoline
.equ __NR_sigreturn, 139
.section .text.signal_trampoline, "ax" # "ax": allocatable+executable
.globl start_signal_trampoline
.balign 4
start_signal_trampoline:
li a7, __NR_sigreturn
li a0, 0
ecall |
Heliosly/LingOS | 6,073 | os/src/arch/riscv64/trap.S | .attribute arch, "rv64gc"
.altmacro
.equ FP_START, 50
.equ TRAPFRAME_SIZE, 688
.macro SAVE_GP n
sd x\n, \n*8(sp)
.endm
.macro LOAD_GP n
ld x\n, \n*8(sp)
.endm
.macro SAVE_FP n, m
fsd f\n, \m*8(sp)
.endm
.macro LOAD_FP n, m
... |
Heliosly/LingOS | 271 | os/src/arch/loongarch64/signal.S | # To create the sigreturn trampoline
.equ __NR_sigreturn, 139
.section .text.signal_trampoline, "ax" # "ax": allocatable+executable
.globl start_signal_trampoline
.balign 4
start_signal_trampoline:
ori $a7, $zero, __NR_sigreturn
ori $a0, $zero, 0
syscall 0 |
Heliosly/LingOS | 4,652 | os/src/arch/loongarch64/trap.S | .equ TRAPFRAME_SIZE, 688
.equ KSAVE_USP, 0x502
.macro SAVE_GP n
st.d $r\n, $sp, \n*8
.endm
.macro LOAD_GP n
ld.d $r\n, $sp, \n*8
.endm
.macro SAVE_FP n, m
fst.d $f\n, $sp, \m*8
.endm
.macro LOAD_FP n, m
fld.d $f\n, $sp, \m*8
.endm
.macro PUSH_GENERAL_REGS
st.d $r1, $sp, 0*8
st.d $r4, $sp,... |
Heliosly/LingOS | 3,479 | os/src/polyhal-trap/src/trap/aarch64/trap.S | .macro INVALID_EXCP, kind, source
.p2align 7
msr daifset, #2
sub sp, sp, 35 * 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]
... |
Heliosly/LingOS | 766 | os/src/polyhal-trap/src/trap/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 ... |
heqichen/qcpilot | 24,549 | panda/board/stm32f4/startup_stm32f413xx.s | /**
******************************************************************************
* @file startup_stm32f413xx.s
* @author MCD Application Team
* @version V2.6.0
* @date 04-November-2016
* @brief STM32F413xx Devices vector table for GCC based toolchains.
* This module perform... |
heqichen/qcpilot | 30,560 | panda/board/stm32h7/startup_stm32h7x5xx.s | /**
******************************************************************************
* @file startup_stm32h735xx.s
* @author MCD Application Team
* @brief STM32H735xx Devices vector table for GCC based toolchain.
* This module performs:
* - Set the initial SP
* ... |
heqichen/qcpilot | 2,508 | tinygrad_repo/extra/assembly/rocm/rdna3/prog.s | .global _start
_start:
.rodata
.align 0x10
.global code.kd
.type code.kd,STT_OBJECT
# amd_kernel_code_t (must be at 0x440 for kernel_code_entry_byte_offset to be right)
code.kd:
# amd_kernel_..., amd_machine_...
.long 0,0,0,0
# kernel_code_entry_byte_offset, kernel_code_prefetch_byte_offset
.long 0x00000bc0,0x00000000,... |
Hexancer/loongarch_vcpu | 4,928 | src/trap.S |
/// Enter the guest given in `VmCpuRegisters` from `a0`
.global _run_guest
_run_guest:
/* Save hypervisor state */
/* Save hypervisor GPRs (except T0-T6 and a0, which is GuestInfo and stashed in sscratch) */
sd ra, ({hyp_ra})(a0)
sd gp, ({hyp_gp})(a0)
sd tp, ({hyp_tp})(a0)
sd s0, ({hyp... |
Hexancer/loongarch_vcpu | 3,433 | src/trap_la.S | .section .text
.global _hyp_trap_vector
_hyp_trap_vector:
// 保存 host 寄存器状态
csrwr $r3, 0x502 // 保存 r3 到 DESAVE CSR
csrrd $r3, 0x33 // 从 SAVE3 CSR 获取上下文指针
// 保存 host 通用寄存器
st.d $r0, $r3, 0
st.d $r1, $r3, 8
st.d $r2, $r3, 16
st.d $r4, $r3, 32
st.d $r5, $r... |
Hexancer/loongarch64-axvisor | 1,868 | scripts/lds/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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.