From f4e62fcfd3d22a51bc5945e6be8b9ac38e5acdc6 Mon Sep 17 00:00:00 2001 From: aj Date: Sun, 23 Jun 2002 05:30:14 +0000 Subject: * 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 --- gcc/ChangeLog | 23 ++++++---- gcc/reg-stack.c | 2 +- gcc/testsuite/ChangeLog | 8 +++- gcc/testsuite/gcc.c-torture/execute/complex-6.c | 59 +++++++++++++++++++++++++ 4 files changed, 80 insertions(+), 12 deletions(-) create mode 100644 gcc/testsuite/gcc.c-torture/execute/complex-6.c 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 + + * reg-stack.c (convert_regs_exit): Push the registers to stack in + proper order. + 2002-06-22 Ulrich Weigand PR middle-end/6963 @@ -29,12 +34,12 @@ 2002-06-21 Matt Thomas * 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 @@ -55,8 +60,8 @@ 2002-06-21 Richard Henderson * 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 (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 (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 (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 (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 + + * gcc.c-torture/execute/complex-6.c: New. + 2002-06-22 Neil Booth * gcc.dg/cpp/trad/comment-2.c. gcc.dg/cpp/trad/funlike-2.c, @@ -47,7 +51,7 @@ 2002-06-18 Hans-Peter Nilsson * gcc.c-torture/execute/20020615-1.c: Fix typo in comment. - + 2002-06-18 Aldy Hernandez * gcc.c-torture/execute/simd-1.c: New. @@ -145,7 +149,7 @@ 2002-06-02 Richard Henderson - * 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 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 +#include + +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; +} -- cgit v1.2.1