Discussion:
New ARM testsuite failures
Nick Clifton
2018-11-26 09:32:19 UTC
Permalink
Hi Andre,

I am seeing a new regression in the binutils testsuite:

GAS REGRESSION: Local BLX instructions in Thumb

This is for "arm-netbsdelf" and "arm-nto" configurations.

Please could you have a look at them ?

Cheers
Nick
Andre Vieira (lists)
2018-11-26 10:53:56 UTC
Permalink
Post by Nick Clifton
Hi Andre,
GAS REGRESSION: Local BLX instructions in Thumb
This is for "arm-netbsdelf" and "arm-nto" configurations.
Please could you have a look at them ?
Cheers
Nick
Hi Nick,

I'll have a look. At first sight it seems the other configurations
change a bl from arm to thumb into blx and arm-netbsdelf and arm-nto
don't. I haven't looked at what code does this, but I'll go do some more
digging. I am also surprised it does so without warning, whereas when it
transforms a blx into a bl it does warn.

Anyhow, I'm having a look and will come back to you. No good deed goes
unpunished ;)

Kind Regards,
Andre
Andre Vieira (lists)
2018-11-29 11:40:32 UTC
Permalink
Post by Andre Vieira (lists)
Post by Nick Clifton
Hi Andre,
GAS REGRESSION: Local BLX instructions in Thumb
This is for "arm-netbsdelf" and "arm-nto" configurations.
Please could you have a look at them ?
Cheers
Nick
Hi Nick,
I'll have a look. At first sight it seems the other configurations
change a bl from arm to thumb into blx and arm-netbsdelf and arm-nto
don't. I haven't looked at what code does this, but I'll go do some more
digging. I am also surprised it does so without warning, whereas when it
transforms a blx into a bl it does warn.
Anyhow, I'm having a look and will come back to you. No good deed goes
unpunished ;)
Kind Regards,
Andre
Hi Nick,

Sorry for the delay, I had a look at this and it seems the code that
transforms bl->blx if it can detect a state change is guarded by
"OBJ_ELF". Also it will only do this if the target label is known to be
a function, i.e. it needs '.type <target_label>, %foo' directive to do
the transformation.

This left me stuck though because:
1) I don't understand why it matters if a target is ELF or not when
making this transformation, I heard it might be because of some non-elf
targets having to perform state changes in a slightly different manner?
2) Should arm-netbsdelf and/or arm-nto be 'elf'? Specially the first
lead me to think yes, as for the second I have no idea.

I am OK with not answering the first question, but if someone familiar
with arm-netbsdelf and arm-nto could come back to me about this,
otherwise I'll have to skip the test for both.

Cheers,
Andre
Nick Clifton
2018-11-29 12:25:53 UTC
Permalink
Hi Andre,
Post by Andre Vieira (lists)
No good deed goes unpunished ;)
So true. So true. :-)
Post by Andre Vieira (lists)
1) I don't understand why it matters if a target is ELF or not when
making this transformation, I heard it might be because of some non-elf
targets having to perform state changes in a slightly different manner?
I think that it is because with non-ELF targets you cannot tell if a label
is a function entry point or some other kind of branch destination.
Post by Andre Vieira (lists)
2) Should arm-netbsdelf and/or arm-nto be 'elf'? Specially the first
lead me to think yes, as for the second I have no idea.
Yes and yes. (NTO is a form of ELF format used by QNX RTOS). [Aargh acronym overload!]

Cheers
Nick
Andre Simoes Dias Vieira
2018-11-29 15:51:34 UTC
Permalink
Hi Nick,

I was wrong, got thrown off by some dodgy debugging, it's not because of OBJ_ELF, they are both correctly configured as elf targets. As I said before GAS only decides to transform blx -> bl if it can tell whether the target function is an arm/thumb function depending on whether its in thumb/arm mode. The code that checks this requires arm_is_eabi () to return true and currently arm-netbsdelf and arm-nto don't, Im guessing there is a good reason for that. I currently think it's best to skip this test for these targets. I'll provide a patch soon.

Cheers,
Andre

________________________________________
From: Nick Clifton <***@redhat.com>
Sent: Thursday, November 29, 2018 12:25:53 PM
To: Andre Simoes Dias Vieira; ***@sourceware.org
Subject: Re: New ARM testsuite failures

Hi Andre,
Post by Andre Vieira (lists)
No good deed goes unpunished ;)
So true. So true. :-)
Post by Andre Vieira (lists)
1) I don't understand why it matters if a target is ELF or not when
making this transformation, I heard it might be because of some non-elf
targets having to perform state changes in a slightly different manner?
I think that it is because with non-ELF targets you cannot tell if a label
is a function entry point or some other kind of branch destination.
Post by Andre Vieira (lists)
2) Should arm-netbsdelf and/or arm-nto be 'elf'? Specially the first
lead me to think yes, as for the second I have no idea.
Yes and yes. (NTO is a form of ELF format used by QNX RTOS). [Aargh acronym overload!]

Cheers
Nick

Loading...