This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: demand_empty_rest_of_line and ignore_rest_of_line


Ian Lance Taylor <ian@wasabisystems.com> writes:

> Can you give some examples of how pre-scrubbed code is harder to read?

For me, it really is all about the whitespace.  Here's a fragment of
x86 assembly as currently generated -

main:
        pushl   %ebp
        movl    $1, %eax
        movl    %esp, %ebp
        pushl   %ebx
        subl    $36, %esp
        andl    $-16, %esp
        movl    %eax, 4(%esp)
        movl    $13, (%esp)
        call    signal
        movl    $17, (%esp)
        movl    $1, %eax
        movl    %eax, 4(%esp)
        call    signal

and as it would be if prescrubbed:

main:
        pushl %ebp
        movl $1,%eax
        movl %esp,%ebp
        pushl %ebx
        subl $36,%esp
        andl $-16,%esp
        movl %eax,4(%esp)
        movl $13,(%esp)
        call signal
        movl $17,(%esp)
        movl $1,%eax
        movl %eax,4(%esp)
        call signal

The denser packing, and the lack of a nicely lined up arguments field,
mean substantially more mental effort just to see what it's doing.

zw


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