This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/14] [x86_64] Vector math functions (vector cos)
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Andrew Senkevich <andrew dot n dot senkevich at gmail dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Mon, 18 May 2015 17:27:39 +0000
- Subject: Re: [PATCH 1/14] [x86_64] Vector math functions (vector cos)
- Authentication-results: sourceware.org; auth=none
- References: <CAMXFM3t+v7zYEmvWQxV9aRmJB6Ag2hQgQ56cZJTDy=siRBszDw at mail dot gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1504301541120 dot 23221 at digraph dot polyomino dot org dot uk> <CAMXFM3sVJ6vkEF7RqrrHczJSdF_-gr9Xog-zFcG3rjhOqgqjDw at mail dot gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1505151616460 dot 21212 at digraph dot polyomino dot org dot uk> <CAMXFM3tfZKDJtjhJ1d=LQ=WALJBBx5ABJXoS5ycBORii78FkEg at mail dot gmail dot com>
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