Re: [patch,testsuite] Support dg-require-effective-target label_offsets.

2016-11-17 Thread Senthil Kumar Selvaraj
Georg-Johann Lay writes: > On 04.11.2016 06:18, Senthil Kumar Selvaraj wrote: >> >> Georg-Johann Lay writes: >>> State of matters is that Binutils support is missing, and if I understand >>> you >>> correctly, dg-require is not appropriate to factor out availability of such >>> features? >> >> I

Re: [patch,testsuite] Support dg-require-effective-target label_offsets.

2016-11-04 Thread Mike Stump
On Nov 4, 2016, at 2:35 AM, Georg-Johann Lay wrote: > >> .word .L3-(.L2) >> >> which seems wrong, given all the other code-gen. I think this has to be >> gs(.L3)-(gs(.L2)), no? I tried to get binutils to do that for me directly >> with a .word and it seemed resistant; which is unfortunate.

Re: [patch,testsuite] Support dg-require-effective-target label_offsets.

2016-11-04 Thread Georg-Johann Lay
On 04.11.2016 06:18, Senthil Kumar Selvaraj wrote: Georg-Johann Lay writes: State of matters is that Binutils support is missing, and if I understand you correctly, dg-require is not appropriate to factor out availability of such features? I'll take a stab at adding the missing binutils suppo

Re: [patch,testsuite] Support dg-require-effective-target label_offsets.

2016-11-04 Thread Georg-Johann Lay
On 04.11.2016 03:48, Mike Stump wrote: On Nov 3, 2016, at 8:25 AM, Georg-Johann Lay wrote: On 28.10.2016 17:58, Mike Stump wrote: On Oct 27, 2016, at 3:16 AM, Georg-Johann Lay wrote: Now imagine some arithmetic like &&LAB2 - &&LAB1. This might result in one or two stub addresses, and diff

Re: [patch,testsuite] Support dg-require-effective-target label_offsets.

2016-11-03 Thread Senthil Kumar Selvaraj
Georg-Johann Lay writes: > On 28.10.2016 17:58, Mike Stump wrote: >> On Oct 27, 2016, at 3:16 AM, Georg-Johann Lay wrote: >>> >>> Now imagine some arithmetic like &&LAB2 - &&LAB1. This might result in >>> one or two stub addresses, and difference between such addresses is a >>> complete differe

Re: [patch,testsuite] Support dg-require-effective-target label_offsets.

2016-11-03 Thread Mike Stump
On Nov 3, 2016, at 8:25 AM, Georg-Johann Lay wrote: > > On 28.10.2016 17:58, Mike Stump wrote: >> On Oct 27, 2016, at 3:16 AM, Georg-Johann Lay wrote: >>> >>> Now imagine some arithmetic like &&LAB2 - &&LAB1. This might result in >>> one or two stub addresses, and difference between such addre

Re: [patch,testsuite] Support dg-require-effective-target label_offsets.

2016-11-03 Thread Georg-Johann Lay
On 28.10.2016 17:58, Mike Stump wrote: On Oct 27, 2016, at 3:16 AM, Georg-Johann Lay wrote: Now imagine some arithmetic like &&LAB2 - &&LAB1. This might result in one or two stub addresses, and difference between such addresses is a complete different thing than the difference between the ori

Re: [patch,testsuite] Support dg-require-effective-target label_offsets.

2016-10-28 Thread Mike Stump
On Oct 27, 2016, at 3:16 AM, Georg-Johann Lay wrote: > > Now imagine some arithmetic like &&LAB2 - &&LAB1. This might result in one > or two stub addresses, and difference between such addresses is a complete > different thing than the difference between the original labels: The result > mig

Re: [patch,testsuite] Support dg-require-effective-target label_offsets.

2016-10-28 Thread Georg-Johann Lay
On 27.10.2016 12:49, Bernd Schmidt wrote: On 10/27/2016 12:16 PM, Georg-Johann Lay wrote: Now imagine some arithmetic like &&LAB2 - &&LAB1. This might result in one or two stub addresses, and difference between such addresses is a complete different thing than the difference between the origina

Re: [patch,testsuite] Support dg-require-effective-target label_offsets.

2016-10-27 Thread Bernd Schmidt
On 10/27/2016 12:16 PM, Georg-Johann Lay wrote: Now imagine some arithmetic like &&LAB2 - &&LAB1. This might result in one or two stub addresses, and difference between such addresses is a complete different thing than the difference between the original labels: The result might differ in absol

Re: [patch,testsuite] Support dg-require-effective-target label_offsets.

2016-10-27 Thread Georg-Johann Lay
On 26.10.2016 18:51, Bernd Schmidt wrote: On 10/26/2016 04:46 PM, Georg-Johann Lay wrote: +if { [istarget avr-*-*] } { +# If the value of a label does not fit into 16 bits, the linker +# will generate a stub (containing a direct jump) and we end up +# with the address of the stub

Re: [patch,testsuite] Support dg-require-effective-target label_offsets.

2016-10-26 Thread Bernd Schmidt
On 10/26/2016 04:46 PM, Georg-Johann Lay wrote: +if { [istarget avr-*-*] } { + # If the value of a label does not fit into 16 bits, the linker + # will generate a stub (containing a direct jump) and we end up + # with the address of the stub instead of the address of the ver

[patch,testsuite] Support dg-require-effective-target label_offsets.

2016-10-26 Thread Georg-Johann Lay
There are targets that support taking values of labels but where any arithmetic on such values might produce garbage. This patch introduces new dg-require-effective-target label_offsets which is a subset of label_values, and adjusts respective test cases to the more restricted predicate. Run