repo_id
string
size
int64
file_path
string
content
string
jontindal/pyriscv
607
firmware/start.S
.section ._start _start: # Set stack pointer la sp, _estack # Copy data section from ROM to RAM la a0, _sidata la a1, _sdata la a2, _edata bge a1, a2, end_init_data loop_init_data: lw a3, 0(a0) sw a3, 0(a1) addi a0, a0, 4 addi a1, a1, 4 blt a1, a2, loop_init_data en...
Josen-B/ci_arceos
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...
Josen-B/ci_arceos
1,839
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...
Josen-B/ci_arceos
2,616
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...
Josen-B/ci_arceos
1,339
modules/axhal/src/arch/x86_64/syscall.S
.section .text .code64 syscall_entry: swapgs // switch to kernel gs mov gs:[offset __PERCPU_USER_RSP_OFFSET], rsp // save user rsp mov rsp, gs:[offset __PERCPU_TSS + {tss_rsp0_offset}] // switch to kernel stack sub rsp, 8 ...
Josen-B/ci_arceos
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 ...
Josen-B/ci_arceos
1,705
modules/axhal/src/arch/loongarch64/trap.S
.macro SAVE_REGS, from_user move $t0, $sp .if \from_user == 1 csrrd $sp, KSAVE_KSP // restore kernel sp addi.d $sp, $sp, -{trapframe_size} STD $tp, $sp, 2 STD $r21, $sp, 21 csrrd $tp, KSAVE_TP csrrd $r21, KSAVE_R21 .else addi.d $sp, $sp, -{trap...
Josen-B/ci_arceos
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...
Josen-B/ci_arceos
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...
Josen-B/ci_arceos
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 //-----------------------------------------------------------------------------------...
jprochazk/hebi4
9,742
src/codegen/opcodes.s
/* Do nothing. */ nop; /* Move value from register `src` to register `dst`. */ mov dst:reg src:reg; # Module variables, captures, array indices and table keys. /* Load module variable `src` to register `dst`. */ lmvar dst:reg src:mvar; # NOTE: `dst` comes 2nd here due to being 16-bit # it's still disassembled...
jrmoulton/probe-rs
461
smoke-tester/test_function_arm.s
.global test_func .thumb_func test_func: mov r0, #0 /* 0x00 */ mov r1, #128 /* 0x02 */ mov r2, #0 /* 0x04 */ bkpt /* 0x06 */ loop: add r0, r0, #1 /* 0x08 */ cmp r0, r1 /* 0x0a */ ble loop /* ...
jrusso440/rustps4
6,429
arch/arm/boot/aeabi_runtime.s
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
jrusso440/rustps4
168
arch/arm/boot/loader.s
.text .code 32 .syntax unified .cpu arm926ej-s .fpu softvfp .global start .global abort .type start, %function start: mov sp, 0x18000 bl main abort: b .
js2xxx/aster-priv
1,106
framework/libs/linux-bzimage/setup/src/x86/amd64_efi/setup.S
/* SPDX-License-Identifier: MPL-2.0 */ .section ".setup", "ax" .code64 // start_of_setup32 should be loaded at CODE32_START, which is our base. .global start_of_setup32 start_of_setup32: // `efi_handover_setup_entry64` should be at efi_handover_setup_entry32 + 0x200, but // we could provide the 32 bit dummy entry poi...
js2xxx/aster-priv
2,407
framework/libs/linux-bzimage/setup/src/x86/amd64_efi/header.S
/* SPDX-License-Identifier: MPL-2.0 */ // The compatibility file for the Linux x86 Boot Protocol. // See https://www.kernel.org/doc/html/v5.6/x86/boot.html for // more information on the Linux x86 Boot Protocol. // Some of the fields filled with a 0xab* values should be filled // by the torjan builder. // Asterinas w...
js2xxx/aster-priv
689
framework/libs/linux-bzimage/setup/src/x86/legacy_i386/setup.S
/* SPDX-License-Identifier: MPL-2.0 */ // 32-bit setup code starts here, and will be loaded at CODE32_START. .section ".setup", "ax" .code32 .global start_of_setup32 start_of_setup32: mov eax, offset __stack_top mov esp, eax mov eax, offset halt push eax # the return address ...
js2xxx/aster-priv
2,165
framework/libs/linux-bzimage/setup/src/x86/legacy_i386/header.S
/* SPDX-License-Identifier: MPL-2.0 */ // The compatibility file for the Linux x86 Boot Protocol. // See https://www.kernel.org/doc/html/v5.6/x86/boot.html for // more information on the Linux x86 Boot Protocol. // Some of the fields filled with a 0xab* values should be filled // by the torjan builder. // Asterinas w...
js2xxx/aster-priv
700
framework/aster-frame/src/task/switch.S
/* SPDX-License-Identifier: MPL-2.0 */ .text .global context_switch .code64 context_switch: # (cur: *mut TaskContext, nxt: *TaskContext) # Save cur's register mov rax, [rsp] # return address mov [rdi + 56], rax # 56 = offsetof(Context, rip) mov [rdi + 0], rsp mov [rdi + 8], rbx mov [rdi + 16], rbp mov [r...
js2xxx/aster-priv
10,035
framework/aster-frame/src/arch/x86/boot/boot.S
/* SPDX-License-Identifier: MPL-2.0 */ // The boot header, initial boot setup code, temporary GDT and page tables are // in the boot section. The boot section is mapped writable since kernel may // modify the initial page table. .section ".boot", "awx" .code32 // With every entry types we could go through common pagi...
js2xxx/aster-priv
2,669
framework/aster-frame/src/arch/x86/smp/smp.S
.extern boot_pml4 .extern ap_early_entry .section ".smp", "awx" .align 4096 .code16 IA32_APIC_BASE = 0x1B IA32_X2APIC_APICID = 0x802 MMIO_XAPIC_APICID = 0xFEE00020 ap_boot: cli // disable interrupts cld xor ax, ax // clear ax mov ds, ax // clear ds lgdt [ap_gdtr] // load gdt mov eax, cr0...
js2xxx/aster-priv
364
framework/aster-frame/src/arch/x86/boot/multiboot/header.S
/* SPDX-License-Identifier: MPL-2.0 */ // This is the GNU Multiboot header. // Reference: https://www.gnu.org/software/grub/manual/multiboot/multiboot.html .section ".multiboot_header", "a" MB_MAGIC = 0x1BADB002 MB_FLAGS = 0 MB_CHECKSUM = -(MB_MAGIC + MB_FLAGS) .code32 multiboot_header: .align 8 .long MB_MAG...
js2xxx/aster-priv
1,252
framework/aster-frame/src/arch/x86/boot/multiboot2/header.S
/* SPDX-License-Identifier: MPL-2.0 */ // This is the GNU Multiboot 2 header. // Reference: https://www.gnu.org/software/grub/manual/multiboot2/html_node/Index.html//Index .section ".multiboot2_header", "a" .code32 // Macros for cleaner code in the header fields. MB2_MAGIC = 0xE85250D6 MB2_ARCHITECTURE = 0 // 32-bit ...
js2xxx/aster-priv
2,102
regression/apps/fork/fork.s
# SPDX-License-Identifier: MPL-2.0 .global _start .section .text _start: call print_hello_world mov $57, %rax # syscall number of fork syscall cmp $0, %rax je _child # child process jmp _parent # parent process _pa...
js2xxx/aster-priv
710
regression/apps/hello_world/hello_world.s
# SPDX-License-Identifier: MPL-2.0 .global _start .section .text _start: call print_message call print_message call print_message mov $60, %rax # syscall number of exit mov $0, %rdi # exit code syscall get_pid: mov $39, %rax sysca...
jtzhpf/starry
1,604
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...
jtzhpf/starry
121
modules/axdriver/image.S
.section .data .global img_start .global img_end .align 16 img_start: .incbin "./disk.img" img_end:
jtzhpf/starry
2,034
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...
jtzhpf/starry
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...
jtzhpf/starry
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 ...
jtzhpf/starry
4,399
modules/axhal/src/arch/loongarch64/trap.S
.equ KSAVE_KSP, 0x30 .equ KSAVE_T0, 0x31 .equ KSAVE_USP, 0x32 .macro SAVE_REGS st.d $ra, $sp, 8 csrrd $t0, KSAVE_T0 st.d $t0, $sp, 12*8 st.d $a0, $sp, 4*8 st.d $a1, $sp, 5*8 st.d $a2, $sp, 6*8 st.d $a3, $sp, 7*8 st.d $a4, $sp, 8*8 st.d $a5, $sp, 9*8 s...
jtzhpf/starry
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...
jtzhpf/starry
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...
jtzhpf/starry
298
modules/axtask/src/copy.S
.altmacro .macro COPY n ld t2, (\n)*8(a0) sd t2, (\n)*8(a1) .endm .section .text .globl __copy __copy: # __copy( # frame_address: *const TrapFrame, # kernel_base: *mut T # ) .set n, 0 .rept 33 COPY %n .set n, n + 1 .endr ret
jtzhpf/starry
306
modules/axtask/src/copy-la64.S
.altmacro .macro COPY n ld.d $t2, $a0, (\n)*8 st.d $t2, $a1, (\n)*8 .endm .section .text .globl __copy __copy: # __copy( # frame_address: *const TrapFrame, # kernel_base: *mut T # ) .set n, 0 .rept 38 COPY %n .set n, n + 1 .endr ret
jtzhpf/starry
2,868
crates/alter_trap/src/trap.S
.section .text // a0: [input] read addr; [output] value to be read // a1: [input] should be 0; [output] 0 if ok, scause if trapped .type __alter_trap_read_usize, %function __alter_trap_read_usize: #mv a1, zero ld a0, 0(a0) ret // a0: [input] write addr // a1: [input] should be 0; [output] 0 if ok, scau...
juliawalowska/Regulator-PID-ogrzewanie
25,517
projekt/Core/Startup/startup_stm32f746zgtx.s
/** ****************************************************************************** * @file startup_stm32f746xx.s * @author MCD Application Team * @brief STM32F746xx Devices vector table for GCC based toolchain. * This module performs: * - Set the initial SP * ...
jul-sh/not-an-oak-fork
1,167
oak_restricted_kernel_wrapper/src/asm/boot.s
/* * Copyright 2023 The Project Oak Authors * * 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 o...
jul-sh/not-an-oak-fork
9,721
stage0_bin/src/asm/boot.s
.code16 .align 16 .section .text16, "ax" .global _start _start : # Enter long mode. This code is inspired by the approach shown at # https://wiki.osdev.org/Entering_Long_Mode_Directly cli xor %eax, %eax mov %eax, %cr3 # Set up descriptors mov $gdt_desc_offset, %si lgdtl %cs:(%si) m...
jul-sh/not-an-oak-fork
695
stage0_bin/src/asm/reset_vector.s
/* * Copyright 2022 The Project Oak Authors * * 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 o...
jul-sh/not-an-oak-fork
2,005
stage0_bin/src/asm/ap_boot.s
.code16 .section .ap_text, "ax" # Entry point for APs. This needs to be page-aligned. .align 4096 .global ap_start ap_start: # Let the BSP know we're alive. lock incl (LIVE_AP_COUNT) 1: hlt jmp 1b # Under SEV-ES, we need to use the AP Reset Hold and AP Jump Tables. We could munge all of it into # `ap_s...
jul-sh/not-an-oak-fork
3,078
oak_restricted_kernel/src/boot/boot.s
/* * Copyright 2022 The Project Oak Authors * * 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 o...
jul-sh/not-an-oak-fork
1,079
testing/sev_snp_hello_world_kernel/src/asm/boot.s
/* * Copyright 2022 The Project Oak Authors * * 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 o...
junkicide/provekit
20,914
skyscraper/block-multiplier/src/aarch64/montgomery_square_interleaved_4.s
// GENERATED FILE, DO NOT EDIT! // in("x0") a[0], in("x1") a[1], in("x2") a[2], in("x3") a[3], // in("x4") a1[0], in("x5") a1[1], in("x6") a1[2], in("x7") a1[3], // in("v0") av[0], in("v1") av[1], in("v2") av[2], in("v3") av[3], // lateout("x0") out[0], lateout("x1") out[1], lateout("x2") out[2], lateout("x3") out[3], ...
junkicide/provekit
17,280
skyscraper/block-multiplier/src/aarch64/montgomery_interleaved_3.s
// GENERATED FILE, DO NOT EDIT! // in("x0") a[0], in("x1") a[1], in("x2") a[2], in("x3") a[3], // in("x4") b[0], in("x5") b[1], in("x6") b[2], in("x7") b[3], // in("v0") av[0], in("v1") av[1], in("v2") av[2], in("v3") av[3], // in("v4") bv[0], in("v5") bv[1], in("v6") bv[2], in("v7") bv[3], // lateout("x0") out[0], lat...
junkicide/provekit
15,672
skyscraper/block-multiplier/src/aarch64/montgomery_square_interleaved_3.s
// GENERATED FILE, DO NOT EDIT! // in("x0") a[0], in("x1") a[1], in("x2") a[2], in("x3") a[3], // in("v0") av[0], in("v1") av[1], in("v2") av[2], in("v3") av[3], // lateout("x0") out[0], lateout("x1") out[1], lateout("x2") out[2], lateout("x3") out[3], // lateout("v0") outv[0], lateout("v1") outv[1], lateout("v2") outv...
junkicide/provekit
22,743
skyscraper/block-multiplier/src/aarch64/montgomery_interleaved_4.s
// GENERATED FILE, DO NOT EDIT! // in("x0") a[0], in("x1") a[1], in("x2") a[2], in("x3") a[3], // in("x4") b[0], in("x5") b[1], in("x6") b[2], in("x7") b[3], // in("x8") a1[0], in("x9") a1[1], in("x10") a1[2], in("x11") a1[3], // in("x12") b1[0], in("x13") b1[1], in("x14") b1[2], in("x15") b1[3], // in("v0") av[0], in(...
junkicide/provekit
15,320
skyscraper/block-multiplier/src/aarch64/montgomery_square_log_interleaved_3.s
// GENERATED FILE, DO NOT EDIT! // in("x0") a[0], in("x1") a[1], in("x2") a[2], in("x3") a[3], // in("v0") av[0], in("v1") av[1], in("v2") av[2], in("v3") av[3], // lateout("x0") out[0], lateout("x1") out[1], lateout("x2") out[2], lateout("x3") out[3], // lateout("v0") outv[0], lateout("v1") outv[1], lateout("v2") outv...
junkicide/provekit
20,246
skyscraper/block-multiplier/src/aarch64/montgomery_square_log_interleaved_4.s
// GENERATED FILE, DO NOT EDIT! // in("x0") a[0], in("x1") a[1], in("x2") a[2], in("x3") a[3], // in("x4") a1[0], in("x5") a1[1], in("x6") a1[2], in("x7") a1[3], // in("v0") av[0], in("v1") av[1], in("v2") av[2], in("v3") av[3], // lateout("x0") out[0], lateout("x1") out[1], lateout("x2") out[2], lateout("x3") out[3], ...
jzmoolman/xv6-rust
607
src/asm/entry.S
# qemu -kernel loads the kernel at 0x80000000 # and causes each hart (i.e. CPU) to jump there. # kernel.ld causes the following code to # be placed at 0x80000000. .section .text.init .globl _entry _entry: # set up a stack for C. # stack0 is declared in start.c, # ...
jzmoolman/xv6-rust
607
src/asm/entry.S
# qemu -kernel loads the kernel at 0x80000000 # and causes each hart (i.e. CPU) to jump there. # kernel.ld causes the following code to # be placed at 0x80000000. .section .text.init .globl _entry _entry: # set up a stack for C. # stack0 is declared in start.c, # ...
KaiWalter/wasm-api-gateway
194
api-go/bindings/gateway/api/api/guest/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.
KaiWalter/wasm-api-gateway
194
api-go/bindings/gateway/api/api/host/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.
KaiWalter/wasm-api-gateway
194
api-go/bindings/gateway/api/api/guest/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.
KaiWalter/wasm-api-gateway
194
api-go/bindings/gateway/api/api/host/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.
kappa8719/kernel2
665
src/arch/rvc/context_switch.S
.global context_switch context_switch: addi sp, sp, -13 * 4 sw ra, 0 * 4(sp) sw s0, 1 * 4(sp) sw s1, 2 * 4(sp) sw s2, 3 * 4(sp) sw s3, 4 * 4(sp) sw s4, 5 * 4(sp) sw s5, 6 * 4(sp) sw s6, 7 * 4(sp) sw s7, 8 * 4(sp) sw s8, 9 * 4(sp) sw s9, 10 * 4(sp) sw s10, 11 * 4(sp) sw s...
karu-rress/CAU-OS-Security
465
1-Compile/hello.s
.file "hello.c" .text .section .rodata .LC0: .string "Hello, World!" .text .globl main .type main, @function main: .LFB0: .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 leaq .LC0(%rip), %rax movq %rax, %rdi call puts@PLT movl $0, %eax popq %...
karu-rress/CAU-OS-Security
422
1-Compile/hello_o1.s
.file "hello.c" .text .section .rodata.str1.1,"aMS",@progbits,1 .LC0: .string "Hello, World!" .text .globl main .type main, @function main: .LFB0: .cfi_startproc subq $8, %rsp .cfi_def_cfa_offset 16 leaq .LC0(%rip), %rdi call puts@PLT movl $0, %eax addq $8, %rsp .cfi_def_cfa_offset 8 ret .cfi_endproc ....
karu-rress/CAU-OS-Security
468
1-Compile/hello_o2.s
.file "hello.c" .text .section .rodata.str1.1,"aMS",@progbits,1 .LC0: .string "Hello, World!" .section .text.startup,"ax",@progbits .p2align 4 .globl main .type main, @function main: .LFB0: .cfi_startproc subq $8, %rsp .cfi_def_cfa_offset 16 leaq .LC0(%rip), %rdi call puts@PLT xorl %eax, %eax addq $8, %r...
karu-rress/CAU-OS-Security
465
1-Compile/hello_o0.s
.file "hello.c" .text .section .rodata .LC0: .string "Hello, World!" .text .globl main .type main, @function main: .LFB0: .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 leaq .LC0(%rip), %rax movq %rax, %rdi call puts@PLT movl $0, %eax popq %...
Katya-Incorporated/Virtualization
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...
Katya-Incorporated/Virtualization
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...
Katya-Incorporated/Virtualization
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...
Katya-Incorporated/Virtualization
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...
Katya-Incorporated/Virtualization
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...
Katya-Incorporated/Virtualization
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...
Katya-Incorporated/Virtualization
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...
kayleegeorge/sp1-fork
8,449
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...
kayleegeorge/sp1-fork
11,854
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 ...
kemkemG0/green_thread_rs
1,038
asm/context.S
#ifdef __APPLE__ // In case of Mac, you need the underscore as the prefix of function name #define SET_CONTEXT _set_context #define SWITCH_CONTEXT _switch_context #else #define SET_CONTEXT set_context #define SWITCH_CONTEXT switch_context #endif .global SET_CONTEXT .global SWITCH_CONTEXT SET_CONTEXT:...
Kensaa/Turing-Complete-RISC-V
292
src/init.S
.section .text .globl _start _start: .option push .option norelax la gp, __global_pointer$ .option pop la sp, _stack_end # init stack pointer add s0, sp, zero # initialize frame pointer to sp call _rust_start hang: j hang # loop forever
Kensaa/Turing-Complete-RISC-V
1,222
tests/rem.S
.section .text .global _start _start: ### ------- REM (signed remainder) --------- li x5, 10 li x6, 3 rem x7, x5, x6 # x7 = 1 li x20, 1 bne x7, x20, error li x5, -10 li x6, 3 rem x7, x5, x6 # x7 = -1 li x20, -1 bne x7, x20, error li x5, 10 li x6, -3 rem...
Kensaa/Turing-Complete-RISC-V
2,277
tests/mult.S
.section .text .global _start _start: ### ------- MUL (signed × signed → low 32) --------- li x5, -8 # x5 li x6, 8 # x6 mul x7, x5, x6 # x7 = -64 li x20, -64 bne x7, x20, error li x5, -2147483648 # x5 INT_MIN li x6, -1 # x6 mul x8, x5, x6 # x...
Kensaa/Turing-Complete-RISC-V
1,219
tests/div.S
.section .text .global _start _start: ### ------- DIV (signed) --------- li x5, 10 li x6, 2 div x7, x5, x6 # x7 = 5 li x20, 5 bne x7, x20, error li x5, -10 li x6, 2 div x7, x5, x6 # x7 = -5 li x20, -5 bne x7, x20, error li x5, 10 li x6, -2 div x7, x5, x...
kern-crates/axhal_split
1,741
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...
kern-crates/axhal_split
1,672
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...
kern-crates/axhal_split
2,415
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...
kern-crates/axhal_split
1,505
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 ...
kern-crates/axhal_split
1,965
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...
kern-crates/axhal_split
4,307
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...
kern-crates/zCore
140
src/platform/aarch64/space.s
.section .data .align 12 sdata: .space 0x8000 // 32K .section .bss.stack .align 12 boot_stack: .space 0x8000 // 32K boot_stack_top:
Kevin1212918/koe-os
1,936
src/interrupt/handler.S
.extern exception_handler .macro EXN_ENTRY int_vec isr_\int_vec: sub rsp, 0x8 push \int_vec jmp _do_exception_handler .section .data .quad isr_\int_vec .section .text .endm .macro EXN_ERRNO_ENTRY int_vec isr_\int_vec: push \int_vec jmp _do_exception_handler .section .data .quad isr_\int_vec .section .text...
Kevin1212918/koe-os
4,414
src/boot/boot.S
.code32 .set _KERNEL_OFFSET_VMA, 0xFFFFFFFF80000000 .section .bootstrap.data, "a", @progbits .align 64 gdt: .quad 0 .set gdt_code, . - gdt .quad (1<<43) | (1<<44) | (1<<47) | (1<<53) /* Code Segment */ gdt_ptr: .word . - gdt - 1 .quad gdt .section .bootstrap.bss, "aw", @nobits .align 4096 pg_ml4_t...
kevincal1226/483-lecture-code
84
neonate/bad.neonate.s
section .text global start_here start_here: mov rax, hahahhaha ret
kevincal1226/483-lecture-code
79
neonate/2025.neonate.s
section .text global start_here start_here: mov rax, 2025 ret
kevincal1226/483-lecture-code
78
neonate/483.s
section .text global start_here start_here: mov rax, 483 ret
kevincal1226/483-lecture-code
77
neonate/483.neonate.s
section .text global start_here start_here: mov rax, 483 ret
kevincal1226/483-lecture-code
410
neonate/assembly_code.s
;;; We are defining "code" section .text ;;; global means we are exporting the symbol start_here, making it available for whatever program we link with global start_here ;;; This is a label, which gives a name to the memory location start_here: ;;; move the value 10 into the register rax. ;;; this is d...
kevincal1226/483-lecture-code
229
adder/function/examples/ex1.add1.s
;; Here's the parsed abstract syntax tree: Add1(Number(5)) ;; The result of the interpreter with input 483 is 6 ;; Result of the compiler: section .text global start_here start_here: mov rax, 5 add rax, 1 ret
kevincal1226/483-lecture-code
229
adder/function/examples/ex0.add1.s
;; Here's the parsed abstract syntax tree: Number(483) ;; The result of the interpreter with input 483 is 483 ;; Result of the compiler: section .text global start_here start_here: mov rax, 483 add rax, 0 ret
kevincal1226/483-lecture-code
250
adder/function/examples/ex2.add1.s
;; Here's the parsed abstract syntax tree: Add1(Sub1(Add1(Sub1(Number(17))))) ;; The result of the interpreter with input 483 is 17 ;; Result of the compiler: section .text global start_here start_here: mov rax, 17 add rax, 0 ret
kevincal1226/483-lecture-code
250
adder/function/examples/ex4.add1.s
;; Here's the parsed abstract syntax tree: Add1(Sub1(Add1(Add1(Variable)))) ;; The result of the interpreter with input 483 is 485 ;; Result of the compiler: section .text global start_here start_here: mov rax, rdi add rax, 2 ret
kevincal1226/483-lecture-code
634
scope_checker/examples/ex8.adder.s
;; Here's the parsed abstract syntax tree: Program { parameter: "x", body: Let("a", Number(10), Let("c", Let("b", Add1(Variable("a")), Let("d", Add1(Variable("b")), Add1(Variable("b")))), Add1(Variable("c")))) } ;; scope checking succeeded ;; The result of the interpreter with input 483 is 13 ;; Result of the compiler:...
kevincal1226/483-lecture-code
267
scope_checker/examples/ex0.add1.s
;; Here's the parsed abstract syntax tree: Program { parameter: "x", body: Number(483) } ;; scope checking succeeded ;; The result of the interpreter with input 483 is 483 ;; Result of the compiler: section .text global start_here start_here: ret
kevincal1226/483-lecture-code
496
scope_checker/examples/ex7.adder.s
;; Here's the parsed abstract syntax tree: Program { parameter: "x", body: Sub1(Let("z", Sub1(Let("a", Sub1(Variable("x")), Variable("a"))), Variable("z"))) } ;; scope checking succeeded ;; The result of the interpreter with input 483 is 480 ;; Result of the compiler: section .text global start_here ...
kevincal1226/483-lecture-code
513
scope_checker/examples/ex6.adder.s
;; Here's the parsed abstract syntax tree: Program { parameter: "x", body: Let("y", Let("z", Sub1(Sub1(Variable("x"))), Add1(Variable("z"))), Sub1(Variable("y"))) } ;; scope checking succeeded ;; The result of the interpreter with input 483 is 481 ;; Result of the compiler: section .text global start_he...
kevincal1226/483-lecture-code
462
scope_checker/examples/ex5.adder.s
;; Here's the parsed abstract syntax tree: Program { parameter: "x", body: Let("y", Let("x", Add1(Variable("x")), Variable("x")), Variable("x")) } ;; scope checking succeeded ;; The result of the interpreter with input 483 is 483 ;; Result of the compiler: section .text global start_here start_here:...
Kevmaninc/openpilot
23,255
body/board/startup_stm32f413xx.s
/** ****************************************************************************** * @file startup_stm32f413xx.s * @author MCD Application Team * @brief STM32F413xx Devices vector table for GCC based toolchains. * This module performs: * - Set the initial SP * ...
klausz65/rust
11,809
library/std/src/sys/pal/sgx/abi/entry.S
/* This symbol is used at runtime to figure out the virtual address that the */ /* enclave is loaded at. */ .section absolute .global IMAGE_BASE IMAGE_BASE: .section ".note.x86_64-fortanix-unknown-sgx", "", @note .align 4 .long 1f - 0f /* name length (not including padding) */ .long 3f - 2f ...
klausz65/rust
79
tests/ui/asm/named-asm-labels.s
lab1: nop // do more things lab2: nop // does bar // a: b lab3: nop; lab4: nop