This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][AArch64][libgloss] Tidy up WXN bit clearing


Hi all,

The patch I sent out recently to clear the WXN bit could be improved a bit.
We can use the assembler bic-immediate pseudo-instruction instead of a mov-immediate and register-bic.
This patch shortens that sequence a bit.

Sorry for the noise.

Ok?

Tested aarch64-none-elf on a model.

P.S. Can someone please install this if ok'd?

[libgloss/]
2014-01-28  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

    * aarch64/cpu-init/rdimon-aem-el3.S (flat_map): Use bic-immediate
    form to clear WXN bit.
diff --git a/libgloss/aarch64/cpu-init/rdimon-aem-el3.S b/libgloss/aarch64/cpu-init/rdimon-aem-el3.S
index 4637627..41db8f9 100644
--- a/libgloss/aarch64/cpu-init/rdimon-aem-el3.S
+++ b/libgloss/aarch64/cpu-init/rdimon-aem-el3.S
@@ -139,8 +139,7 @@ _flat_map:
 	mrs	x0, sctlr_el3
 	ldr	x1, =0x100d			/* bits I(12) SA(3) C(2) M(0) */
 	bic	x0, x0, #(1 << 1)		/* clear bit A(1) */
-	mov	x2, #(1 << 19)			/* clear WXN */
-	bic	x0, x0, x2
+	bic	x0, x0, #(1 << 19)		/* clear WXN */
 	orr	x0, x0, x1			/* set bits */
 
 	dsb	sy

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]