This provides a simple implementation of alloca for ARM (and enables the associated testcase). As tcc for ARM doesn't contain an assembler, we'll have to resort using gcc for compiling it.
		
			
				
	
	
		
			11 lines
		
	
	
	
		
			185 B
		
	
	
	
		
			ArmAsm
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
	
		
			185 B
		
	
	
	
		
			ArmAsm
		
	
	
	
	
	
	.text
 | 
						|
	.align	2
 | 
						|
	.global	alloca
 | 
						|
	.type	alloca, %function
 | 
						|
alloca:
 | 
						|
	rsb	sp, r0, sp
 | 
						|
	bic	sp, sp, #7
 | 
						|
	mov	r0, sp
 | 
						|
	mov	pc, lr
 | 
						|
	.size	alloca, .-alloca
 | 
						|
	.section	.note.GNU-stack,"",%progbits
 |