platform/upstream/orc.git
10 years agoorcprogram-c: Fix swaplq C implementation
Sebastian Dröge [Mon, 14 Apr 2014 21:12:57 +0000 (23:12 +0200)]
orcprogram-c: Fix swaplq C implementation

10 years agoorcbytecodes: Fix filename of generated file
Sebastian Dröge [Mon, 14 Apr 2014 20:39:15 +0000 (22:39 +0200)]
orcbytecodes: Fix filename of generated file

We don't want to override orcbytecode.h but orcbytecodes.h

10 years agoorcarray: Fix compiler warning with gcc 4.9
Sebastian Dröge [Mon, 14 Apr 2014 19:53:40 +0000 (21:53 +0200)]
orcarray: Fix compiler warning with gcc 4.9

In file included from ../orc/orcprogram.h:5:0,
                 from ../orc/orc.h:5,
                 from ../orc-test/orctest.h:5,
                 from orcarray.c:6:
../orc/orcutils.h:124:37: error: 'data' may be used uninitialized in this function [-Werror=maybe-uninitialized]
 #define ORC_PTR_OFFSET(ptr,offset) ((void *)(((unsigned char *)(ptr)) + (offset)))
                                     ^
orcarray.c:42:9: note: 'data' was declared here
   void *data;

10 years agomemcpy_speed: Properly define ALIGN macro and fix memory leaks
Sebastian Dröge [Mon, 14 Apr 2014 16:54:57 +0000 (18:54 +0200)]
memcpy_speed: Properly define ALIGN macro and fix memory leaks

With the previous definition we would use memory *before* our
allocated memory area.

10 years agobench10: Fix syntax errors
Sebastian Dröge [Sun, 13 Apr 2014 20:01:38 +0000 (22:01 +0200)]
bench10: Fix syntax errors

10 years agotest.orc: Fix syntax errors
Sebastian Dröge [Sun, 13 Apr 2014 19:58:16 +0000 (21:58 +0200)]
test.orc: Fix syntax errors

10 years agobenchmorc: Fix memory leaks in test
Sebastian Dröge [Sun, 13 Apr 2014 19:57:59 +0000 (21:57 +0200)]
benchmorc: Fix memory leaks in test

10 years agoorcparse: Guard against unknown tokens
Sebastian Dröge [Sun, 13 Apr 2014 19:56:01 +0000 (21:56 +0200)]
orcparse: Guard against unknown tokens

10 years agoorcprogram: Free init function name
Sebastian Dröge [Sun, 13 Apr 2014 19:55:52 +0000 (21:55 +0200)]
orcprogram: Free init function name

10 years agotests: Fix various memory leaks in tests
Sebastian Dröge [Sun, 13 Apr 2014 19:38:48 +0000 (21:38 +0200)]
tests: Fix various memory leaks in tests

10 years agoorcprogram: Free OrcCode together with the program
Sebastian Dröge [Sun, 13 Apr 2014 19:36:43 +0000 (21:36 +0200)]
orcprogram: Free OrcCode together with the program

10 years agoorcprogram: Free type names of variables when freeing a program
Sebastian Dröge [Sun, 13 Apr 2014 19:22:37 +0000 (21:22 +0200)]
orcprogram: Free type names of variables when freeing a program

10 years agobytecode_parse: Fix memory leaks in test
Sebastian Dröge [Sun, 13 Apr 2014 19:22:28 +0000 (21:22 +0200)]
bytecode_parse: Fix memory leaks in test

10 years agoorcmips: Fix register range check
Edward Hervey [Fri, 11 Apr 2014 14:13:08 +0000 (16:13 +0200)]
orcmips: Fix register range check

There are 32 possible registers and not 33

CID #1146987

10 years agoorcexecutor: Don't use negative values on arrays
Edward Hervey [Fri, 11 Apr 2014 14:03:16 +0000 (16:03 +0200)]
orcexecutor: Don't use negative values on arrays

orc_program_find_var_by_name() can return -1 on errors, if that
happens, don't try to read/write in random memory :)

CID #1146974
CID #1146975
CID #1146976

10 years agoorc: Remove unused variable
Edward Hervey [Fri, 11 Apr 2014 13:58:17 +0000 (15:58 +0200)]
orc: Remove unused variable

include_file was never used in these variants since they were
added.

CID #1146970
CID #1146969

10 years agotestsuite: file leak fix
Vincent Penquerc'h [Thu, 10 Apr 2014 17:12:36 +0000 (18:12 +0100)]
testsuite: file leak fix

Coverity 1147011

10 years agoFix FILE leak
Vincent Penquerc'h [Mon, 7 Apr 2014 09:51:51 +0000 (10:51 +0100)]
Fix FILE leak

Coverity 1147011

10 years agoorcrules-neon: Remove unused variable
Sebastian Dröge [Sat, 8 Feb 2014 15:55:19 +0000 (16:55 +0100)]
orcrules-neon: Remove unused variable

10 years agodocs: mulhsw, mulhsw shifts by 16, not 8
William Manley [Tue, 28 Jan 2014 15:02:57 +0000 (15:02 +0000)]
docs: mulhsw, mulhsw shifts by 16, not 8

The documentation said that mulhsw and mulsuw was equivalent to:

    (a * b) >> 8

when the implementation actually shifts by 16 bits.

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

10 years agoorcarm: OSX doesn't like comparisons against enum and int.
Todd Agulnick [Thu, 2 Jan 2014 00:40:00 +0000 (16:40 -0800)]
orcarm: OSX doesn't like comparisons against enum and int.

10 years agotools: fix memory leak in orcc
Tim-Philipp Müller [Mon, 30 Dec 2013 13:41:14 +0000 (13:41 +0000)]
tools: fix memory leak in orcc

Coverity CID 1147542

10 years agotestsuite: fix file descriptor leak in benchmorc
Tim-Philipp Müller [Mon, 30 Dec 2013 13:32:14 +0000 (13:32 +0000)]
testsuite: fix file descriptor leak in benchmorc

Coverity CID 1147543

11 years agoMake it ANSI-C
Olivier Crête [Mon, 14 Oct 2013 19:25:14 +0000 (15:25 -0400)]
Make it ANSI-C

Use /* */ instead of //
Define _GNU_SOURCE in the ORC_CFLAGS

11 years agoautogen.sh: Allow calling from out of tree
Edward Hervey [Fri, 20 Sep 2013 09:52:21 +0000 (11:52 +0200)]
autogen.sh: Allow calling from out of tree

This is similar to the fix that was done for gstreamer

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

11 years agoconfigure: version back to unreleased
Edward Hervey [Fri, 20 Sep 2013 10:04:25 +0000 (12:04 +0200)]
configure: version back to unreleased

11 years agoRelease 0.4.18 orc-0.4.18
David Schleef [Sat, 24 Aug 2013 17:23:53 +0000 (10:23 -0700)]
Release 0.4.18

11 years agoorcbytecode: Fix parsing of 32 bit values from bytecode as well
Tim-Philipp Müller [Mon, 19 Aug 2013 17:12:21 +0000 (18:12 +0100)]
orcbytecode: Fix parsing of 32 bit values from bytecode as well

The shift by 24 bits has to be casted as well, otherwise we
shift into the sign bit which causes undefined behaviour.

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

11 years agoorcbytecode: Fix parsing of 64 bit values from bytecode
Sebastian Dröge [Mon, 19 Aug 2013 15:02:24 +0000 (17:02 +0200)]
orcbytecode: Fix parsing of 64 bit values from bytecode

The shift by 24 bits has to be casted already, otherwise we shift
into the sign bit which causes undefined behaviour.

Thanks to Edward Hervey for debugging this.

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

11 years agodocs: add more opcode descriptions
Stefan Sauer [Thu, 6 Jun 2013 07:03:48 +0000 (09:03 +0200)]
docs: add more opcode descriptions

11 years agodocs: hook up generate_table tools
Stefan Sauer [Thu, 6 Jun 2013 06:06:05 +0000 (08:06 +0200)]
docs: hook up generate_table tools

Add a makefile-target in docs to update the tables (for a release). Emit a
comment at the top of the generated files which tool produces them so that
people don't edit them manually.

11 years agoaccumulator: use the local variable 'var'
Stefan Sauer [Wed, 5 Jun 2013 19:50:26 +0000 (21:50 +0200)]
accumulator: use the local variable 'var'

The code already had the local var, but barely used it.

11 years agotests: use the ORC_STATIC_OPCODE_FLOAT flag to simplify the tests
Stefan Sauer [Wed, 5 Jun 2013 18:11:43 +0000 (20:11 +0200)]
tests: use the ORC_STATIC_OPCODE_FLOAT flag to simplify the tests

11 years agoorcparse: fix copy and paste of error message
Stefan Sauer [Mon, 3 Jun 2013 19:53:13 +0000 (21:53 +0200)]
orcparse: fix copy and paste of error message

11 years agodocs: add docs for the program directives
Stefan Sauer [Mon, 3 Jun 2013 16:20:10 +0000 (18:20 +0200)]
docs: add docs for the program directives

11 years agoorcprogram-c: fix indent for 2 opcodes
Stefan Sauer [Mon, 3 Jun 2013 05:49:23 +0000 (07:49 +0200)]
orcprogram-c: fix indent for 2 opcodes

11 years agogenerate-*: cosmetic changes
Stefan Sauer [Wed, 29 May 2013 08:30:16 +0000 (10:30 +0200)]
generate-*: cosmetic changes

Print the file name if we use the default. Consider the header_flag for the
default name. Correct the help() desc for the --header flag (it takes no arg).

11 years agogenerate-*: add missing flag to help()
Stefan Sauer [Tue, 28 May 2013 21:03:17 +0000 (23:03 +0200)]
generate-*: add missing flag to help()

11 years agogenerate-bytecode: add ORC_BC_INSTRUCTION_FLAGS to generator
Stefan Sauer [Tue, 28 May 2013 21:11:46 +0000 (23:11 +0200)]
generate-bytecode: add ORC_BC_INSTRUCTION_FLAGS to generator

The checked in orcbytecodes.h already uses the flag.

11 years agoorc-test: Fix typo in #ifdef
Sebastian Dröge [Mon, 27 May 2013 11:52:40 +0000 (13:52 +0200)]
orc-test: Fix typo in #ifdef

11 years agoorc: fix cache flush for iOS
Andoni Morales Alastruey [Thu, 25 Apr 2013 15:09:22 +0000 (17:09 +0200)]
orc: fix cache flush for iOS

Apple does not provide an implementation of __clear_cache in ARM
but sys_icache_invalidate can be used instead

review-by: Sebastian Dröge

11 years agoconfigure: version back to unreleased
David Schleef [Mon, 1 Apr 2013 18:31:59 +0000 (11:31 -0700)]
configure: version back to unreleased

11 years agomips: deactivate loadupdb implementation as it is broken
Guillaume Emont [Fri, 29 Mar 2013 16:34:33 +0000 (11:34 -0500)]
mips: deactivate loadupdb implementation as it is broken

11 years agopkgconfig: in -uninstalled ensure to link with the proper library
Josep Torra [Sat, 30 Mar 2013 11:57:10 +0000 (12:57 +0100)]
pkgconfig: in -uninstalled ensure to link with the proper library

Fixes build of GStreamer in gst-uninstalled on OSX with older liborc
installed from macports at '/opt/local'.

11 years agoconfigure: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS
Josep Torra [Sat, 30 Mar 2013 11:52:33 +0000 (12:52 +0100)]
configure: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS

AM_CONFIG_HEADER has been removed in the just-released automake 1.13:
https://lists.gnu.org/archive/html/automake/2012-12/msg00038.html

11 years agoMerge branch '0.4.17'
David Schleef [Sun, 10 Mar 2013 19:16:49 +0000 (12:16 -0700)]
Merge branch '0.4.17'

11 years agoFix build on Android
Sebastian Dröge [Wed, 20 Feb 2013 15:04:01 +0000 (16:04 +0100)]
Fix build on Android

Android doesn't have a libpthread and includes all relevant functions
in libc.

11 years agoorcc: workaround a bug in the gcc 4.2 provided by XCode 3.2.6
Josep Torra [Wed, 20 Feb 2013 14:32:49 +0000 (15:32 +0100)]
orcc: workaround a bug in the gcc 4.2 provided by XCode 3.2.6

When building orc in OSX Snow Leopard with '-O2 -arch i386 -m32' a bug in
the compiler is triggered and wrong assembly is generated with
the following messages:

'non-relocatable subtraction expression, "LC0" minus "L00000000008$pb"'
'symbol: "L00000000008$pb" can't be undefined in a subtraction expression'
'undefined local symbol L00000000008$pb'

The issue is triggered when the compiler tries to optimize for a constant
value in the code but it does a bad job. Declaring 'volatile' the variable
that holds the constant prevents this optimization to be performed and the
orc C generated code can be properly built.

11 years agoRelease 0.4.17 orc-0.4.17
David Schleef [Wed, 20 Feb 2013 06:21:00 +0000 (22:21 -0800)]
Release 0.4.17

11 years agotest: Fix recent commit
David Schleef [Wed, 20 Feb 2013 04:02:03 +0000 (20:02 -0800)]
test: Fix recent commit

Separate allocated data and aligned data.

11 years agoneon: move orc_arm_loadw out of arm backend
David Schleef [Wed, 20 Feb 2013 03:41:36 +0000 (19:41 -0800)]
neon: move orc_arm_loadw out of arm backend

11 years agoARM backend is disabled until it has decent coverage
David Schleef [Wed, 20 Feb 2013 01:40:14 +0000 (17:40 -0800)]
ARM backend is disabled until it has decent coverage

11 years agogitignore: change 0.4 to *
David Schleef [Wed, 20 Feb 2013 01:15:53 +0000 (17:15 -0800)]
gitignore: change 0.4 to *

11 years agotest: Use the aligned pointer, not something else
David Schleef [Wed, 20 Feb 2013 01:04:21 +0000 (17:04 -0800)]
test: Use the aligned pointer, not something else

11 years agoorcc: add --internal option to mark symbols with internal visibility
Tim-Phillip Müller [Tue, 19 Feb 2013 20:23:16 +0000 (12:23 -0800)]
orcc: add --internal option to mark symbols with internal visibility

Fixes: #52184

11 years agoorccompiler: Allow fallback to backup/emulation if the target specific register alloc...
Sebastian Dröge [Thu, 10 Jan 2013 17:13:32 +0000 (18:13 +0100)]
orccompiler: Allow fallback to backup/emulation if the target specific register allocation fails

The OrcCode of the program wouldn't be filled with all required fields
if the register allocation happens to early.

11 years agomips: do loads as early as possible
Guillaume Emont [Thu, 27 Dec 2012 15:01:16 +0000 (16:01 +0100)]
mips: do loads as early as possible

11 years agomips: loadb: with shift 1, use lh if aligned
Guillaume Emont [Fri, 21 Dec 2012 13:06:15 +0000 (14:06 +0100)]
mips: loadb: with shift 1, use lh if aligned

11 years agomips: copyb: only do something if source and dest are different
Guillaume Emont [Fri, 21 Dec 2012 13:05:37 +0000 (14:05 +0100)]
mips: copyb: only do something if source and dest are different

11 years agomips: fixed prefetching instruction calculation, but deactivated prefetching for...
Guillaume Emont [Fri, 21 Dec 2012 13:04:56 +0000 (14:04 +0100)]
mips: fixed prefetching instruction calculation, but deactivated prefetching for now (no measurable performance improvements)

11 years agomips: added cache prefetching hints
Guillaume Emont [Wed, 19 Dec 2012 13:39:05 +0000 (14:39 +0100)]
mips: added cache prefetching hints

11 years agomips: introduced loop unrolling
Guillaume Emont [Tue, 18 Dec 2012 19:47:37 +0000 (20:47 +0100)]
mips: introduced loop unrolling

For now, this only happens in the main loop, and is decided by the
ORC_UNROLL_SHIFT environment variable.

11 years agoadd forgotten headers to include in make dist
Guillaume Emont [Tue, 18 Dec 2012 19:21:09 +0000 (20:21 +0100)]
add forgotten headers to include in make dist

11 years agomips: implemented select0wb, select1wb, select0lw, select1lw, splatbw, splitlw, split...
Guillaume Emont [Sat, 15 Dec 2012 18:15:43 +0000 (19:15 +0100)]
mips: implemented select0wb, select1wb, select0lw, select1lw, splatbw, splitlw, splitwb, shruw and swapw

11 years agomips: added emit functions for shrl.ph and precrq.qb.ph
Guillaume Emont [Sat, 15 Dec 2012 18:14:56 +0000 (19:14 +0100)]
mips: added emit functions for shrl.ph and precrq.qb.ph

11 years agomips: added convwb
Guillaume Emont [Sat, 15 Dec 2012 17:27:40 +0000 (18:27 +0100)]
mips: added convwb

11 years agomips: loadupib, loadupdb: error (not implemented) if source argument is not source var
Guillaume Emont [Sat, 15 Dec 2012 16:48:43 +0000 (17:48 +0100)]
mips: loadupib, loadupdb: error (not implemented) if source argument is not source var

Only source vars can get a ptr_offset, and we need one in these operations as
they are implemented now.

11 years agomips: shrs, shra.ph: error if shift amount is not a const
Guillaume Emont [Sat, 15 Dec 2012 16:47:46 +0000 (17:47 +0100)]
mips: shrs, shra.ph: error if shift amount is not a const

11 years agomips: mulswl: sign extend words before multiplying
Guillaume Emont [Thu, 13 Dec 2012 17:04:11 +0000 (18:04 +0100)]
mips: mulswl: sign extend words before multiplying

11 years agomips: added emit function for seh
Guillaume Emont [Thu, 13 Dec 2012 17:03:49 +0000 (18:03 +0100)]
mips: added emit function for seh

11 years agomips: convssslw: fix typo on minimum value to compare
Guillaume Emont [Thu, 13 Dec 2012 16:57:08 +0000 (17:57 +0100)]
mips: convssslw: fix typo on minimum value to compare

11 years agomips: convsbw: spread bytes when we have an instruction shift
Guillaume Emont [Thu, 13 Dec 2012 16:46:59 +0000 (17:46 +0100)]
mips: convsbw: spread bytes when we have an instruction shift

11 years agomips: fix endianness of result of loadupib and loadupdb
Guillaume Emont [Thu, 13 Dec 2012 16:28:30 +0000 (17:28 +0100)]
mips: fix endianness of result of loadupib and loadupdb

11 years agomips: added copyright headers
Guillaume Emont [Thu, 13 Dec 2012 14:41:06 +0000 (15:41 +0100)]
mips: added copyright headers

11 years agomips: fixes in mergebw and mergewl
Guillaume Emont [Wed, 12 Dec 2012 16:11:05 +0000 (17:11 +0100)]
mips: fixes in mergebw and mergewl

11 years agomips: addw/addb: always use vectorial operation, whatever the shift
Guillaume Emont [Wed, 12 Dec 2012 16:10:30 +0000 (17:10 +0100)]
mips: addw/addb: always use vectorial operation, whatever the shift

11 years agomips: load: use lbu instead of lb
Guillaume Emont [Wed, 12 Dec 2012 16:09:47 +0000 (17:09 +0100)]
mips: load: use lbu instead of lb

11 years agomips: convubw: extract bytes into 2 halfwords when shift==1
Guillaume Emont [Wed, 12 Dec 2012 11:10:31 +0000 (12:10 +0100)]
mips: convubw: extract bytes into 2 halfwords when shift==1

11 years agomips: convsuswb and convssswb: put results in lower half
Guillaume Emont [Wed, 12 Dec 2012 11:09:26 +0000 (12:09 +0100)]
mips: convsuswb and convssswb: put results in lower half

11 years agomips: _rule_load(): directly concatenate bytes for byte loads with shift 1
Guillaume Emont [Wed, 12 Dec 2012 11:08:24 +0000 (12:08 +0100)]
mips: _rule_load(): directly concatenate bytes for byte loads with shift 1

11 years agomips: added emit for precr.qb.ph
Guillaume Emont [Wed, 12 Dec 2012 11:07:16 +0000 (12:07 +0100)]
mips: added emit for precr.qb.ph

11 years agomips: fix shra.ph: correctly get shift value
Guillaume Emont [Tue, 11 Dec 2012 15:34:47 +0000 (16:34 +0100)]
mips: fix shra.ph: correctly get shift value

11 years agomips: loadp: load as quad bytes or paired halfword for values of (resp) 1 or 2 bytes
Guillaume Emont [Tue, 11 Dec 2012 13:47:13 +0000 (14:47 +0100)]
mips: loadp: load as quad bytes or paired halfword for values of (resp) 1 or 2 bytes

11 years agomips: added emit functions for subu.ph and replv.ph
Guillaume Emont [Tue, 11 Dec 2012 13:36:49 +0000 (14:36 +0100)]
mips: added emit functions for subu.ph and replv.ph

11 years agomips: mark t3->t5 as unavailable
Guillaume Emont [Tue, 11 Dec 2012 13:36:19 +0000 (14:36 +0100)]
mips: mark t3->t5 as unavailable

11 years agomips: made convubw a no-op
Guillaume Emont [Tue, 11 Dec 2012 13:24:16 +0000 (14:24 +0100)]
mips: made convubw a no-op

11 years agomips: avoid orc_compiler_get_temp_reg()
Guillaume Emont [Tue, 11 Dec 2012 13:22:25 +0000 (14:22 +0100)]
mips: avoid orc_compiler_get_temp_reg()

11 years agomips: added rules for convsuswb, convubw, avgub, subw
Guillaume Emont [Mon, 10 Dec 2012 17:22:24 +0000 (18:22 +0100)]
mips: added rules for convsuswb, convubw, avgub, subw

11 years agomips: add missing nop in a branch delay slot
Guillaume Emont [Mon, 10 Dec 2012 17:06:11 +0000 (18:06 +0100)]
mips: add missing nop in a branch delay slot

11 years agomips: added _emit() for lbu, subq.ph and preceu.ph.qbr
Guillaume Emont [Mon, 10 Dec 2012 15:39:08 +0000 (16:39 +0100)]
mips: added _emit() for lbu, subq.ph and preceu.ph.qbr

11 years agomips: implement swapl
Guillaume Emont [Fri, 7 Dec 2012 13:05:44 +0000 (14:05 +0100)]
mips: implement swapl

11 years agomips: _emit() for wsbh
Guillaume Emont [Fri, 7 Dec 2012 13:05:20 +0000 (14:05 +0100)]
mips: _emit() for wsbh

11 years agomips: implement loadupdb
Guillaume Emont [Fri, 7 Dec 2012 12:45:01 +0000 (13:45 +0100)]
mips: implement loadupdb

11 years agomips: made sure more registers are available and use temporary registers more consist...
Guillaume Emont [Wed, 5 Dec 2012 19:06:55 +0000 (20:06 +0100)]
mips: made sure more registers are available and use temporary registers more consistently

11 years agomips: implement loadupib
Guillaume Emont [Wed, 5 Dec 2012 18:23:34 +0000 (19:23 +0100)]
mips: implement loadupib

11 years agomips: initialise pointer offset registers when they exist
Guillaume Emont [Wed, 5 Dec 2012 18:22:32 +0000 (19:22 +0100)]
mips: initialise pointer offset registers when they exist

11 years agomips: handle various update types for vars
Guillaume Emont [Wed, 5 Dec 2012 18:21:17 +0000 (19:21 +0100)]
mips: handle various update types for vars

11 years agomips: emit functions for adduh_r.qb, rpelv.qb and packrl.ph
Guillaume Emont [Wed, 5 Dec 2012 18:17:49 +0000 (19:17 +0100)]
mips: emit functions for adduh_r.qb, rpelv.qb and packrl.ph

11 years agomips: implemented orc instructions subb, mullw, convssswb, mergebw, subssw, shrsw
Guillaume Emont [Tue, 4 Dec 2012 18:32:39 +0000 (19:32 +0100)]
mips: implemented orc instructions subb, mullw, convssswb, mergebw, subssw, shrsw

11 years agomips: added emit for subu.qb, subq_s.ph, and, mul.ph, repl.ph, cmp.lt.ph, pick.ph
Guillaume Emont [Tue, 4 Dec 2012 18:27:30 +0000 (19:27 +0100)]
mips: added emit for subu.qb, subq_s.ph, and, mul.ph, repl.ph, cmp.lt.ph, pick.ph