platform/upstream/orc.git
6 years agoorc: remove empty and unused orcrules-x86.c
Tim-Philipp Müller [Sat, 28 Apr 2018 00:10:59 +0000 (01:10 +0100)]
orc: remove empty and unused orcrules-x86.c

6 years agoorc: move unusable orc_code_chunk_free() declaration to internal header
Tim-Philipp Müller [Fri, 27 Apr 2018 23:37:35 +0000 (00:37 +0100)]
orc: move unusable orc_code_chunk_free() declaration to internal header

Nothing in any public header ever returned or used an OrcCodeChunk.

6 years agoautotools: control symbol visibility via -fvisibility
Tim-Philipp Müller [Fri, 27 Apr 2018 17:42:29 +0000 (18:42 +0100)]
autotools: control symbol visibility via -fvisibility

All symbols are hidden by default unless exported
explicitly via our public API decorators.

6 years agomeson: fix symbol export with MSVC and use -fvisibility elsewhere
Tim-Philipp Müller [Fri, 27 Apr 2018 16:45:23 +0000 (17:45 +0100)]
meson: fix symbol export with MSVC and use -fvisibility elsewhere

Use newly-added ORC_API decorators to export symbols explicitly.

Get rid of orc.map file and the ORC_EXPORT stuff that never did
anything anyway (define was unused).

6 years agoorc: decorate public symbols with ORC_API
Tim-Philipp Müller [Fri, 27 Apr 2018 15:56:11 +0000 (16:56 +0100)]
orc: decorate public symbols with ORC_API

We'll use that later to control symbol visibility and
exported symbols.

6 years agoorc-test: decorate public symbols with ORC_TEST_API
Tim-Philipp Müller [Fri, 27 Apr 2018 13:00:54 +0000 (14:00 +0100)]
orc-test: decorate public symbols with ORC_TEST_API

We'll use that later to control symbol visibility and
exported symbols.

6 years agoorcc: add --decorator command line argument
Tim-Philipp Müller [Fri, 27 Apr 2018 16:02:18 +0000 (17:02 +0100)]
orcc: add --decorator command line argument

So we can add things like FOO_API if the functions are
supposed to be public, for example.

6 years agomeson: use -Bsymbolic-functions when linking if available
Tim-Philipp Müller [Fri, 27 Apr 2018 11:47:42 +0000 (12:47 +0100)]
meson: use -Bsymbolic-functions when linking if available

cc.has_linker_argument() requires Meson 0.46, so guard
against older Meson versions for now.

6 years agoorc: make more functions static
Tim-Philipp Müller [Fri, 27 Apr 2018 23:06:03 +0000 (00:06 +0100)]
orc: make more functions static

All of these are only used internally and are
not in any header files, but were still exported
by accident because they start with orc_*.

6 years agogtk-doc: get rid of templates
Tim-Philipp Müller [Fri, 20 Apr 2018 11:34:17 +0000 (12:34 +0100)]
gtk-doc: get rid of templates

gtkdoc-mktmpl was removed in recent gtk-doc versions.

Update gtk-doc.make to 1.27, but modify to generate
xml/version.entities (i.e. add copy in right dir).

All a bit cargo-culted, but seems to work.

6 years agoorcmips: only enable if the DSPr2 ASE is present
James Cowgill [Fri, 6 Apr 2018 14:26:43 +0000 (15:26 +0100)]
orcmips: only enable if the DSPr2 ASE is present

The mips target uses various instructions that a part of the MIPS DSPr2
ASE which is not present on all processors. The easiest solution is to
gate the target on the presense of DSPr2 at runtime.

Unfortunately there isn't a "nice" way to detect if DSPr2 is present, so
resort to parsing /proc/cpuinfo to get the information.

https://bugzilla.gnome.org/show_bug.cgi?id=760834

6 years agoorcutils: refactor /proc/cpuinfo reading code from orccpu-arm.c
James Cowgill [Fri, 6 Apr 2018 14:24:47 +0000 (15:24 +0100)]
orcutils: refactor /proc/cpuinfo reading code from orccpu-arm.c

This code will later be used by mips target, so it makes sense
to use a common function instead of duplicating the code.

https://bugzilla.gnome.org/show_bug.cgi?id=760834

6 years agoconfigure: don't check for functions that aren't used anywhere
Tim-Philipp Müller [Mon, 9 Apr 2018 18:14:05 +0000 (19:14 +0100)]
configure: don't check for functions that aren't used anywhere

And remove some unneeded includes.

6 years agomeson: fix mips cpu_family test
James Cowgill [Fri, 6 Apr 2018 14:38:54 +0000 (15:38 +0100)]
meson: fix mips cpu_family test

The cpu family "mipsel" does not exist in meson so the current test to
enable the HAVE_MIPSEL macro is always false. The real cpu family is
"mips" but this also matches big endian platforms so also check that the
endian is little.

https://bugzilla.gnome.org/attachment.cgi?id=370595

6 years agoorccpu-arm: Allow 'cpuinfo' fallback on non-android
Edward Hervey [Wed, 29 Nov 2017 08:19:20 +0000 (09:19 +0100)]
orccpu-arm: Allow 'cpuinfo' fallback on non-android

Reading the cpu flags from cpuinfo is also useful on non-android
ARM platforms which might have mechanisms that prevent /proc/*/auxv
from being read.

6 years agomeson: Always build both shared and static libraries
Nirbheek Chauhan [Tue, 21 Nov 2017 20:12:23 +0000 (01:42 +0530)]
meson: Always build both shared and static libraries

This reuses objects from the shared library for the static library, so
it should not affect the build time at all.

orc_dep and orc_test_dep will still contain the library selected by
--default-library

6 years agoBuild liborc-test also as a properly versioned library with meson
Sebastian Dröge [Mon, 20 Nov 2017 17:16:55 +0000 (19:16 +0200)]
Build liborc-test also as a properly versioned library with meson

6 years agoAdd meson configuration for disabling tests and gtk-doc docs
Sebastian Dröge [Mon, 20 Nov 2017 16:41:01 +0000 (18:41 +0200)]
Add meson configuration for disabling tests and gtk-doc docs

https://bugzilla.gnome.org/show_bug.cgi?id=790626

6 years agoAllow building shared/static library based on configuration
Sebastian Dröge [Mon, 20 Nov 2017 16:36:20 +0000 (18:36 +0200)]
Allow building shared/static library based on configuration

Before only a shared library was possible

6 years agoBack to development
Edward Hervey [Mon, 20 Nov 2017 15:47:00 +0000 (16:47 +0100)]
Back to development

6 years agoRelease 0.4.28 sandbox/mzx/upstream-git
Edward Hervey [Mon, 20 Nov 2017 15:15:58 +0000 (16:15 +0100)]
Release 0.4.28

6 years agoorcutils: Use compiler offsetof() when available
Edward Hervey [Mon, 20 Nov 2017 14:08:57 +0000 (15:08 +0100)]
orcutils: Use compiler offsetof() when available

The way we were calculating the offset of a structure entry was
undefined behaviour.

Instead, use 'offsetof()' (defined in C89) when available

6 years agoorccpu-x86: Fix undefined behaviour compilation issue
Edward Hervey [Sun, 19 Nov 2017 17:21:34 +0000 (18:21 +0100)]
orccpu-x86: Fix undefined behaviour compilation issue

runtime error: left shift of 1 by 31 places cannot be represented in type 'int'

6 years agoconfigure.ac: Print configuration after configuration
Edward Hervey [Sun, 19 Nov 2017 17:19:22 +0000 (18:19 +0100)]
configure.ac: Print configuration after configuration

Makes it easier to spot/review detected flags

6 years agoorc: Add a configure option to disable tests
Edward Hervey [Sun, 19 Nov 2017 17:18:19 +0000 (18:18 +0100)]
orc: Add a configure option to disable tests

For targets where it doesn't make sense.

Note that this will disable the build of orc-bugreport since it
depends on the the orc_test helper library

6 years agotesuite: Fix some leaks
Edward Hervey [Sun, 19 Nov 2017 17:15:31 +0000 (18:15 +0100)]
tesuite: Fix some leaks

6 years agoorcprogram-c.c: Don't cast constant
Edward Hervey [Sat, 21 Oct 2017 07:26:39 +0000 (09:26 +0200)]
orcprogram-c.c: Don't cast constant

Clang compilers would complain with constant-conversion error (trying
to fit a 'int' into another type)

This was introduced to fix a warning in gcc ... which doesn't happen

6 years agoorc: Cast maximum constants
Edward Hervey [Sat, 21 Oct 2017 07:25:39 +0000 (09:25 +0200)]
orc: Cast maximum constants

Avoids constant-conversion warnings as such:

/src/orc/orc/orcemulateopcodes.c:158:13: error: implicit conversion from 'int' to 'orc_int8' (aka 'signed char') changes value from 255 to -1 [-Werror,-Wconstant-conversion]
    var34 = ORC_CLAMP_UB((orc_uint8)var32 + (orc_uint8)var33);
          ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/src/orc/orc/orcemulateopcodes.c:29:48: note: expanded from macro 'ORC_CLAMP_UB'
                                               ^~~~~~~~~~
/src/orc/orc/orcemulateopcodes.c:18:20: note: expanded from macro 'ORC_UB_MAX'
                   ^~~
/src/orc/orc/orcemulateopcodes.c:12:55: note: expanded from macro 'ORC_CLAMP'
                                                      ^

7 years agoDist meson files with autotools make dist
Tim-Philipp Müller [Tue, 18 Jul 2017 11:33:15 +0000 (12:33 +0100)]
Dist meson files with autotools make dist

7 years agoBack to development
Tim-Philipp Müller [Mon, 17 Jul 2017 15:42:02 +0000 (16:42 +0100)]
Back to development

7 years agoRelease 0.4.27
Tim-Philipp Müller [Mon, 17 Jul 2017 15:16:35 +0000 (16:16 +0100)]
Release 0.4.27

7 years agoorcc: make coverity happy
Tim-Philipp Müller [Tue, 27 Jun 2017 08:43:07 +0000 (09:43 +0100)]
orcc: make coverity happy

Use typedefed enum so static analysis tools like coverity can know
we covered all possibilities in switch/case statements. CID 1413336.

7 years agoorc: preserve non volatile sse registers
Matej Knopp [Mon, 19 Jun 2017 02:00:31 +0000 (04:00 +0200)]
orc: preserve non volatile sse registers

required for MSVC
https://msdn.microsoft.com/en-us/library/9z1stfyw.aspx

orc already marks these register in compiler->save_regs,
but the actual saving and restoring was not done

https://bugzilla.gnome.org/show_bug.cgi?id=783931

7 years agomeson: Only use --version-script if not using MSVC
Nirbheek Chauhan [Fri, 23 Sep 2016 11:01:11 +0000 (16:31 +0530)]
meson: Only use --version-script if not using MSVC

7 years agomeson: use find_library() on compiler object
Tim-Philipp Müller [Sun, 28 May 2017 18:13:04 +0000 (19:13 +0100)]
meson: use find_library() on compiler object

The old stand-alone find_library() was deprecated.

7 years agomeson: add meson build
Tim-Philipp Müller [Thu, 15 Oct 2015 19:29:15 +0000 (20:29 +0100)]
meson: add meson build

Includes contributions from Nirbheek Chauhan <nirbheek@centricular.com>

7 years agoorcx86: Don't hard-code register size to zero in orc_x86_emit_*() functions
Igor Rondarev [Tue, 28 Feb 2017 09:23:55 +0000 (12:23 +0300)]
orcx86: Don't hard-code register size to zero in orc_x86_emit_*() functions

Instead use the size passed as argument. Fixes segmentation fault on QNX.

https://bugzilla.gnome.org/show_bug.cgi?id=779319

7 years agoorcx86: use HAVE_AMD64 and HAVE_I386 defines everywhere
Jan Schmidt [Fri, 28 Oct 2016 12:37:51 +0000 (23:37 +1100)]
orcx86: use HAVE_AMD64 and HAVE_I386 defines everywhere

Some places were checking for __amd64__ and __i386__ explicitly,
but MSVC doesn't define __amd64__ in 64-bit mode, so use the
define from config.h instead. Fixes incorrect asm generation
on 64-bit Windows

7 years agoBack to development
Sebastian Dröge [Wed, 31 Aug 2016 10:13:29 +0000 (13:13 +0300)]
Back to development

7 years agoRelease 0.4.26
Sebastian Dröge [Wed, 31 Aug 2016 10:13:04 +0000 (13:13 +0300)]
Release 0.4.26

7 years agopkgconfig: add orc-test path to the -uninstalled .pc file
Josep Torra [Thu, 25 Aug 2016 13:45:57 +0000 (15:45 +0200)]
pkgconfig: add orc-test path to the -uninstalled .pc file

Expose orc-test library in the uninstalled pkgconfig file.

7 years agouse 64bit arithmetic to increment the stride
Wim Taymans [Wed, 24 Aug 2016 08:10:09 +0000 (10:10 +0200)]
use 64bit arithmetic to increment the stride

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=770295

7 years agoorcx86: Fix generation of ModR/M / SIB bytes for the EBP, R12, R13 registers
Sebastian Dröge [Wed, 24 Aug 2016 16:11:18 +0000 (19:11 +0300)]
orcx86: Fix generation of ModR/M / SIB bytes for the EBP, R12, R13 registers

See http://wiki.osdev.org/X86-64_Instruction_Encoding#ModR.2FM

ESP and R12 are to be handled exactly the same, that is the addressing is
done with SIB instead of directly.

EBP and R13 have a special case for Mod 00, where they're expecting RIP/EIP
plus 32 bit displacement. If we handle them like all other registers, we would
instead of addressing offset 0, address something relative to the instruction
pointer and make part of the following instruction the 32 bit displacement.

Instead of using Mod 00 for offset 0 like for all other registers, we use Mod
01 and a 8 bit displacement of 0.

On Windows this rather low-level bug caused problems at a rather
high-level in the ORC video conversion code, where a movdqu was eating the
following paddw instruction and tried to load data from a rather random memory
location.

For whatever reason this didn't cause any other big problems in other ORC
generated code, and it also only seemed to have caused problems on Windows.

https://bugzilla.gnome.org/show_bug.cgi?id=765713

8 years agotests: fix a warning spotted when building in osx
Josep Torra [Sun, 24 Jul 2016 16:09:50 +0000 (18:09 +0200)]
tests: fix a warning spotted when building in osx

orctest.c:730:19: error: logical not is only applied to the left hand side of this comparison
       if (!float_compare (dest_emul[l-ORC_VAR_D1], dest_exec[l-ORC_VAR_D1], i, j) != 0) {

It seems some sort of typo. Fixing by removing the potentially leftover condition.

8 years agoFix test_parse with no executable backend
Pascal Terjan [Wed, 4 May 2016 09:36:21 +0000 (09:36 +0000)]
Fix test_parse with no executable backend

https://bugzilla.gnome.org/show_bug.cgi?id=765953

8 years agoBack to development
Tim-Philipp Müller [Sat, 5 Mar 2016 00:32:19 +0000 (00:32 +0000)]
Back to development

8 years agoRelease 0.4.25
Tim-Philipp Müller [Sat, 5 Mar 2016 00:01:25 +0000 (00:01 +0000)]
Release 0.4.25

8 years agoconfigure: fix bug report url
Tim-Philipp Müller [Fri, 4 Mar 2016 23:58:09 +0000 (23:58 +0000)]
configure: fix bug report url

8 years agoorcc: check version of liborc to make sure the right lib is being used
Tim-Philipp Müller [Wed, 2 Mar 2016 19:04:35 +0000 (19:04 +0000)]
orcc: check version of liborc to make sure the right lib is being used

Interesting compilation failures might otherwise ensue.

8 years agoAdd orc_version_string()
Tim-Philipp Müller [Wed, 2 Mar 2016 19:04:24 +0000 (19:04 +0000)]
Add orc_version_string()

8 years agouninstalled.pc: add support for non libtool build systems
Julien Isorce [Thu, 18 Feb 2016 14:18:32 +0000 (14:18 +0000)]
uninstalled.pc: add support for non libtool build systems

Currently the .la path is provided which requires to use libtool as
mentioned in the GStreamer manual section-helloworld-compilerun.html.
It is fine as long as the application is built using libtool.

So currently it is not possible to compile a GStreamer application
within gst-uninstalled with CMake or other build system different
than autotools.

This patch allows to do the following in gst-uninstalled env:
gcc test.c -o test $(pkg-config --cflags --libs orc-uninstalled)
Previously it required to prepend libtool --mode=link

https://bugzilla.gnome.org/show_bug.cgi?id=720778

8 years agoorcprogram-c: check array bound in get_varname_stride()
Luis de Bethencourt [Mon, 14 Dec 2015 16:20:18 +0000 (16:20 +0000)]
orcprogram-c: check array bound in get_varname_stride()

https://bugzilla.gnome.org/show_bug.cgi?id=759840

8 years agoRevert "orcprogram-c: avoid running out of bounds of varnames"
Luis de Bethencourt [Wed, 17 Feb 2016 15:05:49 +0000 (15:05 +0000)]
Revert "orcprogram-c: avoid running out of bounds of varnames"

This reverts commit 951091788b8496868bf86b2f853f5214659e782a.

This isn't a proper fix and the risk of bringing in a regression is too
high for the small and incomplete improvement.

8 years agoconfigure: Only check for Android's liblog on Android targets
Sebastian Dröge [Wed, 30 Dec 2015 18:52:58 +0000 (20:52 +0200)]
configure: Only check for Android's liblog on Android targets

https://bugzilla.gnome.org/show_bug.cgi?id=760008

8 years agoconfigure: Make -Bsymbolic check work with clang.
Koop Mast [Sun, 20 Dec 2015 23:43:49 +0000 (00:43 +0100)]
configure: Make -Bsymbolic check work with clang.

Update the -Bsymbolic check with the version glib has. This version
works with clang.

https://bugzilla.gnome.org/show_bug.cgi?id=759713

8 years agoorcprogram-c: avoid running out of bounds of varnames
Luis de Bethencourt [Mon, 14 Dec 2015 13:46:52 +0000 (13:46 +0000)]
orcprogram-c: avoid running out of bounds of varnames

These two for loops use varnames[i], since varname has 48 items avoid
running out of bounds by running the for loop up to that limit.

CID 1147004

8 years agodoc: update from entropywave locations to gstreamer
Tim-Philipp Müller [Tue, 20 Oct 2015 10:28:52 +0000 (11:28 +0100)]
doc: update from entropywave locations to gstreamer

The entropywave website isn't even up any longer.
Docs have been uploaded to gstreamer website too now.

8 years agodoc: update generated opcode tables
Tim-Philipp Müller [Tue, 20 Oct 2015 09:58:23 +0000 (10:58 +0100)]
doc: update generated opcode tables

8 years agotools: remove unused test.orc
Tim-Philipp Müller [Thu, 15 Oct 2015 23:05:03 +0000 (00:05 +0100)]
tools: remove unused test.orc

8 years agobuild: fix detection of AMD Kn host cpu
Tim-Philipp Müller [Thu, 15 Oct 2015 10:15:01 +0000 (11:15 +0100)]
build: fix detection of AMD Kn host cpu

Not that anyone noticed in all these years, so
the check is probably bogus.

8 years agoexecutor: fix load of parameters smaller than 64 bits
Wim Taymans [Mon, 7 Sep 2015 13:30:36 +0000 (15:30 +0200)]
executor: fix load of parameters smaller than 64 bits

Parameters less than 64 bits are passed in just one param register.
Fixes crashes on ldresnearb and friends in emulated code.

8 years agocompiler: also prefer the backup function when no target
Wim Taymans [Mon, 7 Sep 2015 11:43:55 +0000 (13:43 +0200)]
compiler: also prefer the backup function when no target

If we don't have a compiler target (like for ppc64), prefer to use the
backup function instead of doing full emulation.

8 years agotest-limits: improve test without target
Wim Taymans [Wed, 12 Aug 2015 11:16:28 +0000 (13:16 +0200)]
test-limits: improve test without target

When there is no target available, the unit test would fail with a
non-fatal error (because emulation would be done). The non-fatal error
would however not be overwritten by the real error when we exceed the
limits.

First relax the first compilation test to check for FATAL errors. Then
reset the program (and clear any non-fatal errors) before triggering
the next error.

9 years agoBack to development
Sebastian Dröge [Wed, 24 Jun 2015 20:26:31 +0000 (22:26 +0200)]
Back to development

9 years agoRelease 0.4.24
Sebastian Dröge [Wed, 24 Jun 2015 20:19:53 +0000 (22:19 +0200)]
Release 0.4.24

9 years agoparse: increase array size
Wim Taymans [Mon, 22 Jun 2015 14:42:58 +0000 (16:42 +0200)]
parse: increase array size

Increase the size of the array to hold our variable name and use
snprintf to avoid overflows.

9 years agoprogram: only reuse constants of the same size and value
Wim Taymans [Mon, 22 Jun 2015 11:13:36 +0000 (13:13 +0200)]
program: only reuse constants of the same size and value

When reusing an existing constant, make sure not only the value but also
the size is the same. We then also need to make a name based on the size
and value so that we can store the same value for different sizes.

Fixes problem with the bayer functions that used 255 as a 16 and 8 bit
constant. This was not detected in the unit test because both the backup
and asm functions do the same error, but it could be seen when a new
backup function was checked against a older ORC.

9 years agotestsuite: fix reading .orc files with win32 line endings on windows
Tim-Philipp Müller [Fri, 22 May 2015 13:11:32 +0000 (14:11 +0100)]
testsuite: fix reading .orc files with win32 line endings on windows

Just read them in binary form with win32 line endings and
parse them to the orc parser as-is now that the parser
can handle win32 line endings.

9 years agotestsuite: add parsing test case for win32 line endings
Tim-Philipp Müller [Fri, 22 May 2015 12:55:46 +0000 (13:55 +0100)]
testsuite: add parsing test case for win32 line endings

Should handle \r\n as well as \n instead of relying on
the file reader to translate it.

9 years agoorcc: fix reading .orc files with win32 line endings on windows
Tim-Philipp Müller [Fri, 22 May 2015 13:07:09 +0000 (14:07 +0100)]
orcc: fix reading .orc files with win32 line endings on windows

We used to open the files in text/translation mode, which
makes fread() convert all windows-style line endings (\r\n)
to unix style line endings (\n) under the hood. However, the
file size we get from the seek is apparently still the original
binary size, and then we just get less data because the \r have
been removed. This means we put our zero terminator in the wrong
place, and there might be some junk between the end of the
text data and the zero terminator.

Fix this by reading the file in binary mode (who knows what
else the text mode might mess up or trip over, e.g. unicode
chars in comments or such) and pass it to the orc parser
as-is now that the parser can handle win32 line endings.

Spotted by Ray Molenkamp.

9 years agoorcparse: handle win32 \r\n line endings
Tim-Philipp Müller [Fri, 22 May 2015 12:57:30 +0000 (13:57 +0100)]
orcparse: handle win32 \r\n line endings

9 years agotests: use AM_TESTS_ENVIRONMENT
Tim-Philipp Müller [Fri, 10 Apr 2015 11:41:10 +0000 (12:41 +0100)]
tests: use AM_TESTS_ENVIRONMENT

So test environment gets used also with the
automake test runner. The code has fallbacks
so this doesn't actually fix anything in
particular.

9 years agotest: protect against out-of-bounds
Luis de Bethencourt [Thu, 12 Mar 2015 13:50:33 +0000 (13:50 +0000)]
test: protect against out-of-bounds

Same as commit 8bc018cbbe25521f91ecba0fc98185d2eaac650d

CID #1146994
CID #1146995

9 years agotest: protect against going out of bounds
Luis de Bethencourt [Thu, 12 Mar 2015 13:43:43 +0000 (13:43 +0000)]
test: protect against going out of bounds

Conditions should never happen but protect against going out of bounds in the
args array.

CID #1146993

9 years agoorcc: Remove duplicate codepath
Edward Hervey [Sun, 8 Mar 2015 06:51:34 +0000 (07:51 +0100)]
orcc: Remove duplicate codepath

The code is identical regardless of the variable value

CID #1226451

https://bugzilla.gnome.org/show_bug.cgi?id=745830

9 years agotestsuite: Put a limit to the memcpy test
Edward Hervey [Fri, 27 Feb 2015 08:02:12 +0000 (09:02 +0100)]
testsuite: Put a limit to the memcpy test

Some systems have massive L3 cache that can exceed 64MB, which would
result in attempting to read/write about our allocated memory.

If we can deal with 64MB... there's a good chance we can handle above.

9 years agoorccodemem: fix mmap leak on error path
Vincent Penquerc'h [Fri, 30 Jan 2015 10:30:07 +0000 (10:30 +0000)]
orccodemem: fix mmap leak on error path

Not that these seem to be freed at all on non error

9 years agoBack to development
Sebastian Dröge [Wed, 17 Dec 2014 09:14:11 +0000 (10:14 +0100)]
Back to development

9 years agoRelease 0.4.23 0.4.23
Sebastian Dröge [Wed, 17 Dec 2014 09:13:17 +0000 (10:13 +0100)]
Release 0.4.23

9 years agoneon: add support for all constants
Wim Taymans [Wed, 10 Dec 2014 12:33:37 +0000 (13:33 +0100)]
neon: add support for all constants

Use mov and orr to construct all constants.

9 years agoneon: add support for 64 bit parameters
Wim Taymans [Tue, 9 Dec 2014 15:58:56 +0000 (16:58 +0100)]
neon: add support for 64 bit parameters

9 years agoneon: vtrn and vzip are undefined when src == dest
Wim Taymans [Tue, 9 Dec 2014 15:54:19 +0000 (16:54 +0100)]
neon: vtrn and vzip are undefined when src == dest

Make sure we use different src and dest registers for vtrn and vzip
because otherwise they are undefined.

9 years agoorcc: allow setting custom backup function
Wim Taymans [Fri, 5 Dec 2014 11:01:21 +0000 (12:01 +0100)]
orcc: allow setting custom backup function

Add a new .backup keyword that instructs the orc compiler to call our
custom backup function instead of generating one. This is interesting if
the generated backup function is slower than a plain C implementation.

9 years agoFix high-order bit of first register in VPUSH/VPOP generation
Jerome Laheurte [Wed, 3 Dec 2014 10:03:52 +0000 (11:03 +0100)]
Fix high-order bit of first register in VPUSH/VPOP generation

CID 1256553
CID 1256554

https://bugzilla.gnome.org/show_bug.cgi?id=727464

9 years agoPreserve NEON/VFP registers across subroutines according to ARM PCS (5.1.2.1)
Jerome Laheurte [Wed, 26 Nov 2014 12:29:08 +0000 (13:29 +0100)]
Preserve NEON/VFP registers across subroutines according to ARM PCS (5.1.2.1)

https://bugzilla.gnome.org/show_bug.cgi?id=727464

9 years agoorcc: program-c: fix 64-bit parameter loading (loadpq) on big-endian systems
Tim-Philipp Müller [Sat, 8 Nov 2014 13:23:12 +0000 (13:23 +0000)]
orcc: program-c: fix 64-bit parameter loading (loadpq) on big-endian systems

When passing 64-bit parameters through OrcExecutor, we
have to split them up into two 32-bit parameters for
backwards compatibility reasons. When generating C code,
make sure that we split up 64-bit parameters in the same
way as loadpq will read them back later. The lower 32 bits
should end up in params[ORC_VAR_D1+i] and the higher bits
should end up in params[ORC_VAR_T1+i]. The way it was done
so far, the higher/lower bits ended up swapped on big endian
systems, and then got deserialised in swapped order by loadpq.
This resulted in bogus parameters being used.

In particular, this broke the gstreamer volume element and
its unit tests on big endian systems when handling samples
in F64 format (i.e. doubles).

https://bugzilla.gnome.org/show_bug.cgi?id=739354

9 years agoorc: include orcprogram only once
Wim Taymans [Fri, 26 Sep 2014 16:16:18 +0000 (18:16 +0200)]
orc: include orcprogram only once

9 years agoopcode: mark copy opcodes and don't emit mov for them
Wim Taymans [Fri, 26 Sep 2014 14:32:25 +0000 (16:32 +0200)]
opcode: mark copy opcodes and don't emit mov for them

There is no need to emit a mov operation when the source and dest
registers of a copy operation are different, that's kindof the point of
the copy operation. Saves some useless movs whenever copyX is used.

9 years agocompiler: use src register as dest2
Wim Taymans [Fri, 26 Sep 2014 13:02:21 +0000 (15:02 +0200)]
compiler: use src register as dest2

Also try to use the src register as the second destination register for
opcodes with 2 results. Saves one unnecessary mov for splitX opcodes.

9 years agocompiler: update max_used_temp_reg before use
Wim Taymans [Fri, 26 Sep 2014 10:11:14 +0000 (12:11 +0200)]
compiler: update max_used_temp_reg before use

It should not be smaller than min_temp_reg or we will fail to search for
a free register.

9 years agosse: improve splitXX on sse3
Wim Taymans [Fri, 26 Sep 2014 08:09:17 +0000 (10:09 +0200)]
sse: improve splitXX on sse3

We can implement splitXX with byte shuffles on sse3

9 years agoparse: cleanup
Wim Taymans [Mon, 22 Sep 2014 08:14:04 +0000 (10:14 +0200)]
parse: cleanup

Be more elegant in parsing and passing the parameters to
orc_program_append_str_2().

9 years agotest: add more tests
Wim Taymans [Mon, 22 Sep 2014 08:11:35 +0000 (10:11 +0200)]
test: add more tests

9 years agocompiler: keep track of temp variables that contain param/const
Wim Taymans [Fri, 19 Sep 2014 16:07:10 +0000 (18:07 +0200)]
compiler: keep track of temp variables that contain param/const

Keep track of what const/param is loaded into a temp variable. We can
then see if the const is already loaded in a variable and simply reuse
it instead of using a new temp. We must also make sure we load constants
of different size in different temp variables.

9 years agoRevert reuse constants
Wim Taymans [Fri, 19 Sep 2014 20:57:03 +0000 (22:57 +0200)]
Revert reuse constants

This reverts commit 2ece711c615d327be1e74bec4844186ced58b0ef.
This reverts commit 2ae41b98a35405dbfd35209e7d68428be77a2e62.
This reverts commit 106dacc2620126dedb99d2b981ba2e5a7d4591f9.
This reverts commit f6697e30681f46f6f3f632ddbbcab98107eec7e0.

These commits are more complicated than needed. A more simple solution
is possible by tracking the registers that hold a certain constant and
simply reusing that register when we can. We can then load the same
constant in different registers of different sizes if needed.

9 years agoparse: make contants per size
Wim Taymans [Fri, 19 Sep 2014 13:39:22 +0000 (15:39 +0200)]
parse: make contants per size

When we automatically create constants from the opcode arguments, make
different constants per size and rewrite the program to use the newly
created constant.

9 years agoparse: fix opcode arg size
Wim Taymans [Fri, 19 Sep 2014 13:38:21 +0000 (15:38 +0200)]
parse: fix opcode arg size

9 years agoexecutor: use the size of the opcode arg to get multiplier
Wim Taymans [Fri, 19 Sep 2014 10:23:44 +0000 (12:23 +0200)]
executor: use the size of the opcode arg to get multiplier

When loading a constant, select the multiplier based on the size of the
opcode argument. This is safer because we have existing code that declares
the constants of the wrong size.

9 years agoexecutor: fully expand const vars into the temp register
Wim Taymans [Thu, 18 Sep 2014 17:32:18 +0000 (19:32 +0200)]
executor: fully expand const vars into the temp register

When loading a const in a register, always make it cover the full
register so that it containts enough values to be used in x2 and
x4 instructions.

9 years agoparse: register constants with the right size
Wim Taymans [Fri, 19 Sep 2014 08:55:52 +0000 (10:55 +0200)]
parse: register constants with the right size

When we detect a constant while parsing a line, register it with the
same size as the argument of the opcode.