mirror of
https://github.com/autc04/Retro68.git
synced 2025-01-12 10:31:01 +00:00
avoid transformations on __magic_inline functions
This commit is contained in:
parent
a79c598392
commit
390818e425
@ -181,7 +181,21 @@ prepare_call_address (tree fndecl, rtx funexp, rtx static_chain_value,
|
|||||||
else if (! sibcallp)
|
else if (! sibcallp)
|
||||||
{
|
{
|
||||||
#ifndef NO_FUNCTION_CSE
|
#ifndef NO_FUNCTION_CSE
|
||||||
if (optimize && ! flag_no_function_cse)
|
int is_magic = 0;
|
||||||
|
tree decl = fndecl;//SYMBOL_REF_DECL(funexp);
|
||||||
|
if(decl)
|
||||||
|
{
|
||||||
|
if(DECL_NAME(decl))
|
||||||
|
{
|
||||||
|
if(!strncmp(IDENTIFIER_POINTER (DECL_NAME (decl)), "__magic_inline_", 15))
|
||||||
|
{
|
||||||
|
is_magic = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fprintf(stderr, "CSE?: %s\n", IDENTIFIER_POINTER (DECL_NAME (decl)));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (optimize && ! flag_no_function_cse && !is_magic)
|
||||||
funexp = force_reg (Pmode, funexp);
|
funexp = force_reg (Pmode, funexp);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -2437,6 +2437,21 @@ legitimize_pic_address (rtx orig, enum machine_mode mode ATTRIBUTE_UNUSED,
|
|||||||
/* First handle a simple SYMBOL_REF or LABEL_REF */
|
/* First handle a simple SYMBOL_REF or LABEL_REF */
|
||||||
if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
|
if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
|
||||||
{
|
{
|
||||||
|
if(GET_CODE (orig) == SYMBOL_REF)
|
||||||
|
{
|
||||||
|
tree decl = SYMBOL_REF_DECL(orig);
|
||||||
|
if(decl)
|
||||||
|
{
|
||||||
|
if(DECL_NAME(decl))
|
||||||
|
{
|
||||||
|
if(!strncmp(IDENTIFIER_POINTER (DECL_NAME (decl)), "__magic_inline_", 15))
|
||||||
|
{
|
||||||
|
return orig;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//fprintf(stderr, "Hello: %s\n", IDENTIFIER_POINTER (DECL_NAME (decl)));
|
||||||
|
}
|
||||||
|
}
|
||||||
gcc_assert (reg);
|
gcc_assert (reg);
|
||||||
|
|
||||||
pic_ref = m68k_wrap_symbol_into_got_ref (orig, RELOC_GOT, reg);
|
pic_ref = m68k_wrap_symbol_into_got_ref (orig, RELOC_GOT, reg);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user