This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH] x86 interrupt attribute patch [1/2]


Sorry, here is the right patch.

-----Original Message-----
From: Koval, Julia 
Sent: Wednesday, April 20, 2016 4:42 PM
To: 'gcc-patches@gcc.gnu.org' <gcc-patches@gcc.gnu.org>
Cc: Lu, Hongjiu <hongjiu.lu@intel.com>; 'vaalfreja@gmail.com' <vaalfreja@gmail.com>; 'ubizjak@gmail.com' <ubizjak@gmail.com>; 'law@redhat.com' <law@redhat.com>; Zamyatin, Igor <igor.zamyatin@intel.com>
Subject: [PATCH] x86 interrupt attribute patch [1/2]

Hi,
Here is the new version of interrupt attribute patch. Bootstraped/regtested for Linux/x86_64. Ok for trunk?
    
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.

Attachment: patch.txt
Description: patch.txt


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]