[PATCH] Add type_unknown/type_executable/type_pic to output_type
Alan Modra
amodra@gmail.com
Mon Aug 24 03:00:00 GMT 2015
On Sun, Aug 23, 2015 at 07:41:09AM -0700, H.J. Lu wrote:
> My patch improves the generated code by changing
>
> movzbl (%rax), %eax
> movl %eax, %edx
> andl $3, %edx
> cmpb $1, %dl
>
> to
>
> movzbl (%rax), %eax
> testb $1, %al
>
> for bfd_link_executable (flinfo->info).
This is due to gcc tree-ssa-reassoc.c not considering a single range
test for optimisation to a bit test. As I said previously, we could
work around this by using
#define bfd_link_executable(info) (((info)->type & 2) == 0)
That generates good code, and doesn't regress other places like your
patch does (I'm assuming regressions from the size increase), but it
just doesn't seem worth applying this sort of micro-optimisation.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list