From 4e2b26aaa258ada5c20d19861655452354be3abc Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Sun, 17 Jun 2007 13:08:43 +0000 Subject: [PATCH] predicates.md (const_call_operand): Adjust comment. * config/m68k/predicates.md (const_call_operand): Adjust comment. (const_sibcall_operand): New. (sibcall_operand): Use it. * config/m68k/m68k.c (FL_FOR_isa_c): Not ISA_B compatible. (m68k_isas): ISAC does not imply FPU or EMAC. (override_options): Add ISA_C logic for symbolic jump & call. From-SVN: r125774 --- gcc/ChangeLog | 7 +++++++ gcc/config/m68k/m68k.c | 22 +++++++++++++++------- gcc/config/m68k/predicates.md | 10 ++++++++-- 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a51abb73c54..321e61627a7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -7,6 +7,13 @@ * config/m68k/m68k.c (all_isas): Remove FL_CF_FPU and FL_CF_EMAC from the entry for isac. + * config/m68k/predicates.md (const_call_operand): Adjust comment. + (const_sibcall_operand): New. + (sibcall_operand): Use it. + * config/m68k/m68k.c (FL_FOR_isa_c): Not ISA_B compatible. + (m68k_isas): ISAC does not imply FPU or EMAC. + (override_options): Add ISA_C logic for symbolic jump & call. + 2007-06-17 Eric Botcazou * config/sparc/sparc.c (sparc_vis_init_builtins): Retrieve the diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index 6607ae1c20d..d1ce578d099 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -233,7 +233,8 @@ struct gcc_target targetm = TARGET_INITIALIZER; #define FL_FOR_isa_aplus (FL_FOR_isa_a | FL_ISA_APLUS | FL_CF_USP) /* Note ISA_B doesn't necessarily include USP (user stack pointer) support. */ #define FL_FOR_isa_b (FL_FOR_isa_a | FL_ISA_B | FL_CF_HWDIV) -#define FL_FOR_isa_c (FL_FOR_isa_b | FL_ISA_C | FL_CF_USP) +/* ISA_C is not upwardly compatible with ISA_B. */ +#define FL_FOR_isa_c (FL_FOR_isa_a | FL_ISA_C | FL_CF_HWDIV | FL_CF_USP) enum m68k_isa { @@ -563,20 +564,27 @@ override_options (void) else if (TARGET_ID_SHARED_LIBRARY) /* All addresses must be loaded from the GOT. */ ; - else if (TARGET_68020 || TARGET_ISAB) + else if (TARGET_68020 || TARGET_ISAB || TARGET_ISAC) { if (TARGET_PCREL) - { - m68k_symbolic_call = "bsr.l %c0"; - m68k_symbolic_jump = "bra.l %c0"; - } + m68k_symbolic_call = "bsr.l %c0"; else { #if defined(USE_GAS) m68k_symbolic_call = "bsr.l %p0"; - m68k_symbolic_jump = "bra.l %p0"; #else m68k_symbolic_call = "bsr %p0"; +#endif + } + if (TARGET_ISAC) + /* No unconditional long branch */; + else if (TARGET_PCREL) + m68k_symbolic_jump = "bra.l %c0"; + else + { +#if defined(USE_GAS) + m68k_symbolic_jump = "bra.l %p0"; +#else m68k_symbolic_jump = "bra %p0"; #endif } diff --git a/gcc/config/m68k/predicates.md b/gcc/config/m68k/predicates.md index ae091f181ed..e62d426857b 100644 --- a/gcc/config/m68k/predicates.md +++ b/gcc/config/m68k/predicates.md @@ -159,7 +159,7 @@ } }) -;; A constant that can be used the address in a call or sibcall insn. +;; A constant that can be used the address in a call insn (define_predicate "const_call_operand" (ior (match_operand 0 "const_int_operand") (and (match_test "m68k_symbolic_call != NULL") @@ -170,9 +170,15 @@ (ior (match_operand 0 "const_call_operand") (match_operand 0 "register_operand"))) +;; A constant that can be used the address in a sibcall insn +(define_predicate "const_sibcall_operand" + (ior (match_operand 0 "const_int_operand") + (and (match_test "m68k_symbolic_jump != NULL") + (match_operand 0 "symbolic_operand")))) + ;; An operand that can be used as the address in a sibcall insn. (define_predicate "sibcall_operand" - (ior (match_operand 0 "const_call_operand") + (ior (match_operand 0 "const_sibcall_operand") (and (match_code "reg") (match_test "REGNO (op) == STATIC_CHAIN_REGNUM"))))