xen/arm32: head: Introduce print_reg
authorJulien Grall <julien.grall@arm.com>
Mon, 15 Apr 2019 22:11:42 +0000 (23:11 +0100)
committerJulien Grall <julien.grall@arm.com>
Sat, 7 Sep 2019 11:10:22 +0000 (12:10 +0100)
commit854e7d6224063af64b5a6750415bccd880e292fa
tree2534cbb24c4a729f05ede9618d7e0b7b01c00b49
parentf68eece73c69bbb9686def0980b252cd17f8e130
xen/arm32: head: Introduce print_reg

At the moment, the user should save r14/lr if it cares about it.

Follow-up patches will introduce more use of putn in place where lr
should be preserved.

Furthermore, any user of putn should also move the value to register r0
if it was stored in a different register.

For convenience, a new macro is introduced to print a given register.
The macro will take care for us to move the value to r0 and also
preserve lr.

Lastly the new macro is used to replace all the callsite of putn. This
will simplify rework/review later on.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/arm32/head.S