intel/clflush: Add support for clflushopt instruction

Rework:
 * Split clflushopt into a separate file as recommended by Ken.
   If we enable -mclflush on all driver source compilation, then
   gcc may insert uses of it on processors that don't support it.
 * Add uintptr_t casting to cpu_caps->cacheline usage

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22379>
This commit is contained in:
Jordan Justen
2023-03-30 00:50:10 -07:00
committed by Marge Bot
parent b68582b1c5
commit 2b128c570b
4 changed files with 82 additions and 4 deletions

View File

@@ -60,6 +60,19 @@ files_batch_decoder = files(
'intel_decoder.c',
)
libintel_common_links = [libisl]
if with_clflushopt
libintel_clflushopt = static_library(
'intel_clflushopt',
['intel_clflushopt.c'],
include_directories : [inc_include, inc_src],
c_args : [no_override_init_args] + clflushopt_args,
gnu_symbol_visibility : 'hidden',
)
libintel_common_links += libintel_clflushopt
endif
batch_decoder_dependencies = []
if not dep_expat.found()
files_libintel_common += 'intel_batch_decoder_stub.c'
@@ -74,7 +87,7 @@ libintel_common = static_library(
include_directories : [inc_include, inc_src, inc_intel],
c_args : [no_override_init_args],
gnu_symbol_visibility : 'hidden',
link_with : [libisl],
link_with : libintel_common_links,
dependencies : [batch_decoder_dependencies, dep_libdrm, dep_thread, idep_genxml, idep_mesautil, idep_intel_dev],
)