Accepting request 131614 from home:klausi123:X11

Heavily break the system? ok lets do it!
(Just kidding)

This is just to show some work towards mesa 8.1, but this snapshot actually works :)
Three new development packages added!
If you accept this there will be a new libdrm and a newer nouveau driver

OBS-URL: https://build.opensuse.org/request/show/131614
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=240
This commit is contained in:
Stefan Dirsch 2012-08-27 09:57:08 +00:00 committed by Git OBS Bridge
parent 610c431a46
commit 7a0930bbe6
10 changed files with 109 additions and 213 deletions

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Fri Aug 24 22:22:28 UTC 2012 - tobias.johannes.klausmann@mni.thm.de
- Update to 8.1 prerelease:
+ Changed u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch
to apply!
+ Changed u_remove-os-abi-tag.patch to apply! (Removed parts of it)
+ Changed u_mesa-8.0.1-fix-16bpp.patch to apply! (Removed parts of it)
+ Remove upstreamed patches: (double checked)
- upstream-llvm-patch.diff
- U_i965-gen7-Reduce-GT1-WM-thread-count-according-to-up.patch
-------------------------------------------------------------------
Thu Aug 23 15:29:34 UTC 2012 - fcrozat@suse.com

111
Mesa.spec
View File

@ -17,15 +17,13 @@
%define glamor 1
#
%define _version 8.0.4
%define _version 8.0.98.24
%define _name_archive mesa
Name: Mesa
Version: 8.0.4
Version: 8.0.98.24
Release: 0
BuildRequires: autoconf >= 2.59
BuildRequires: autoconf >= 2.60
BuildRequires: automake
BuildRequires: bison
BuildRequires: fdupes
@ -79,7 +77,7 @@ Provides: XFree86-Mesa-64bit = %{version}
Summary: System for rendering interactive 3-D graphics
License: MIT
Group: System/Libraries
Source: %{_name_archive}-%{_version}.tar.bz2
Source: %{_name_archive}-%{version}.tar.bz2
Source2: baselibs.conf
Source3: README.updates
Source4: manual-pages.tar.bz2
@ -89,13 +87,10 @@ Source6: %name-rpmlintrc
Patch1: Mesa-nodate.diff
# to be upstreamed
Patch11: u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch
# Patch from upstream master to resolve build issues with llvm 3.1
Patch12: upstream-llvm-patch.diff
# Patch from Fedora, fix 16bpp in llvmpipe
Patch13: u_mesa-8.0.1-fix-16bpp.patch
# Patch to remove OS ABI tag from libGL, so it is no longer preferred over libGLs without OS ABI tag
Patch14: u_remove-os-abi-tag.patch
Patch15: U_i965-gen7-Reduce-GT1-WM-thread-count-according-to-up.patch
# Patch from Fedora, use shmget when available, under llvmpipe
Patch16: u_mesa-8.0-llvmpipe-shmget.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -124,9 +119,9 @@ Requires: Mesa-libGL-devel = %version
Requires: Mesa-libGLESv1_CM-devel = %version
Requires: Mesa-libGLESv2-devel = %version
Requires: Mesa-libGLU-devel = %version
Requires: Mesa-libIndirectGL1 = %version
Requires: Mesa-libglapi0 = %version
Requires: libOSMesa8 = %version
Requires: Mesa-libIndirectGL-devel = %version
Requires: Mesa-libglapi-devel = %version
Requires: libOSMesa-devel = %version
Requires: libgbm-devel
# bug437293
%ifarch ppc64
@ -319,6 +314,16 @@ This library provides a pure software rasterizer; it does not provide
a direct rendering capable library, or one which uses GLX. For that,
please see Mesa-libGL1.
%package -n Mesa-libIndirectGL-devel
Summary: Development Files for the free implementation of the OpenGL API
Group: Development/Libraries/C and C++
Requires: Mesa-libIndirectGL1 = %version
%description -n Mesa-libIndirectGL-devel
This library provides a pure software rasterizer; it does not provide
a direct rendering capable library, or one which uses GLX. For that,
please see Mesa-libGL1.
%package -n libOSMesa8
Summary: Mesa Off-screen rendering extension
Group: System/Libraries
@ -328,6 +333,35 @@ OSmesa is a Mesa extension that allows programs to render to an
off-screen buffer using the OpenGL API without having to create a
rendering context on an X Server. It uses a pure software renderer.
%package -n libOSMesa-devel
Summary: Development files for the Mesa Offscreen Rendering extension
Group: Development/Libraries/C and C++
Requires: libOSMesa8 = %version
%description -n libOSMesa-devel
Development files for the OSmesa Mesa extension that allows programs to render to an
off-screen buffer using the OpenGL API without having to create a
rendering context on an X Server. It uses a pure software renderer.
%package -n Mesa-libglapi0
Summary: Free implementation of the GL API
Group: System/Libraries
%description -n Mesa-libglapi0
The Mesa GL API module is responsible for dispatching all the gl*
functions. It is intended to be mainly used by the Mesa-libGLES*
packages.
%package -n Mesa-libglapi-devel
Summary: Development files for the free implementation of the GL API
Group: Development/Libraries/C and C++
Requires: Mesa-libglapi0 = %version
%description -n Mesa-libglapi-devel
Development files for the Mesa GL API module which is responsible for
dispatching all the gl* functions. It is intended to be mainly used by
the Mesa-libGLES* packages.
%package -n libgbm1
Summary: Generic buffer management API
Group: System/Libraries
@ -461,27 +495,15 @@ This package contains the Software implementation of the VDPAU
state tracker. This is still "work in progress", i.e. expect
poor video quality, choppy videos and artefacts all over.
%package -n Mesa-libglapi0
Summary: Free implementation of the GL API
Group: System/Libraries
%description -n Mesa-libglapi0
The Mesa GL API module is responsible for dispatching all the gl*
functions. It is intended to be mainly used by the Mesa-libGLES*
packages.
%prep
%setup -n %{_name_archive}-%{_version} -b4 -q
%patch1 -p1
# remove some docs
rm -rf docs/README.{VMS,WIN32,OS2}
#%patch11 -p1
%patch12 -p1
%patch16 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%build
@ -522,15 +544,19 @@ autoreconf -fi
make %{?_smp_mflags}
make install DESTDIR=$RPM_BUILD_ROOT
# build and install Indirect Rendering only libGL
make realclean
%configure --with-driver=xlib \
make clean-local
%configure --enable-xlib-glx \
--enable-osmesa \
--disable-glu \
--disable-dri \
--with-egl-platforms=x11 \
--with-gallium-drivers="" \
--with-gl-lib-name=IndirectGL \
CFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
sed -i 's/GL_LIB = .*/GL_LIB = IndirectGL/g' configs/autoconf
make %{?_smp_mflags}
cp -a %{_lib}/libIndirectGL.so.* %{_lib}/libOSMesa.so* \
$RPM_BUILD_ROOT/usr/%{_lib}
make install DESTDIR=$RPM_BUILD_ROOT
for dir in ../xc/doc/man/{GL/gl,GL/glx,GLU}; do
pushd $dir
xmkmf -a
@ -620,7 +646,7 @@ install -m 644 $RPM_SOURCE_DIR/drirc $RPM_BUILD_ROOT/etc
%doc docs/README* docs/COPYING
%config /etc/drirc
%{_libdir}/dri/
#%{_libdir}/egl/
%_libdir/libdricore8*.so.*
%files -n Mesa-libEGL1
%defattr(-,root,root)
@ -632,6 +658,7 @@ install -m 644 $RPM_SOURCE_DIR/drirc $RPM_BUILD_ROOT/etc
%_includedir/KHR
%_libdir/libEGL.so
%_libdir/pkgconfig/egl.pc
%_libdir/libEGL.la
%files -n Mesa-libGL1
%defattr(-,root,root)
@ -644,6 +671,7 @@ install -m 644 $RPM_SOURCE_DIR/drirc $RPM_BUILD_ROOT/etc
%exclude %_includedir/GL/glu*.h
%_libdir/libGL.so
%_libdir/pkgconfig/gl.pc
%_libdir/libGL.la
%_mandir/man3/gl[A-Z]*
%files -n Mesa-libGLESv1_CM1
@ -654,6 +682,7 @@ install -m 644 $RPM_SOURCE_DIR/drirc $RPM_BUILD_ROOT/etc
%defattr(-,root,root)
%_includedir/GLES
%_libdir/libGLESv1_CM.so
%_libdir/libGLESv1_CM.la
%_libdir/pkgconfig/glesv1_cm.pc
%files -n Mesa-libGLESv2-2
@ -664,6 +693,7 @@ install -m 644 $RPM_SOURCE_DIR/drirc $RPM_BUILD_ROOT/etc
%defattr(-,root,root)
%_includedir/GLES2
%_libdir/libGLESv2.so
%_libdir/libGLESv2.la
%_libdir/pkgconfig/glesv2.pc
%files -n Mesa-libGLU1
@ -682,9 +712,20 @@ install -m 644 $RPM_SOURCE_DIR/drirc $RPM_BUILD_ROOT/etc
%defattr(-,root,root)
%_libdir/libIndirectGL.so.1*
%files -n Mesa-libIndirectGL-devel
%defattr(-,root,root)
%_libdir/libIndirectGL.so
%_libdir/libIndirectGL.la
%files -n libOSMesa8
%defattr(-,root,root)
%_libdir/libOSMesa.so.8*
%_libdir/libOSMesa.so.*
%files -n libOSMesa-devel
%defattr(-,root,root)
%_libdir/libOSMesa.so
%_libdir/libOSMesa.la
%_libdir/pkgconfig/osmesa.pc
%files -n libgbm1
%defattr(-,root,root)
@ -694,6 +735,7 @@ install -m 644 $RPM_SOURCE_DIR/drirc $RPM_BUILD_ROOT/etc
%defattr(-,root,root)
%_includedir/gbm.h
%_libdir/libgbm.so
%_libdir/libgbm.la
%_libdir/pkgconfig/gbm.pc
%ifnarch s390 s390x %arm ppc ppc64
@ -761,12 +803,17 @@ install -m 644 $RPM_SOURCE_DIR/drirc $RPM_BUILD_ROOT/etc
%defattr(-,root,root)
%_libdir/libglapi.so.0*
%files -n Mesa-libglapi-devel
%defattr(-,root,root)
%_libdir/libglapi.la
%files devel
%defattr(-,root,root)
%doc docs/*.html docs/*.spec
%_includedir/GL/internal
%_libdir/libOSMesa.so
%_libdir/libglapi.so
%_libdir/libdricore8*.so
%_libdir/libdricore8*.la
%_libdir/pkgconfig/dri.pc
%changelog

View File

@ -1,30 +0,0 @@
From 539a02b9a73276a6d012436e296cfab55d5257a3 Mon Sep 17 00:00:00 2001
From: Eric Anholt <eric@anholt.net>
Date: Fri, 27 Jul 2012 11:34:07 -0700
Subject: [PATCH 03/11] i965/gen7: Reduce GT1 WM thread count according to
updated BSpec.
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
https://bugs.freedesktop.org/show_bug.cgi?id=52382
(cherry picked from commit fbf86c7f0f1f12e52b927e3870535073879d0a4d)
---
src/mesa/drivers/dri/i965/brw_context.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index a66ccc7..78bc6f9 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -240,7 +240,7 @@ brwCreateContext(int api,
/* WM maximum threads is number of EUs times number of threads per EU. */
if (intel->gen >= 7) {
if (intel->gt == 1) {
- brw->max_wm_threads = 86;
+ brw->max_wm_threads = 48;
brw->max_vs_threads = 36;
brw->max_gs_threads = 36;
brw->urb.size = 128;
--
1.7.11.4

View File

@ -10,9 +10,12 @@ Mesa-devel
requires "Mesa-libGLESv2-devel-<targettype> = <version>"
requires "Mesa-libGLU-devel-<targettype> = <version>"
requires "Mesa-libIndirectGL1-<targettype> = <version>"
requires "Mesa-libIndirectGL-devel-<targettype> = <version>"
requires "libOSMesa8-<targettype> = <version>"
requires "libOSMesa-devel-<targettype> = <version>"
requires "libgbm-devel-<targettype>"
requires "Mesa-libglapi0-<targettype> = <version>"
requires "Mesa-libglapi-devel-<targettype> = <version>"
obsoletes "XFree86-Mesa-devel-<targettype> xorg-x11-Mesa-devel-<targettype>"
provides "XFree86-Mesa-devel-<targettype> xorg-x11-Mesa-devel-<targettype>"
Mesa-libEGL1
@ -36,12 +39,21 @@ Mesa-libGLU-devel
requires -Mesa-libGLU-<targettype>
requires "Mesa-libGLU1-<targettype> = <version>"
Mesa-libIndirectGL1
Mesa-libIndirectGL1-devel
requires -Mesa-libIndirectGL-<targettype>
requires "Mesa-libIndirectGL1-<targettype> = <version>"
libOSMesa8
libOSMesa-devel
requires -libOSMesa-<targettype>
requires "libOSMesa8-<targettype> = <version>"
libgbm1
libgbm-devel
requires -libgbm-<targettype>
requires "libgbm1-<targettype> = <version>"
Mesa-libglapi0
Mesa-libglapi-devel
requires -Mesa-libglapi-<targettype>
requires "Mesa-libglapi0-<targettype> = <version>"
libXvMC_nouveau
libXvMC_r300
libXvMC_r600

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3bcaa465f2e6372a297c7e448bf62f28d75fc95937ce8661cef85b082ecd8e3a
size 5486800

3
mesa-8.0.98.24.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e53b5af4f99acdb53afadc8e26464cfe1db11ad3d2d6cdf3a6afbe061af4a0d6
size 5911997

View File

@ -13,6 +13,7 @@ Signed-off-by: Egbert Eich <eich@freedesktop.org>
for 8.0.1
Ported to 8.0.2
Ported to 8.1
---
src/mesa/drivers/dri/swrast/swrast.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
@ -21,7 +22,7 @@ diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/
index d18dd09..dd7d0c0 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -63,6 +63,7 @@
@@ -66,6 +66,7 @@
static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
GLint texture_format, __DRIdrawable *dPriv)
{
@ -29,7 +30,7 @@ index d18dd09..dd7d0c0 100644
struct dri_context *dri_ctx;
int x, y, w, h;
__DRIscreen *sPriv = dPriv->driScreenPriv;
@@ -93,6 +94,13 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
@@ -96,6 +97,13 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
_mesa_init_teximage_fields(&dri_ctx->Base, texImage,
w, h, 1, 0, internalFormat, texFormat);

View File

@ -1,17 +1,3 @@
diff -up Mesa-8.0.1/src/glx/drisw_glx.c.jx Mesa-8.0.1/src/glx/drisw_glx.c
--- Mesa-8.0.1/src/glx/drisw_glx.c.jx 2012-04-02 10:34:23.000000000 -0400
+++ Mesa-8.0.1/src/glx/drisw_glx.c 2012-04-02 11:44:19.296407735 -0400
@@ -274,7 +274,9 @@ swrastShmGetImage(__DRIdrawable *read, c
do {
int i;
char *src = ximage->data;
- int dst_width = align(ximage->width * ximage->bits_per_pixel / 8, 256);
+ int bytes_per_pixel = ((ximage->bits_per_pixel + 7) / 8);
+ int dst_width = align(ximage->width * bytes_per_pixel,
+ 64 * bytes_per_pixel);
for (i = 0; i < ximage->height; i++) {
memcpy(data, src, ximage->bytes_per_line);
diff -up Mesa-8.0.1/src/mesa/state_tracker/st_manager.c.jx Mesa-8.0.1/src/mesa/state_tracker/st_manager.c
--- Mesa-8.0.1/src/mesa/state_tracker/st_manager.c.jx 2012-02-14 18:44:00.000000000 -0500
+++ Mesa-8.0.1/src/mesa/state_tracker/st_manager.c 2012-04-02 12:02:14.613964417 -0400

View File

@ -26,30 +26,6 @@ diff -u -r -p mesa-8.0.3.orig//src/mapi/glapi/gen/gl_x86_asm.py mesa-8.0.3/src/m
print ' .section ".note.ABI-tag", "a"'
print ' .p2align 2'
print ' .long 1f - 0f /* name length */'
diff -u -r -p mesa-8.0.3.orig//src/mapi/glapi/glapi_x86-64.S mesa-8.0.3/src/mapi/glapi/glapi_x86-64.S
--- mesa-8.0.3.orig//src/mapi/glapi/glapi_x86-64.S 2012-06-12 12:07:39.000000000 +0200
+++ mesa-8.0.3/src/mapi/glapi/glapi_x86-64.S 2012-06-12 12:09:43.000000000 +0200
@@ -37448,7 +37448,7 @@ GL_PREFIX(EGLImageTargetTexture2DOES):
.globl GL_PREFIX(TransformFeedbackVaryings) ; .set GL_PREFIX(TransformFeedbackVaryings), GL_PREFIX(TransformFeedbackVaryingsEXT)
.globl GL_PREFIX(ProvokingVertex) ; .set GL_PREFIX(ProvokingVertex), GL_PREFIX(ProvokingVertexEXT)
-#if defined(GLX_USE_TLS) && defined(__linux__)
+#if 0 && defined(__linux__)
.section ".note.ABI-tag", "a"
.p2align 2
.long 1f - 0f /* name length */
diff -u -r -p mesa-8.0.3.orig//src/mapi/glapi/glapi_x86.S mesa-8.0.3/src/mapi/glapi/glapi_x86.S
--- mesa-8.0.3.orig//src/mapi/glapi/glapi_x86.S 2012-06-12 12:07:39.000000000 +0200
+++ mesa-8.0.3/src/mapi/glapi/glapi_x86.S 2012-06-12 12:09:01.000000000 +0200
@@ -1504,7 +1504,7 @@ GLNAME(gl_dispatch_functions_start):
ALIGNTEXT16
GLNAME(gl_dispatch_functions_end):
-#if defined(GLX_USE_TLS) && defined(__linux__)
+#if 0 && defined(__linux__)
.section ".note.ABI-tag", "a"
.p2align 2
.long 1f - 0f /* name length */
diff -u -r -p mesa-8.0.3.orig//src/mapi/mapi/entry_x86-64_tls.h mesa-8.0.3/src/mapi/mapi/entry_x86-64_tls.h
--- mesa-8.0.3.orig//src/mapi/mapi/entry_x86-64_tls.h 2012-06-12 12:07:39.000000000 +0200
+++ mesa-8.0.3/src/mapi/mapi/entry_x86-64_tls.h 2012-06-12 12:10:20.000000000 +0200

View File

@ -1,108 +0,0 @@
From fe34006908f1ff99ada34d52c06fd80197e452ec Mon Sep 17 00:00:00 2001
From: Vinson Lee <vlee@freedesktop.org>
Date: Wed, 14 Mar 2012 05:40:52 +0000
Subject: gallivm: Fix createOProfileJITEventListener namespace with llvm-3.1.
llvm-3.1svn r152620 refactored the OProfile profiling code.
createOProfileJITEventListener was moved from the llvm namespace to the
llvm::JITEventListener namespace.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
---
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index fe7616b..68f8808 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -62,7 +62,11 @@
extern "C" void
lp_register_oprofile_jit_event_listener(LLVMExecutionEngineRef EE)
{
+#if HAVE_LLVM >= 0x0301
+ llvm::unwrap(EE)->RegisterJITEventListener(llvm::JITEventListener::createOProfileJITEventListener());
+#else
llvm::unwrap(EE)->RegisterJITEventListener(llvm::createOProfileJITEventListener());
+#endif
}
--
cgit v0.9.0.2-2-gbebe
From 1633dcd890d97bd5e4d125d57f2f529f04d14477 Mon Sep 17 00:00:00 2001
From: Vinson Lee <vlee@freedesktop.org>
Date: Tue, 06 Mar 2012 06:00:40 +0000
Subject: gallivm: Pass in a MCRegisterInfo to MCInstPrinter on llvm-3.1.
llvm-3.1svn r152043 changes createMCInstPrinter to take an additional
MCRegisterInfo argument.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
---
(limited to 'src/gallium/auxiliary/gallivm/lp_bld_debug.cpp')
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
index 11209da..b6849cb 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
@@ -235,7 +235,18 @@ lp_disassemble(const void* func)
int AsmPrinterVariant = AsmInfo->getAssemblerDialect();
#endif
-#if HAVE_LLVM >= 0x0300
+#if HAVE_LLVM >= 0x0301
+ OwningPtr<const MCRegisterInfo> MRI(T->createMCRegInfo(Triple));
+ if (!MRI) {
+ debug_printf("error: no register info for target %s\n", Triple.c_str());
+ return;
+ }
+#endif
+
+#if HAVE_LLVM >= 0x0301
+ OwningPtr<MCInstPrinter> Printer(
+ T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MRI, *STI));
+#elif HAVE_LLVM == 0x0300
OwningPtr<MCInstPrinter> Printer(
T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *STI));
#elif HAVE_LLVM >= 0x0208
--
cgit v0.9.0.2-2-gbebe
From 4f513002f65c629576252b34efedf3c8c4531dfd Mon Sep 17 00:00:00 2001
From: Vinson Lee <vlee@freedesktop.org>
Date: Tue, 03 Apr 2012 05:14:15 +0000
Subject: gallivm: Pass in a MCInstrInfo to createMCInstPrinter on llvm-3.1.
llvm-3.1svn r153860 makes MCInstrInfo available to the MCInstPrinter.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
---
(limited to 'src/gallium/auxiliary/gallivm/lp_bld_debug.cpp')
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
index c5afff0..9cf2094 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
@@ -241,11 +241,17 @@ lp_disassemble(const void* func)
debug_printf("error: no register info for target %s\n", Triple.c_str());
return;
}
+
+ OwningPtr<const MCInstrInfo> MII(T->createMCInstrInfo());
+ if (!MII) {
+ debug_printf("error: no instruction info for target %s\n", Triple.c_str());
+ return;
+ }
#endif
#if HAVE_LLVM >= 0x0301
OwningPtr<MCInstPrinter> Printer(
- T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MRI, *STI));
+ T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MII, *MRI, *STI));
#elif HAVE_LLVM == 0x0300
OwningPtr<MCInstPrinter> Printer(
T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *STI));
--
cgit v0.9.0.2-2-gbebe