Update TARGET_FUNCTION_INCOMING_ARG documentation
commite9f82fd3babf682fb126a8359715dca8c3c4660b
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 2 Jun 2016 13:46:20 +0000 (2 13:46 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 2 Jun 2016 13:46:20 +0000 (2 13:46 +0000)
treeb0b73d22e0c8a955f7f397790e174ba0ffe5305b
parent9ae89a4e68dfedb678ed4f6413ba27ec187a7604
Update TARGET_FUNCTION_INCOMING_ARG documentation

On x86, interrupt handlers are only called by processors which push
interrupt data onto stack at the address where the normal return address
is.  Since interrupt handlers must access interrupt data via pointers so
that they can update interrupt data, the pointer argument is passed as
"argument pointer - word".

TARGET_FUNCTION_INCOMING_ARG defines how callee sees its argument.
Normally it returns REG, NULL, or CONST_INT.  This patch adds arbitrary
address computation based on hard register, which can be forced into a
register, to the list.

When copying an incoming argument onto stack, assign_parm_setup_stack
has:

if (argument in memory)
  copy argument in memory to stack
else
  move argument to stack

Since an arbitrary address computation may be passed as an argument, we
change it to:

if (argument in memory)
  copy argument in memory to stack
else
  {
    if (argument isn't in register)
      force argument into a register
    move argument to stack
  }

* function.c (assign_parm_setup_stack): Force source into a
register if needed.
* target.def (function_incoming_arg): Update documentation to
allow arbitrary address computation based on hard register.
* doc/tm.texi: Regenerated.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237037 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/doc/tm.texi
gcc/function.c
gcc/target.def