RFA: MN10300: Add mi_thunk support

Nick Clifton nickc@redhat.com
Tue Jan 26 12:22:00 GMT 2010


Hi Jeff, HI Alex,

  A customer recently noticed that the MN10300 port does not support MI
  THUNKS.  The patch below adds this support.

  Whilst implementing this code I also noticed that a couple of comments
  in the mn10300.h header file stated that the port does not pass any
  arguments in registers, when in fact it uses d0 and d1.  So the patch
  also fixes this and updates function_arg() to make use of the newly
  defined FIRST_ARGUMENT_REGNUM.

  Tested without regressions on a mn10300-elf toolchain.

  OK to apply ?

Cheers
  Nick Clifton

gcc/ChangeLog
2010-01-26  Nick Clifton  <nickc@redhat.com>

	* config/mn10300/mn10300.c (TARGET_ASM_OUTPUT_MI_THUNK): Define.
        (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Define.
        (function_arg): Use NULL_RTX and FIRST_ARGUMENT_REGNUM.
        (mn10300_asm_output_mi_thunk): New function.
        * config/mn10300/mn10300.h (FIRST_ARGUMENT_REGNUM): Define.
        (FUNCTION_ARG_REGNO_P): Fix comment.  Accept d0 and d1.
        (FUNCTION_ARG): Delete incorrect comment.

gcc/testsuite/ChangeLog
2010-01-26  Nick Clifton  <nickc@redhat.com>

	* g++.old-deja/g++.jason/thunk3.C: This test now passes on the
	MN10300 target.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mn10300.patch
Type: text/x-patch
Size: 6366 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100126/38084161/attachment.bin>


More information about the Gcc-patches mailing list