summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraj <aj@138bc75d-0d04-0410-961f-82ee72b054a4>2002-06-23 05:30:14 +0000
committeraj <aj@138bc75d-0d04-0410-961f-82ee72b054a4>2002-06-23 05:30:14 +0000
commitf4e62fcfd3d22a51bc5945e6be8b9ac38e5acdc6 (patch)
treee499ba3b8810f143ff97baa9f8d8c1bfbf6a5ef8
parent84be287d6e3705eab1a8be2d76367bd0ba1e5af4 (diff)
downloadgcc-f4e62fcfd3d22a51bc5945e6be8b9ac38e5acdc6.tar.gz
* gcc.c-torture/execute/complex-6.c: New.
* reg-stack.c (convert_regs_exit): Push the registers to stack in proper order. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54915 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog23
-rw-r--r--gcc/reg-stack.c2
-rw-r--r--gcc/testsuite/ChangeLog8
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/complex-6.c59
4 files changed, 80 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 261874de794..8d31820a2f7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2002-06-23 Jan Hubicka <jh@suse.cz>
+
+ * reg-stack.c (convert_regs_exit): Push the registers to stack in
+ proper order.
+
2002-06-22 Ulrich Weigand <uweigand@de.ibm.com>
PR middle-end/6963
@@ -29,12 +34,12 @@
2002-06-21 Matt Thomas <matt@3am-software.com>
* config/vax/vax.c (vax_output_function_prologue): Use
- REGISTER_PREFIX. Fix some indentation.
+ REGISTER_PREFIX. Fix some indentation.
* config/vax/vax.h (FUNCTION_PROFILER): Use reg_names[].
(VAX_ISTREAM_SYNC): Define.
(INITIALIZE_TRAMPOLINE): Use VAX_ISTREAM_SYNC. Move the
- i-stream sync to the end.
- (REGISTER_PREFIX): Define as "".
+ i-stream sync to the end.
+ (REGISTER_PREFIX): Define as "".
(ASM_OUTPUT_MI_THUNK): Use REGISTER_PREFIX.
2002-06-21 Jason Thorpe <thorpej@wasabisystems.com>
@@ -55,8 +60,8 @@
2002-06-21 Richard Henderson <rth@redhat.com>
* bb-reorder.c (make_reorder_chain_1): Search harder for the
- vax casesi fallthru edge.
- * cfglayout.c (cleanup_unconditional_jumps): Use
+ vax casesi fallthru edge.
+ * cfglayout.c (cleanup_unconditional_jumps): Use
redirect_edge_succ_nodup. Do not delete ADDR_VEC insns as dead.
* cfgrtl.c (force_nonfallthru_and_redirect): Place redirection
block after ADDR_VEC.
@@ -255,7 +260,7 @@ Thu Jun 20 17:25:29 CEST 2002 JAn HUbicka <jh@suse.cz>
(sparclite-*-elf*): Likewise.
(sparc86x-*-elf*): Likewise.
(sparc64-*-elf*): Likewise.
-
+
* config/i386/sol2.h (PREFERRED_DEBUGGING_TYPE): Moved to
config/sol2.h.
(ASM_SPEC): Override config/sol2.h version for now.
@@ -270,7 +275,7 @@ Thu Jun 20 17:25:29 CEST 2002 JAn HUbicka <jh@suse.cz>
(SWITCH_TAKES_ARG, STDC_0_IN_SYSTEM_HEADERS): Likewise.
(ASM_CPU_SPEC): Define.
(SUBTARGET_EXTRA_SPECS): Define.
-
+
* config/sparc/sol2-bi.h (LONG_DOUBLE_TYPE_SIZE): Removed, already
in config/sparc/sol2.h.
(ASM_SPEC): Moved to config/sol2.h.
@@ -286,7 +291,7 @@ Thu Jun 20 17:25:29 CEST 2002 JAn HUbicka <jh@suse.cz>
(LINK_ARCH64_SPEC): Simplified.
(LINK_ARCH_SPEC): Redefined config/sol2.h version for 64-bit support.
(LINK_SPEC): Moved to config/sol2.h
-
+
* config/sparc/sol2.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Moved to
config/sol2.h.
Use BITS_PER_WORD for size.
@@ -302,7 +307,7 @@ Thu Jun 20 17:25:29 CEST 2002 JAn HUbicka <jh@suse.cz>
(SWITCH_TAKES_ARG, STDC_0_IN_SYSTEM_HEADERS): Likewise.
(TARGET_DEFAULT): Reordered to match config/sparc/sol2-bi.h version.
(TRANSFER_FROM_TRAMPOLINE): Moved to config/sol2.h
-
+
* config.gcc (i?86-*-solaris2*): Removed obsolete gas support.
* config/i386/sol2gas.h: Removed.
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c
index ff896fd93b1..6ed482c4277 100644
--- a/gcc/reg-stack.c
+++ b/gcc/reg-stack.c
@@ -2462,7 +2462,7 @@ convert_regs_exit ()
output_stack->top = value_reg_high - value_reg_low;
for (reg = value_reg_low; reg <= value_reg_high; ++reg)
{
- output_stack->reg[reg - value_reg_low] = reg;
+ output_stack->reg[value_reg_high - reg] = reg;
SET_HARD_REG_BIT (output_stack->reg_set, reg);
}
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 52b8c9b9989..9391915b733 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2002-06-23 Andreas Jaeger <aj@suse.de>
+
+ * gcc.c-torture/execute/complex-6.c: New.
+
2002-06-22 Neil Booth <neil@daikokuya.co.uk>
* gcc.dg/cpp/trad/comment-2.c. gcc.dg/cpp/trad/funlike-2.c,
@@ -47,7 +51,7 @@
2002-06-18 Hans-Peter Nilsson <hp@axis.com>
* gcc.c-torture/execute/20020615-1.c: Fix typo in comment.
-
+
2002-06-18 Aldy Hernandez <aldyh@redhat.com>
* gcc.c-torture/execute/simd-1.c: New.
@@ -145,7 +149,7 @@
2002-06-02 Richard Henderson <rth@redhat.com>
- * gcc.c-torture/execute/pure-1.c: Don't mark any of the
+ * gcc.c-torture/execute/pure-1.c: Don't mark any of the
test functions static.
2002-06-02 Andreas Jaeger <aj@suse.de>
diff --git a/gcc/testsuite/gcc.c-torture/execute/complex-6.c b/gcc/testsuite/gcc.c-torture/execute/complex-6.c
new file mode 100644
index 00000000000..bbb8c8d40aa
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/complex-6.c
@@ -0,0 +1,59 @@
+/* This test tests complex conjugate and passing/returning of
+ complex parameter. */
+
+#include <stdlib.h>
+#include <stdio.h>
+
+int err;
+
+#define TEST(TYPE, FUNC) \
+__complex__ TYPE \
+ctest_ ## FUNC (__complex__ TYPE x) \
+{ \
+ __complex__ TYPE res; \
+ \
+ res = ~x; \
+ \
+ return res; \
+} \
+ \
+void \
+test_ ## FUNC (void) \
+{ \
+ __complex__ TYPE res, x; \
+ \
+ x = 1.0 + 2.0i; \
+ \
+ res = ctest_ ## FUNC (x); \
+ \
+ if (res != 1.0 - 2.0i) \
+ { \
+ printf ("test_" #FUNC " failed\n"); \
+ ++err; \
+ } \
+}
+
+
+TEST(float, float)
+TEST(double, double)
+TEST(long double, long_double)
+TEST(int, int)
+TEST(long int, long_int)
+
+int
+main (void)
+{
+
+ err = 0;
+
+ test_float ();
+ test_double ();
+ test_long_double ();
+ test_int ();
+ test_long_int ();
+
+ if (err != 0)
+ abort ();
+
+ return 0;
+}