diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5f3ea3a01649dcd389372db2d7878c7688c1b1c6..665e70622ba68a85c7a7cadc18c0447d9a84fc9a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-11-26 David Edelsohn <edelsohn@gnu.org> + + * rs6000.c (output_mi_thunk): Handle minimal-toc and call + correct function on AIX. + 2001-11-26 Alexandre Oliva <aoliva@redhat.com> * toplev.c (process_options): Don't force diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 7f524f8735c5b24a0808f9d597e00b928e13b8d5..b2ff972a714b17881cdfe4af70548074ca8e36a5 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -8173,13 +8173,15 @@ output_mi_thunk (file, thunk_fndecl, delta, function) ASM_OUTPUT_INTERNAL_LABEL (file, "Lthunk", labelno); labelno++; - /* Note, MINIMAL_TOC doesn't make sense in the case of a - thunk, since there will be only one TOC entry for this - function. */ - fputs ("\t.tc\t", file); - assemble_name (file, buf); - fputs ("[TC],", file); - assemble_name (file, buf); + if (TARGET_MINIMAL_TOC) + fputs (TARGET_32BIT ? "\t.long " : DOUBLE_INT_ASM_OP, file); + else + { + fputs ("\t.tc ", file); + assemble_name (file, fname); + fputs ("[TC],", file); + } + assemble_name (file, fname); putc ('\n', file); text_section (); asm_fprintf (file, (TARGET_32BIT) ? "\t{l|lwz} %s," : "\tld %s,", r12);