Hi guys,
compiling ppc head with bunch of asm errors on power8 box (gcc version 4.8.3 )
checked commit log but found nothing special. Looks like it's asm issue?
Has anybody seen that?
arch/powerpc/kernel/exceptions-64s.S: Assembler messages:
arch/powerpc/kernel/exceptions-64s.S:421: Error: operand out of range
(0xffffffffffff8680 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:663: Error: operand out of range
(0xffffffffffff8b00 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:671: Error: operand out of range
(0xffffffffffff8c80 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:708: Error: operand out of range
(0xffffffffffff8e00 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:721: Error: operand out of range
(0xffffffffffff8e00 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:137: Error: operand out of range
(0xffffffffffff8000 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:471: Error: operand out of range
(0xffffffffffff8700 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:517: Error: operand out of range
(0xffffffffffff8a00 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:548: Error: operand out of range
(0xffffffffffff8880 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:580: Error: operand out of range
(0xffffffffffff8a00 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:703: Error: operand out of range
(0xffffffffffff8e00 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:728: Error: operand out of range
(0xffffffffffff8f80 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:748: Error: operand out of range
(0xffffffffffff9100 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:760: Error: operand out of range
(0xffffffffffff9280 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:793: Error: operand out of range
(0xffffffffffff9480 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:799: Error: operand out of range
(0xffffffffffff9600 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:805: Error: operand out of range
(0xffffffffffff9780 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:815: Error: operand out of range
(0xffffffffffff9900 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:911: Error: operand out of range
(0xffffffffffff9a80 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:1130: Error: operand out of range
(0xffffffffffffad80 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:1152: Error: operand out of range
(0xffffffffffffaf00 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:1243: Error: operand out of range
(0xffffffffffffb080 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:149: Error: operand out of range
(0xffffffffffff8000 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:229: Error: operand out of range
(0xffffffffffff8380 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:241: Error: operand out of range
(0xffffffffffff8680 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:264: Error: operand out of range
(0xffffffffffff8180 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:916: Error: operand out of range
(0xffffffffffff9c00 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:932: Error: operand out of range
(0xffffffffffff9d80 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:938: Error: operand out of range
(0xffffffffffff9f00 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:950: Error: operand out of range
(0xffffffffffffa080 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:1005: Error: operand out of range
(0xffffffffffffa200 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:1015: Error: operand out of range
(0xffffffffffffa380 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:1025: Error: operand out of range
(0xffffffffffffa500 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:1031: Error: operand out of range
(0xffffffffffffa680 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:1068: Error: operand out of range
(0xffffffffffffa880 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:1104: Error: operand out of range
(0xffffffffffffaa80 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:1110: Error: operand out of range
(0xffffffffffffac00 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:472: Error: operand out of range
(0xffffffffffff8700 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:540: Error: operand out of range
(0xffffffffffff8a00 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:549: Error: operand out of range
(0xffffffffffff8880 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:598: Error: operand out of range
(0xffffffffffff8a00 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:719: Error: operand out of range
(0xffffffffffff8e00 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:729: Error: operand out of range
(0xffffffffffff8f80 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:749: Error: operand out of range
(0xffffffffffff9100 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:761: Error: operand out of range
(0xffffffffffff9280 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:794: Error: operand out of range
(0xffffffffffff9480 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:800: Error: operand out of range
(0xffffffffffff9600 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:806: Error: operand out of range
(0xffffffffffff9780 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:816: Error: operand out of range
(0xffffffffffff9900 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:912: Error: operand out of range
(0xffffffffffff9a80 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:1131: Error: operand out of range
(0xffffffffffffad80 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:1244: Error: operand out of range
(0xffffffffffffb080 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:939: Error: operand out of range
(0xffffffffffff9f00 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:1006: Error: operand out of range
(0xffffffffffffa200 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:1016: Error: operand out of range
(0xffffffffffffa380 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:1026: Error: operand out of range
(0xffffffffffffa500 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:1032: Error: operand out of range
(0xffffffffffffa680 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:1069: Error: operand out of range
(0xffffffffffffa880 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:1105: Error: operand out of range
(0xffffffffffffaa80 is not between 0x0000000000000000 and
0x000000000000ffff)
arch/powerpc/kernel/exceptions-64s.S:1111: Error: operand out of range
(0xffffffffffffac00 is not between 0x0000000000000000 and
0x000000000000ffff)
From: Nicholas Piggin <npiggin@gmail.com> Date: 2016-11-03 04:55:42
On Wed, 2 Nov 2016 13:49:39 +0300
Denis Kirjanov [off-list ref] wrote:
Hi guys,
compiling ppc head with bunch of asm errors on power8 box (gcc version 4.8.3 )
checked commit log but found nothing special. Looks like it's asm issue?
Has anybody seen that?
arch/powerpc/kernel/exceptions-64s.S: Assembler messages:
arch/powerpc/kernel/exceptions-64s.S:421: Error: operand out of range
(0xffffffffffff8680 is not between 0x0000000000000000 and
0x000000000000ffff)
Hey, thanks for the report. It's likely due to the exception vectors rewrite,
and yes it's an assembler issue (what's your binutils version?). Your errors
look like they're coming from LOAD_HANDLER(). For some reason it seems to be
interpreting the immediate as signed, or the actual calculation ends up being
negative, neither of which should happen.
It might take a bit of trial and error, and the assembler doesn't give a lot
of good options to debug it, so if I can reproduce it here with your bintuils
version it will be helpful.
Thanks,
Nick
From: Naveen N. Rao <hidden> Date: 2016-11-03 06:53:41
On 2016/11/03 03:55PM, Nicholas Piggin wrote:
On Wed, 2 Nov 2016 13:49:39 +0300
Denis Kirjanov [off-list ref] wrote:
quoted
Hi guys,
compiling ppc head with bunch of asm errors on power8 box (gcc version 4.8.3 )
checked commit log but found nothing special. Looks like it's asm issue?
Has anybody seen that?
arch/powerpc/kernel/exceptions-64s.S: Assembler messages:
arch/powerpc/kernel/exceptions-64s.S:421: Error: operand out of range
(0xffffffffffff8680 is not between 0x0000000000000000 and
0x000000000000ffff)
Hey, thanks for the report. It's likely due to the exception vectors rewrite,
and yes it's an assembler issue (what's your binutils version?). Your errors
look like they're coming from LOAD_HANDLER(). For some reason it seems to be
interpreting the immediate as signed, or the actual calculation ends up being
negative, neither of which should happen.
It might take a bit of trial and error, and the assembler doesn't give a lot
of good options to debug it, so if I can reproduce it here with your bintuils
version it will be helpful.
I saw this issue when trying to do a BE build on RHEL 7.1. The below
fixes this for me and it indeed looks like an issue with the assembler.
Interestingly, the same assembler version on RHEL 7.1 LE does not throw
these errors.
[root@rhel71be linux]# gcc --version
gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-8)
<snip>
[root@rhel71be linux]# as --version
GNU assembler version 2.23.52.0.1-26.el7 20130226
<snip>
Signed-off-by: Naveen N. Rao <redacted>
---
arch/powerpc/include/asm/exception-64s.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -91,7 +91,7 @@*/#define LOAD_HANDLER(reg, label) \ldreg,PACAKBASE(r13);/* get high part of &label */\-orireg,reg,(FIXED_SYMBOL_ABS_ADDR(label))@l;+orireg,reg,((FIXED_SYMBOL_ABS_ADDR(label))&0xffff);/* Exception register prefixes */#define EXC_HV H
From: Nicholas Piggin <npiggin@gmail.com> Date: 2016-11-03 07:09:31
On Thu, 3 Nov 2016 12:23:17 +0530
"Naveen N. Rao" [off-list ref] wrote:
quoted hunk
On 2016/11/03 03:55PM, Nicholas Piggin wrote:
quoted
On Wed, 2 Nov 2016 13:49:39 +0300
Denis Kirjanov [off-list ref] wrote:
quoted
Hi guys,
compiling ppc head with bunch of asm errors on power8 box (gcc version 4.8.3 )
checked commit log but found nothing special. Looks like it's asm issue?
Has anybody seen that?
arch/powerpc/kernel/exceptions-64s.S: Assembler messages:
arch/powerpc/kernel/exceptions-64s.S:421: Error: operand out of range
(0xffffffffffff8680 is not between 0x0000000000000000 and
0x000000000000ffff)
Hey, thanks for the report. It's likely due to the exception vectors rewrite,
and yes it's an assembler issue (what's your binutils version?). Your errors
look like they're coming from LOAD_HANDLER(). For some reason it seems to be
interpreting the immediate as signed, or the actual calculation ends up being
negative, neither of which should happen.
It might take a bit of trial and error, and the assembler doesn't give a lot
of good options to debug it, so if I can reproduce it here with your bintuils
version it will be helpful.
I saw this issue when trying to do a BE build on RHEL 7.1. The below
fixes this for me and it indeed looks like an issue with the assembler.
Interestingly, the same assembler version on RHEL 7.1 LE does not throw
these errors.
[root@rhel71be linux]# gcc --version
gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-8)
<snip>
[root@rhel71be linux]# as --version
GNU assembler version 2.23.52.0.1-26.el7 20130226
<snip>
Signed-off-by: Naveen N. Rao <redacted>
---
arch/powerpc/include/asm/exception-64s.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -91,7 +91,7 @@*/#define LOAD_HANDLER(reg, label) \ldreg,PACAKBASE(r13);/* get high part of &label */\-orireg,reg,(FIXED_SYMBOL_ABS_ADDR(label))@l;+orireg,reg,((FIXED_SYMBOL_ABS_ADDR(label))&0xffff);/* Exception register prefixes */#define EXC_HV H
Thanks for taking a look. Does this patch fix it, or just hide the build
error? This would presumably hide real bugs too, so it will be good if we
can make it conditional on older assemblers, or otherwise do a test for
out of bounds value (you could try asm directives like .if/.error)
Thanks,
Nick
On Wed, 2 Nov 2016 13:49:39 +0300
Denis Kirjanov [off-list ref] wrote:
quoted
Hi guys,
compiling ppc head with bunch of asm errors on power8 box (gcc version
4.8.3 )
checked commit log but found nothing special. Looks like it's asm
issue?
Has anybody seen that?
arch/powerpc/kernel/exceptions-64s.S: Assembler messages:
arch/powerpc/kernel/exceptions-64s.S:421: Error: operand out of range
(0xffffffffffff8680 is not between 0x0000000000000000 and
0x000000000000ffff)
Hey, thanks for the report. It's likely due to the exception vectors
rewrite,
and yes it's an assembler issue (what's your binutils version?). Your
errors
look like they're coming from LOAD_HANDLER(). For some reason it seems to
be
interpreting the immediate as signed, or the actual calculation ends up
being
negative, neither of which should happen.
It might take a bit of trial and error, and the assembler doesn't give a
lot
of good options to debug it, so if I can reproduce it here with your
bintuils
version it will be helpful.
I saw this issue when trying to do a BE build on RHEL 7.1. The below
fixes this for me and it indeed looks like an issue with the assembler.
Interestingly, the same assembler version on RHEL 7.1 LE does not throw
these errors.
[root@rhel71be linux]# gcc --version
gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-8)
<snip>
[root@rhel71be linux]# as --version
GNU assembler version 2.23.52.0.1-26.el7 20130226
<snip>
Signed-off-by: Naveen N. Rao <redacted>
@@ -91,7 +91,7 @@*/#define LOAD_HANDLER(reg, label) \ldreg,PACAKBASE(r13);/* get high part of &label */\-orireg,reg,(FIXED_SYMBOL_ABS_ADDR(label))@l;+orireg,reg,((FIXED_SYMBOL_ABS_ADDR(label))&0xffff);/* Exception register prefixes */#define EXC_HV H--
@@ -91,7 +91,7 @@*/#define LOAD_HANDLER(reg, label) \ldreg,PACAKBASE(r13);/* get high part of &label */\-orireg,reg,(FIXED_SYMBOL_ABS_ADDR(label))@l;+orireg,reg,((FIXED_SYMBOL_ABS_ADDR(label))&0xffff);
That's weird. We explicitly added the @l there to make it work with
binutils 2.22. Is the Redhat "2.23" not really 2.23 ?
cheers
@@ -91,7 +91,7 @@*/#define LOAD_HANDLER(reg, label) \ldreg,PACAKBASE(r13);/* get high part of &label */\-orireg,reg,(FIXED_SYMBOL_ABS_ADDR(label))@l;+orireg,reg,((FIXED_SYMBOL_ABS_ADDR(label))&0xffff);
That's weird. We explicitly added the @l there to make it work with
binutils 2.22. Is the Redhat "2.23" not really 2.23 ?
Not sure why @l isn't working. It does seem to be 2.23. Also, it is a
bit weird that this only shows up on BE and not on LE...
[root@rhel71be linux]# rpm -qf /usr/bin/as
binutils-2.23.52.0.1-30.el7.ppc64
[root@rhel71be linux]# rpm -qi binutils
Name : binutils
Version : 2.23.52.0.1
Release : 30.el7
Architecture: ppc64
Install Date: Thursday 03 November 2016 03:58:24 PM IST
Group : Development/Tools
Size : 14200512
License : GPLv3+
Signature : RSA/SHA256, Monday 19 January 2015 10:14:51 PM IST, Key ID
199e2f91fd431d51
Source RPM : binutils-2.23.52.0.1-30.el7.src.rpm
Build Date : Thursday 15 January 2015 10:55:42 PM IST
Build Host : ppc-020.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor : Red Hat, Inc.
URL : http://sources.redhat.com/binutils
Summary : A GNU collection of binary utilities
- Naveen
@@ -91,7 +91,7 @@*/#define LOAD_HANDLER(reg, label) \ldreg,PACAKBASE(r13);/* get high part of &label */\-orireg,reg,(FIXED_SYMBOL_ABS_ADDR(label))@l;+orireg,reg,((FIXED_SYMBOL_ABS_ADDR(label))&0xffff);/* Exception register prefixes */#define EXC_HV H
Thanks for taking a look. Does this patch fix it, or just hide the build
error? This would presumably hide real bugs too, so it will be good if we
can make it conditional on older assemblers, or otherwise do a test for
out of bounds value (you could try asm directives like .if/.error)
It does seem to fix it for me - the built kernel booted fine ;)
My assembly skills are a bit lacking, but is there a specific reason you
think that AND'ing with 0xffff is different from using @l?
Thanks,
Naveen
@@ -91,7 +91,7 @@*/#define LOAD_HANDLER(reg, label) \ldreg,PACAKBASE(r13);/* get high part of &label */\-orireg,reg,(FIXED_SYMBOL_ABS_ADDR(label))@l;+orireg,reg,((FIXED_SYMBOL_ABS_ADDR(label))&0xffff);
That's weird. We explicitly added the @l there to make it work with
binutils 2.22. Is the Redhat "2.23" not really 2.23 ?
I have the same version: Version : 2.23.52.0.1
Not sure why @l isn't working. It does seem to be 2.23. Also, it is a
bit weird that this only shows up on BE and not on LE...
[root@rhel71be linux]# rpm -qf /usr/bin/as
binutils-2.23.52.0.1-30.el7.ppc64
[root@rhel71be linux]# rpm -qi binutils
Name : binutils
Version : 2.23.52.0.1
Release : 30.el7
Architecture: ppc64
Install Date: Thursday 03 November 2016 03:58:24 PM IST
Group : Development/Tools
Size : 14200512
License : GPLv3+
Signature : RSA/SHA256, Monday 19 January 2015 10:14:51 PM IST, Key ID
199e2f91fd431d51
Source RPM : binutils-2.23.52.0.1-30.el7.src.rpm
Build Date : Thursday 15 January 2015 10:55:42 PM IST
Build Host : ppc-020.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor : Red Hat, Inc.
URL : http://sources.redhat.com/binutils
Summary : A GNU collection of binary utilities
- Naveen