1/* 2 * This file is subject to the terms and conditions of the GNU General Public 3 * License 2. See the file "COPYING-GPL-2" in the main directory of this 4 * archive for more details. 5 * 6 * Copyright (C) 2013 Imagination Technologies Ltd. 7 * Author: Yann Le Du <ledu@kymasys.com> 8 */ 9 10/** 11 * \file 12 * \brief Startup code 13 */ 14 15#include <sys/asm.h> 16 17/*--- .text (program code) -------------------------*/ 18 19.section .text, "ax" 20.type _real_start, @function 21.globl _real_start 22.set noreorder 23_real_start: 24 SETUP_GPX($0) 25 SETUP_GPX64($25, $0) 26 /* Mind the argc that is popped off the stack! */ 27 PTR_LA $29, _stack_top-8 28 PTR_LA $25, __start 29 PTR_SUBU $29, (NARGSAVE * SZREG) 30 jalr $25 31 nop 321: 33 b 1b 34 35/*--- my stack -------------------------------------*/ 36.section ".bss", "aw" 37.global _stack_bottom 38_stack_bottom: 39 .space 0x4000 40.global _stack_top 41_stack_top: 42