AtomicsObject.cpp & AtomicOperations-shared-jit.cpp: In function '...' .. unsupported size for integer register
Categories
(Core :: JavaScript Engine: JIT, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr91 | --- | unaffected |
firefox97 | --- | unaffected |
firefox98 | --- | wontfix |
firefox99 | --- | fixed |
People
(Reporter: ray-v, Assigned: jandem)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
Cross compiling FF98 for i686 to changeset 8426c57c6960 [98_0b6_RELEASE] fails.
This failure first occurs when building to changeset 3fba20138922 [bug#1749665, part 3].
46:11.98 In file included from Unified_cpp_js_src0.cpp:11:
46:11.98 /mozbuild/mozilla/js/src/builtin/AtomicsObject.cpp: In function ‘bool atomics_store(JSContext*, unsigned int, JS::Value*)’:
46:11.98 /mozbuild/mozilla/js/src/builtin/AtomicsObject.cpp:387:1: error: unsupported size for integer register
46:11.98 387 | }
46:11.98 | ^
46:11.98 /mozbuild/beta/firefox-build-dir-i686/js/src/jit/AtomicOperationsGenerated.h: Assembler messages:
46:11.98 /mozbuild/beta/firefox-build-dir-i686/js/src/jit/AtomicOperationsGenerated.h:85: Error: bad register name `%sil'
46:14.65 gmake[4]: *** [/mozbuild/mozilla/config/rules.mk:660: Unified_cpp_js_src0.o] Error 1
46:14.65 gmake[3]: *** [/mozbuild/mozilla/config/recurse.mk:72: js/src/target-objects] Error 2
46:33.58 In file included from Unified_cpp_js_src_jit12.cpp:38:
46:33.58 /mozbuild/mozilla/js/src/jit/shared/AtomicOperations-shared-jit.cpp: In function ‘void js::jit::AtomicMemcpyDownUnsynchronized(uint8_t*, const uint8_t*, size_t)’:
46:33.58 /mozbuild/mozilla/js/src/jit/shared/AtomicOperations-shared-jit.cpp:122:1: error: unsupported size for integer register
46:33.58 122 | }
46:33.58 | ^
46:33.58 /mozbuild/mozilla/js/src/jit/shared/AtomicOperations-shared-jit.cpp:122:1: error: unsupported size for integer register
46:33.58 /mozbuild/mozilla/js/src/jit/shared/AtomicOperations-shared-jit.cpp:122:1: error: unsupported size for integer register
46:33.59 /mozbuild/mozilla/js/src/jit/shared/AtomicOperations-shared-jit.cpp:122:1: error: unsupported size for integer register
46:34.64 /mozbuild/beta/firefox-build-dir-i686/js/src/jit/AtomicOperationsGenerated.h: Assembler messages:
46:34.64 /mozbuild/beta/firefox-build-dir-i686/js/src/jit/AtomicOperationsGenerated.h:581: Error: bad register name `%bpl'
46:34.64 /mozbuild/beta/firefox-build-dir-i686/js/src/jit/AtomicOperationsGenerated.h:582: Error: bad register name `%bpl'
46:34.64 /mozbuild/beta/firefox-build-dir-i686/js/src/jit/AtomicOperationsGenerated.h:581: Error: bad register name `%dil'
46:34.64 /mozbuild/beta/firefox-build-dir-i686/js/src/jit/AtomicOperationsGenerated.h:582: Error: bad register name `%dil'
46:34.70 gmake[4]: *** [/mozbuild/mozilla/config/rules.mk:660: Unified_cpp_js_src_jit12.o] Error 1
...
47:19.53 gmake[3]: *** [/mozbuild/mozilla/config/recurse.mk:72: js/src/jit/target-objects] Error 2
Comment 1•11 months ago
|
||
Can you mention which compiler you are using? How did you configure Firefox (mozconfig file) ?
Firefox is currently being cross-compiled to x86 using clang-13 in our CI. I suspect there is a problem in the way you configure the cross compilation environment.
I use the build method here, which has worked up to this change.
The cross compiler is
# ./i686-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=./i686-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/mozbuild/chrt64/opt/cross-pi-gcc-x86/bin/../libexec/gcc/i686-linux-gnu/9.1.0/lto-wrapper
Target: i686-linux-gnu
Configured with: ../gcc-9.1.0/configure --prefix=/opt/cross-pi-gcc --with-sysroot=/opt/cross-pi-gcc/sysroot --target=i686-linux-gnu --enable-languages=c,c++,lto --enable-lto --with-arch=core2 --with-tune=core2 --with-fpmath=sse --disable-multilib
Thread model: posix
gcc version 9.1.0 (GCC)
The mozconfigs are for a native x86_64 build with additions for cross compiling [6].
x86_64 and aarch64 builds beyond this CS [3fba20138922] are ok.
I've just tried an armv7 build which fails at the same CS:
44:56.48 {standard input}: Assembler messages:
44:56.48 {standard input}:53: Error: immediate expression requires a # prefix -- `ldrb r3,[r1,0]'
44:56.48 {standard input}:54: Error: immediate expression requires a # prefix -- `strb r3,[r0,0]'
44:56.48 {standard input}:55: Error: immediate expression requires a # prefix -- `ldrb r3,[r1,1]'
44:56.48 {standard input}:56: Error: immediate expression requires a # prefix -- `strb r3,[r0,1]'
44:56.48 {standard input}:57: Error: immediate expression requires a # prefix -- `ldrb r3,[r1,2]'
44:56.48 {standard input}:58: Error: immediate expression requires a # prefix -- `strb r3,[r0,2]'
<snip> ..
44:56.78 {standard input}:5298: Error: immediate expression requires a # prefix -- `ldrb r2,[r5,0]'
44:56.78 {standard input}:5299: Error: immediate expression requires a # prefix -- `strb r2,[r4,0]'
45:00.11 gmake[4]: *** [/mozbuild/mozilla/config/rules.mk:658: Unified_cpp_js_src_jit14.o] Error 1
45:00.11 gmake[3]: *** [/mozbuild/mozilla/config/recurse.mk:72: js/src/jit/target-objects] Error 2
Comment 3•11 months ago
|
||
Inline assembly syntax depends on the compiler. I suspect that there is maybe a syntax which is not supported by gcc.
Updated•11 months ago
|
Comment 4•11 months ago
|
||
Set release status flags based on info from the regressing bug 1749665
Updated•11 months ago
|
Updated•11 months ago
|
Assignee | ||
Comment 5•11 months ago
|
||
This seems to be a GCC x86-32 issue when inlining the functions containing the inline assembly. I'll post a patch to add MOZ_NEVER_INLINE
on 32-bit GCC as workaround.
Assignee | ||
Comment 6•11 months ago
|
||
Use MOZ_NEVER_INLINE for GCC x86-32. It seems to run out of byte registers when
inlining these functions.
Updated•11 months ago
|
Assignee | ||
Comment 7•11 months ago
|
||
Depends on D139703
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5348a5355b78 part 1 - Work around a GCC issue with generated atomics. r=lth https://hg.mozilla.org/integration/autoland/rev/b4a2877a21d6 part 2 - Use # prefix for arm32 immediates. r=lth
Comment 9•11 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5348a5355b78
https://hg.mozilla.org/mozilla-central/rev/b4a2877a21d6
Comment 10•11 months ago
|
||
It would have been nice to uplift to 98.
Description
•