This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports 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 05/26] arm: Introduce thumb helpers s and pc_ofs


---
	* sysdeps/arm/sysdep.h (s, pc_ofs): New macros.
---
 ports/sysdeps/arm/sysdep.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/ports/sysdeps/arm/sysdep.h b/ports/sysdeps/arm/sysdep.h
index 0e6f645..4a9f05a 100644
--- a/ports/sysdeps/arm/sysdep.h
+++ b/ports/sysdeps/arm/sysdep.h
@@ -114,4 +114,19 @@
    the caller.  */
 	.eabi_attribute 24, 1
 
+/* We occasionally want to use the S form simply to achieve a smaller
+   instruction form in Thumb mode.  Never set the flags in ARM mode.  */
+#ifdef __thumb__
+# define s(insn)	insn##s
+#else
+# define s(insn)	insn
+#endif
+
+/* This number is the offset from the pc at the current location.  */
+#ifdef __thumb__
+# define pc_ofs		4
+#else
+# define pc_ofs		8
+#endif
+
 #endif	/* __ASSEMBLER__ */
-- 
1.8.1.2


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