diff --git a/gcc/gcc/config/m68k/m68k-protos.h b/gcc/gcc/config/m68k/m68k-protos.h index acfd064308..36f3a4c8ed 100644 --- a/gcc/gcc/config/m68k/m68k-protos.h +++ b/gcc/gcc/config/m68k/m68k-protos.h @@ -116,3 +116,5 @@ extern int m68k_hard_regno_rename_ok(unsigned int, unsigned int); extern void m68k_write_macsbug_name(FILE *, const char *, tree decl); extern poly_int64 m68k_push_rounding (poly_int64); + +extern bool m68k_rawinline_p (rtx x); diff --git a/gcc/gcc/config/m68k/m68k.cc b/gcc/gcc/config/m68k/m68k.cc index c3a5b8ec27..e72b77d8ee 100644 --- a/gcc/gcc/config/m68k/m68k.cc +++ b/gcc/gcc/config/m68k/m68k.cc @@ -7408,4 +7408,20 @@ m68k_promote_function_mode (const_tree type, machine_mode mode, return mode; } +bool +m68k_rawinline_p (rtx x) +{ + if(GET_CODE (x) == SYMBOL_REF) + { + tree decl = SYMBOL_REF_DECL(x); + if(decl) + { + tree attr = lookup_attribute ("raw_inline", TYPE_ATTRIBUTES( TREE_TYPE(decl) )); + if(attr) + return true; + } + } + return false; +} + #include "gt-m68k.h" diff --git a/gcc/gcc/config/m68k/predicates.md b/gcc/gcc/config/m68k/predicates.md index f8dedd9f83..4de1c5ae9b 100644 --- a/gcc/gcc/config/m68k/predicates.md +++ b/gcc/gcc/config/m68k/predicates.md @@ -156,9 +156,18 @@ } }) + +(define_predicate "rawinline_operand" + (match_code "symbol_ref") +{ + return m68k_rawinline_p(op); +}) + + ;; A constant that can be used the address in a call insn (define_predicate "const_call_operand" (ior (match_operand 0 "const_int_operand") + (match_operand 0 "rawinline_operand") (and (match_test "m68k_symbolic_call != NULL") (match_operand 0 "symbolic_operand"))))