aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcc/config/rs6000
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcc/config/rs6000')
-rw-r--r--contrib/gcc/config/rs6000/linux.h3
-rw-r--r--contrib/gcc/config/rs6000/linux64.h3
-rw-r--r--contrib/gcc/config/rs6000/rs6000.c4
-rw-r--r--contrib/gcc/config/rs6000/rs6000.md24
-rw-r--r--contrib/gcc/config/rs6000/sysv4.h15
5 files changed, 35 insertions, 14 deletions
diff --git a/contrib/gcc/config/rs6000/linux.h b/contrib/gcc/config/rs6000/linux.h
index 593e961f7433..15db88a9e6e5 100644
--- a/contrib/gcc/config/rs6000/linux.h
+++ b/contrib/gcc/config/rs6000/linux.h
@@ -48,6 +48,9 @@ Boston, MA 02111-1307, USA. */
#undef LINK_SHLIB_SPEC
#define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}"
+#define LINK_GCC_C_SEQUENCE_SPEC \
+ "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
+
#undef LIB_DEFAULT_SPEC
#define LIB_DEFAULT_SPEC "%(lib_linux)"
diff --git a/contrib/gcc/config/rs6000/linux64.h b/contrib/gcc/config/rs6000/linux64.h
index 55065c6a31d4..a538d02b955d 100644
--- a/contrib/gcc/config/rs6000/linux64.h
+++ b/contrib/gcc/config/rs6000/linux64.h
@@ -137,6 +137,9 @@ Boston, MA 02111-1307, USA. */
#undef LINK_SHLIB_SPEC
#define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}"
+#define LINK_GCC_C_SEQUENCE_SPEC \
+ "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
+
#undef LIB_DEFAULT_SPEC
#define LIB_DEFAULT_SPEC "%(lib_linux)"
diff --git a/contrib/gcc/config/rs6000/rs6000.c b/contrib/gcc/config/rs6000/rs6000.c
index 3c17f2156f2d..13f4ed3dab10 100644
--- a/contrib/gcc/config/rs6000/rs6000.c
+++ b/contrib/gcc/config/rs6000/rs6000.c
@@ -3310,7 +3310,7 @@ function_arg_pass_by_reference (cum, mode, type, named)
return 1;
}
- return type && int_size_in_bytes (type) <= 0;
+ return type && int_size_in_bytes (type) < 0;
}
/* Perform any needed actions needed for a function that is receiving a
@@ -3551,7 +3551,7 @@ rs6000_va_arg (valist, type)
if (DEFAULT_ABI != ABI_V4)
{
/* Variable sized types are passed by reference. */
- if (int_size_in_bytes (type) <= 0)
+ if (int_size_in_bytes (type) < 0)
{
u = build_pointer_type (type);
diff --git a/contrib/gcc/config/rs6000/rs6000.md b/contrib/gcc/config/rs6000/rs6000.md
index 4c9503128711..4d5ef9db4caa 100644
--- a/contrib/gcc/config/rs6000/rs6000.md
+++ b/contrib/gcc/config/rs6000/rs6000.md
@@ -14308,7 +14308,7 @@
return \"bdz $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "*,12,16")])
(define_insn "*ctrsi_internal2"
[(set (pc)
@@ -14332,7 +14332,7 @@
return \"{bdn|bdnz} $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "*,12,16")])
(define_insn "*ctrdi_internal1"
[(set (pc)
@@ -14356,7 +14356,7 @@
return \"bdz $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "*,12,16")])
(define_insn "*ctrdi_internal2"
[(set (pc)
@@ -14380,7 +14380,7 @@
return \"{bdn|bdnz} $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "*,12,16")])
;; Similar, but we can use GE since we have a REG_NONNEG.
@@ -14406,7 +14406,7 @@
return \"bdz $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "*,12,16")])
(define_insn "*ctrsi_internal4"
[(set (pc)
@@ -14430,7 +14430,7 @@
return \"{bdn|bdnz} $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "*,12,16")])
(define_insn "*ctrdi_internal3"
[(set (pc)
@@ -14454,7 +14454,7 @@
return \"bdz $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "*,12,16")])
(define_insn "*ctrdi_internal4"
[(set (pc)
@@ -14478,7 +14478,7 @@
return \"{bdn|bdnz} $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "*,12,16")])
;; Similar but use EQ
@@ -14504,7 +14504,7 @@
return \"{bdn|bdnz} $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "*,12,16")])
(define_insn "*ctrsi_internal6"
[(set (pc)
@@ -14528,7 +14528,7 @@
return \"bdz $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "*,12,16")])
(define_insn "*ctrdi_internal5"
[(set (pc)
@@ -14552,7 +14552,7 @@
return \"{bdn|bdnz} $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "*,12,16")])
(define_insn "*ctrdi_internal6"
[(set (pc)
@@ -14576,7 +14576,7 @@
return \"bdz $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "*,12,16")])
;; Now the splitters if we could not allocate the CTR register
diff --git a/contrib/gcc/config/rs6000/sysv4.h b/contrib/gcc/config/rs6000/sysv4.h
index 3da996fbd54c..26450e7ee273 100644
--- a/contrib/gcc/config/rs6000/sysv4.h
+++ b/contrib/gcc/config/rs6000/sysv4.h
@@ -383,6 +383,21 @@ do { \
#undef STACK_BOUNDARY
#define STACK_BOUNDARY (TARGET_ALTIVEC_ABI ? 128 : 64)
+/* Define this macro if you wish to preserve a certain alignment for
+ the stack pointer, greater than what the hardware enforces. The
+ definition is a C expression for the desired alignment (measured
+ in bits). This macro must evaluate to a value equal to or larger
+ than STACK_BOUNDARY.
+ For the SYSV ABI and variants the alignment of the stack pointer
+ is usually controlled manually in rs6000.c. However, to maintain
+ alignment across alloca () in all circumstances,
+ PREFERRED_STACK_BOUNDARY needs to be set as well.
+ This has the additional advantage of allowing a bigger maximum
+ alignment of user objects on the stack. */
+
+#undef PREFERRED_STACK_BOUNDARY
+#define PREFERRED_STACK_BOUNDARY 128
+
/* Real stack boundary as mandated by the appropriate ABI. */
#define ABI_STACK_BOUNDARY ((TARGET_EABI && !TARGET_ALTIVEC_ABI) ? 64 : 128)