xref: /freebsd/contrib/netbsd-tests/lib/csu/arch/arm/h_initfini_align.S (revision 9268022b74279434ed6300244e3f977e56a8ceb5)
1*57718be8SEnji Cooper/*	$NetBSD: h_initfini_align.S,v 1.1 2013/12/11 17:31:56 matt Exp $	*/
2*57718be8SEnji Cooper
3*57718be8SEnji Cooper#include <machine/asm.h>
4*57718be8SEnji Cooper
5*57718be8SEnji CooperRCSID("$NetBSD: h_initfini_align.S,v 1.1 2013/12/11 17:31:56 matt Exp $")
6*57718be8SEnji Cooper
7*57718be8SEnji Cooper/*
8*57718be8SEnji Cooper * LINTSTUB: bool check_stack_alignment(void);
9*57718be8SEnji Cooper */
10*57718be8SEnji Cooper
11*57718be8SEnji CooperARM_ENTRY(check_stack_alignment)
12*57718be8SEnji Cooper#ifdef __ARM_EABI__
13*57718be8SEnji Cooper	tst	sp, #7
14*57718be8SEnji Cooper#else
15*57718be8SEnji Cooper	tst	sp, #3
16*57718be8SEnji Cooper#endif
17*57718be8SEnji Cooper	movne	r0, #0
18*57718be8SEnji Cooper	moveq	r0, #1
19*57718be8SEnji Cooper	RET
20*57718be8SEnji CooperEND(check_stack_alignment)
21