diff options
author | nickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-03 16:25:29 +0000 |
---|---|---|
committer | nickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-03 16:25:29 +0000 |
commit | 67e66e16928468050d4593ada24a16013fe3ca20 (patch) | |
tree | e2ed6b0428b652d000e627bca0a843d199164895 /gcc/testsuite/gcc.target/rx | |
parent | 98f767b793f057165c877f91c46fe0bfd4ee7124 (diff) | |
download | gcc-67e66e16928468050d4593ada24a16013fe3ca20.tar.gz |
* config/rx/predicates.md (rx_store_multiple_vector): Reverse
order of expected registers.
(rx_load_multiple_vector): Likewise.
(rx_rtsd_vector): Likewise.
* config/rx/rx.c (rx_cpu_type): New variable.
(rx_print_operand): Fix bug printing 64-bit constant values.
(rx_emit_stack_pushm): Reverse order of pushed registers.
(gen_rx_store_vector): Likewise.
(is_fast_interrupt_func): Only accept "fast_interrupt" as the
attribute name.
(is_exception_func): Rename to is_interrupt_func and only accept
"interrupt" as the attribute name.
(rx_get_stack_layout): Use new function name.
(rx_func_attr_inlinable): Likewise.
(rx_attribute_table): Remove "exception".
(rx_expand_prologue): If necessary push the accumulator register
in the prologue of interrupt functions.
(rx_expand_epilogue): If necessary pop the accumulator.
(rx_builtins): Add RX_BUILTIN_MVTIPL.
(rx_expand_builtin_stz): Remove.
(rx_expand_builtin_mvtipl): New function.
(rx_init_builtins): Handle RX_BUILTIN_MVTIPL.
(rx_expand_builtin): Likewise.
(rx_enable_fpu): New variable.
(rx_handle_option): Handle -fpu, -nofpu, -mcpu and -patch.
* config/rx/rx.h (TARGET_CPU_CPP_BUILTINS): Assert machine based
on rx_cpu_type. Define __RX_FPU_INSNS__ if FPU insns are allowed.
(enum rx_cpu_types): Define.
(ASM_SPEC): Pass -m32bit-doubles on to assembler.
(INCOMING_FRAME_SP_OFFSET): Define.
(ARG_POINTER_CFA_OFFSET): Define.
(FRAME_POINTER_CFA_OFFSET): Define.
(OVERRIDE_OPTIONS): Enable fast math if RX FPU insns are enabled.
(ALLOW_RX_FPU_INSNS): Define.
* config/rx/rx.md: Test ALLOW_RX_FPU_INSNS instead of
fast_math_flags_set_p.
(UNSPEC_BUILTIN_MVTIPL): Define.
(revl): Rename to bswapsi2.
(bswaphi2): New pattern.
(mvtachi): Mark as volatile because it uses a register unknown to
GCC.
(mvtaclo): Likewise.
(racw): Likewise.
(mvtc): Remove clobber of cc0.
(mvtcp): Delete.
(opecp): Delete.
* config/rx/rx.opt (mieee): Remove.
(fpu): Add.
(nofpu): Add.
(mcpu=): Add.
(patch=): Add.
(msave-acc-in-interrupts): Add.
* config/rx/t-rx (MULTILIB_OPTIONS): Change default to 64bit
doubles.
(MULTILIB_DIRS): Likewise.
(MULTILIB_MATCHES): Treat -fpu as an alias for -m32bit-doubles.
* doc/extend.texi: Remove description of "exception" function
attribute.
* doc/invoke.texi: Document -fpu, -nofpu, -mcpu=, -patch= and
-msave-acc-in-interrupts options.
* gcc.target/rx/builtins,c: Remove redundant tests.
Add test of MVTIPL instruction.
* gcc.target/rx/interrupts.c: Use fast_interrupt and interrupt
function attributes. Add -msave-acc-in-interrupts option to the
command line.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153853 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target/rx')
-rw-r--r-- | gcc/testsuite/gcc.target/rx/builtins.c | 14 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/rx/interrupts.c | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/rx/rx-abi-function-tests.c | 2 |
3 files changed, 19 insertions, 7 deletions
diff --git a/gcc/testsuite/gcc.target/rx/builtins.c b/gcc/testsuite/gcc.target/rx/builtins.c index 07448024b44..2a6241d7cce 100644 --- a/gcc/testsuite/gcc.target/rx/builtins.c +++ b/gcc/testsuite/gcc.target/rx/builtins.c @@ -17,7 +17,6 @@ to correctly set the psw flags. */ int saturate_add (int, int) __attribute__((__noinline__)); -int subtract_with_borrow (int, int, int) __attribute__((__noinline__)); int exchange (int, int) __attribute__((__noinline__)); int @@ -33,6 +32,13 @@ saturate_add (int arg1, int arg2) return __builtin_rx_sat (arg1); } +int +exchange (int arg1, int arg2) +{ + arg1 = __builtin_rx_xchg (arg2); + return arg1; +} + long multiply_and_accumulate (long arg1, long arg2, long arg3) { @@ -157,3 +163,9 @@ rmpa (int * multiplicand, int * multiplier, int num) { __builtin_rx_rmpa (); } + +void +set_interrupts (void) +{ + __builtin_mvtipl (3); +} diff --git a/gcc/testsuite/gcc.target/rx/interrupts.c b/gcc/testsuite/gcc.target/rx/interrupts.c index 910e870f11b..cdc4903ded8 100644 --- a/gcc/testsuite/gcc.target/rx/interrupts.c +++ b/gcc/testsuite/gcc.target/rx/interrupts.c @@ -1,10 +1,10 @@ /* { dg-do compile } */ -/* { dg-options "-mint-register=3" } */ +/* { dg-options "-mint-register=3 -msave-acc-in-interrupts" } */ /* Verify that the RX specific function attributes work. */ +void fast_interrupt (void) __attribute__((__fast_interrupt__)); void interrupt (void) __attribute__((__interrupt__)); -void exception (void) __attribute__((__exception__)); int naked (int) __attribute__((__naked__)); int flag = 0; @@ -13,16 +13,16 @@ int flag = 0; by the -fixed-xxx gcc command line option. Returns via RTFI. */ void -interrupt (void) +fast_interrupt (void) { flag = 1; } -/* Exception handler. Must preserve any register it uses, even +/* Interrupt handler. Must preserve any register it uses, even call clobbered ones. Returns via RTE. */ void -exception (void) +interrupt (void) { switch (flag) { diff --git a/gcc/testsuite/gcc.target/rx/rx-abi-function-tests.c b/gcc/testsuite/gcc.target/rx/rx-abi-function-tests.c index 0c4ec3f6b05..e07ff71a007 100644 --- a/gcc/testsuite/gcc.target/rx/rx-abi-function-tests.c +++ b/gcc/testsuite/gcc.target/rx/rx-abi-function-tests.c @@ -1,6 +1,6 @@ /* { dg-do run } */ /* { dg-options "-msim" } */ -/* Note: The -msim abiove is actually there to override the default +/* Note: The -msim above is actually there to override the default options which include -ansi -pendantic and -Wlong-long... */ extern int printf (const char *, ...); |