mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Alex Dowad <alexinbeijing@gmail.com>
To: musl@lists.openwall.com
Subject: Re: [PATCH v2] First prototype of script which adds CFI directives to x86 asm
Date: Wed, 13 May 2015 19:36:46 +0200	[thread overview]
Message-ID: <20150513173646.GA2951@alex-ThinkPad-L530> (raw)

Thanks to Szabolcs Nagy for your reply!

> it might make sense to have a make rule that produces the cfi asm for inspection

Any opinions from others on this?

> i wonder if a configure check for .cfi support should be added: in theory
> an assembler may not support it (tcc?)

Sure, I can do this. If debugging is not enabled, it doesn't make much sense
to use the CFI script either.

Would adding another variable to config.mak, something like GENERATE_CFI=yes
(or something like that) be acceptable?

> move this loop to BEGIN so it only runs at startup

I tried benchmarking and there is no measurable impact on performance either way.
I would prefer to leave the loop where it is, to make the script easier to read
(keeping related code together).

I added 'i' to the argument list to make it local -- thanks for the tip.

> i think hex conversion for $123 is wrong in i386 asm

Fixed in the v2.

> allow whitespace between ',' and the regs

Fixed, thanks.

> (missing .cfi_startproc/endproc might be problematic i think
> because .cfi directives can be rejected outside of startproc/endproc)

Yes, that's why the script doesn't emit them unless it is inside a startproc/endproc pair.

Regarding the concern with .type @function, I am trying a different strategy now
for identifying the beginning and end of functions. Please see the v3 (soon to be
posted).

Thanks,
Alex


             reply	other threads:[~2015-05-13 17:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-13 17:36 Alex Dowad [this message]
2015-05-14  2:32 ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150513173646.GA2951@alex-ThinkPad-L530 \
    --to=alexinbeijing@gmail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).