Mesa (main): freedreno/afuc: Disable the disassembler on 32-bit builds.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Oct 19 19:16:46 UTC 2021
Module: Mesa
Branch: main
Commit: 80d5e40fd1392af9401db3d0bbcbcc6b7276675c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=80d5e40fd1392af9401db3d0bbcbcc6b7276675c
Author: Emma Anholt <emma at anholt.net>
Date: Mon Oct 18 11:42:45 2021 -0700
freedreno/afuc: Disable the disassembler on 32-bit builds.
There's an mmap(2 << 32), which armhf can't handle.
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5514
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13421>
---
src/freedreno/afuc/meson.build | 92 ++++++++++++++++++++++--------------------
1 file changed, 49 insertions(+), 43 deletions(-)
diff --git a/src/freedreno/afuc/meson.build b/src/freedreno/afuc/meson.build
index 247834dc7c1..b779b2dd39f 100644
--- a/src/freedreno/afuc/meson.build
+++ b/src/freedreno/afuc/meson.build
@@ -18,6 +18,10 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
+if with_tests
+ diff = find_program('diff')
+endif
+
afuc_parser = custom_target(
'parser.[ch]',
input: 'parser.y',
@@ -55,50 +59,7 @@ asm = executable(
build_by_default : with_tools.contains('freedreno'),
install: install_fd_decode_tools,
)
-
-disasm = executable(
- 'afuc-disasm',
- [
- 'disasm.c',
- 'emu.c',
- 'emu.h',
- 'emu-ds.c',
- 'emu-regs.c',
- 'emu-ui.c',
- 'util.c',
- 'util.h',
- ],
- include_directories: [
- inc_freedreno,
- inc_freedreno_rnn,
- inc_include,
- inc_src,
- inc_util,
- ],
- link_with: [
- libfreedreno_rnn,
- ],
- dependencies: [
- ],
- build_by_default : with_tools.contains('freedreno'),
- install: install_fd_decode_tools,
-)
-
if with_tests
- diff = find_program('diff')
-
- disasm_fw = custom_target('afuc_test.asm',
- output: 'afuc_test.asm',
- command: [disasm, '-u', files('../.gitlab-ci/reference/afuc_test.fw'), '-g', '630'],
- capture: true
- )
- test('afuc-disasm',
- diff,
- args: ['-u', files('../.gitlab-ci/reference/afuc_test.asm'), disasm_fw],
- suite: 'freedreno',
- workdir: meson.source_root()
- )
-
asm_fw = custom_target('afuc_test.fw',
output: 'afuc_test.fw',
command: [asm, '-g', '6', files('../.gitlab-ci/traces/afuc_test.asm'), '@OUTPUT@'],
@@ -110,3 +71,48 @@ if with_tests
workdir: meson.source_root()
)
endif
+
+# Disasm requires mmaping >4GB
+if cc.sizeof('size_t') > 4
+ disasm = executable(
+ 'afuc-disasm',
+ [
+ 'disasm.c',
+ 'emu.c',
+ 'emu.h',
+ 'emu-ds.c',
+ 'emu-regs.c',
+ 'emu-ui.c',
+ 'util.c',
+ 'util.h',
+ ],
+ include_directories: [
+ inc_freedreno,
+ inc_freedreno_rnn,
+ inc_include,
+ inc_src,
+ inc_util,
+ ],
+ link_with: [
+ libfreedreno_rnn,
+ ],
+ dependencies: [
+ ],
+ build_by_default : with_tools.contains('freedreno'),
+ install: install_fd_decode_tools,
+ )
+
+ if with_tests
+ disasm_fw = custom_target('afuc_test.asm',
+ output: 'afuc_test.asm',
+ command: [disasm, '-u', files('../.gitlab-ci/reference/afuc_test.fw'), '-g', '630'],
+ capture: true
+ )
+ test('afuc-disasm',
+ diff,
+ args: ['-u', files('../.gitlab-ci/reference/afuc_test.asm'), disasm_fw],
+ suite: 'freedreno',
+ workdir: meson.source_root()
+ )
+ endif
+endif
More information about the mesa-commit
mailing list