This is the mail archive of the gcc@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]

Partial Regs


Hi,

Im trying to setup gcc to pass BLKmode value partially in regs (as many as
possible), and the remainder on the stack. Suppose I have a blk mode value
which has passes the first word in r5, and the remaining words on the
stack. Am I right in saying:

Function_arg should return a parallel expr of the form:

 (parallel:BLK[
        (expr_list (nil)
            (const_int 2 [0x2]))
        (expr_list (reg:HI 5 R5)
            (const_int 0 [0x0]))
    ] )

(i.e., the remainder of the argument goes on the stack at position 2,
whilst the first word of the argument goes in R5)

Define partial_nregs to return 1 (i.e., one register).

When I do the above, the caller still pushes the first word onto the stack
(although it does pass it in a register as well)? i thought the idea of
using partial_nregs was that it didn't pass values on the stack if they
were in registers?

Thanks,
 Dan.

===============================================================================
Dan Towner


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