aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorliujiangning <liujiangning@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-16 06:55:09 +0000
committerliujiangning <liujiangning@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-16 06:55:09 +0000
commite22d790e49cc9176467c7a88be558f66670aae78 (patch)
tree514086a0c88fdd1b54d398a760a7381af847aa51
parentd3761a29cf68afea6173f03aadfb20953fb4ff2c (diff)
Undo changes committed in r179307.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/ARM/embedded-4_6-branch@181402 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog.arm19
-rw-r--r--gcc/config/i386/i386.c5
-rw-r--r--gcc/config/rs6000/rs6000.c12
-rw-r--r--gcc/doc/tm.texi16
-rw-r--r--gcc/doc/tm.texi.in16
-rw-r--r--gcc/sched-deps.c8
-rw-r--r--gcc/target.def7
-rw-r--r--gcc/testsuite/gcc.target/arm/stack-red-zone.c13
8 files changed, 2 insertions, 94 deletions
diff --git a/gcc/ChangeLog.arm b/gcc/ChangeLog.arm
index d078757cd10..956ad66a608 100644
--- a/gcc/ChangeLog.arm
+++ b/gcc/ChangeLog.arm
@@ -2,25 +2,6 @@
* config/arm/t-thumb2: Use thumb2 version library for Cortex-R5.
-2011-09-28 Jiangning Liu <jiangning.liu@arm.com>
-
- PR rtl-optimization/38644
- * config/i386/i386.c (ix86_stack_using_red_zone): Change inline
- to be extern.
- (TARGET_STACK_USING_RED_ZONE): New.
- * config/rs6000/rs6000.c (rs6000_stack_using_red_zone): New.
- (TARGET_STACK_USING_RED_ZONE): New.
- (offset_below_red_zone_p): Change to use new hook
- TARGET_STACK_USING_RED_ZONE.
- * doc/tm.texi (TARGET_STACK_USING_RED_ZONE): New.
- * doc/tm.texi.in (TARGET_STACK_USING_RED_ZONE): New.
- * sched-deps.c (sched_analyze_1): If the stack pointer is being
- modified and stack red zone is not supported for ports, flush out
- all memory references as they may become invalid if moved across
- the stack adjustment.
- * target.def (stack_using_red_zone): New.
- * testsuite/gcc.target/arm/stack-red-zone.c: New.
-
2011-09-28 Terry Guo <terry.guo@arm.com>
Backport r173371 from mainline
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 14dc21f8dfc..942dfbe978e 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -2684,7 +2684,7 @@ static const char *const cpu_names[TARGET_CPU_DEFAULT_max] =
/* Return true if a red-zone is in use. */
-static bool
+static inline bool
ix86_using_red_zone (void)
{
return TARGET_RED_ZONE && !TARGET_64BIT_MS_ABI;
@@ -35209,9 +35209,6 @@ ix86_autovectorize_vector_sizes (void)
#undef TARGET_SUPPORTS_SPLIT_STACK
#define TARGET_SUPPORTS_SPLIT_STACK ix86_supports_split_stack
-#undef TARGET_STACK_USING_RED_ZONE
-#define TARGET_STACK_USING_RED_ZONE ix86_using_red_zone
-
#undef TARGET_FUNCTION_VALUE
#define TARGET_FUNCTION_VALUE ix86_function_value
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 3c70db457a1..ea66f80fe81 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -1586,9 +1586,6 @@ static const struct default_options rs6000_option_optimization_table[] =
#undef TARGET_STACK_PROTECT_FAIL
#define TARGET_STACK_PROTECT_FAIL rs6000_stack_protect_fail
-#undef TARGET_STACK_USING_RED_ZONE
-#define TARGET_STACK_USING_RED_ZONE rs6000_stack_using_red_zone
-
/* MPC604EUM 3.5.2 Weak Consistency between Multiple Processors
The PowerPC architecture requires only weak consistency among
processors--that is, memory accesses between processors need not be
@@ -21188,13 +21185,6 @@ rs6000_restore_saved_cr (rtx reg, int using_mfcr_multiple)
}
}
-/* Return true if the ABI allows red zone access. */
-static bool
-rs6000_stack_using_red_zone (void)
-{
- return (DEFAULT_ABI != ABI_V4);
-}
-
/* Return true if OFFSET from stack pointer can be clobbered by signals.
V.4 doesn't have any stack cushion, AIX ABIs have 220 or 288 bytes
below stack pointer not cloberred by signals. */
@@ -21202,7 +21192,7 @@ rs6000_stack_using_red_zone (void)
static inline bool
offset_below_red_zone_p (HOST_WIDE_INT offset)
{
- return offset < (!TARGET_STACK_USING_RED_ZONE
+ return offset < (DEFAULT_ABI == ABI_V4
? 0
: TARGET_32BIT ? -220 : -288);
}
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index d509b4d3c29..73ec011669c 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -11277,22 +11277,6 @@ to the stack. Therefore, this hook should return true in general, but
false for naked functions. The default implementation always returns true.
@end deftypefn
-@deftypefn {Target Hook} bool TARGET_STACK_USING_RED_ZONE (void)
-This hook returns true if the target has a red zone (an area beyond the
-current extent of the stack that cannot be modified by asynchronous events
-on the processor).
-
-If this hook returns false then the compiler mid-end will not move an access
-to memory in the stack frame past a stack adjustment insn.
-
-If this hook returns true then the compiler mid-end will assume that it is
-safe to move an access to memory in the stack frame past a stack adjustment
-insn. The target back-end must emit scheduling barrier insns when this is
-unsafe.
-
-The default is to return false which is safe and appropriate for most targets.
-@end deftypefn
-
@deftypevr {Target Hook} {unsigned HOST_WIDE_INT} TARGET_CONST_ANCHOR
On some architectures it can take multiple instructions to synthesize
a constant. If there is another constant already in a register that
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index 648a128f70e..4ad3877a8d4 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -11223,22 +11223,6 @@ to the stack. Therefore, this hook should return true in general, but
false for naked functions. The default implementation always returns true.
@end deftypefn
-@hook TARGET_STACK_USING_RED_ZONE
-This hook returns true if the target has a red zone (an area beyond the
-current extent of the stack that cannot be modified by asynchronous events
-on the processor).
-
-If this hook returns false then the compiler mid-end will not move an access
-to memory in the stack frame past a stack adjustment insn.
-
-If this hook returns true then the compiler mid-end will assume that it is
-safe to move an access to memory in the stack frame past a stack adjustment
-insn. The target back-end must emit scheduling barrier insns when this is
-unsafe.
-
-The default is to return false which is safe and appropriate for most targets.
-@end deftypefn
-
@hook TARGET_CONST_ANCHOR
On some architectures it can take multiple instructions to synthesize
a constant. If there is another constant already in a register that
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
index 485106cf996..7293fc3c972 100644
--- a/gcc/sched-deps.c
+++ b/gcc/sched-deps.c
@@ -2271,14 +2271,6 @@ sched_analyze_1 (struct deps_desc *deps, rtx x, rtx insn)
FIRST_STACK_REG + nregs);
}
#endif
- /* If the stack pointer is being modified, flush out all memory
- references as they may become invalid if moved across the
- stack adjustment. */
- if (!targetm.calls.stack_using_red_zone ()
- && (dest == stack_pointer_rtx))
- {
- flush_pending_lists (deps, insn, true, true);
- }
}
else if (MEM_P (dest))
{
diff --git a/gcc/target.def b/gcc/target.def
index 1dfa7236082..ecacd44cce7 100644
--- a/gcc/target.def
+++ b/gcc/target.def
@@ -2115,13 +2115,6 @@ DEFHOOK
bool, (void),
hook_bool_void_true)
-/* Return true if target uses stack red zone. */
-DEFHOOK
-(stack_using_red_zone,
- "",
- bool, (void),
- hook_bool_void_false)
-
/* Return an rtx for the static chain for FNDECL. If INCOMING_P is true,
then it should be for the callee; otherwise for the caller. */
DEFHOOK
diff --git a/gcc/testsuite/gcc.target/arm/stack-red-zone.c b/gcc/testsuite/gcc.target/arm/stack-red-zone.c
deleted file mode 100644
index 488870737e1..00000000000
--- a/gcc/testsuite/gcc.target/arm/stack-red-zone.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/* No stack red zone. PR38644. */
-/* { dg-options "-mthumb -O2" } */
-/* { dg-final { scan-assembler "ldrb\[^\n\]*\\n\[\t \]*add\[\t \]*sp\[^\n\]*\\n\[\t \]*@\[^\n\]*\\n\[\t \]*pop" } } */
-/* { dg-require-effective-target arm_thumb1_ok } */
-
-extern int doStreamReadBlock (int *, char *, int size, int);
-
-char readStream (int *s)
-{
- char c = 0;
- doStreamReadBlock (s, &c, 1, *s);
- return c;
-}