[PATCH 1/5] arm: LLVMLinux: Add current_stack_pointer macro for ARM

Behan Webster behanw at converseincode.com
Fri Sep 6 18:50:45 EDT 2013


On 09/06/13 18:12, Måns Rullgård wrote:
> behanw at converseincode.com writes:
>
>> +#define current_stack_pointer ({ \
>> +	unsigned long current_sp; \
>> +	asm ("mov %0, r13" : "=r" (current_sp)); \
>> +	current_sp; \
>> +})
> Why do you use 'r13' rather than the more common 'sp' alias?
Originally we were using LLVM's Integrated Assembler (IA), which didn't 
allow for that alias if I remember correctly. However, now we're using 
gas because IA only supports Unified Assembly Language grammar, and not 
the extensions that are common in the kernel code.

I can resubmit using that alias (after the rest of the discussion).

Behan

-- 
Behan Webster
behanw at converseincode.com




More information about the linux-arm-kernel mailing list