This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] doc - document how gcc relies on the length of an asm

>>>>> "Falk" == Falk Hueffner <> writes:

 Falk> Richard Earnshaw <> writes:
 >> This is a documentation update in response to PR 11442 where the
 >> user had put a .skip directive in an ASM statement and this broke
 >> GCC's asm size estimation rules.  It tries to make it clear that
 >> this is a user error that will only be detected by the assembler.

 Falk> It should be mentioned that this might not only lead to
 Falk> assembler errors, but also to silently generated bad code (PR
 Falk> 12108). 

That's an assembler bug, right?

 Falk> By the way, would it be possible to assert gcc's guess for the
 Falk> size of an asm by putting a label before and after it and
 Falk> emitting an ".assert" directive or something? That might avoid
 Falk> such errors.

Not a bad idea so long as it's a range check (i.e., assert that the
estimate is a correct upper bound).  Sometimes it's quite hard to make
the estimate exact, so the backend ends up producing a reasonably
tight upper bound.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]