public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: libffi-discuss@sourceware.org
Subject: [PATCH 2/8] Add ffi_cfi.h
Date: Tue, 28 Oct 2014 18:32:00 -0000	[thread overview]
Message-ID: <1414521094-18403-3-git-send-email-rth@twiddle.net> (raw)
In-Reply-To: <1414521094-18403-1-git-send-email-rth@twiddle.net>

Have one copy of the HAVE_AS_CFI_PSEUDO_OP code
to share between all backends.
---
 include/ffi_cfi.h | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 include/ffi_cfi.h

diff --git a/include/ffi_cfi.h b/include/ffi_cfi.h
new file mode 100644
index 0000000..6cca20c
--- /dev/null
+++ b/include/ffi_cfi.h
@@ -0,0 +1,53 @@
+/* -----------------------------------------------------------------------
+   ffi_cfi.h - Copyright (c) 2014  Red Hat, Inc.
+
+   Conditionally assemble cfi directives. Only necessary for building libffi.
+   ----------------------------------------------------------------------- */
+
+#ifndef FFI_CFI_H
+#define FFI_CFI_H
+
+#ifdef HAVE_AS_CFI_PSEUDO_OP
+
+# define cfi_startproc			.cfi_startproc
+# define cfi_endproc			.cfi_endproc
+# define cfi_def_cfa(reg, off)		.cfi_def_cfa reg, off
+# define cfi_def_cfa_register(reg)	.cfi_def_cfa_register reg
+# define cfi_def_cfa_offset(off)	.cfi_def_cfa_offset off
+# define cfi_adjust_cfa_offset(off)	.cfi_adjust_cfa_offset off
+# define cfi_offset(reg, off)		.cfi_offset reg, off
+# define cfi_rel_offset(reg, off)	.cfi_rel_offset reg, off
+# define cfi_register(r1, r2)		.cfi_register r1, r2
+# define cfi_return_column(reg)		.cfi_return_column reg
+# define cfi_restore(reg)		.cfi_restore reg
+# define cfi_same_value(reg)		.cfi_same_value reg
+# define cfi_undefined(reg)		.cfi_undefined reg
+# define cfi_remember_state		.cfi_remember_state
+# define cfi_restore_state		.cfi_restore_state
+# define cfi_window_save		.cfi_window_save
+# define cfi_personality(enc, exp)	.cfi_personality enc, exp
+# define cfi_lsda(enc, exp)		.cfi_lsda enc, exp
+
+#else
+
+# define cfi_startproc
+# define cfi_endproc
+# define cfi_def_cfa(reg, off)
+# define cfi_def_cfa_register(reg)
+# define cfi_def_cfa_offset(off)
+# define cfi_adjust_cfa_offset(off)
+# define cfi_offset(reg, off)
+# define cfi_rel_offset(reg, off)
+# define cfi_register(r1, r2)
+# define cfi_return_column(reg)
+# define cfi_restore(reg)
+# define cfi_same_value(reg)
+# define cfi_undefined(reg)
+# define cfi_remember_state
+# define cfi_restore_state
+# define cfi_window_save
+# define cfi_personality(enc, exp)
+# define cfi_lsda(enc, exp)
+
+#endif /* HAVE_AS_CFI_PSEUDO_OP */
+#endif /* FFI_CFI_H */
-- 
1.9.3

  reply	other threads:[~2014-10-28 18:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-28 18:32 [PATCH 0/8] Go closures for x86_64 Richard Henderson
2014-10-28 18:32 ` Richard Henderson [this message]
2014-10-28 18:32 ` [PATCH 4/8] win64: Rewrite Richard Henderson
2014-10-28 18:32 ` [PATCH 5/8] win64: Remove support from ffi.c Richard Henderson
2014-10-28 18:32 ` [PATCH 8/8] x86_64: Add support for complex types Richard Henderson
2014-10-28 18:32 ` [PATCH 6/8] x86_64: Fixups for x32 Richard Henderson
2014-10-28 18:32 ` [PATCH 1/8] Add entry points for interacting with Go Richard Henderson
2014-10-28 18:32 ` [PATCH 3/8] x86-64: Support go closures Richard Henderson
2014-10-28 18:32 ` [PATCH 7/8] x86_64: Decouple return types from FFI_TYPE constants Richard Henderson

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=1414521094-18403-3-git-send-email-rth@twiddle.net \
    --to=rth@twiddle.net \
    --cc=libffi-discuss@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).