[Mesa-dev] [PATCH 1/4] meson: Add support for SPARC assembly

Dylan Baker dylan at pnwbakers.com
Thu Jun 7 21:26:55 UTC 2018


Quoting Eric Anholt (2018-06-07 14:18:32)
> Dylan Baker <dylan at pnwbakers.com> writes:
> 
> > Not tested at all (not even compiled), just a blind port from autotools.
> >
> > Signed-off-by: Dylan Baker <dylan.c.baker at intel.com>
> > ---
> >  meson.build                |  5 +++++
> >  src/mapi/glapi/meson.build |  3 ++-
> >  src/mesa/meson.build       | 16 +++++++++++++---
> >  3 files changed, 20 insertions(+), 4 deletions(-)
> >
> > diff --git a/meson.build b/meson.build
> > index 32ab30faa4b..0171328bcd7 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -887,6 +887,11 @@ if with_asm
> >        with_asm_arch = 'aarch64'
> >        pre_args += ['-DUSE_AARCH64_ASM']
> >      endif
> > +  elif host_machine.cpu_family() == 'sparc64'
> > +    if system_has_kms_drm
> > +      with_asm_arch = 'sparc'
> > +      pre_args += ['-DUSE_SPARC_ASM']
> > +    endif
> >    endif
> >  endif
> >  
> > diff --git a/src/mapi/glapi/meson.build b/src/mapi/glapi/meson.build
> > index e241d9ed388..2509e19eaa3 100644
> > --- a/src/mapi/glapi/meson.build
> > +++ b/src/mapi/glapi/meson.build
> > @@ -64,8 +64,9 @@ else
> >      static_glapi_files += glapi_x86_s
> >    elif with_asm_arch == 'x86_64'
> >      static_glapi_files += glapi_x86_64_s
> > +  elif with_asm_arch == 'sparc'
> > +    static_glapi_files += glapi_sparc_s
> >    endif
> > -  # TODO: SPARC asm
> >  endif
> >  
> >  libglapi_static = static_library(
> > diff --git a/src/mesa/meson.build b/src/mesa/meson.build
> > index cba361c0988..0d4417ba5d7 100644
> > --- a/src/mesa/meson.build
> > +++ b/src/mesa/meson.build
> > @@ -613,6 +613,8 @@ if with_asm_arch == 'x86' or with_asm_arch == 'x86_64'
> >      capture : true,
> >    )
> >  endif
> > +
> > +inc_libmesa_asm = []
> >  if with_asm_arch == 'x86'
> >    files_libmesa_common += files(
> >      'x86/assyntax.h',
> > @@ -643,10 +645,18 @@ if with_asm_arch == 'x86'
> >      'x86/sse_normal.S',
> >      'x86/read_rgba_span_x86.S',
> >    )
> > +  inc_libmesa_asm = include_directories('x86')
> >  elif with_asm_arch == 'x86_64'
> >    files_libmesa_common += files('x86-64/x86-64.h', 'x86-64/xform4.S')
> > +  inc_libmesa_asm = include_directories('x86', 'x86-64')
> 
> automake seems to only have x86-64 include dir added.  Also, not sure
> why this is being added in a sparc commit.  However, it brings us closer
> to autotools so with this little fix the patch gets my r-b anyway.

Wow, I completely misread the autotools build, I thought it was really strange.
I'll change that and split this into a different commit.

Dylan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180607/5309843f/attachment.sig>


More information about the mesa-dev mailing list