Re: [PATCH 08/11] x86: use asm .macro instead of cpp #define in entry_32.S

Ingo Molnar
2009-02-10T11:12:26Z

* Jeremy Fitzhardinge <jeremy@goop.org> wrote:

> Tejun Heo wrote:
>> Hmm... I originally did the conversion because I had some .if trick in
>> SAVE_ALL which got removed later. Even after the removal, it
>> generally looked like a good idea as x86_64 asm was primarily using
>> .macro too. I do like being able to see the post-processing output of
>> cpp too but for assembler disassembling the output often seem to give
>> enough clue,
>
> That's assuming that the file assembles. But if you're trying to assemble
> and the best error the assembler comes up with is "bad operand" on the line
> where you're using the macro, its extremely frustrating trying to work out
> where the problem actually lies.

Yeah, i had that experience with GAS usability with all the CFI restructuring
we did.

But it should be pretty rare that we come up with instructions that do not
assemble - and even rarer that we come up with a _lot_ of new instructions
that do not assemble. The trick i used was to remove bits of the macro to
hone in on the bad instruction/construct. Stone-age tool but works.

Ingo