mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-24 17:29:38 +00:00
output rawinline calls in pic modes
This commit is contained in:
parent
d5e013f891
commit
d073b6e52b
@ -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);
|
||||
|
@ -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"
|
||||
|
@ -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"))))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user