Re: [patch] fix profiling in glibc for Linux/MIPS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Daniel Jacobowitz wrote:
> _mcount was doing awful things to its caller's stack frame.

Maybe I'm missing something, but both the old and the new code
add 8 byte more to sp than they subtracted before. How is this
supposed to work?

[snip]
> I think this is close enough; it only adds
> one instruction.  Is this OK?

Why do you save and restore $6, $7, seemingly without using them?

> Do I need a "nop" after the subu?

It works here since it is expanded in an

	addiu $29,$29,-40

which is executed in one cycle. The usual suspects for hazards
to be NOPed are load/store insns and branches.

[snip]
> +        "sw $31,20($29);" \
>          "move $5,$31;" \
>          "jal __mcount;" \
>          "move $4,$1;" \
            ^
Some stylistic issue: In ".set noreorder" assembly it helps to
indent the insns in a branch delay slot by one blank to avoid
confusion about their non-sequential nature.


Thiemo


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux