[RFC PATCH 03/14] ARM: fix add instruction to set the flags

Lorenzo Pieralisi lorenzo.pieralisi at arm.com
Thu Aug 19 04:59:49 EST 2010


ARM data processing instructions require the 's' suffix to update
the flags upon execution.

This patch fixes code requiring flags to be updated in order to check
the carry flag for overflow.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi at arm.com>
---
 arch/arm/kernel/head.S |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index 7e00565..9879797 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -96,7 +96,7 @@ ENTRY(stext)
 	 * here, as we'll lookup one based on the device tree in setup_arch().
 	 * Also, we don't need to call __vet_atags.
 	 */
-	add	r3, r1, #1
+	adds	r3, r1, #1
 	bcs	1f
 
 	bl	__lookup_machine_type		@ r5=machinfo
-- 
1.6.3.3



More information about the devicetree-discuss mailing list