New syntax for IVMS prolog epilog size
Douglas B Rupp
rupp@gnat.com
Fri Sep 11 15:51:00 GMT 2009
Nick Clifton wrote:
> Hi Douglas,
>
>> From the HP Dwarf extensions manual:
>
> Hmm, this makes it sound like the new directive ought to be called
> something like:
>
> .dw_at_hp_prologue
>
>> If the value of DW_AT_HP_prologue has class constant, then the integer
>> value of the attribute gives the offset of the one and only prologue
>> end relative to the base of reference.
>>
>> -------------
>> Note: This is the case we are discussing above,
>
> [I am being lazy here and asking you rather than looking this up:] Is
> the integer value discussed above LEB128 encoded ?
No, the single prologue is not encoded. I've been using data4 because
that what I perceive the DEC "C" compiler to be using.
> If so then there is
> no need to worry about having a size modifier added to the
> .dw.at_hp_prologue directive.
>
> Also, if this integer value is the offset of the prologue end then why
> did your original gcc patch compute "(end - start) / 16 * 3" ? Or did I
> misread that ?
You didn't misread and it that's the offset from the beginning of the
function. "Start" was the function begin label, "End" the prologue end
label. I guess I'm not understanding your question.
>
>> but it gets more complicated for multiple prologues (and epilogues),
>> for which we need SLEB slot offsets, and possibly even addresses.
>> -------------
>
>
>> If the value of DW_AT_HP_prologue has class block, then the block
>> contains a sequence of values. The first value is a signed non-zero
>> LEB integer value. There are two cases:
>> 1.If the first value is positive, it is a count of the number of
>> signed LEB integer values that follow. Each such value is an
>> (instruction slot) offset relative to the base of reference to a
>> prologue end location.
>>
>> This case applies when there is more than one prologue end location,
>> but they are all in the same section as the base of reference.
>> 2.If the first value is negative, its absolute value is a count of the
>> number of addresses that follow. Each such address is a prologue end
>> location.
>
> The (theoretical) advantage to calling the new directive
> .dw_at_hp_prologue is that its syntax could be defined to handle these
> cases as well. Ie something like:
>
> .dw_at_hp_prologue <start_label>, <end_label> { , <start_label> ,
> <end_label> }
>
> Then the code could evaluate the list of labels. If there is only one
> pair then the first case applies. If there are multiple pairs and the
> start label is the same for all of them then the last case applies,
> otherwise the middle case applies.
>
> Cheers
> Nick
>
>
More information about the Binutils
mailing list