[PATCH 3/8] MIPS: pbl: add pbl_probe_mem macro
Oleksij Rempel
linux at rempel-privat.de
Wed Jun 19 05:11:28 EDT 2013
Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
arch/mips/include/asm/pbl_macros.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/mips/include/asm/pbl_macros.h b/arch/mips/include/asm/pbl_macros.h
index cfca117..22d41b8 100644
--- a/arch/mips/include/asm/pbl_macros.h
+++ b/arch/mips/include/asm/pbl_macros.h
@@ -38,6 +38,18 @@
.set pop
.endm
+ .macro pbl_probe_mem ret1 ret2 addr
+ .set push
+ .set noreorder
+ la \ret1, \addr
+ sw zero, 0(\ret1)
+ li \ret2, 0x12345678
+ sw \ret2, 0(\ret1)
+ lw \ret2, 0(\ret1)
+ li \ret1, 0x12345678
+ .set pop
+ .endm
+
/*
* ADR macro instruction (inspired by ARM)
*
--
1.8.1.2
More information about the barebox
mailing list