repo_id
string
size
int64
file_path
string
content
string
j4yc3-mw/Viren
40,476
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.17.8/pregenerated/chacha-armv8-win64.S
// This file is generated from a similarly-named Perl script in the BoringSSL // source tree. Do not edit by hand. #include <ring-core/asm_base.h> #if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_AARCH64) && defined(_WIN32) #include <ring-core/arm_arch.h> .section .rodata .align 5 Lsigma: .quad 0x3320646e61707865...
j4yc3-mw/Viren
77,139
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.17.8/pregenerated/p256-x86_64-asm-elf.S
// This file is generated from a similarly-named Perl script in the BoringSSL // source tree. Do not edit by hand. #include <ring-core/asm_base.h> #if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_X86_64) && defined(__ELF__) .text .extern OPENSSL_ia32cap_P .hidden OPENSSL_ia32cap_P .section .rodata .align 64 .Lpoly:...
j4yc3-mw/Viren
190,086
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.17.8/pregenerated/chacha20_poly1305_x86_64-macosx.S
// This file is generated from a similarly-named Perl script in the BoringSSL // source tree. Do not edit by hand. #include <ring-core/asm_base.h> #if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_X86_64) && defined(__APPLE__) .text chacha20_poly1305_constants: .section __DATA,__const .p2align 6 L$chacha20_consts: ...
j4yc3-mw/Viren
8,262
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.17.8/pregenerated/aesv8-armx-ios64.S
// This file is generated from a similarly-named Perl script in the BoringSSL // source tree. Do not edit by hand. #include <ring-core/asm_base.h> #if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_AARCH64) && defined(__APPLE__) #include <ring-core/arm_arch.h> #if __ARM_MAX_ARCH__>=7 .text .section __TEXT,__const .ali...
j4yc3-mw/Viren
43,302
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.17.8/pregenerated/sha512-armv4-linux32.S
// This file is generated from a similarly-named Perl script in the BoringSSL // source tree. Do not edit by hand. #include <ring-core/asm_base.h> #if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_ARM) && defined(__ELF__) @ Copyright 2007-2016 The OpenSSL Project Authors. All Rights Reserved. @ @ Licensed under the Ope...
j4yc3-mw/Viren
35,688
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.17.8/pregenerated/p256-armv8-asm-win64.S
// This file is generated from a similarly-named Perl script in the BoringSSL // source tree. Do not edit by hand. #include <ring-core/asm_base.h> #if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_AARCH64) && defined(_WIN32) #include "ring-core/arm_arch.h" .section .rodata .align 5 Lpoly: .quad 0xffffffffffffffff,0x00...
j4yc3-mw/Viren
32,699
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.17.8/pregenerated/chacha-x86_64-macosx.S
// This file is generated from a similarly-named Perl script in the BoringSSL // source tree. Do not edit by hand. #include <ring-core/asm_base.h> #if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_X86_64) && defined(__APPLE__) .text .section __DATA,__const .p2align 6 L$zero: .long 0,0,0,0 L$one: .long 1,0,0,0 L$inc...
j4yc3-mw/Viren
23,634
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.17.8/pregenerated/vpaes-armv7-linux32.S
// This file is generated from a similarly-named Perl script in the BoringSSL // source tree. Do not edit by hand. #include <ring-core/asm_base.h> #if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_ARM) && defined(__ELF__) .syntax unified .arch armv7-a .fpu neon #if defined(__thumb2__) .thumb #else .code 32 #endif .t...
j4yc3-mw/Viren
58,542
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.17.8/pregenerated/x86_64-mont5-elf.S
// This file is generated from a similarly-named Perl script in the BoringSSL // source tree. Do not edit by hand. #include <ring-core/asm_base.h> #if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_X86_64) && defined(__ELF__) .text .extern OPENSSL_ia32cap_P .hidden OPENSSL_ia32cap_P .globl bn_mul_mont_gather5 .hidden...
j4yc3-mw/Viren
2,659
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.17.8/third_party/fiat/asm/fiat_curve25519_adx_square.S
#include <ring-core/asm_base.h> #if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_X86_64) && \ (defined(__APPLE__) || defined(__ELF__)) .intel_syntax noprefix .text #if defined(__APPLE__) .private_extern _fiat_curve25519_adx_square .global _fiat_curve25519_adx_square _fiat_curve25519_adx_square: #else .type fiat_cu...
j4yc3-mw/Viren
3,464
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.17.8/third_party/fiat/asm/fiat_curve25519_adx_mul.S
#include <ring-core/asm_base.h> #if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_X86_64) && \ (defined(__APPLE__) || defined(__ELF__)) .intel_syntax noprefix .text #if defined(__APPLE__) .private_extern _fiat_curve25519_adx_mul .global _fiat_curve25519_adx_mul _fiat_curve25519_adx_mul: #else .type fiat_curve25519_...
j4yc3-mw/Viren
62,534
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.17.8/crypto/poly1305/poly1305_arm_asm.S
#include <ring-core/asm_base.h> #if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_ARM) && defined(__ELF__) #pragma GCC diagnostic ignored "-Wlanguage-extension-token" # This implementation was taken from the public domain, neon2 version in # SUPERCOP by D. J. Bernstein and Peter Schwabe. # qhasm: int32 input_0 # qha...
j4yc3-mw/Viren
41,612
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.17.8/crypto/curve25519/asm/x25519-asm-arm.S
/* Copyright (c) 2015, Google Inc. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS...
j4yc3-mw/Viren
1,571
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/psm-0.1.21/src/arch/riscv.s
#include "psm.h" .text .globl rust_psm_stack_direction .p2align 2 .type rust_psm_stack_direction,@function rust_psm_stack_direction: /* extern "C" fn() -> u8 */ .cfi_startproc li x10, STACK_DIRECTION_DESCENDING jr x1 .rust_psm_stack_direction_end: .size rust_psm_stack_direction,.rust_psm_stack_direction_...
j4yc3-mw/Viren
2,235
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/psm-0.1.21/src/arch/x86_64.s
#include "psm.h" /* NOTE: sysv64 calling convention is used on all x86_64 targets, including Windows! */ .text #if CFG_TARGET_OS_darwin || CFG_TARGET_OS_macos || CFG_TARGET_OS_ios #define GLOBL(fnname) .globl _##fnname #define TYPE(fnname) #define FUNCTION(fnname) _##fnname #define SIZE(fnname,endlabel) #else #def...
j4yc3-mw/Viren
1,569
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/psm-0.1.21/src/arch/riscv64.s
#include "psm.h" .text .globl rust_psm_stack_direction .p2align 2 .type rust_psm_stack_direction,@function rust_psm_stack_direction: /* extern "C" fn() -> u8 */ .cfi_startproc li x10, STACK_DIRECTION_DESCENDING jr x1 .rust_psm_stack_direction_end: .size rust_psm_stack_direction,.rust_psm_stack_direction_...
j4yc3-mw/Viren
2,080
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/psm-0.1.21/src/arch/zseries_linux.s
/* Implementation of stack swtiching routines for zSeries LINUX ABI. This ABI is used by the s390x-unknown-linux-gnu target. Documents used: * LINUX for zSeries: ELF Application Binary Interface Supplement (1st ed., 2001) (LNUX-1107-01) * z/Architecture: Principles of Operation (4th ed., 2004) (SA22-7832...
j4yc3-mw/Viren
2,264
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/psm-0.1.21/src/arch/x86_windows_gnu.s
/* FIXME: this works locally but not on appveyor??!? */ /* NOTE: fastcall calling convention used on all x86 targets */ .text .def @rust_psm_stack_direction@0 .scl 2 .type 32 .endef .globl @rust_psm_stack_direction@0 .p2align 4 @rust_psm_stack_direction@0: /* extern "fastcall" fn() -> u8 (%al) */ .cfi_startproc mo...
j4yc3-mw/Viren
1,963
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/psm-0.1.21/src/arch/powerpc32.s
#include "psm.h" /* FIXME: this probably does not cover all ABIs? Tested with sysv only, possibly works for AIX as well? */ .text .globl rust_psm_stack_direction .p2align 2 .type rust_psm_stack_direction,@function rust_psm_stack_direction: /* extern "C" fn() -> u8 */ .cfi_startproc li 3, STACK_DIRECTION_DESCEND...
j4yc3-mw/Viren
2,218
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/psm-0.1.21/src/arch/x86_64_windows_gnu.s
.text .def rust_psm_stack_direction .scl 2 .type 32 .endef .globl rust_psm_stack_direction .p2align 4 rust_psm_stack_direction: /* extern "sysv64" fn() -> u8 (%al) */ .cfi_startproc movb $2, %al # always descending on x86_64 retq .cfi_endproc .def rust_psm_stack_pointer .scl 2 .type 32 .endef .globl rust_psm_...
j4yc3-mw/Viren
2,299
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/psm-0.1.21/src/arch/arm_aapcs.s
#include "psm.h" .text .syntax unified #if CFG_TARGET_OS_darwin || CFG_TARGET_OS_macos || CFG_TARGET_OS_ios #define GLOBL(fnname) .globl _##fnname #define THUMBTYPE(fnname) .thumb_func _##fnname #define FUNCTION(fnname) _##fnname #define THUMBFN .code 16 #define SIZE(fnname,endlabel) #define FNSTART #define CANTUNWI...
j4yc3-mw/Viren
1,938
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/psm-0.1.21/src/arch/sparc64.s
#include "psm.h" .text .globl rust_psm_stack_direction .p2align 2 .type rust_psm_stack_direction,@function rust_psm_stack_direction: /* extern "C" fn() -> u8 */ .cfi_startproc jmpl %o7 + 8, %g0 mov STACK_DIRECTION_DESCENDING, %o0 .rust_psm_stack_direction_end: .size rust_psm_stack_direction,.rust_psm_sta...
j4yc3-mw/Viren
1,722
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/psm-0.1.21/src/arch/sparc_sysv.s
#include "psm.h" /* FIXME: this ABI has definitely not been verified at all */ .text .globl rust_psm_stack_direction .p2align 2 .type rust_psm_stack_direction,@function rust_psm_stack_direction: /* extern "C" fn() -> u8 */ .cfi_startproc jmpl %o7 + 8, %g0 mov STACK_DIRECTION_DESCENDING, %o0 .rust_psm_stack_di...
j4yc3-mw/Viren
3,609
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/psm-0.1.21/src/arch/powerpc64_aix.s
.csect .text[PR],2 .file "powerpc64_aix.s" .globl rust_psm_stack_direction[DS] .globl .rust_psm_stack_direction .align 4 .csect rust_psm_stack_direction[DS],3 .vbyte 8, .rust_psm_stack_direction .vbyte 8, TOC[TC0] .vbyte 8, 0 .csect .text[PR],2 .rust_psm_stack_direction: # extern "C" fn() -> u8 li 3, 2 blr L..r...
j4yc3-mw/Viren
2,557
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/psm-0.1.21/src/arch/x86.s
#include "psm.h" /* NOTE: fastcall calling convention used on all x86 targets */ .text #if CFG_TARGET_OS_darwin || CFG_TARGET_OS_macos || CFG_TARGET_OS_ios #define GLOBL(fnname) .globl _##fnname #define TYPE(fnname) #define FUNCTION(fnname) _##fnname #define SIZE(fnname,endlabel) #else #define GLOBL(fnname) .globl...
j4yc3-mw/Viren
2,149
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/psm-0.1.21/src/arch/mips_eabi.s
/* Not only MIPS has 20 different ABIs... nobody tells anybody what specific variant of which ABI is used where. This is an "EABI" implementation based on the following page: http://www.cygwin.com/ml/binutils/2003-06/msg00436.html */ #include "psm.h" .set noreorder /* we’ll manage the delay slots on our own, thanks...
j4yc3-mw/Viren
1,568
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/psm-0.1.21/src/arch/loongarch64.s
#include "psm.h" .text .globl rust_psm_stack_direction .align 2 .type rust_psm_stack_direction,@function rust_psm_stack_direction: /* extern "C" fn() -> u8 */ .cfi_startproc li.w $r4, STACK_DIRECTION_DESCENDING jr $r1 .rust_psm_stack_direction_end: .size rust_psm_stack_direction,.rust_psm_stack_direction...
j4yc3-mw/Viren
2,137
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/psm-0.1.21/src/arch/aarch_aapcs64.s
#include "psm.h" .text #if CFG_TARGET_OS_darwin || CFG_TARGET_OS_macos || CFG_TARGET_OS_ios #define GLOBL(fnname) .globl _##fnname #define TYPE(fnname) #define FUNCTION(fnname) _##fnname #define SIZE(fnname,endlabel) #elif CFG_TARGET_OS_windows #define GLOBL(fnname) .globl fnname #define TYPE(fnname) #define FUNCT...
j4yc3-mw/Viren
2,144
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/psm-0.1.21/src/arch/mips64_eabi.s
/* Not only MIPS has 20 different ABIs... nobody tells anybody what specific variant of which ABI is used where. This is an "EABI" implementation based on the following page: http://www.cygwin.com/ml/binutils/2003-06/msg00436.html */ #include "psm.h" .set noreorder /* we’ll manage the delay slots on our own, thanks...
j4yc3-mw/Viren
1,694
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/psm-0.1.21/src/arch/wasm32.s
#include "psm.h" # Note that this function is not compiled when this package is uploaded to # crates.io, this source is only here as a reference for how the corresponding # wasm32.o was generated. This file can be compiled with: # # cpp psm/src/arch/wasm32.s | llvm-mc -o psm/src/arch/wasm32.o --arch=wasm32 -filetyp...
j4yc3-mw/Viren
2,541
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/psm-0.1.21/src/arch/powerpc64.s
/* Implementation of the AIX-like PowerPC ABI. Seems to be used by the big-endian PowerPC targets. The following references were used during the implementation of this code: https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/com.ibm.aix.alangref/idalangref_rntime_stack.htm https://www.ibm.com/support/k...
j4yc3-mw/Viren
2,045
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/psm-0.1.21/src/arch/powerpc64_openpower.s
/* Implementation of stack swtiching routines for OpenPOWER 64-bit ELF ABI The specification can be found at http://openpowerfoundation.org/wp-content/uploads/resources/leabi/content/ch_preface.html This ABI is usually used by the ppc64le targets. */ #include "psm.h" .text .abiversion 2 .globl rust_psm_st...
jack0682/CSAv1
8,352
third_party/opencv-3.4.17/3rdparty/libpng/arm/filter_neon.S
/* filter_neon.S - NEON optimised filter functions * * Copyright (c) 2018 Cosmin Truta * Copyright (c) 2014,2017 Glenn Randers-Pehrson * Written by Mans Rullgard, 2011. * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer * and license in png.h */ /...
JackMyles/BASIC-to-ASM-Compiler
1,801
runtime/call_check.s
# This is a custom entry point that calls basic_main() for a compiled BASIC program # and verifies that it satisfies the x86-64 calling convention. # This means that the callee-save registers and all memory above %rsp # at the start of basic_main() must not be modified. .rodata check_failed_msg: .string "x86-64 ca...
JackMyles/BASIC-to-ASM-Compiler
42
runtime/print_int_mock.s
.text .globl print_int print_int: ret
JackMyles/BASIC-to-ASM-Compiler
643
runtime/print_int.s
.rodata int_format: .string "%ld\n" .text .globl print_int print_int: movq %rdi, %rsi leaq int_format(%rip), %rdi # LABEL(%rip) computes the address of LABEL relative to %rip movb $0, %al # %al stores the number of float arguments to printf() call printf@plt # Clobber all caller-save registers...
JacobInwald/courseworks
182
Compiling Techniques/coursework-3-JacobInwald/tests/riscv/parser/labels.s
# RUN: ../../../riscv/parser.py %s | filecheck %s foo: add a0, a0, a0 # CHECK: foo: # CHECK-NEXT: add a0, a0, a0 bar: add a0, a0, a0 # CHECK: bar: # CHECK-NEXT: add a0, a0, a0
JacobInwald/courseworks
7,024
Compiling Techniques/coursework-3-JacobInwald/tests/riscv/parser/ops.s
# RUN: ../../../riscv/parser.py %s | filecheck %s loadbyte: lb t0, t2 lb t0, t2, 0 lb t0, t2, 12 lb t0, t2, -34 lb t0, 0(t2) lb t0, 56(t2) lb t0, -78(t2) # CHECK: loadbyte: # CHECK-NEXT: lb t0, 0(t2) # CHECK-NEXT: lb t0, 0(t2) # CHECK-NEXT: lb t0, 12(t2) # CHECK-NEXT: lb t0, -34(t2) # CHECK-NEXT: lb t0, 0...
JacobInwald/courseworks
180
Compiling Techniques/coursework-3-JacobInwald/tests/riscv/parser/directives.s
# RUN: ../../../riscv/parser.py %s | filecheck %s .asciz "somestring" # CHECK: .asciz "somestring" .section .text # CHECK: .section .text .global getasm # CHECK: .global getasm
JacobInwald/courseworks
2,427
Compiling Techniques/coursework-3-JacobInwald/tests/riscv/parser/registers.s
# RUN: ../../../riscv/parser.py %s | filecheck %s registers: # CHECK: registers: jal x0, 0 # CHECK-NEXT: jal zero, 0 jal x1, 0 # CHECK-NEXT: jal ra, 0 jal x2, 0 # CHECK-NEXT: jal sp, 0 jal x3, 0 # CHECK-NEXT: jal gp, 0 jal x4, 0 # CHECK-NEXT: jal tp, 0 jal x5, 0 # CHECK-NEXT: jal t0, 0 jal x6, 0 # CHECK-NEXT: j...
JacobInwald/courseworks
2,779
Compiling Techniques/coursework-3-JacobInwald/tests/riscv/parser/pseudoops.s
# RUN: ../../../riscv/parser.py %s | filecheck %s nop: nop # CHECK: nop: # CHECK-NEXT: nop li: li t0, 0 li t0, 12345 li t0, -67890 # CHECK: li: # CHECK-NEXT: li t0, 0 # CHECK-NEXT: li t0, 12345 # CHECK-NEXT: li t0, -67890 mv: mv t0, t0 # CHECK: mv: # CHECK-NEXT: mv t0, t0 not: not t0, t0...
JacobInwald/courseworks
599
Compiling Techniques/coursework-3-JacobInwald/tests/riscv/interpreter/hello_world.s
# RUN: riscv-interpreter %s | filecheck %s ; hello-world.asm ; print "Hello World" to stdout and exit .data msg: .ascii "Hello World!\n" .text addi a0, zero, 1 ; print to stdout addi a1, zero, msg ; load msg address addi a2, zero, 12 ...
JacobInwald/courseworks
525
Compiling Techniques/coursework-3-JacobInwald/tests/riscv/lexer/labels.s
# RUN: riscv-lexer %s | filecheck %s foo: add a0, a0, a0 # CHECK: SYMBOL:foo # CHECK-NEXT: COLON # CHECK-NEXT: NEWLINE # CHECK-NEXT: SYMBOL:add # CHECK-NEXT: SYMBOL:a0 # CHECK-NEXT: COMMA # CHECK-NEXT: SYMBOL:a0 # CHECK-NEXT: COMMA # CHECK-NEXT: SYMBOL:a0 # CHECK-NEXT: NEWLINE bar: add a0, a0, a0 # CHECK: SYMBOL:...
JacobInwald/courseworks
1,071
Compiling Techniques/coursework-3-JacobInwald/tests/riscv/lexer/ops.s
# RUN: riscv-lexer %s | filecheck %s add a0, a0, a0 # CHECK: SYMBOL:add # CHECK-NEXT: SYMBOL:a0 # CHECK-NEXT: COMMA # CHECK-NEXT: SYMBOL:a0 # CHECK-NEXT: COMMA # CHECK-NEXT: SYMBOL:a0 # CHECK-NEXT: NEWLINE add a0, a0, 1 # CHECK: SYMBOL:add # CHECK-NEXT: SYMBOL:a0 # CHECK-NEXT: COMMA # CHECK-NEXT: SYMBOL:a0 # CHECK...
JacobInwald/courseworks
364
Compiling Techniques/coursework-3-JacobInwald/tests/riscv/lexer/directives.s
# RUN: riscv-lexer %s | filecheck %s .asciz "somestring" # CHECK: DOT # CHECK-NEXT: SYMBOL:asciz # CHECK-NEXT: LITERAL:"somestring" # CHECK-NEXT: NEWLINE .section .text # CHECK: DOT # CHECK-NEXT: SYMBOL:section # CHECK-NEXT: DOT # CHECK-NEXT: SYMBOL:text # CHECK-NEXT: NEWLINE .global getasm # CHECK: DOT # CHECK-NEXT...
JacopoSini/Rust4Safety_DATE2025
256
Vanilla/src/crt0.s
.section .init, "ax" .global _start _start: .cfi_startproc .cfi_undefined ra .option push .option norelax la gp, __global_pointer$ .option pop la sp, __stack_top add s0, sp, zero jal zero, main .cfi_endproc .end
JacopoSini/Rust4Safety_DATE2025
256
YACCA/src/crt0.s
.section .init, "ax" .global _start _start: .cfi_startproc .cfi_undefined ra .option push .option norelax la gp, __global_pointer$ .option pop la sp, __stack_top add s0, sp, zero jal zero, main .cfi_endproc .end
JacopoSini/Rust4Safety_DATE2025
256
RACFED/src/crt0.s
.section .init, "ax" .global _start _start: .cfi_startproc .cfi_undefined ra .option push .option norelax la gp, __global_pointer$ .option pop la sp, __stack_top add s0, sp, zero jal zero, main .cfi_endproc .end
jared-hughes/defcpu
6,847
tests/integration/print_regs.s
# This file is a modification of defasm/cli/debug.s, which is under the following license. # # Copyright (c) 2021, Alon Ran # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice...
jared-hughes/defcpu
5,405
tests/integration/dump_initial_state.s
# Dump the intial state of the program execution. # It's not strictly a memory dump -- I'm trying to print # the minimal necessary information to reconstruct the state. # This should just be the program arguments, plus any offsets needed # to determine the consequences of address-space layout randomization (ASLR) # us...
jared-hughes/defcpu
214
tests/integration/sources/007_movmem.s
# hole: fibonacci mov $0x00007FFEA10A6BE0, %rsp mov $mem, %ebp mov (%ebp), %al mov (%ebp), %bh mov (%ebp), %cx mov (%ebp), %edx mov (%ebp), %rsi hlt .data mem: .byte 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0
jared-hughes/defcpu
467
tests/integration/sources/013_xchg.s
# hole: fibonacci mov $0, %rsp mov $0x0102030405060708, %rax mov $0xA1B1C1D1E1F1A1B1, %rbx xchg %rax, %rbx xchg %rax, %r11 xchg %r11, %rcx xchg %rbx, %r8 xchg %r8d, %edx nop print_regs xchg %r11w, %si xchg %ax, %dx xchg %bl, %dl print_regs mov $x, %rax mov $y, %rbx xchg (%rax), %dl xchg (%rax), %cx xchg (%rbx), %ed...
jared-hughes/defcpu
45
tests/integration/sources/018_syscall_0.s
# hole: fibonacci dump_initial syscall hlt
jared-hughes/defcpu
836
tests/integration/sources/014_cltq_cbw.s
# hole: fibonacci mov $0, %rsp mov $0x1234567812345678, %rdx mov $0x0000, %ax cwtd print_regs mov $0x1234567812345678, %rdx mov $0x8000, %ax cwtd print_regs mov $0x1234567812345678, %rdx mov $0x00000000, %eax cltd print_regs mov $0x1234567812345678, %rdx mov $0x80000000, %eax cltd print_regs mov $0x12345678123456...
jared-hughes/defcpu
370
tests/integration/sources/003_mov8.s
# hole: fibonacci mov $0x00007FFF3EA39100, %rsp mov $0x11, %al mov $0x12, %cl mov $0x13, %dl mov $0x14, %bl mov $0x21, %ah mov $0x22, %ch mov $0x23, %dh mov $0x24, %bh mov $0x31, %sil mov $0x32, %dil mov $0x33, %spl mov $0x34, %bpl mov $0x41, %r8b mov $0x42, %r9b mov $0x43, %r10b mov $0x44, %r11b mov $0x45, %r12b mov $...
jared-hughes/defcpu
500
tests/integration/sources/006_mov64.s
# hole: fibonacci mov $0x87654321DEA0BEEF, %rax mov $0x87654321DEA1BEEE, %rcx mov $0x87654321DEA2BEED, %rdx mov $0x87654321DEA3BEEC, %rbx mov $0x87654321DEA4BEEB, %rsp mov $0x87654321DEA5BEEA, %rbp mov $0x87654321DEA6BEE9, %rsi mov $0x87654321DEA7BEE8, %rdi mov $0x87654321DEA8BEE7, %r8 mov $0x87654321DEA9BEE6, %r9 mov ...
jared-hughes/defcpu
8,513
tests/integration/sources/016_dump.s
# hole: rock-paper-scissors-spock-lizard SYS_WRITE = 1 SYS_EXIT = 60 STDOUT_FILENO = 1 .text dump_initial print_regs mov $argc, %rsi call printsz pop %rax push %rax call printDec # argc (one eighbyte) pop %rbx mov $nl, %rsi call printsz # always at least one arg because $0 = /tmp/asm argLoop: pop %rsi # pop th...
jared-hughes/defcpu
455
tests/integration/sources/015_call_ret.s
# hole: fibonacci .data stack: .quad 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 stack_top: .quad 0 .text mov $stack_top, %rsp mov $1, %rax call lbl1 mov $5, %rdi print_regs call exit # unreachable: mov $12345, %r12 lbl1: mov $2, %rbx call lbl2 mov $4, %rdx ret # unreachable: mov $23456, %r13 lbl2...
jared-hughes/defcpu
338
tests/integration/sources/004_mov16.s
# hole: fibonacci mov $0x00007FFCA2C2BEEB, %rsp mov $0xBEEF, %ax mov $0xBEEE, %cx mov $0xBEED, %dx mov $0xBEEC, %bx mov $0xBEEB, %sp mov $0xBEEA, %bp mov $0xBEE9, %si mov $0xBEE8, %di mov $0xBEE7, %r8w mov $0xBEE6, %r9w mov $0xBEE5, %r10w mov $0xBEE4, %r11w mov $0xBEE3, %r12w mov $0xBEE2, %r13w mov $0xBEE1, %r14w mov $...
jared-hughes/defcpu
380
tests/integration/sources/005_mov32.s
# hole: fibonacci mov $0xDEA0BEEF, %eax mov $0xDEA1BEEE, %ecx mov $0xDEA2BEED, %edx mov $0xDEA3BEEC, %ebx mov $0xDEA4BEEB, %esp mov $0xDEA5BEEA, %ebp mov $0xDEA6BEE9, %esi mov $0xDEA7BEE8, %edi mov $0xDEA8BEE7, %r8d mov $0xDEA9BEE6, %r9d mov $0xDEAABEE5, %r10d mov $0xDEABBEE4, %r11d mov $0xDEACBEE3, %r12d mov $0xDEADBE...
jared-hughes/defcpu
275
tests/integration/sources/017_bswap.s
# hole: fibonacci xor %rsp, %rsp mov $0x0102030405060708, %rax mov $0xA1B2C3D4E5F6A7B8, %rbx bswap %rax bswap %rbx print_regs mov $0x0102030405060708, %rax mov $0xA1B2C3D4E5F6A7B8, %rbx bswap %eax bswap %ebx print_regs # --- Clean exit mov $60, %eax mov $0, %edi syscall
jared-hughes/defcpu
2,006
tests/integration/sources/012_and_xor.s
# hole: fibonacci .data stack: .quad 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 stack_top: .quad 0 .text mov $stack_top, %rsp # --- 64-bit and mov $0x1122334455667788, %rax mov $0xA1B2C3D4E5F67890, %rbx and %rax, %rbx print_regs # --- 32-bit and push $0x0000000000010ad7; popfq mov $0x11223344, %eax mov $0xA1B2C3...
jared-hughes/defcpu
402
tests/integration/sources/010_push_pop.s
# hole: fibonacci .data stack: .quad 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 stack_top: .quad 0 .text mov $stack_top, %rsp push $0x123 print_regs pushfq print_regs pop %rax pop %rbx print_regs # TODO: setting the rflags. It's a mess of bus errors and sigtrap currently. # mov $0xFFFFFFFFFFFFFFFFFF, %rbx # pu...
jared-hughes/defcpu
676
tests/integration/sources/011_div.s
# hole: fibonacci .data stack: .quad 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 stack_top: .quad 0 .text mov $stack_top, %rsp # --- 64-bit div mov $0x123456789ABCDEF0, %rdx mov $0x1122334455667788, %rax mov $0xA1B2C3D4E5F67890, %rcx div %rcx print_regs # --- 32-bit div push $0x0000000000010ad7; popfq mov $0x9AB...
jared-hughes/defcpu
281
tests/integration/sources/002_hello_world.s
# hole: fibonacci SYS_WRITE = 1 SYS_EXIT = 60 STDOUT_FILENO = 1 # Printing .data buffer: .string "Hello, World!\n" bufferLen = . - buffer .text mov $SYS_WRITE, %eax mov $STDOUT_FILENO, %edi mov $buffer, %esi mov $bufferLen, %edx syscall mov $SYS_EXIT, %eax mov $0, %edi syscall
jared-hughes/defcpu
699
tests/integration/sources/008_printnum.s
# hole: fibonacci .comm x, 0xf78000000 mov $0, %rsp # just so test files line up mov $123456789, %eax # SUB: print decimal followed by newline # Requires .comm directive above to let # (-1_i32 as u32) be accessible memory locations mov $10, %bl mov $'\n'-'0', %dl for_digit_in_num: add $'0', %dl dec %esi # first run...
jared-hughes/defcpu
263
tests/integration/sources/001_mov.s
# hole: fibonacci mov $0x00007FFCD4A9D8F0, %rsp mov $0xDEADBEEF, %ebx mov $0x1023456789ABCDEF, %rax mov $0xF1023456789ABCDE, %rcx mov $0xEF1023456789ABCD, %rdx mov $0xDEF1023456789ABC, %r8 mov $0x12340567, %eax mov $0x1234, %cx mov $0x45, %dl mov $0x23, %dh hlt
jared-hughes/defcpu
12,160
tests/integration/sources/009_add_sub_cmp.s
# hole: fibonacci mov $0, %rsp stc print_regs clc print_regs # --- 64-bit add # plain mov $0x0102030405060708, %rax mov $0xA1B1C1D1E1F1A1B1, %rbx mov %rax, %rcx add %rbx, %rcx print_regs # carry mov $0x6000000000000001, %rax mov $0xA000000000000000, %rbx mov %rax, %rcx add %rbx, %rcx print_regs # overflow and ca...
jared-hughes/defcpu
381
tests/disassembly/sources/022_lea.s
8d 0c 18 lea (%rax, %rbx, 1), %ecx 8d 4c 18 12 lea 0x12(%rax, %rbx, 1), %ecx 8d 8c 18 12 34 56 78 lea 0x78563412(%rax, %rbx, 1), %ecx 8d 4c 18 82 lea -0x7e(%rax, %rbx, 1), %ecx 8d 8c 18 12 34 56 88 lea -0x77a9cbee(%rax, %rbx, 1), %ecx 8d ...
jared-hughes/defcpu
3,872
tests/disassembly/sources/021_rotate.s
c0 01 12 rolb $0x12, (%rcx) 48 c0 01 12 rex.W rolb $0x12, (%rcx) 41 c0 01 12 rolb $0x12, (%r9) c0 c1 12 rol $0x12, %cl c0 09 12 rorb $0x12, (%rcx) 48 c0 09 12 rex.W rorb $0x12, (%rcx) 41 c0 09 12 rorb $0x12, (%r9) c0 c9 12 ror $0x12, %cl c0 11 12 rclb $0x12, (%rcx) 48 c0 11 12 rex.W rclb ...
jared-hughes/defcpu
2,441
tests/disassembly/sources/023_xchg.s
90 nop 91 xchg %eax, %ecx 92 xchg %eax, %edx 93 xchg %eax, %ebx 94 xchg %eax, %esp 95 xchg %eax, %ebp 96 xchg %eax, %esi 97 xchg %eax, %edi 66 90 xchg %ax, %ax 66 91 xchg %ax, %cx 66 92 xchg %ax, %dx 66 93 ...
jared-hughes/defcpu
16,420
tests/disassembly/sources/010_fuzz_prefix_mov.s
88 b8 67 66 4f 66 mov %bh, 0x664f6667(%rax) bf 4a 67 8a 88 mov $0x888a674a, %edi b8 4c 67 b0 b8 mov $0xb8b0674c, %eax c6 40 c6 67 movb $0x67, -0x3a(%rax) 66 c6 data16 (bad) 88 c6 ...
jared-hughes/defcpu
14,596
tests/disassembly/sources/012_inc_dec_div_not.s
fe 00 incb (%rax) fe 04 f4 incb (%rsp, %rsi, 8) fe 05 f4 f4 f4 f4 incb -0xb0b0b0c(%rip) fe 06 incb (%rsi) fe 40 f4 incb -0xc(%rax) fe c3 inc %bl fe c4 inc %ah 41 fe 00 ...
jared-hughes/defcpu
38,137
tests/disassembly/sources/013_add_and_sub_cmp_xor_bt.s
04 12 add $0x12, %al 66 05 12 34 add $0x3412, %ax 05 12 34 56 78 add $0x78563412, %eax 41 05 12 34 56 78 rex.B add $0x78563412, %eax 41 05 12 34 56 88 rex.B add $0x88563412, %eax 48 05 12 34 56 78 add $0x78563412, %rax 48 05 12...
jared-hughes/defcpu
1,118
tests/disassembly/sources/001_mov8.s
b0 11 mov $0x11, %al b1 12 mov $0x12, %cl b2 13 mov $0x13, %dl b3 14 mov $0x14, %bl b4 21 mov $0x21, %ah b5 22 mov $0x22, %ch b6 23 mov $0x23, %dh b7 24 mov $0x24, %bh 40 b6 31 mov $0x31, %sil 40 b7 32 mov $0x32, %dil 40 b4 33 mov ...
jared-hughes/defcpu
2,093
tests/disassembly/sources/002_mov16.s
66 b8 ef be mov $0xbeef, %ax 66 b8 12 34 mov $0x3412, %ax 66 b9 12 34 mov $0x3412, %cx 66 ba 12 34 mov $0x3412, %dx 66 bb 12 34 mov $0x3412, %bx 66 bc 12 34 mov ...
jared-hughes/defcpu
5,614
tests/disassembly/sources/006_movmem.s
88 23 mov %ah, (%rbx) 66 88 23 data16 mov %ah, (%rbx) 67 88 23 mov %ah, (%ebx) 66 67 88 23 data16 mov %ah, (%ebx) 40 88 23 mov %spl, (%rbx) 67 40 88 23 mov %spl, (%ebx) 66 40 88 23 data16 mov %spl, (%rbx) 66 67 40 88 23 data16 mov %...
jared-hughes/defcpu
286
tests/disassembly/sources/024_cltq_cbw.s
98 cwtl 99 cltd 66 98 cbtw 66 99 cwtd 67 98 addr32 cwtl 67 99 addr32 cltd 40 98 rex cwtl 40 99 rex cltd 41 98 rex.B cwtl 41 99 rex.B cltd 48 98 cltq 48 99 cqto 49 98 rex.WB cltq 49 99 rex.WB cqto
jared-hughes/defcpu
10,317
tests/disassembly/sources/009_sidb.s
8a 0c 18 mov (%rax, %rbx, 1), %cl 8a 0c 58 mov (%rax, %rbx, 2), %cl 8a 0c 98 mov (%rax, %rbx, 4), %cl 8a 0c d8 mov (%rax, %rbx, 8), %cl 67 8a 0c 18 mov (%eax, %ebx, 1), %cl 67 8a 0c 58 mov (%eax...
jared-hughes/defcpu
18,722
tests/disassembly/sources/011_rm8.s
fe 00 incb (%rax) fe 01 incb (%rcx) fe 02 incb (%rdx) fe 03 incb (%rbx) fe 04 12 incb (%rdx, %rdx, 1) fe 05 12 34 56 78 incb 0x78563412(%rip) fe 06 incb (%rsi) fe 07 ...
jared-hughes/defcpu
895
tests/disassembly/sources/018_scas.s
ae scas %es:(%rdi), %al 66 ae data16 scas %es:(%rdi), %al 67 ae scas %es:(%edi), %al 66 67 ae data16 scas %es:(%edi), %al 41 ae rex.B scas %es:(%rdi), %al 48 ae rex.W scas %es:(%rdi), %al 49 ae rex.WB scas %es:(%rdi), %al 67 49 ae rex.WB scas %es:(%edi), %al 66 af ...
jared-hughes/defcpu
14,904
tests/disassembly/sources/005_fuzz_rex_mov.s
bf 4f b0 b9 4a mov $0x4ab9b04f, %edi b8 47 4a 4c 40 mov $0x404c4a47, %eax b0 b8 mov $0xb8, %al 47 b3 b9 rex.RXB mov $0xb9, %r11b 40 bf 47 4a 47 b3 rex mov $0xb3474a47, %edi 4f ...
jared-hughes/defcpu
559
tests/disassembly/sources/019_rep.s
f3 ae repz scas %es:(%rdi), %al f2 ae repnz scas %es:(%rdi), %al f2 03 00 repnz add (%rax), %eax 03 00 add (%rax), %eax 66 f2 67 f3 00 00 data16 repnz repz add %al, (%eax) 67 f2 ae repnz scas %es:(%edi), %al f2 ae repnz scas %es:(%rdi), ...
jared-hughes/defcpu
150
tests/disassembly/sources/007_mov_rm_imm.s
48 c7 c0 12 34 56 78 mov $0x78563412, %rax c6 c0 12 mov $0x12, %al 66 67 88 23 data16 mov %ah, (%ebx)
jared-hughes/defcpu
6,268
tests/disassembly/sources/017_pop.s
58 pop %rax 59 pop %rcx 5a pop %rdx 5b pop %rbx 5c pop %rsp 5d pop %rbp 5e pop %rsi 5f pop %rdi ...
jared-hughes/defcpu
1,113
tests/disassembly/sources/003_mov32.s
b8 12 34 56 78 mov $0x78563412, %eax b9 12 34 56 78 mov $0x78563412, %ecx ba 12 34 56 78 mov $0x78563412, %edx bb 12 34 56 78 mov $0x78563412, %ebx bc 12 34 56 78 mov $0x78563412, %esp bd 12 34 56 78 mov $0x78563412, %ebp be 12 34 56 78 mov $0x78563412, %esi bf 12...
jared-hughes/defcpu
6,881
tests/disassembly/sources/014_jcc.s
70 82 jo 0x3fff84 70 12 jo 0x400016 71 12 jno 0x400018 72 12 jb 0x40001a 73 12 jae 0x40001c 74 12 je 0x40001e 75 12 jne 0x400020 76 12 ...
jared-hughes/defcpu
1,560
tests/disassembly/sources/004_mov64.s
48 b8 12 34 56 78 9a bc de ff movabs $0xffdebc9a78563412, %rax 48 b9 12 34 56 78 9a bc de ff movabs $0xffdebc9a78563412, %rcx 48 ba 12 34 56 78 9a bc de ff movabs $0xffdebc9a78563412, %rdx 48 bb 12 34 56 78 9a bc de ff movabs $0xffdebc9a78563412, %rbx 48 bc 12 34 56 78 9a bc de ff movabs $...
jared-hughes/defcpu
3,676
tests/disassembly/sources/015_jmp.s
eb 82 jmp 0x3fff84 eb 12 jmp 0x400016 e8 12 34 56 88 call 0xffffffff8896341b e9 12 34 56 88 jmp 0xffffffff88963420 e8 12 34 56 78 call 0x78963425 e9 12 34 56 78 jmp 0x7896342a 66 eb 82 data...
jared-hughes/defcpu
3,072
tests/disassembly/sources/008_prefixes.s
b0 12 mov $0x12, %al 66 b0 12 data16 mov $0x12, %al 67 b0 12 addr32 mov $0x12, %al 66 67 b0 12 data16 addr32 mov $0x12, %al 66 66 67 67 b0 12 data16 data16 addr32 addr32 mov $0x12, %al 67 67 66 66 b0 12 addr32 addr32 data...
jared-hughes/defcpu
7,726
tests/disassembly/sources/016_push.s
6a 12 push $0x12 6a a2 push $0xffffffffffffffa2 66 6a 12 pushw $0x12 67 6a 12 addr32 push $0x12 66 67 6a 12 addr32 pushw $0x12 68 12 34 56 78 push $0x78563412 68 a2 b4 c6 d8 push $0xfffff...
jared-hughes/defcpu
1,180
tests/disassembly/sources/025_bswap.s
0f c8 bswap %eax 0f c9 bswap %ecx 0f ca bswap %edx 0f cb bswap %ebx 0f cc bswap %esp 0f cd bswap %ebp 0f ce bswap %esi 0f cf bswap %edi 40 0f c8 rex bswap %eax 40 0f c9 rex bswap %ecx 40 0f ca rex bswap %edx 40 0f cb rex bswap %ebx 40 0f cc rex bswa...
jared-hughes/defcpu
4,971
tests/disassembly/sources/020_imul.s
f6 28 imulb (%rax) f6 e8 imul %al 66 f7 28 imulw (%rax) 66 f7 e8 imul %ax f7 28 imull (%rax) f7 e8 imul %eax 48 f7 28 imulq (%rax) 48 f7 e8 imul ...
jasondyoungberg/NyauxKT
224
kernel/src/mem/gdt/flush.s
.global gdt_flush gdt_flush: lgdt [rdi] push 0x28 lea rax, [rip + reload_CS] push rax retfq reload_CS: mov ax, 0x30 mov ds, ax mov es, ax mov fs, ax mov gs, ax mov ss, ax ret
jason-hue/FakeToy
254
sbi-qemu/src/sbi_boot.S
.section ".text.boot" .globl _start _start: /* setup stack with 4KB size */ la sp, stacks_start li t0, 4096 add sp, sp, t0 csrw mscratch,sp /* goto C */ tail sbi_main .section .data .align 12 .global stacks_start stacks_start: .skip 4096
jason-hue/FakeToy
965
sbi-qemu/src/trap/trap.S
/* _sbi_exception_vector M模式下的异常向量表入口 按8字节对齐 */ /*必须加上.altmacro,不然就用不了宏*/ .altmacro .macro save_reg n sd x\n, \n*8(sp) .endm .macro restore_reg n ld x\n, \n*8(sp) .endm .align 3 .globl _sbi_exception_vector _sbi_exception_vector: /*从mscratch 获取M模式的sp指针,并把S模式的sp保存到mscratch*/ csrrw sp,mscra...
jason-hue/FakeToy
367
os/src/boot.S
.section ".text.boot" .globl _start _start: /* Mask all interrupts */ csrw sie, zero /* set the stack of SP, size 4KB */ la sp, stacks_start li t0, 40960 add sp, sp, t0 /* Clear sscratch */ csrw sscratch, zero /* goto C */ call kernel_main .section .data.stack .align 12 .global stacks_start stacks_star...
jason-hue/FakeToy
1,602
os/src/trap/trap.S
.section .text.trap .altmacro .macro save_reg n sd x\n,\n*8(sp) .endm .macro restore_reg n ld x\n,\n*8(sp) .endm /* do_exception_vector()必须按4字节对齐 否则写入stvec会不成功 */ .align 2 .globl do_exception_vectors do_exception_vectors: /*检查sstatus的SPP判断是否异常来自U mode*/ # x4不需要保存,所以可以用来保存临时值 csrr x4, sstatus and...
jason-hue/RustOs
17,376
dependencies/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...
jason-hue/RustOs
3,978
os/src/link_app.S
.align 3 .section .data .global _num_app _num_app: .quad 17 .quad app_0_start .quad app_1_start .quad app_2_start .quad app_3_start .quad app_4_start .quad app_5_start .quad app_6_start .quad app_7_start .quad app_8_start .quad app_9_start .quad app_10_start ...