[PATCH 1/14] [x86_64] Vector math functions (vector cos)
Joseph Myers
joseph@codesourcery.com
Mon May 18 21:06:00 GMT 2015
On Mon, 18 May 2015, Andrew Senkevich wrote:
> How to calculate offset for .cfi_offset directive after f.e. movq
> %r12, 168(%rsp)?
I think you'll need to use .cfi_escape in order to generate
DW_CFA_expression describing the register as saved relative to %rsp
instead of relative to the CFA. Something like:
DW_CFA_expression
uleb128 register number (as in the x86_64 ABI)
uleb128 length of what follows
DW_OP_drop
DW_OP_breg7 (%rsp is register 7)
sleb128 offset from %rsp
appropriately encoded by hand and entered with .cfi_escape (with
appropriate comments saying what operations are being encoded). You could
probably write an assembler macro to do the encoding (though if the
offsets in question don't all have the same length when encoded as
sleb128, that complicates the macro a bit).
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list