platform/upstream/orc.git
4 years agoorc: Don't set memory protection if there's no code
Nirbheek Chauhan [Thu, 2 Jul 2020 09:32:57 +0000 (15:02 +0530)]
orc: Don't set memory protection if there's no code

If the size of the JIT code is 0, there's no code and the *mem is
uninitialized. This can happen when orcc.exe is used to generate
backup C code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/orc/-/merge_requests/44>

4 years agoorc: Print hex value directly instead of a constant
Nirbheek Chauhan [Thu, 2 Jul 2020 09:32:12 +0000 (15:02 +0530)]
orc: Print hex value directly instead of a constant

This is actually more useful because the constants are all bitfields
and it's fairly straightforward to look it up:

https://docs.microsoft.com/en-us/windows/win32/memory/memory-protection-constants

Part-of: <https://gitlab.freedesktop.org/gstreamer/orc/-/merge_requests/44>

4 years agoorc: Fix indentation
Nirbheek Chauhan [Thu, 2 Jul 2020 09:31:40 +0000 (15:01 +0530)]
orc: Fix indentation

Only whitespace changes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/orc/-/merge_requests/44>

4 years agoci: Attempt to fix broken Windows CI
Nirbheek Chauhan [Tue, 30 Jun 2020 11:14:59 +0000 (16:44 +0530)]
ci: Attempt to fix broken Windows CI

https://gitlab.freedesktop.org/nirbheek/orc/-/pipelines/169274

Update to latest image and use the gstreamer runner tag. Matches the
gst-ci template.

Also try to make MSYS2 CI more resilient by following:
https://github.com/msys2/setup-msys2/blob/master/main.js#L98

Part-of: <https://gitlab.freedesktop.org/gstreamer/orc/-/merge_requests/42>

4 years agoorc: Fix some warnings on MSVC and enable --werror
Nirbheek Chauhan [Tue, 30 Jun 2020 11:42:54 +0000 (17:12 +0530)]
orc: Fix some warnings on MSVC and enable --werror

Part-of: <https://gitlab.freedesktop.org/gstreamer/orc/-/merge_requests/42>

4 years agoorccodemem: Add support for Universal Windows Platform apps
Nirbheek Chauhan [Tue, 30 Jun 2020 10:46:39 +0000 (16:16 +0530)]
orccodemem: Add support for Universal Windows Platform apps

VirtualAlloc is VirtualAllocFromApp when targeting UWP, and you can
only allocate executable pages if you have the codeGeneration
capability set in the app manifest. Check for that capability in
_orc_compiler_init() and switch to backup code or emulation if it
isn't available instead of crashing when VirtualAllocFromApp
returns NULL.

Also you cannot allocate pages that are both READWRITE and EXECUTE, so
we allocate as read-write first, then set the memory as execute-only
after the code has been compiled and copied over.

Part-of: <https://gitlab.freedesktop.org/gstreamer/orc/-/merge_requests/42>

4 years agoorc: Implement a windows helper for getenv()
Nirbheek Chauhan [Tue, 30 Jun 2020 10:00:35 +0000 (15:30 +0530)]
orc: Implement a windows helper for getenv()

On Windows, getenv() is deprecated and does not work in all cases. On
the Universal Windows Platform (UWP) it always returns NULL. Add
a wrapper orc_getenv() that calls GetEnvironmentVariable on Windows.

Also change semantics to always make a copy before returning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/orc/-/merge_requests/42>

4 years agomeson: improve summary() printout
Tim-Philipp Müller [Fri, 13 Mar 2020 12:29:12 +0000 (12:29 +0000)]
meson: improve summary() printout

Pass bool_yn kwarg to summary() to make it
print boolean arguments as nice coloured YES/NO
instead of true/false.

We can also pass multiple arguments like a bool
and a disabled_reason string. In meson 0.54 these
can be printed on one line if we set the line_sep
kwarg. In meson 0.53 these will always be printed
on two lines (and it will warn about the line_sep
arg), so only pass two args if docs are disabled
and otherwise just pass one arg, so we don't end
up with an ugly empty line with meson 0.53.

4 years agomeson: add summary() if Meson version is new enough
Tim-Philipp Müller [Fri, 7 Feb 2020 15:53:29 +0000 (15:53 +0000)]
meson: add summary() if Meson version is new enough

4 years agoci: update windows runner tag and image
Tim-Philipp Müller [Sat, 8 Feb 2020 00:17:22 +0000 (00:17 +0000)]
ci: update windows runner tag and image

5 years agoRelease 0.4.31
Sebastian Dröge [Sat, 2 Nov 2019 09:24:17 +0000 (10:24 +0100)]
Release 0.4.31

5 years agoneon: Enable Flush-to-zero mode for float programs
Doug Nazar [Fri, 20 Sep 2019 08:56:35 +0000 (04:56 -0400)]
neon: Enable Flush-to-zero mode for float programs

Some of the instructions are not NEON (which always uses FTZ),
but are actually VFP, which requires enabling FTZ mode.

5 years agopowerpc: Fix a few opcodes to support x2/x4 usage
Doug Nazar [Fri, 20 Sep 2019 08:51:42 +0000 (04:51 -0400)]
powerpc: Fix a few opcodes to support x2/x4 usage

5 years agopowerpc: Fix a few rules to handle multiple vector elements
Doug Nazar [Sat, 14 Sep 2019 01:07:35 +0000 (21:07 -0400)]
powerpc: Fix a few rules to handle multiple vector elements

5 years agopowerpc: Add manual denormalize support for vsx instructions
Doug Nazar [Sat, 14 Sep 2019 00:53:50 +0000 (20:53 -0400)]
powerpc: Add manual denormalize support for vsx instructions

The VSX vector instructions don't support automatically treating source
denormalized FP numbers as 0 or converting the denormalized results
to zero.

5 years agotestsuite: Reduce memcpy_speed loops
Doug Nazar [Sat, 14 Sep 2019 00:24:28 +0000 (20:24 -0400)]
testsuite: Reduce memcpy_speed loops

Even with the PowerPC copy improvements we still exceed the 30s
time limit.

Power8 has an 8MB L3 cache, resulting in a total copy of ~9GB.

Before PowerPC copy: ~48s
 After PowerPC copy: ~38s
                now: ~18s

5 years agopowerpc: Add custom handling of copy programs
Doug Nazar [Sat, 14 Sep 2019 00:17:47 +0000 (20:17 -0400)]
powerpc: Add custom handling of copy programs

Provides ~20x speedup for fulling aligned buffers, although still
slower than builtin memcpy.

5 years agopowerpc: Move load/store align helpers to common file
Doug Nazar [Fri, 13 Sep 2019 23:52:58 +0000 (19:52 -0400)]
powerpc: Move load/store align helpers to common file

5 years agopowerpc: Improve constant handling
Doug Nazar [Fri, 13 Sep 2019 23:42:58 +0000 (19:42 -0400)]
powerpc: Improve constant handling

Some of the constants are used by the invariants so add them to
the precheck and then load constants first.

5 years agopowerpc: Fix register order of a few emit helpers
Doug Nazar [Fri, 13 Sep 2019 23:32:24 +0000 (19:32 -0400)]
powerpc: Fix register order of a few emit helpers

Two emit helpers had their parameters in the wrong location in
the generated opcode. Hasn't mattered because they were using
the same register for source & dest.

Constant flags are now at the end, so the label should be marked
forward, not backward.

5 years agotestsuite: Return error from exec_parse if a program fails
Doug Nazar [Fri, 13 Sep 2019 23:22:04 +0000 (19:22 -0400)]
testsuite: Return error from exec_parse if a program fails

5 years agoorctest: Fix parentheses location in ULP test
Doug Nazar [Fri, 13 Sep 2019 23:15:47 +0000 (19:15 -0400)]
orctest: Fix parentheses location in ULP test

5 years agoFix OrcTargetPowerPCFlags enum typedef
Pablo Marcos Oltra [Tue, 10 Sep 2019 15:36:51 +0000 (17:36 +0200)]
Fix OrcTargetPowerPCFlags enum typedef

5 years agoBack to development
Sebastian Dröge [Mon, 9 Sep 2019 07:27:32 +0000 (10:27 +0300)]
Back to development

5 years agoRelease 0.4.30
Sebastian Dröge [Mon, 9 Sep 2019 07:21:29 +0000 (10:21 +0300)]
Release 0.4.30

5 years agopowerpc: Use extended mnemonic for load immediate
Doug Nazar [Wed, 28 Aug 2019 14:30:12 +0000 (10:30 -0400)]
powerpc: Use extended mnemonic for load immediate

5 years agopowerpc: Add double & quad operands for vsx/v2.07 compatible cpus
Doug Nazar [Wed, 28 Aug 2019 14:28:39 +0000 (10:28 -0400)]
powerpc: Add double & quad operands for vsx/v2.07 compatible cpus

5 years agopowerpc: Fix cpu feature detection
Doug Nazar [Wed, 28 Aug 2019 14:23:31 +0000 (10:23 -0400)]
powerpc: Fix cpu feature detection

Fix meson cpu family detection.
Actually call cpu detection from progam init.
Add VSX & v2.07 checks for linux with options to diable.
Add display of target flags & cache sizes.

5 years agoDrop support for Autotools as build system
Tim-Philipp Müller [Fri, 19 Apr 2019 23:22:51 +0000 (00:22 +0100)]
Drop support for Autotools as build system

5 years agotests: Allow exec testing of single opcode
Doug Nazar [Wed, 28 Aug 2019 14:05:21 +0000 (10:05 -0400)]
tests: Allow exec testing of single opcode

5 years agotests: Use correct double/int64 functions for parameters & consts
Doug Nazar [Wed, 28 Aug 2019 14:00:33 +0000 (10:00 -0400)]
tests: Use correct double/int64 functions for parameters & consts

5 years agoexecutor: x2 union members not endian safe
Doug Nazar [Wed, 28 Aug 2019 13:55:26 +0000 (09:55 -0400)]
executor: x2 union members not endian safe

5 years agopowerpc: Pre-load long constants & invariants
Doug Nazar [Sun, 25 Aug 2019 19:50:15 +0000 (15:50 -0400)]
powerpc: Pre-load long constants & invariants

PowerPC doesn't have an easy way to load a long constant into a
vector register so we emit the value into the code and then load it.

This moves those values to after the epilogue and then loads them
before starting the outer loop.

5 years agoorc: Consolidate orc_program_has_float()
Doug Nazar [Sun, 25 Aug 2019 19:41:59 +0000 (15:41 -0400)]
orc: Consolidate orc_program_has_float()

5 years agoorc: Make orc_*_emit_invariants() generic
Doug Nazar [Sun, 25 Aug 2019 18:50:11 +0000 (14:50 -0400)]
orc: Make orc_*_emit_invariants() generic

Move mmx/sse emit invariant function to orcompiler so it can
be used on other architectures.

5 years agoorccodemem: Mark exec mapping writable if debugging
Doug Nazar [Sun, 25 Aug 2019 18:27:23 +0000 (14:27 -0400)]
orccodemem: Mark exec mapping writable if debugging

gdb needs the mapping to be writable to set breakpoints.

5 years agoorctest: Fix ULP compare and make compatible with clang
Doug Nazar [Sat, 31 Aug 2019 15:08:58 +0000 (11:08 -0400)]
orctest: Fix ULP compare and make compatible with clang

5 years agobuild: fix werror build with clang
Matthew Waters [Tue, 27 Aug 2019 01:36:49 +0000 (11:36 +1000)]
build: fix werror build with clang

../subprojects/orc/orc-test/orcarray.c:230:47: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
          if ((a[i] < 0.0) == (b[i] < 0.0) && abs(*(orc_uint32 *)&a[i] - *(orc_uint32 *)&b[i]) <= 2) continue;
                                              ^
../subprojects/orc/orc-test/orcarray.c:230:47: note: remove the call to 'abs' since unsigned values cannot be negative
          if ((a[i] < 0.0) == (b[i] < 0.0) && abs(*(orc_uint32 *)&a[i] - *(orc_uint32 *)&b[i]) <= 2) continue;
                                              ^~~
../subprojects/orc/orc-test/orcarray.c:247:47: error: taking the absolute value of unsigned type 'unsigned long' has no effect [-Werror,-Wabsolute-value]
          if ((a[i] < 0.0) == (b[i] < 0.0) && abs(*(orc_uint64 *)&a[i] - *(orc_uint64 *)&b[i]) <= 2) continue;
                                              ^
../subprojects/orc/orc-test/orcarray.c:247:47: note: remove the call to 'abs' since unsigned values cannot be negative
          if ((a[i] < 0.0) == (b[i] < 0.0) && abs(*(orc_uint64 *)&a[i] - *(orc_uint64 *)&b[i]) <= 2) continue;
                                              ^~~
../subprojects/orc/orc-test/orctest.c:525:63: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
      if ((*(float *)ptr1 < 0.0) == (*(float *)ptr2 < 0.0) && abs(*(orc_uint32 *)ptr1 - *(orc_uint32 *)ptr2) <= 2) return TRUE;
                                                              ^
../subprojects/orc/orc-test/orctest.c:525:63: note: remove the call to 'abs' since unsigned values cannot be negative
      if ((*(float *)ptr1 < 0.0) == (*(float *)ptr2 < 0.0) && abs(*(orc_uint32 *)ptr1 - *(orc_uint32 *)ptr2) <= 2) return TRUE;
                                                              ^~~
../subprojects/orc/orc-test/orctest.c:530:65: error: taking the absolute value of unsigned type 'unsigned long' has no effect [-Werror,-Wabsolute-value]
      if ((*(double *)ptr1 < 0.0) == (*(double *)ptr2 < 0.0) && abs(*(orc_uint64 *)ptr1 - *(orc_uint64 *)ptr2) <= 2) return TRUE;
                                                                ^
../subprojects/orc/orc-test/orctest.c:530:65: note: remove the call to 'abs' since unsigned values cannot be negative
      if ((*(double *)ptr1 < 0.0) == (*(double *)ptr2 < 0.0) && abs(*(orc_uint64 *)ptr1 - *(orc_uint64 *)ptr2) <= 2) return TRUE;
                                                                ^~~

5 years agopowerpc: Add little endian support
Doug Nazar [Tue, 20 Aug 2019 08:50:56 +0000 (04:50 -0400)]
powerpc: Add little endian support

5 years agopowerpc: Fix whitespace
Doug Nazar [Tue, 20 Aug 2019 08:38:39 +0000 (04:38 -0400)]
powerpc: Fix whitespace

5 years agoorc: Add ORC_LIKELY/ORC_UNLIKELY macros
Doug Nazar [Sun, 18 Aug 2019 15:50:44 +0000 (11:50 -0400)]
orc: Add ORC_LIKELY/ORC_UNLIKELY macros

5 years agomeson: Fix ppc/ppc64 cpu family detection
Doug Nazar [Sun, 18 Aug 2019 15:48:10 +0000 (11:48 -0400)]
meson: Fix ppc/ppc64 cpu family detection

5 years agoorctest: print_array_val_float return value not used
Doug Nazar [Sun, 18 Aug 2019 15:47:06 +0000 (11:47 -0400)]
orctest: print_array_val_float return value not used

5 years agoadd Hygon Dhyana processor support
fanjinke [Tue, 7 May 2019 15:48:37 +0000 (23:48 +0800)]
add Hygon Dhyana processor support

Signed-off-by: fanjinke <fanjinke@hygon.cn>
5 years agotests: Use float constants and parameters when testing float opcodes.
Doug Nazar [Tue, 13 Aug 2019 19:38:55 +0000 (15:38 -0400)]
tests: Use float constants and parameters when testing float opcodes.

5 years agoorcarm: Fix flushing of icache when using dual map
Doug Nazar [Wed, 7 Aug 2019 01:44:02 +0000 (21:44 -0400)]
orcarm: Fix flushing of icache when using dual map

On a codemem_dual_map setup, we need to also flush the PROT_EXEC alias.

5 years agoorctest: Switch nearby float comparison to ULP method
Doug Nazar [Wed, 7 Aug 2019 04:11:35 +0000 (00:11 -0400)]
orctest: Switch nearby float comparison to ULP method

5 years agodoc: fix gtkdoc when orc is used as a subproject
Mathieu Duponchelle [Fri, 2 Aug 2019 16:41:52 +0000 (18:41 +0200)]
doc: fix gtkdoc when orc is used as a subproject

meson.source_root() will point to the root of the top level
project, and should not be used to compute paths in the current
project.

5 years agox86: add endbr32 and endbr64 instructions
Wim Taymans [Fri, 19 Jul 2019 14:18:04 +0000 (16:18 +0200)]
x86: add endbr32 and endbr64 instructions

Issue endbr instructions at the start of generated functions to
make IBT (indirect branch tracking) work.

Resolves #17

5 years agoci: run tests on windows
Tim-Philipp Müller [Tue, 23 Jul 2019 23:26:32 +0000 (00:26 +0100)]
ci: run tests on windows

5 years agoAdd Windows CI for msvc 2017 and msys2
Jordan Petridis [Thu, 11 Jul 2019 04:48:08 +0000 (07:48 +0300)]
Add Windows CI for msvc 2017 and msys2

Currently the container is based upon a windows 1607 image
and requires a runner with a server/hyper-v 1607 host
to be able to execute.

There are plan on moving the runner to a 1807 later.

5 years agouwp: workaround a false positive in certification of orc
Nirbheek Chauhan [Tue, 7 May 2019 14:48:34 +0000 (20:18 +0530)]
uwp: workaround a false positive in certification of orc

It seems that the Windows App Certification Kit searches all files and
binaries for the regex '\<reg\>' (or something like it) and throws
errors if it exists. Supposedly this is for preventing apps from
running REG.EXE

https://blogs.msdn.microsoft.com/appconsult/2017/08/16/how-to-validate-if-your-application-is-compliant-with-the-windows-store-polices-windows-10-and-windows-10-s/

5 years agoMeson: Do not always generate static library
Xavier Claessens [Fri, 12 Apr 2019 15:34:33 +0000 (11:34 -0400)]
Meson: Do not always generate static library

Since Meson 0.46.0 'default_library' can be set to 'both' when user
wants both shared and static libraries.

5 years agoBack to development
Tim-Philipp Müller [Mon, 15 Apr 2019 08:27:24 +0000 (09:27 +0100)]
Back to development

5 years agoRelease 0.4.29
Tim-Philipp Müller [Sun, 14 Apr 2019 22:47:03 +0000 (23:47 +0100)]
Release 0.4.29

5 years agoorc: fix C++ style comment
Tim-Philipp Müller [Fri, 22 Mar 2019 19:36:24 +0000 (19:36 +0000)]
orc: fix C++ style comment

5 years agoconfigure.ac: no more bugzilla
Tim-Philipp Müller [Tue, 5 Mar 2019 14:21:04 +0000 (14:21 +0000)]
configure.ac: no more bugzilla

5 years agoUpdate news file for upcoming release
Tim-Philipp Müller [Tue, 5 Mar 2019 13:52:54 +0000 (13:52 +0000)]
Update news file for upcoming release

5 years agoAdd pkg-config file for orc-test library
Tim-Philipp Müller [Tue, 5 Mar 2019 11:05:43 +0000 (11:05 +0000)]
Add pkg-config file for orc-test library

Fixes #16

5 years agoFix warnings with Cerbero's mingw (gcc 4.7)
Nirbheek Chauhan [Tue, 5 Feb 2019 13:29:11 +0000 (18:59 +0530)]
Fix warnings with Cerbero's mingw (gcc 4.7)

orcutils.h:59:38: error: "__STDC_VERSION__" is not defined [-Werror=undef]

5 years agomeson: Make orcc detectable from other subprojects
Seungha Yang [Mon, 28 Jan 2019 13:12:46 +0000 (22:12 +0900)]
meson: Make orcc detectable from other subprojects

If we are a subproject (e.g., gst-build), this can make it possible
to use orcc by other subprojects.

5 years agoPowerPC: Support ELFv2 ABI
A. Wilcox [Tue, 10 Jul 2018 02:18:07 +0000 (21:18 -0500)]
PowerPC: Support ELFv2 ABI

The ELFv2 ABI does not use function descriptors.  This change has been
tested on Power Mac G5, IBM POWER6, and Raptor Talos II, all using the
musl libc on Linux kernel 4.14.

5 years agoAdd support for ppc64le
Michel Normand [Mon, 2 Mar 2015 11:14:03 +0000 (12:14 +0100)]
Add support for ppc64le

Fixes https://gitlab.freedesktop.org/gstreamer/orc/issues/6

5 years agoci: add minimal ci
Tim-Philipp Müller [Wed, 2 Jan 2019 00:47:42 +0000 (00:47 +0000)]
ci: add minimal ci

5 years agoorc: Remove dead assignments
Edward Hervey [Mon, 17 Dec 2018 10:26:21 +0000 (11:26 +0100)]
orc: Remove dead assignments

All those temporary registry were not used and instead were being
assigned constant values.

5 years agomeson: Maintain macOS ABI compatibility
Nirbheek Chauhan [Wed, 14 Nov 2018 09:49:42 +0000 (15:19 +0530)]
meson: Maintain macOS ABI compatibility

Need to use the correct dylib versioning.

6 years agomeson: add option to disable orc-test library
Tim-Philipp Müller [Sat, 6 Oct 2018 12:04:01 +0000 (13:04 +0100)]
meson: add option to disable orc-test library

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

6 years agomeson: rename "enable-backend" option to "orc-backend"
Tim-Philipp Müller [Wed, 3 Oct 2018 09:31:47 +0000 (10:31 +0100)]
meson: rename "enable-backend" option to "orc-backend"

More consistent with the Meson option naming conventions.

6 years agomeson: add options to disable benchmarks, examples, tools
Tim-Philipp Müller [Wed, 3 Oct 2018 08:28:53 +0000 (09:28 +0100)]
meson: add options to disable benchmarks, examples, tools

Like we have in other modules.

6 years agomeson: make "tests" option an auto feature option
Tim-Philipp Müller [Wed, 3 Oct 2018 08:13:31 +0000 (09:13 +0100)]
meson: make "tests" option an auto feature option

Consistent with the rest of GStreamer and gst-build.

6 years agomeson: rename 'disable_gtkdoc' option to 'gtk_doc' and make it an auto/feature option
Tim-Philipp Müller [Mon, 30 Jul 2018 09:06:04 +0000 (10:06 +0100)]
meson: rename 'disable_gtkdoc' option to 'gtk_doc' and make it an auto/feature option

6 years agomeson: rename option disable_tests=false -> tests=true
Tim-Philipp Müller [Mon, 30 Jul 2018 08:56:14 +0000 (09:56 +0100)]
meson: rename option disable_tests=false -> tests=true

Bring it in line with convention.

6 years agomeson: Bump required version to 0.46
Nicolas Dufresne [Sun, 22 Jul 2018 13:53:39 +0000 (09:53 -0400)]
meson: Bump required version to 0.46

6 years agomeson: pass the right header when testing for posix_memalign
Christoph Reiter [Mon, 21 May 2018 15:06:12 +0000 (17:06 +0200)]
meson: pass the right header when testing for posix_memalign

has_function() needs to know the header to correctly detect the function in
all cases.

This fixes the build under mingw-w64 where posix_memalign was wrongfully being
detected as available.

See this glib bug for a similar fix:
    https://bugzilla.gnome.org/show_bug.cgi?id=795876

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

6 years agoFix MSVC compiler warning
Tim-Philipp Müller [Fri, 18 May 2018 08:49:01 +0000 (09:49 +0100)]
Fix MSVC compiler warning

The isnan() macro was redefined to _isnan() on MSVC, but it's
been in math.h since vs2013, so it should be safe to rely on
it unconditionally nowadays, and we have no intention of
supporting ancient vs versions anyway.

6 years agoorc: fix static build on windows
Tim-Philipp Müller [Fri, 18 May 2018 08:10:17 +0000 (09:10 +0100)]
orc: fix static build on windows

Orc users mustn't use __declspec(dllimport) when
linking against a static liborc.

6 years agoorctest: Allow enough room for sprintf()
Edward Hervey [Fri, 4 May 2018 07:21:16 +0000 (09:21 +0200)]
orctest: Allow enough room for sprintf()

We were writing more than 300 characters in some cases. Thanks gcc
8 for pointing that out :)

6 years agomeson: use add_project_arguments() instead of add_global_arguments()
Tim-Philipp Müller [Sat, 28 Apr 2018 22:48:39 +0000 (23:48 +0100)]
meson: use add_project_arguments() instead of add_global_arguments()

The latter won't play nice when being used as a subproject.

6 years agoorc: update some generated files
Tim-Philipp Müller [Sat, 28 Apr 2018 12:06:34 +0000 (13:06 +0100)]
orc: update some generated files

6 years agoorcfunctions.h: include orcutils.h for ORC_API define
Tim-Philipp Müller [Sat, 28 Apr 2018 12:04:11 +0000 (13:04 +0100)]
orcfunctions.h: include orcutils.h for ORC_API define

Fixes build for users that just include orcfunctions.h
directly instead of orc/orc.h, like libs in gst-plugins-base.

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