public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Olivier Hainque <hainque@adacore.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Cc: Olivier Hainque <hainque@adacore.com>,
	Douglas B Rupp <rupp@adacore.com>,
	Jerome Lambourg <lambourg@adacore.com>,
	Nathan Sidwell <nathan@acm.org>
Subject: x86_64-vxworks* support, vxworks target files updates
Date: Tue, 27 Jun 2017 13:45:00 -0000	[thread overview]
Message-ID: <2349EBC7-97D2-47EA-95C4-C562C6166E3D@adacore.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 636 bytes --]

Hello,

Minor updates to the x86 specific config files
for VxWorks, to account for 64bit ABIs.

Tested together with the previous patches in the
vx7 series, for x86_64-vxworks7 in particular.

Committing to mainline.

With Kind Regards,

Olivier


2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
            Olivier Hainque  <hainque@adacore.com>

	* config/i386/vxworks.h (DBX_REGISTER_NUMBER): Pick distinct
	map for 64bits.
	(TARGET_OS_CPP_BUILTINS): builtin_define CPU to X86_64 for 64bit
	targets. Pick a default if no particular attempt applied.
	(STACK_CHECK_PROTECT): Double for 64bit targets, which have
	larger contexts.


[-- Attachment #2: 0007-support-for-x86-and-x86_64-vxworks7-vxworks-config-f.patch --]
[-- Type: application/octet-stream, Size: 1320 bytes --]

--- a/gcc/config/i386/vxworks.h
+++ b/gcc/config/i386/vxworks.h
@@ -34,7 +34,8 @@ along with GCC; see the file COPYING3.  If not see
    the SVR4 numbering.  */
 
 #undef DBX_REGISTER_NUMBER
-#define DBX_REGISTER_NUMBER(n)  svr4_dbx_register_map[n]
+#define DBX_REGISTER_NUMBER(n) \
+  (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
 
 #define TARGET_OS_CPP_BUILTINS()			\
   do							\
@@ -59,7 +60,11 @@ along with GCC; see the file COPYING3.  If not see
           builtin_define ("CPU=PENTIUM4");		\
           builtin_define ("CPU_VARIANT=PENTIUM4");	\
         }						\
-    }							\
+      else if (TARGET_64BIT)				\
+          builtin_define ("CPU=X86_64");		\
+      else						\
+          builtin_define ("CPU=I80386");		\
+    } 							\
   while (0)
 
 #undef  CPP_SPEC
@@ -91,5 +96,10 @@ along with GCC; see the file COPYING3.  If not see
 #define STACK_CHECK_STATIC_BUILTIN 1
 
 /* This platform supports the probing method of stack checking (RTP mode).
-   8K is reserved in the stack to propagate exceptions in case of overflow.  */
+   8K is reserved in the stack to propagate exceptions in case of overflow. 
+   On 64-bit targets, we double that size.  */
+#if TARGET_64BIT_DEFAULT
+#define STACK_CHECK_PROTECT 16384
+#else
 #define STACK_CHECK_PROTECT 8192
+#endif
-- 
1.7.10.4


                 reply	other threads:[~2017-06-27 13:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=2349EBC7-97D2-47EA-95C4-C562C6166E3D@adacore.com \
    --to=hainque@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=lambourg@adacore.com \
    --cc=nathan@acm.org \
    --cc=rupp@adacore.com \
    /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).