From: Kazuhiro Inaoka Date: Wed, 7 Jul 2004 11:11:08 +0000 (+0000) Subject: re PR c++/1679 (c++ -v -save-temps -DHAVE_CONFIG_H -I. -I. -I. -I./.. -isystem /usr... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=767dec6b106a8c3f99826670bd2429c71728bfea;p=gcc.git re PR c++/1679 (c++ -v -save-temps -DHAVE_CONFIG_H -I. -I. -I. -I./.. -isystem /usr/local/X11/include -DNDEBUG -O2 -g -W -Wall -trigraphs -c HelpCB.C) PR target/1679. * config/m32r/m32r.c (m32r_function_symbol): New function: Generate a symbol name RTX with the correct m32r specific flags set. (block_move_call): Use new function to generate correct symbol. * config/m32r/m32r-protos.h: Add prototype for new funcion. * config/m32r/m32r.h (INITIALIZE_TRAMPOLINE): Use the new function. From-SVN: r84200 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 48e5f0ddbba..35a65f6779f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2004-07-06 Kazuhiro Inaoka + + PR target/1679. + * config/m32r/m32r.c (m32r_function_symbol): New function: + Generate a symbol name RTX with the correct m32r specific flags + set. + (block_move_call): Use new function to generate correct symbol. + * config/m32r/m32r-protos.h: Add prototype for new funcion. + * config/m32r/m32r.h (INITIALIZE_TRAMPOLINE): Use the new + function. + 2004-07-07 Nathan Sidwell * tree.h (TYPE_BINFO_OFFSET, TYPE_BINFO_VTABLE, diff --git a/gcc/config/m32r/m32r-protos.h b/gcc/config/m32r/m32r-protos.h index 4bc4c6c8ca7..17ab18d6c36 100644 --- a/gcc/config/m32r/m32r-protos.h +++ b/gcc/config/m32r/m32r-protos.h @@ -59,6 +59,7 @@ extern int m32r_hard_regno_rename_ok (unsigned int, unsigned int); extern int m32r_legitimate_pic_operand_p (rtx); extern rtx m32r_legitimize_pic_address (rtx, rtx); extern rtx m32r_return_addr (int); +extern rtx m32r_function_symbol (const char *); #ifdef HAVE_MACHINE_MODES extern int call_address_operand (rtx, Mmode); diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c index 9de4eb34d28..44d67d3a22b 100644 --- a/gcc/config/m32r/m32r.c +++ b/gcc/config/m32r/m32r.c @@ -2590,6 +2590,29 @@ m32r_not_same_reg (rtx a, rtx b) } +rtx +m32r_function_symbol (const char *name) +{ + int extra_flags = 0; + enum m32r_model model; + rtx sym = gen_rtx_SYMBOL_REF (Pmode, name); + + if (TARGET_MODEL_SMALL) + model = M32R_MODEL_SMALL; + else if (TARGET_MODEL_MEDIUM) + model = M32R_MODEL_MEDIUM; + else if (TARGET_MODEL_LARGE) + model = M32R_MODEL_LARGE; + else + abort (); /* Shouldn't happen. */ + extra_flags |= model << SYMBOL_FLAG_MODEL_SHIFT; + + if (extra_flags) + SYMBOL_REF_FLAGS (sym) |= extra_flags; + + return sym; +} + /* Use a library function to move some bytes. */ static void @@ -2601,7 +2624,7 @@ block_move_call (rtx dest_reg, rtx src_reg, rtx bytes_rtx) && GET_MODE (bytes_rtx) != Pmode) bytes_rtx = convert_to_mode (Pmode, bytes_rtx, 1); - emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "memcpy"), 0, + emit_library_call (m32r_function_symbol ("memcpy"), 0, VOIDmode, 3, dest_reg, Pmode, src_reg, Pmode, convert_to_mode (TYPE_MODE (sizetype), bytes_rtx, TYPE_UNSIGNED (sizetype)), diff --git a/gcc/config/m32r/m32r.h b/gcc/config/m32r/m32r.h index 14f266c0949..0f119447a20 100644 --- a/gcc/config/m32r/m32r.h +++ b/gcc/config/m32r/m32r.h @@ -1253,7 +1253,7 @@ L2: .word STATIC emit_insn (gen_flush_icache (validize_mem (gen_rtx_MEM (SImode, TRAMP)),\ GEN_INT (m32r_cache_flush_trap) )); \ else if (m32r_cache_flush_func && m32r_cache_flush_func[0]) \ - emit_library_call (gen_rtx_SYMBOL_REF (Pmode, m32r_cache_flush_func), \ + emit_library_call (m32r_function_symbol (m32r_cache_flush_func), \ 0, VOIDmode, 3, TRAMP, Pmode, \ GEN_INT (TRAMPOLINE_SIZE), SImode, \ GEN_INT (3), SImode); \