public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
From: Roland McGrath <roland@hack.frob.com>
To: Joseph Myers <joseph@codesourcery.com>
Cc: libc-ports@sourceware.org
Subject: [PATCH 2/2 roland/arm-sfi-macros] ARM: sfi_sp assembler macro
Date: Wed, 13 Mar 2013 23:14:00 -0000	[thread overview]
Message-ID: <20130313231403.492372C09A@topped-with-meat.com> (raw)
In-Reply-To: Roland McGrath's message of  Wednesday, 13 March 2013 16:08:41 -0700 <20130313230841.B880B2C097@topped-with-meat.com>

Another requirement of the arm-nacl ABI is that all explicit modifications
of sp take a special form.  By "explicit" I mean not including push/pop or
any [sp...]! forms of loads or stores (or sp! forms of ldm/stm).  I haven't
yet dealt with the dynamic linker support code, and other than that longjmp
is the only place that actually does any such sp modification.

See the previous message for pointers to the non-no-op definition of sfi_sp
that will be used by the arm-nacl configuration.


Thanks,
Roland


ports/ChangeLog.arm
	* sysdeps/arm/sysdep.h [!ARM_SFI_MACROS] (sfi_sp): New macro.
	* sysdeps/arm/__longjmp.S: Use it.

--- a/ports/sysdeps/arm/__longjmp.S
+++ b/ports/sysdeps/arm/__longjmp.S
@@ -36,7 +36,7 @@ ENTRY (__longjmp)
 	cfi_undefined (r4)
 	CHECK_SP (r4)
 #endif
-	sfi_breg ip, \
+	sfi_sp sfi_breg ip, \
 	ldmia	\B!, JMP_BUF_REGLIST
 	cfi_restore (v1)
 	cfi_restore (v2)
--- a/ports/sysdeps/arm/sysdep.h
+++ b/ports/sysdeps/arm/sysdep.h
@@ -250,6 +250,11 @@
 		pld [\basereg, \offset]
 	.endm
 
+/* This macro precedes any instruction that directly changes the SP.
+   It's not needed for push/pop or for any kind of load or store that
+   implicitly changes the SP via the ! syntax.  */
+# define sfi_sp	/* Nothing to do.  */
+
 # endif
 
 #endif	/* __ASSEMBLER__ */

  reply	other threads:[~2013-03-13 23:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-13 23:09 [PATCH 1/2 roland/arm-sfi-macros] ARM: sfi_breg " Roland McGrath
2013-03-13 23:14 ` Roland McGrath [this message]
2013-03-15  1:52   ` [PATCH 2/2 roland/arm-sfi-macros] ARM: sfi_sp " Joseph S. Myers
2013-03-15  1:49 ` [PATCH 1/2 roland/arm-sfi-macros] ARM: sfi_breg " Joseph S. Myers
2013-03-15 16:25   ` Roland McGrath

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130313231403.492372C09A@topped-with-meat.com \
    --to=roland@hack.frob.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-ports@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).