* [PATCH 1/3] remove STRUCT_VALUE macro
2015-09-10 11:57 [PATCH 0/3] remove tm.h from libobjc/sendmsg.c tbsaunde+gcc
2015-09-10 11:57 ` [PATCH 2/3] remove unused defines from sendmsg.c tbsaunde+gcc
@ 2015-09-10 11:57 ` tbsaunde+gcc
2015-09-10 12:32 ` Bernd Schmidt
2015-09-10 12:26 ` [PATCH 3/3] stop including tm.h in sendmsg.c tbsaunde+gcc
` (2 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: tbsaunde+gcc @ 2015-09-10 11:57 UTC (permalink / raw)
To: gcc-patches
From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
It is undocumented so the meaning is unclear, but it is only ever
defined to 0, which the one user in libobjc treats the same as being
undefined.
gcc/ChangeLog:
2015-09-10 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* config/arc/arc.h: Remove define of STRUCT_VALUE.
* config/lm32/lm32.h: Likewise.
* config/mep/mep.h: Likewise.
* config/visium/visium.h: Likewise.
* system.h: Poison STRUCT_VALUE macro.
libobjc/ChangeLog:
2015-09-10 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* sendmsg.c: Remove check of STRUCT_VALUE macro.
---
gcc/config/arc/arc.h | 4 ----
gcc/config/lm32/lm32.h | 2 --
gcc/config/mep/mep.h | 2 --
gcc/config/visium/visium.h | 8 --------
gcc/system.h | 2 +-
libobjc/sendmsg.c | 5 -----
6 files changed, 1 insertion(+), 22 deletions(-)
diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h
index d98cce1..4b67716 100644
--- a/gcc/config/arc/arc.h
+++ b/gcc/config/arc/arc.h
@@ -901,10 +901,6 @@ arc_return_addr_rtx(COUNT,FRAME)
/* Tell GCC to use RETURN_IN_MEMORY. */
#define DEFAULT_PCC_STRUCT_RETURN 0
-/* Register in which address to store a structure value
- is passed to a function, or 0 to use `invisible' first argument. */
-#define STRUCT_VALUE 0
-
/* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
the stack pointer does not matter. The value is tested only in
functions that have frame pointers.
diff --git a/gcc/config/lm32/lm32.h b/gcc/config/lm32/lm32.h
index 986383f..c65538a 100644
--- a/gcc/config/lm32/lm32.h
+++ b/gcc/config/lm32/lm32.h
@@ -302,8 +302,6 @@ enum reg_class
LM32_NUM_INTS ((MODE) == BLKmode ? \
int_size_in_bytes (TYPE) : GET_MODE_SIZE (MODE))
-#define STRUCT_VALUE 0
-
/*---------------------------*/
/* Function entry and exit. */
/*---------------------------*/
diff --git a/gcc/config/mep/mep.h b/gcc/config/mep/mep.h
index f7322cb7..4d335b0 100644
--- a/gcc/config/mep/mep.h
+++ b/gcc/config/mep/mep.h
@@ -499,8 +499,6 @@ typedef struct
#define DEFAULT_PCC_STRUCT_RETURN 0
-#define STRUCT_VALUE 0
-
#define FUNCTION_OK_FOR_SIBCALL(DECL) mep_function_ok_for_sibcall(DECL)
\f
/* Prologue and epilogues are all handled via RTL. */
diff --git a/gcc/config/visium/visium.h b/gcc/config/visium/visium.h
index a2ab61c..71c960e 100644
--- a/gcc/config/visium/visium.h
+++ b/gcc/config/visium/visium.h
@@ -1075,14 +1075,6 @@ struct visium_args
If not defined, this defaults to the value 1. */
#define DEFAULT_PCC_STRUCT_RETURN 0
-/* `STRUCT_VALUE'
-
- If the structure value address is not passed in a register, define
- `STRUCT_VALUE' as an expression returning an RTX for the place
- where the address is passed. If it returns 0, the address is
- passed as an "invisible" first argument. */
-#define STRUCT_VALUE 0
-
/* Caller-Saves Register Allocation
If you enable it, GNU CC can save registers around function calls.
diff --git a/gcc/system.h b/gcc/system.h
index 9ca5b5f..e306459 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -948,7 +948,7 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
EXTRA_ADDRESS_CONSTRAINT CONST_DOUBLE_OK_FOR_CONSTRAINT_P \
CALLER_SAVE_PROFITABLE LARGEST_EXPONENT_IS_NORMAL \
ROUND_TOWARDS_ZERO SF_SIZE DF_SIZE XF_SIZE TF_SIZE LIBGCC2_TF_CEXT \
- LIBGCC2_LONG_DOUBLE_TYPE_SIZE
+ LIBGCC2_LONG_DOUBLE_TYPE_SIZE STRUCT_VALUE
/* Hooks that are no longer used. */
#pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE \
diff --git a/libobjc/sendmsg.c b/libobjc/sendmsg.c
index 8e347df..3a079f0 100644
--- a/libobjc/sendmsg.c
+++ b/libobjc/sendmsg.c
@@ -47,7 +47,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include <assert.h> /* For assert */
#include <string.h> /* For strlen */
-/* This is how we hack STRUCT_VALUE to be 1 or 0. */
#define gen_rtx(args...) 1
#define gen_rtx_MEM(args...) 1
#define gen_rtx_REG(args...) 1
@@ -55,11 +54,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#undef rtx
#define rtx int
-#if ! defined (STRUCT_VALUE) || STRUCT_VALUE == 0
#define INVISIBLE_STRUCT_RETURN 1
-#else
-#define INVISIBLE_STRUCT_RETURN 0
-#endif
/* The uninstalled dispatch table. If a class' dispatch table points
to __objc_uninstalled_dtable then that means it needs its dispatch
--
2.4.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/3] remove unused defines from sendmsg.c
2015-09-10 11:57 [PATCH 0/3] remove tm.h from libobjc/sendmsg.c tbsaunde+gcc
@ 2015-09-10 11:57 ` tbsaunde+gcc
2015-09-10 11:57 ` [PATCH 1/3] remove STRUCT_VALUE macro tbsaunde+gcc
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: tbsaunde+gcc @ 2015-09-10 11:57 UTC (permalink / raw)
To: gcc-patches
From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
libobjc/ChangeLog:
2015-09-10 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* sendmsg.c (gen_rtx): Remove macro.
(gen_rtx_MEM): Likewise.
(gen_rtx_REG): Likewise.
(rtx): Likewise.
---
libobjc/sendmsg.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/libobjc/sendmsg.c b/libobjc/sendmsg.c
index 3a079f0..ba31930 100644
--- a/libobjc/sendmsg.c
+++ b/libobjc/sendmsg.c
@@ -47,13 +47,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include <assert.h> /* For assert */
#include <string.h> /* For strlen */
-#define gen_rtx(args...) 1
-#define gen_rtx_MEM(args...) 1
-#define gen_rtx_REG(args...) 1
-/* Already defined in gcc/coretypes.h. So prevent double definition warning. */
-#undef rtx
-#define rtx int
-
#define INVISIBLE_STRUCT_RETURN 1
/* The uninstalled dispatch table. If a class' dispatch table points
--
2.4.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 0/3] remove tm.h from libobjc/sendmsg.c
@ 2015-09-10 11:57 tbsaunde+gcc
2015-09-10 11:57 ` [PATCH 2/3] remove unused defines from sendmsg.c tbsaunde+gcc
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: tbsaunde+gcc @ 2015-09-10 11:57 UTC (permalink / raw)
To: gcc-patches
From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
Hi,
I thought I'd see how hard it is to get tm.h out of libobjc/ so it wouldn't be
necessary to check there for uses of target macros.
each patch individually bootstrapped + regtested on x86_64-linux-gnu, ok?
Trev
Trevor Saunders (3):
remove STRUCT_VALUE macro
remove unused defines from sendmsg.c
stop including tm.h in sendmsg.c
gcc/config/arc/arc.h | 4 ----
gcc/config/lm32/lm32.h | 2 --
gcc/config/mep/mep.h | 2 --
gcc/config/visium/visium.h | 8 --------
gcc/system.h | 2 +-
libobjc/sendmsg.c | 14 --------------
6 files changed, 1 insertion(+), 31 deletions(-)
--
2.4.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/3] stop including tm.h in sendmsg.c
2015-09-10 11:57 [PATCH 0/3] remove tm.h from libobjc/sendmsg.c tbsaunde+gcc
2015-09-10 11:57 ` [PATCH 2/3] remove unused defines from sendmsg.c tbsaunde+gcc
2015-09-10 11:57 ` [PATCH 1/3] remove STRUCT_VALUE macro tbsaunde+gcc
@ 2015-09-10 12:26 ` tbsaunde+gcc
2015-09-10 12:35 ` Bernd Schmidt
2015-09-10 13:39 ` [PATCH 0/3] remove tm.h from libobjc/sendmsg.c pinskia
2015-09-10 13:41 ` Joseph Myers
4 siblings, 1 reply; 8+ messages in thread
From: tbsaunde+gcc @ 2015-09-10 12:26 UTC (permalink / raw)
To: gcc-patches
From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
libobjc/ChangeLog:
2015-09-10 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* sendmsg.c (tm.h): Remove include.
---
libobjc/sendmsg.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/libobjc/sendmsg.c b/libobjc/sendmsg.c
index ba31930..8eb6d54 100644
--- a/libobjc/sendmsg.c
+++ b/libobjc/sendmsg.c
@@ -26,7 +26,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
only while debugging the runtime. */
/* #define DEBUG 1 */
-/* FIXME: This file has no business including tm.h. */
/* FIXME: This should be using libffi instead of __builtin_apply
and friends. */
@@ -34,7 +33,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "objc-private/error.h"
#include "tconfig.h"
#include "coretypes.h"
-#include "tm.h"
#include "objc/runtime.h"
#include "objc/message.h" /* For objc_msg_lookup(), objc_msg_lookup_super(). */
#include "objc/thr.h"
--
2.4.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] remove STRUCT_VALUE macro
2015-09-10 11:57 ` [PATCH 1/3] remove STRUCT_VALUE macro tbsaunde+gcc
@ 2015-09-10 12:32 ` Bernd Schmidt
0 siblings, 0 replies; 8+ messages in thread
From: Bernd Schmidt @ 2015-09-10 12:32 UTC (permalink / raw)
To: tbsaunde+gcc, gcc-patches
On 09/10/2015 01:57 PM, tbsaunde+gcc@tbsaunde.org wrote:
> From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
>
> It is undocumented so the meaning is unclear, but it is only ever
> defined to 0, which the one user in libobjc treats the same as being
> undefined.
Apparently it was converted to TARGET_STRUCT_VALUE_RTX in 2003/2004. The
default definition of that is documented as just returning 0, so
removing these macros should be fine.
> gcc/ChangeLog:
>
> 2015-09-10 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
>
> * config/arc/arc.h: Remove define of STRUCT_VALUE.
> * config/lm32/lm32.h: Likewise.
> * config/mep/mep.h: Likewise.
> * config/visium/visium.h: Likewise.
> * system.h: Poison STRUCT_VALUE macro.
Ok.
Bernd
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] stop including tm.h in sendmsg.c
2015-09-10 12:26 ` [PATCH 3/3] stop including tm.h in sendmsg.c tbsaunde+gcc
@ 2015-09-10 12:35 ` Bernd Schmidt
0 siblings, 0 replies; 8+ messages in thread
From: Bernd Schmidt @ 2015-09-10 12:35 UTC (permalink / raw)
To: tbsaunde+gcc, gcc-patches
On 09/10/2015 01:57 PM, tbsaunde+gcc@tbsaunde.org wrote:
> From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
>
> libobjc/ChangeLog:
>
> 2015-09-10 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
>
> * sendmsg.c (tm.h): Remove include.
Ok for this and the previous one too. If it turns out we still need this
information we'll figure something out, probably involving
-fbuilding-libgcc.
Bernd
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] remove tm.h from libobjc/sendmsg.c
2015-09-10 11:57 [PATCH 0/3] remove tm.h from libobjc/sendmsg.c tbsaunde+gcc
` (2 preceding siblings ...)
2015-09-10 12:26 ` [PATCH 3/3] stop including tm.h in sendmsg.c tbsaunde+gcc
@ 2015-09-10 13:39 ` pinskia
2015-09-10 13:41 ` Joseph Myers
4 siblings, 0 replies; 8+ messages in thread
From: pinskia @ 2015-09-10 13:39 UTC (permalink / raw)
To: tbsaunde+gcc; +Cc: gcc-patches
> On Sep 10, 2015, at 7:57 PM, tbsaunde+gcc@tbsaunde.org wrote:
>
> From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
>
> Hi,
>
> I thought I'd see how hard it is to get tm.h out of libobjc/ so it wouldn't be
> necessary to check there for uses of target macros.
I once had a branch which did this and then I got busy with other things. The libobjc side should still apply.
Thanks,
Andrew
>
> each patch individually bootstrapped + regtested on x86_64-linux-gnu, ok?
>
> Trev
>
>
> Trevor Saunders (3):
> remove STRUCT_VALUE macro
> remove unused defines from sendmsg.c
> stop including tm.h in sendmsg.c
>
> gcc/config/arc/arc.h | 4 ----
> gcc/config/lm32/lm32.h | 2 --
> gcc/config/mep/mep.h | 2 --
> gcc/config/visium/visium.h | 8 --------
> gcc/system.h | 2 +-
> libobjc/sendmsg.c | 14 --------------
> 6 files changed, 1 insertion(+), 31 deletions(-)
>
> --
> 2.4.0
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] remove tm.h from libobjc/sendmsg.c
2015-09-10 11:57 [PATCH 0/3] remove tm.h from libobjc/sendmsg.c tbsaunde+gcc
` (3 preceding siblings ...)
2015-09-10 13:39 ` [PATCH 0/3] remove tm.h from libobjc/sendmsg.c pinskia
@ 2015-09-10 13:41 ` Joseph Myers
4 siblings, 0 replies; 8+ messages in thread
From: Joseph Myers @ 2015-09-10 13:41 UTC (permalink / raw)
To: tbsaunde+gcc; +Cc: gcc-patches
On Thu, 10 Sep 2015, tbsaunde+gcc@tbsaunde.org wrote:
> I thought I'd see how hard it is to get tm.h out of libobjc/ so it wouldn't be
> necessary to check there for uses of target macros.
The issue is PR libobjc/24775, so include that in the ChangeLog entry for
any relevant patch (and if finished, close that bug as fixed as well as
removing the list of libobjc target macros from
<https://gcc.gnu.org/wiki/Top-Level_Libgcc_Migration>, which has the
overall lists, maybe not fully up to date, of cases of host-side target
macros used in target-side code).
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-09-10 13:39 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-10 11:57 [PATCH 0/3] remove tm.h from libobjc/sendmsg.c tbsaunde+gcc
2015-09-10 11:57 ` [PATCH 2/3] remove unused defines from sendmsg.c tbsaunde+gcc
2015-09-10 11:57 ` [PATCH 1/3] remove STRUCT_VALUE macro tbsaunde+gcc
2015-09-10 12:32 ` Bernd Schmidt
2015-09-10 12:26 ` [PATCH 3/3] stop including tm.h in sendmsg.c tbsaunde+gcc
2015-09-10 12:35 ` Bernd Schmidt
2015-09-10 13:39 ` [PATCH 0/3] remove tm.h from libobjc/sendmsg.c pinskia
2015-09-10 13:41 ` Joseph Myers
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).