1/** 2 * \file 3 * \brief bench startup code. 4 */ 5 6/* 7 * Copyright (c) 2007, 2008, ETH Zurich. 8 * All rights reserved. 9 * 10 * This file is distributed under the terms in the attached LICENSE file. 11 * If you do not find this file, copies can be found by writing to: 12 * ETH Zurich D-INFK, Universitaetstrasse 6, CH-8092 Zurich. Attn: Systems Group. 13 */ 14 15/// User-space default stack size is 32K 16#define STACK_SIZE (32 * 1024) 17 18 .text 19 .globl _start 20 21_start: 22 // Initialize stack for program 23 lea (stack + STACK_SIZE)(%rip), %rsp 24 25 // Call main() function 26 movq $0, %rsi 27 movq $0, %rdi 28 movq $0, %rax 29 callq main 30 31 // In case main() returns we loop endlessly 32halt: 33 jmp halt 34 35 .bss 36 .comm stack, STACK_SIZE 37