repo_id stringlengths 5 115 | size int64 590 5.01M | file_path stringlengths 4 212 | content stringlengths 590 5.01M |
|---|---|---|---|
aixcc-public/challenge-001-exemplar-source | 1,867 | arch/x86/lib/copy_page_64.S | /* SPDX-License-Identifier: GPL-2.0 */
/* Written 2003 by Andi Kleen, based on a kernel by Evandro Menezes */
#include <linux/linkage.h>
#include <asm/cpufeatures.h>
#include <asm/alternative.h>
#include <asm/export.h>
/*
* Some CPUs run faster using the string copy instructions (sane microcode).
* It is also a lot... |
aixcc-public/challenge-001-exemplar-source | 2,673 | arch/x86/lib/atomic64_cx8_32.S | /* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* atomic64_t for 586+
*
* Copyright © 2010 Luca Barbieri
*/
#include <linux/linkage.h>
#include <asm/alternative.h>
.macro read64 reg
movl %ebx, %eax
movl %ecx, %edx
/* we need LOCK_PREFIX since otherwise cmpxchg8b always does the write */
LOCK_PREFIX
cmpxch... |
aixcc-public/challenge-001-exemplar-source | 3,716 | arch/x86/lib/memmove_64.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* Normally compiler builtins are used, but sometimes the compiler calls out
* of line code. Based on asm-i386/string.h.
*
* This assembly file is re-written from memmove_64.c file.
* - Copyright 2011 Fenghua Yu <fenghua.yu@intel.com>
*/
#include <linux/linkage.h>
#include... |
aixcc-public/challenge-001-exemplar-source | 3,798 | arch/x86/lib/copy_mc_64.S | /* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright(c) 2016-2020 Intel Corporation. All rights reserved. */
#include <linux/linkage.h>
#include <asm/asm.h>
#ifndef CONFIG_UML
#ifdef CONFIG_X86_MCE
/*
* copy_mc_fragile - copy memory with indication if an exception / fault happened
*
* The 'fragile' version i... |
aixcc-public/challenge-001-exemplar-source | 4,620 | arch/x86/lib/getuser.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* __get_user functions.
*
* (C) Copyright 1998 Linus Torvalds
* (C) Copyright 2005 Andi Kleen
* (C) Copyright 2008 Glauber Costa
*
* These functions have a non-standard call interface
* to make them more efficient, especially as they
* return an error value in addition... |
aixcc-public/challenge-001-exemplar-source | 2,774 | arch/x86/lib/putuser.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* __put_user functions.
*
* (C) Copyright 2005 Linus Torvalds
* (C) Copyright 2005 Andi Kleen
* (C) Copyright 2008 Glauber Costa
*
* These functions have a non-standard call interface
* to make them more efficient, especially as they
* return an error value in addition... |
aixcc-public/challenge-001-exemplar-source | 1,984 | arch/x86/purgatory/entry64.S | /* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2003,2004 Eric Biederman (ebiederm@xmission.com)
* Copyright (C) 2014 Red Hat Inc.
* Author(s): Vivek Goyal <vgoyal@redhat.com>
*
* This code has been taken from kexec-tools.
*/
#include <linux/linkage.h>
.text
.balign 16
.code64
SYM_CODE_STA... |
aixcc-public/challenge-001-exemplar-source | 1,198 | arch/x86/purgatory/setup-x86_64.S | /* SPDX-License-Identifier: GPL-2.0-only */
/*
* purgatory: setup code
*
* Copyright (C) 2003,2004 Eric Biederman (ebiederm@xmission.com)
* Copyright (C) 2014 Red Hat Inc.
*
* This code has been taken from kexec-tools.
*/
#include <linux/linkage.h>
#include <asm/purgatory.h>
.text
.balign 16
.code64
SYM_C... |
aixcc-public/challenge-001-exemplar-source | 1,424 | arch/x86/boot/bioscall.S | /* SPDX-License-Identifier: GPL-2.0-or-later */
/* -----------------------------------------------------------------------
*
* Copyright 2009-2014 Intel Corporation; author H. Peter Anvin
*
* ----------------------------------------------------------------------- */
/*
* "Glove box" for BIOS calls. Avoids the ... |
aixcc-public/challenge-001-exemplar-source | 18,078 | arch/x86/boot/header.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* header.S
*
* Copyright (C) 1991, 1992 Linus Torvalds
*
* Based on bootsect.S and setup.S
* modified by more people than can be counted
*
* Rewritten as a common file by H. Peter Anvin (Apr 2007)
*
* BIG FAT NOTE: We're in real mode using 64k segments. Therefore seg... |
aixcc-public/challenge-001-exemplar-source | 1,045 | arch/x86/boot/copy.S | /* SPDX-License-Identifier: GPL-2.0-only */
/* ----------------------------------------------------------------------- *
*
* Copyright (C) 1991, 1992 Linus Torvalds
* Copyright 2007 rPath, Inc. - All Rights Reserved
*
* ----------------------------------------------------------------------- */
#include <linux... |
aixcc-public/challenge-001-exemplar-source | 1,705 | arch/x86/boot/pmjump.S | /* SPDX-License-Identifier: GPL-2.0-only */
/* ----------------------------------------------------------------------- *
*
* Copyright (C) 1991, 1992 Linus Torvalds
* Copyright 2007 rPath, Inc. - All Rights Reserved
*
* ----------------------------------------------------------------------- */
/*
* The actua... |
aixcc-public/challenge-001-exemplar-source | 43,654 | arch/x86/entry/entry_64.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* linux/arch/x86_64/entry.S
*
* Copyright (C) 1991, 1992 Linus Torvalds
* Copyright (C) 2000, 2001, 2002 Andi Kleen SuSE Labs
* Copyright (C) 2000 Pavel Machek <pavel@suse.cz>
*
* entry.S contains the system-call and fault low-level handling routines.
*
* Some o... |
aixcc-public/challenge-001-exemplar-source | 33,441 | arch/x86/entry/entry_32.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 1991,1992 Linus Torvalds
*
* entry_32.S contains the system-call and low-level fault and trap handling routines.
*
* Stack layout while running C code:
* ptrace needs to have all registers on the stack.
* If the order here is changed, it needs to be
* ... |
aixcc-public/challenge-001-exemplar-source | 11,203 | arch/x86/entry/entry_64_compat.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* Compatibility mode system call entry point for x86-64.
*
* Copyright 2000-2002 Andi Kleen, SuSE Labs.
*/
#include <asm/asm-offsets.h>
#include <asm/current.h>
#include <asm/errno.h>
#include <asm/ia32_unistd.h>
#include <asm/thread_info.h>
#include <asm/segment.h>
#includ... |
aixcc-public/challenge-001-exemplar-source | 1,095 | arch/x86/entry/thunk_64.S | /* SPDX-License-Identifier: GPL-2.0-only */
/*
* Save registers before calling assembly functions. This avoids
* disturbance of register allocation in some inline assembly constructs.
* Copyright 2001,2002 by Andi Kleen, SuSE Labs.
*/
#include <linux/linkage.h>
#include "calling.h"
#include <asm/asm.h>
#include <as... |
aixcc-public/challenge-001-exemplar-source | 4,482 | arch/x86/mm/mem_encrypt_boot.S | /* SPDX-License-Identifier: GPL-2.0-only */
/*
* AMD Memory Encryption Support
*
* Copyright (C) 2016 Advanced Micro Devices, Inc.
*
* Author: Tom Lendacky <thomas.lendacky@amd.com>
*/
#include <linux/linkage.h>
#include <linux/pgtable.h>
#include <asm/page.h>
#include <asm/processor-flags.h>
#include <asm/msr-i... |
aixcc-public/challenge-001-exemplar-source | 6,430 | arch/x86/coco/tdx/tdcall.S | /* SPDX-License-Identifier: GPL-2.0 */
#include <asm/asm-offsets.h>
#include <asm/asm.h>
#include <asm/frame.h>
#include <asm/unwind_hints.h>
#include <linux/linkage.h>
#include <linux/bits.h>
#include <linux/errno.h>
#include "../../virt/vmx/tdx/tdxcall.S"
/*
* Bitmasks of exposed registers (with VMM).
*/
#define... |
aixcc-public/challenge-001-exemplar-source | 1,624 | arch/x86/um/vdso/vdso-layout.lds.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* Linker script for vDSO. This is an ELF shared object prelinked to
* its virtual address, and with only one read-only segment.
* This script controls its layout.
*/
SECTIONS
{
. = VDSO_PRELINK + SIZEOF_HEADERS;
.hash : { *(.hash) } :text
.gnu.hash : { *(.gnu.hash)... |
aixcc-public/challenge-001-exemplar-source | 6,265 | arch/x86/realmode/rm/trampoline_64.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
*
* Trampoline.S Derived from Setup.S by Linus Torvalds
*
* 4 Jan 1997 Michael Chastain: changed to gnu as.
* 15 Sept 2005 Eric Biederman: 64bit PIC support
*
* Entry: CS:IP point to the start of our code, we are
* in real mode with no stack, but the rest of the
* tram... |
aixcc-public/challenge-001-exemplar-source | 1,035 | arch/x86/realmode/rm/header.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* Real-mode blob header; this should match realmode.h and be
* readonly; for mutable data instead add pointers into the .data
* or .bss sections as appropriate.
*/
#include <linux/linkage.h>
#include <asm/page_types.h>
#include <asm/segment.h>
#include "realmode.h"
.se... |
aixcc-public/challenge-001-exemplar-source | 1,919 | arch/x86/realmode/rm/trampoline_32.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
*
* Trampoline.S Derived from Setup.S by Linus Torvalds
*
* 4 Jan 1997 Michael Chastain: changed to gnu as.
*
* This is only used for booting secondary CPUs in SMP machine
*
* Entry: CS:IP point to the start of our code, we are
* in real mode with no stack, but the res... |
aixcc-public/challenge-001-exemplar-source | 3,864 | arch/x86/realmode/rm/wakeup_asm.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* ACPI wakeup real mode startup stub
*/
#include <linux/linkage.h>
#include <asm/segment.h>
#include <asm/msr-index.h>
#include <asm/page_types.h>
#include <asm/pgtable_types.h>
#include <asm/processor-flags.h>
#include "realmode.h"
#include "wakeup.h"
.code16
/* This shou... |
aixcc-public/challenge-001-exemplar-source | 4,290 | arch/x86/realmode/rm/reboot.S | /* SPDX-License-Identifier: GPL-2.0 */
#include <linux/linkage.h>
#include <asm/segment.h>
#include <asm/page_types.h>
#include <asm/processor-flags.h>
#include <asm/msr-index.h>
#include "realmode.h"
/*
* The following code and data reboots the machine by switching to real
* mode and jumping to the BIOS reset entry... |
aixcc-public/challenge-001-exemplar-source | 2,250 | arch/x86/platform/olpc/xo1-wakeup.S | /* SPDX-License-Identifier: GPL-2.0 */
.text
#include <linux/linkage.h>
#include <asm/segment.h>
#include <asm/page.h>
#include <asm/pgtable_32.h>
.macro writepost,value
movb $0x34, %al
outb %al, $0x70
movb $\value, %al
outb %al, $0x71
.endm
wakeup_start:
# OFW lands us here, running in protected mode, wit... |
aixcc-public/challenge-001-exemplar-source | 1,178 | arch/x86/platform/efi/efi_stub_32.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* EFI call stub for IA32.
*
* This stub allows us to make EFI calls in physical mode with interrupts
* turned off.
*/
#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/asm-offsets.h>
#include <asm/page_types.h>
__INIT
SYM_FUNC_START(efi_call_svam)
push %... |
aixcc-public/challenge-001-exemplar-source | 2,480 | arch/x86/platform/efi/efi_thunk_64.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2014 Intel Corporation; author Matt Fleming
*
* Support for invoking 32-bit EFI runtime services from a 64-bit
* kernel.
*
* The below thunking functions are only used after ExitBootServices()
* has been called. This simplifies things considerably as comp... |
aixcc-public/challenge-001-exemplar-source | 3,978 | arch/x86/platform/pvh/head.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright C 2016, Oracle and/or its affiliates. All rights reserved.
*/
.code32
.text
#define _pa(x) ((x) - __START_KERNEL_map)
#include <linux/elfnote.h>
#include <linux/init.h>
#include <linux/linkage.h>
#include <asm/segment.h>
#include <asm/asm.h>
#include... |
aixcc-public/challenge-001-exemplar-source | 3,196 | arch/x86/kernel/acpi/wakeup_64.S | /* SPDX-License-Identifier: GPL-2.0-only */
.text
#include <linux/linkage.h>
#include <linux/objtool.h>
#include <asm/segment.h>
#include <asm/pgtable_types.h>
#include <asm/page_types.h>
#include <asm/msr.h>
#include <asm/asm-offsets.h>
#include <asm/frame.h>
#include <asm/nospec-branch.h>
# Copyright 2003 Pavel Mach... |
aixcc-public/challenge-001-exemplar-source | 1,800 | arch/x86/kernel/acpi/wakeup_32.S | /* SPDX-License-Identifier: GPL-2.0-only */
.text
#include <linux/linkage.h>
#include <asm/segment.h>
#include <asm/page_types.h>
# Copyright 2003, 2008 Pavel Machek <pavel@suse.cz
.code32
ALIGN
SYM_CODE_START(wakeup_pmode_return)
movw $__KERNEL_DS, %ax
movw %ax, %ss
movw %ax, %fs
movw %ax, %gs
movw $__USER... |
aixcc-public/challenge-001-exemplar-source | 9,454 | arch/x86/kvm/svm/vmenter.S | /* SPDX-License-Identifier: GPL-2.0 */
#include <linux/linkage.h>
#include <asm/asm.h>
#include <asm/bitsperlong.h>
#include <asm/kvm_vcpu_regs.h>
#include <asm/nospec-branch.h>
#include "kvm-asm-offsets.h"
#define WORD_SIZE (BITS_PER_LONG / 8)
/* Intentionally omit RAX as it's context switched by hardware */
#define... |
aixcc-public/challenge-001-exemplar-source | 8,884 | arch/x86/kvm/vmx/vmenter.S | /* SPDX-License-Identifier: GPL-2.0 */
#include <linux/linkage.h>
#include <asm/asm.h>
#include <asm/bitsperlong.h>
#include <asm/kvm_vcpu_regs.h>
#include <asm/nospec-branch.h>
#include <asm/percpu.h>
#include <asm/segment.h>
#include "kvm-asm-offsets.h"
#include "run_flags.h"
#define WORD_SIZE (BITS_PER_LONG / 8)
#... |
aixcc-public/challenge-001-exemplar-source | 5,674 | arch/x86/boot/compressed/head_32.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* linux/boot/head.S
*
* Copyright (C) 1991, 1992, 1993 Linus Torvalds
*/
/*
* head.S contains the 32-bit startup code.
*
* NOTE!!! Startup happens at absolute address 0x00001000, which is also where
* the page directory will exist. The startup code will be overwrit... |
aixcc-public/challenge-001-exemplar-source | 3,622 | arch/x86/boot/compressed/efi_thunk_64.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2014, 2015 Intel Corporation; author Matt Fleming
*
* Early support for invoking 32-bit EFI services from a 64-bit kernel.
*
* Because this thunking occurs before ExitBootServices() we have to
* restore the firmware's 32-bit GDT and IDT before we make EFI ... |
aixcc-public/challenge-001-exemplar-source | 4,039 | arch/x86/boot/compressed/mem_encrypt.S | /* SPDX-License-Identifier: GPL-2.0-only */
/*
* AMD Memory Encryption Support
*
* Copyright (C) 2017 Advanced Micro Devices, Inc.
*
* Author: Tom Lendacky <thomas.lendacky@amd.com>
*/
#include <linux/linkage.h>
#include <asm/processor-flags.h>
#include <asm/msr.h>
#include <asm/asm-offsets.h>
.text
.code32
... |
aixcc-public/challenge-001-exemplar-source | 2,062 | arch/x86/boot/compressed/vmlinux.lds.S | /* SPDX-License-Identifier: GPL-2.0 */
#include <asm-generic/vmlinux.lds.h>
OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT)
#undef i386
#include <asm/cache.h>
#include <asm/page_types.h>
#ifdef CONFIG_X86_64
OUTPUT_ARCH(i386:x86-64)
ENTRY(startup_64)
#else
OUTPUT_ARCH(i386)
ENTRY(startup_32)
#endif
SECTIONS
{
/* Be careful p... |
aixcc-public/challenge-001-exemplar-source | 26,880 | arch/x86/boot/compressed/head_64.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* linux/boot/head.S
*
* Copyright (C) 1991, 1992, 1993 Linus Torvalds
*/
/*
* head.S contains the 32-bit startup code.
*
* NOTE!!! Startup happens at absolute address 0x00001000, which is also where
* the page directory will exist. The startup code will be overwrit... |
aixcc-public/challenge-001-exemplar-source | 1,291 | arch/x86/boot/compressed/idt_handlers_64.S | /* SPDX-License-Identifier: GPL-2.0-only */
/*
* Early IDT handler entry points
*
* Copyright (C) 2019 SUSE
*
* Author: Joerg Roedel <jroedel@suse.de>
*/
#include <asm/segment.h>
/* For ORIG_RAX */
#include "../../entry/calling.h"
.macro EXCEPTION_HANDLER name function error_code=0
SYM_FUNC_START(\name)
/* B... |
aixcc-public/challenge-001-exemplar-source | 3,674 | arch/x86/entry/vdso/vsgx.S | /* SPDX-License-Identifier: GPL-2.0 */
#include <linux/linkage.h>
#include <asm/export.h>
#include <asm/errno.h>
#include <asm/enclu.h>
#include "extable.h"
/* Relative to %rbp. */
#define SGX_ENCLAVE_OFFSET_OF_RUN 16
/* The offsets relative to struct sgx_enclave_run. */
#define SGX_ENCLAVE_RUN_TCS 0
#define SGX... |
aixcc-public/challenge-001-exemplar-source | 2,659 | arch/x86/entry/vdso/vdso-layout.lds.S | /* SPDX-License-Identifier: GPL-2.0 */
#include <asm/vdso.h>
/*
* Linker script for vDSO. This is an ELF shared object prelinked to
* its virtual address, and with only one read-only segment.
* This script controls its layout.
*/
SECTIONS
{
/*
* User/kernel shared data is before the vDSO. This may be a littl... |
aixcc-public/challenge-001-exemplar-source | 4,984 | arch/x86/entry/vdso/vdso32/sigreturn.S | /* SPDX-License-Identifier: GPL-2.0 */
#include <linux/linkage.h>
#include <asm/unistd_32.h>
#include <asm/asm-offsets.h>
#ifndef SYSCALL_ENTER_KERNEL
#define SYSCALL_ENTER_KERNEL int $0x80
#endif
.text
.globl __kernel_sigreturn
.type __kernel_sigreturn,@function
nop /* this guy is needed for .LSTARTFDEDLSI1 belo... |
aixcc-public/challenge-001-exemplar-source | 2,429 | arch/x86/entry/vdso/vdso32/system_call.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* AT_SYSINFO entry point
*/
#include <linux/linkage.h>
#include <asm/dwarf2.h>
#include <asm/cpufeatures.h>
#include <asm/alternative.h>
.text
.globl __kernel_vsyscall
.type __kernel_vsyscall,@function
ALIGN
__kernel_vsyscall:
CFI_STARTPROC
/*
* Reshuffle regs so tha... |
aixcc-public/challenge-001-exemplar-source | 2,555 | arch/x86/virt/vmx/tdx/tdxcall.S | /* SPDX-License-Identifier: GPL-2.0 */
#include <asm/asm-offsets.h>
#include <asm/tdx.h>
/*
* TDCALL and SEAMCALL are supported in Binutils >= 2.36.
*/
#define tdcall .byte 0x66,0x0f,0x01,0xcc
#define seamcall .byte 0x66,0x0f,0x01,0xcf
/*
* TDX_MODULE_CALL - common helper macro for both
* TDCALL ... |
aixcc-public/challenge-001-exemplar-source | 5,120 | arch/csky/kernel/entry.S | /* SPDX-License-Identifier: GPL-2.0 */
// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
#include <linux/linkage.h>
#include <abi/entry.h>
#include <abi/pgtable-bits.h>
#include <asm/errno.h>
#include <asm/setup.h>
#include <asm/unistd.h>
#include <asm/asm-offsets.h>
#include <linux/threads.h>
#include <asm/p... |
aixcc-public/challenge-001-exemplar-source | 1,990 | arch/csky/kernel/vmlinux.lds.S | /* SPDX-License-Identifier: GPL-2.0 */
#include <asm/vmlinux.lds.h>
#include <asm/page.h>
#include <asm/memory.h>
OUTPUT_ARCH(csky)
ENTRY(_start)
#ifndef __cskyBE__
jiffies = jiffies_64;
#else
jiffies = jiffies_64 + 4;
#endif
#define VBR_BASE \
. = ALIGN(1024); \
vec_base = .; \
. += 512;
SECTIONS
{
. = PAGE_O... |
aixcc-public/challenge-001-exemplar-source | 1,945 | arch/csky/abiv2/memcpy.S | /* SPDX-License-Identifier: GPL-2.0 */
// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
#include <linux/linkage.h>
#include "sysdep.h"
ENTRY(__memcpy)
ENTRY(memcpy)
/* Test if len less than 4 bytes. */
mov r12, r0
cmplti r2, 4
bt .L_copy_by_byte
andi r13, r0, 3
movi r19, 4
/* Test if dest is not 4 ... |
aixcc-public/challenge-001-exemplar-source | 1,498 | arch/csky/abiv2/strcpy.S | /* SPDX-License-Identifier: GPL-2.0 */
// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
#include <linux/linkage.h>
#include "sysdep.h"
ENTRY(strcpy)
mov a3, a0
/* Check if the src addr is aligned. */
andi t0, a1, 3
bnez t0, 11f
1:
/* Check if all the bytes in the word are not zero. *... |
aixcc-public/challenge-001-exemplar-source | 2,017 | arch/csky/abiv2/memmove.S | /* SPDX-License-Identifier: GPL-2.0 */
// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
#include <linux/linkage.h>
#include "sysdep.h"
.weak memmove
ENTRY(__memmove)
ENTRY(memmove)
subu r3, r0, r1
cmphs r3, r2
bt memcpy
mov r12, r0
addu r0, r0, r2
addu r1, r1, r2
/* Test if len less than 4 bytes. ... |
aixcc-public/challenge-001-exemplar-source | 1,705 | arch/csky/abiv2/memset.S | /* SPDX-License-Identifier: GPL-2.0 */
// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
#include <linux/linkage.h>
#include "sysdep.h"
.weak memset
ENTRY(__memset)
ENTRY(memset)
/* Test if len less than 4 bytes. */
mov r12, r0
cmplti r2, 8
bt .L_set_by_byte
andi r13, r0, 3
movi r19, 4
/* Test if d... |
aixcc-public/challenge-001-exemplar-source | 3,565 | arch/csky/abiv2/mcount.S | /* SPDX-License-Identifier: GPL-2.0 */
// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
#include <linux/linkage.h>
#include <asm/ftrace.h>
#include <abi/entry.h>
#include <asm/asm-offsets.h>
/*
* csky-gcc with -pg will put the following asm after prologue:
* push r15
* jsri _mcount
*
* stack ... |
aixcc-public/challenge-001-exemplar-source | 2,929 | arch/csky/abiv2/memcmp.S | /* SPDX-License-Identifier: GPL-2.0 */
// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
#include <linux/linkage.h>
#include "sysdep.h"
ENTRY(memcmp)
/* Test if len less than 4 bytes. */
mov r3, r0
movi r0, 0
mov r12, r4
cmplti r2, 4
bt .L_compare_by_byte
andi r13, r0, 3
movi r19, 4
/* Test if s1... |
aixcc-public/challenge-001-exemplar-source | 1,481 | arch/csky/abiv2/strlen.S | /* SPDX-License-Identifier: GPL-2.0 */
// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
#include <linux/linkage.h>
#include "sysdep.h"
ENTRY(strlen)
/* Check if the start addr is aligned. */
mov r3, r0
andi r1, r0, 3
movi r2, 4
movi r0, 0
bnez r1, .L_start_not_aligned
LABLE_ALIGN
.L_start_addr_alig... |
aixcc-public/challenge-001-exemplar-source | 2,334 | arch/csky/abiv2/strcmp.S | /* SPDX-License-Identifier: GPL-2.0 */
// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
#include <linux/linkage.h>
#include "sysdep.h"
ENTRY(strcmp)
mov a3, a0
/* Check if the s1 addr is aligned. */
xor a2, a3, a1
andi a2, 0x3
bnez a2, 7f
andi t1, a0, 0x3
bnez t1, 5f
1:
/* If aligned, load word ea... |
aixcc-public/challenge-001-exemplar-source | 1,156 | arch/csky/kernel/vdso/vdso.lds.S | /* SPDX-License-Identifier: GPL-2.0-only */
#include <asm/page.h>
OUTPUT_ARCH(csky)
SECTIONS
{
PROVIDE(_vdso_data = . + PAGE_SIZE);
. = SIZEOF_HEADERS;
.hash : { *(.hash) } :text
.gnu.hash : { *(.gnu.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
.gnu.version : { *(.gnu.version) }
.gnu.versi... |
aixcc-public/challenge-001-exemplar-source | 2,175 | arch/alpha/kernel/head.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/kernel/head.S
*
* initial boot stuff.. At this point, the bootloader has already
* switched into OSF/1 PAL-code, and loaded us at the correct address
* (START_ADDR). So there isn't much left for us to do: just set up
* the kernel global pointer and jump to t... |
aixcc-public/challenge-001-exemplar-source | 17,981 | arch/alpha/kernel/entry.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/kernel/entry.S
*
* Kernel entry-points.
*/
#include <asm/asm-offsets.h>
#include <asm/thread_info.h>
#include <asm/pal.h>
#include <asm/errno.h>
#include <asm/unistd.h>
.text
.set noat
.cfi_sections .debug_frame
/* Stack offsets. */
#define SP_OFF 184
... |
aixcc-public/challenge-001-exemplar-source | 1,431 | arch/alpha/kernel/vmlinux.lds.S | /* SPDX-License-Identifier: GPL-2.0 */
#define EMITS_PT_NOTE
#define RO_EXCEPTION_TABLE_ALIGN 16
#include <asm-generic/vmlinux.lds.h>
#include <asm/thread_info.h>
#include <asm/cache.h>
#include <asm/page.h>
#include <asm/setup.h>
OUTPUT_FORMAT("elf64-alpha")
OUTPUT_ARCH(alpha)
ENTRY(__start)
PHDRS { text PT_LOAD; n... |
aixcc-public/challenge-001-exemplar-source | 2,491 | arch/alpha/lib/clear_user.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/clear_user.S
* Contributed by Richard Henderson <rth@tamu.edu>
*
* Zero user space, handling exceptions as we go.
*
* We have to make sure that $0 is always up-to-date and contains the
* right "bytes left to zero" value (and that it is updated only _afte... |
aixcc-public/challenge-001-exemplar-source | 4,406 | arch/alpha/lib/divide.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/divide.S
*
* (C) 1995 Linus Torvalds
*
* Alpha division..
*/
/*
* The alpha chip doesn't provide hardware division, so we have to do it
* by hand. The compiler expects the functions
*
* __divqu: 64-bit unsigned long divide
* __remqu: 64-bit unsigne... |
aixcc-public/challenge-001-exemplar-source | 2,880 | arch/alpha/lib/ev67-strchr.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/ev67-strchr.S
* 21264 version contributed by Rick Gorton <rick.gorton@alpha-processor.com>
*
* Return the address of a given character within a null-terminated
* string, or null if it is not found.
*
* Much of the information about 21264 scheduling/codin... |
aixcc-public/challenge-001-exemplar-source | 8,994 | arch/alpha/lib/stxcpy.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/stxcpy.S
* Contributed by Richard Henderson (rth@tamu.edu)
*
* Copy a null-terminated string from SRC to DST.
*
* This is an internal routine used by strcpy, stpcpy, and strcat.
* As such, it uses special linkage conventions to make implementation
* of ... |
aixcc-public/challenge-001-exemplar-source | 16,394 | arch/alpha/lib/ev6-memset.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/ev6-memset.S
*
* This is an efficient (and relatively small) implementation of the C library
* "memset()" function for the 21264 implementation of Alpha.
*
* 21264 version contributed by Rick Gorton <rick.gorton@alpha-processor.com>
*
* Much of the inf... |
aixcc-public/challenge-001-exemplar-source | 2,999 | arch/alpha/lib/callback_srm.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/callback_srm.S
*/
#include <asm/console.h>
#include <asm/export.h>
.text
#define HWRPB_CRB_OFFSET 0xc0
#if defined(CONFIG_ALPHA_SRM) || defined(CONFIG_ALPHA_GENERIC)
.align 4
srm_dispatch:
#if defined(CONFIG_ALPHA_GENERIC)
ldl $4,alpha_using_srm
beq $4,n... |
aixcc-public/challenge-001-exemplar-source | 6,378 | arch/alpha/lib/ev6-memcpy.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/ev6-memcpy.S
* 21264 version by Rick Gorton <rick.gorton@alpha-processor.com>
*
* Reasonably optimized memcpy() routine for the Alpha 21264
*
* - memory accessed as aligned quadwords only
* - uses bcmpge to compare 8 bytes in parallel
*
* Much of the i... |
aixcc-public/challenge-001-exemplar-source | 9,666 | arch/alpha/lib/ev6-stxcpy.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/ev6-stxcpy.S
* 21264 version contributed by Rick Gorton <rick.gorton@alpha-processor.com>
*
* Copy a null-terminated string from SRC to DST.
*
* This is an internal routine used by strcpy, stpcpy, and strcat.
* As such, it uses special linkage convention... |
aixcc-public/challenge-001-exemplar-source | 1,914 | arch/alpha/lib/strncat.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/strncat.S
* Contributed by Richard Henderson (rth@tamu.edu)
*
* Append no more than COUNT characters from the null-terminated string SRC
* to the null-terminated string DST. Always null-terminate the new DST.
*
* This differs slightly from the semantics... |
aixcc-public/challenge-001-exemplar-source | 10,883 | arch/alpha/lib/stxncpy.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/stxncpy.S
* Contributed by Richard Henderson (rth@tamu.edu)
*
* Copy no more than COUNT bytes of the null-terminated string from
* SRC to DST.
*
* This is an internal routine used by strncpy, stpncpy, and strncat.
* As such, it uses special linkage conv... |
aixcc-public/challenge-001-exemplar-source | 1,361 | arch/alpha/lib/ev67-strlen.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/ev67-strlen.S
* 21264 version by Rick Gorton <rick.gorton@alpha-processor.com>
*
* Finds length of a 0-terminated string. Optimized for the
* Alpha architecture:
*
* - memory accessed as aligned quadwords only
* - uses bcmpge to compare 8 bytes in para... |
aixcc-public/challenge-001-exemplar-source | 11,554 | arch/alpha/lib/ev6-stxncpy.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/ev6-stxncpy.S
* 21264 version contributed by Rick Gorton <rick.gorton@api-networks.com>
*
* Copy no more than COUNT bytes of the null-terminated string from
* SRC to DST.
*
* This is an internal routine used by strncpy, stpncpy, and strncat.
* As such, ... |
aixcc-public/challenge-001-exemplar-source | 2,735 | arch/alpha/lib/memmove.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/memmove.S
*
* Barely optimized memmove routine for Alpha EV5.
*
* This is hand-massaged output from the original memcpy.c. We defer to
* memcpy whenever possible; the backwards copy loops are not unrolled.
*/
#include <asm/export.h>
.set noat
... |
aixcc-public/challenge-001-exemplar-source | 1,627 | arch/alpha/lib/ev67-strcat.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/ev67-strcat.S
* 21264 version contributed by Rick Gorton <rick.gorton@alpha-processor.com>
*
* Append a null-terminated string from SRC to DST.
*
* Much of the information about 21264 scheduling/coding comes from:
* Compiler Writer's Guide for the Alpha ... |
aixcc-public/challenge-001-exemplar-source | 5,444 | arch/alpha/lib/ev6-memchr.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/ev6-memchr.S
*
* 21264 version contributed by Rick Gorton <rick.gorton@alpha-processor.com>
*
* Finds characters in a memory area. Optimized for the Alpha:
*
* - memory accessed as aligned quadwords only
* - uses cmpbge to compare 8 bytes in para... |
aixcc-public/challenge-001-exemplar-source | 3,198 | arch/alpha/lib/memset.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* linux/arch/alpha/lib/memset.S
*
* This is an efficient (and small) implementation of the C library "memset()"
* function for the alpha.
*
* (C) Copyright 1996 Linus Torvalds
*
* This routine is "moral-ware": you are free to use it any way you wish, and
* the only obl... |
aixcc-public/challenge-001-exemplar-source | 5,302 | arch/alpha/lib/ev6-csum_ipv6_magic.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/ev6-csum_ipv6_magic.S
* 21264 version contributed by Rick Gorton <rick.gorton@alpha-processor.com>
*
* unsigned short csum_ipv6_magic(struct in6_addr *saddr,
* struct in6_addr *daddr,
* __u32 l... |
aixcc-public/challenge-001-exemplar-source | 2,116 | arch/alpha/lib/copy_user.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/copy_user.S
*
* Copy to/from user space, handling exceptions as we go.. This
* isn't exactly pretty.
*
* This is essentially the same as "memcpy()", but with a few twists.
* Notably, we have to make sure that $0 is always up-to-date and
* contains the ... |
aixcc-public/challenge-001-exemplar-source | 6,508 | arch/alpha/lib/ev6-divide.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/ev6-divide.S
*
* 21264 version contributed by Rick Gorton <rick.gorton@alpha-processor.com>
*
* Alpha division..
*/
/*
* The alpha chip doesn't provide hardware division, so we have to do it
* by hand. The compiler expects the functions
*
* __divqu:... |
aixcc-public/challenge-001-exemplar-source | 2,980 | arch/alpha/lib/csum_ipv6_magic.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/csum_ipv6_magic.S
* Contributed by Richard Henderson <rth@tamu.edu>
*
* unsigned short csum_ipv6_magic(struct in6_addr *saddr,
* struct in6_addr *daddr,
* __u32 len,
* ... |
aixcc-public/challenge-001-exemplar-source | 2,854 | arch/alpha/lib/strrchr.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/strrchr.S
* Contributed by Richard Henderson (rth@tamu.edu)
*
* Return the address of the last occurrence of a given character
* within a null-terminated string, or null if it is not found.
*/
#include <asm/export.h>
#include <asm/regdef.h>
.set noreord... |
aixcc-public/challenge-001-exemplar-source | 3,342 | arch/alpha/lib/udiv-qrnnd.S | # Alpha 21064 __udiv_qrnnd
# Copyright (C) 1992, 1994, 1995, 2000 Free Software Foundation, Inc.
# This file is part of GCC.
# The GNU MP Library is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either ... |
aixcc-public/challenge-001-exemplar-source | 3,379 | arch/alpha/lib/ev67-strrchr.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/ev67-strrchr.S
* 21264 version by Rick Gorton <rick.gorton@alpha-processor.com>
*
* Finds length of a 0-terminated string. Optimized for the
* Alpha architecture:
*
* - memory accessed as aligned quadwords only
* - uses bcmpge to compare 8 bytes in par... |
aixcc-public/challenge-001-exemplar-source | 5,047 | arch/alpha/lib/memchr.S | /* Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger (davidm@cs.arizona.edu).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the ... |
aixcc-public/challenge-001-exemplar-source | 4,341 | arch/alpha/lib/ev6-copy_page.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/ev6-copy_page.S
*
* Copy an entire page.
*/
/* The following comparison of this routine vs the normal copy_page.S
was written by an unnamed ev6 hardware designer and forwarded to me
via Steven Hobbs <hobbs@steven.zko.dec.com>.
First Problem: STQ... |
aixcc-public/challenge-001-exemplar-source | 7,189 | arch/alpha/lib/ev6-clear_user.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/ev6-clear_user.S
* 21264 version contributed by Rick Gorton <rick.gorton@alpha-processor.com>
*
* Zero user space, handling exceptions as we go.
*
* We have to make sure that $0 is always up-to-date and contains the
* right "bytes left to zero" value (an... |
aixcc-public/challenge-001-exemplar-source | 1,220 | arch/alpha/lib/strlen.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* strlen.S (c) 1995 David Mosberger (davidm@cs.arizona.edu)
*
* Finds length of a 0-terminated string. Optimized for the
* Alpha architecture:
*
* - memory accessed as aligned quadwords only
* - uses bcmpge to compare 8 bytes in parallel
* - does binary search to find ... |
aixcc-public/challenge-001-exemplar-source | 2,502 | arch/alpha/lib/ev67-strncat.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/ev67-strncat.S
* 21264 version contributed by Rick Gorton <rick.gorton@api-networks.com>
*
* Append no more than COUNT characters from the null-terminated string SRC
* to the null-terminated string DST. Always null-terminate the new DST.
*
* This differ... |
aixcc-public/challenge-001-exemplar-source | 1,032 | arch/alpha/lib/strcat.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/strcat.S
* Contributed by Richard Henderson (rth@tamu.edu)
*
* Append a null-terminated string from SRC to DST.
*/
#include <asm/export.h>
.text
.align 3
.globl strcat
.ent strcat
strcat:
.frame $30, 0, $26
.prologue 0
mov $16, $0 # set up retur... |
aixcc-public/challenge-001-exemplar-source | 2,019 | arch/alpha/lib/strchr.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/strchr.S
* Contributed by Richard Henderson (rth@tamu.edu)
*
* Return the address of a given character within a null-terminated
* string, or null if it is not found.
*/
#include <asm/export.h>
#include <asm/regdef.h>
.set noreorder
.set noat
.align 3... |
aixcc-public/challenge-001-exemplar-source | 7,016 | arch/alpha/lib/ev6-copy_user.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/ev6-copy_user.S
*
* 21264 version contributed by Rick Gorton <rick.gorton@alpha-processor.com>
*
* Copy to/from user space, handling exceptions as we go.. This
* isn't exactly pretty.
*
* This is essentially the same as "memcpy()", but with a few twist... |
aixcc-public/challenge-001-exemplar-source | 1,572 | arch/alpha/lib/strncpy.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/lib/strncpy.S
* Contributed by Richard Henderson (rth@tamu.edu)
*
* Copy no more than COUNT bytes of the null-terminated string from
* SRC to DST. If SRC does not cover all of COUNT, the balance is
* zeroed.
*
* Or, rather, if the kernel cared about that w... |
aixcc-public/challenge-001-exemplar-source | 1,845 | arch/alpha/boot/head.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* arch/alpha/boot/head.S
*
* initial bootloader stuff..
*/
#include <asm/pal.h>
.set noreorder
.globl __start
.ent __start
__start:
br $29,2f
2: ldgp $29,0($29)
jsr $26,start_kernel
call_pal PAL_halt
.end __start
.align 5
.globl wrent
.ent wrent
wrent:
.prolog... |
aixcc-public/challenge-001-exemplar-source | 1,307 | arch/mips/power/hibernate_asm.S | /* SPDX-License-Identifier: GPL-2.0-only */
/*
* Hibernation support specific for mips - temporary page tables
*
* Copyright (C) 2009 Lemote Inc.
* Author: Hu Hongbing <huhb@lemote.com>
* Wu Zhangjin <wuzhangjin@gmail.com>
*/
#include <asm/asm-offsets.h>
#include <asm/regdef.h>
#include <asm/asm.h>
.text
LEAF... |
aixcc-public/challenge-001-exemplar-source | 2,603 | arch/mips/vdso/vdso.lds.S | /* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2015 Imagination Technologies
* Author: Alex Smith <alex.smith@imgtec.com>
*/
#include <asm/sgidefs.h>
#if _MIPS_SIM == _MIPS_SIM_ABI64
OUTPUT_FORMAT("elf64-tradlittlemips", "elf64-tradbigmips", "elf64-tradlittlemips")
#elif _MIPS_SIM == _MIPS_SIM_... |
aixcc-public/challenge-001-exemplar-source | 1,603 | arch/mips/vdso/elf.S | /* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2015 Imagination Technologies
* Author: Alex Smith <alex.smith@imgtec.com>
*/
#include <asm/vdso/vdso.h>
#include <asm/isa-rev.h>
#include <linux/elfnote.h>
#include <linux/version.h>
ELFNOTE_START(Linux, 0, "a")
.long LINUX_VERSION_CODE
ELFNOTE... |
aixcc-public/challenge-001-exemplar-source | 7,780 | arch/mips/dec/int-handler.S | /* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 1995, 1996, 1997 Paul M. Antoine and Harald Koerfgen
* Copyright (C) 2000, 2001, 2002, 2003, 2005 Maciej W. Rozycki
*
* Written by Ralf Baechle and Andreas Busse, modified for DECstation
* support by Paul Antoine and Harald Koerfgen.
*
* completely rewri... |
aixcc-public/challenge-001-exemplar-source | 3,855 | arch/mips/kernel/head.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.
*
* Copyright (C) 1994, 1995 Waldorf Electronics
* Written by Ralf Baechle and Andreas Busse
* Copyright (C) 1994 - 99, 2003, 06 Ralf Baechl... |
aixcc-public/challenge-001-exemplar-source | 9,337 | arch/mips/kernel/r4k_fpu.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.
*
* Copyright (C) 1996, 98, 99, 2000, 01 Ralf Baechle
*
* Multi-arch abstraction and asm macros for easier reading:
* Copyright (C) 1996 Da... |
aixcc-public/challenge-001-exemplar-source | 2,907 | arch/mips/kernel/r2300_fpu.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.
*
* Copyright (C) 1996, 1998 by Ralf Baechle
*
* Multi-arch abstraction and asm macros for easier reading:
* Copyright (C) 1996 David S. Mi... |
aixcc-public/challenge-001-exemplar-source | 7,181 | arch/mips/kernel/bmips_vec.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.
*
* Copyright (C) 2011 by Kevin Cernekee (cernekee@gmail.com)
*
* Reset/NMI/re-entry vectors for BMIPS processors
*/
#include <asm/asm.h>... |
aixcc-public/challenge-001-exemplar-source | 14,945 | arch/mips/kernel/octeon_switch.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.
*
* Copyright (C) 1994, 1995, 1996, 1998, 1999, 2002, 2003 Ralf Baechle
* Copyright (C) 1996 David S. Miller (davem@davemloft.net)
* Copyrig... |
aixcc-public/challenge-001-exemplar-source | 4,403 | arch/mips/kernel/entry.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.
*
* Copyright (C) 1994 - 2000, 2001, 2003 Ralf Baechle
* Copyright (C) 1999, 2000 Silicon Graphics, Inc.
* Copyright (C) 2001 MIPS Technolog... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.