output rawinline calls in pic modes

This commit is contained in:
Wolfgang Thaller 2024-05-05 14:02:09 +02:00
parent d5e013f891
commit d073b6e52b
3 changed files with 27 additions and 0 deletions

View File

@ -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);

View File

@ -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"

View File

@ -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"))))