platform/upstream/orc.git
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

11 years agomips: implement convsbw
Guillaume Emont [Fri, 30 Nov 2012 18:23:17 +0000 (19:23 +0100)]
mips: implement convsbw

11 years agomips: emit functions for shll.ph and shra.ph
Guillaume Emont [Fri, 30 Nov 2012 18:23:05 +0000 (19:23 +0100)]
mips: emit functions for shll.ph and shra.ph

11 years agomips: implement flush_cache, fixing segfaults on actual hardware
Guillaume Emont [Wed, 28 Nov 2012 19:15:26 +0000 (20:15 +0100)]
mips: implement flush_cache, fixing segfaults on actual hardware

11 years agomips: frame pointer when ORC_CODE=debug
Guillaume Emont [Wed, 28 Nov 2012 13:45:06 +0000 (14:45 +0100)]
mips: frame pointer when ORC_CODE=debug

11 years agomips: emit invariant instructions in _load_constants_inner()
Guillaume Emont [Thu, 22 Nov 2012 18:41:52 +0000 (19:41 +0100)]
mips: emit invariant instructions in _load_constants_inner()

11 years agomips: fixed convssslw, implementing it with slt/movn
Guillaume Emont [Thu, 22 Nov 2012 18:39:39 +0000 (19:39 +0100)]
mips: fixed convssslw, implementing it with slt/movn

11 years agomips: _emit_slt() and _emit_movn()
Guillaume Emont [Thu, 22 Nov 2012 18:38:33 +0000 (19:38 +0100)]
mips: _emit_slt() and _emit_movn()

11 years agomips: change insn shift when x2/x4 is present
Guillaume Emont [Thu, 22 Nov 2012 18:38:02 +0000 (19:38 +0100)]
mips: change insn shift when x2/x4 is present

11 years agomips: $t3 is now our tmpreg
Guillaume Emont [Thu, 22 Nov 2012 18:37:03 +0000 (19:37 +0100)]
mips: $t3 is now our tmpreg

11 years agomips: implement loadp* orc instructions
Guillaume Emont [Thu, 22 Nov 2012 18:28:41 +0000 (19:28 +0100)]
mips: implement loadp* orc instructions

11 years agomips: add _emit_lui()
Guillaume Emont [Thu, 22 Nov 2012 14:12:18 +0000 (15:12 +0100)]
mips: add _emit_lui()

11 years agomips: rules for mergewl and addssw
Guillaume Emont [Tue, 20 Nov 2012 18:58:46 +0000 (19:58 +0100)]
mips: rules for mergewl and addssw

11 years agomips: add emit method for addq_s.ph
Guillaume Emont [Tue, 20 Nov 2012 18:57:33 +0000 (19:57 +0100)]
mips: add emit method for addq_s.ph

11 years agomips: rules for mulswl, shrsl and convssslw
Guillaume Emont [Tue, 20 Nov 2012 17:55:48 +0000 (18:55 +0100)]
mips: rules for mulswl, shrsl and convssslw

11 years agomips: add emit methods for sra, mul, mtlo and extr_s.h
Guillaume Emont [Tue, 20 Nov 2012 17:54:30 +0000 (18:54 +0100)]
mips: add emit methods for sra, mul, mtlo and extr_s.h

11 years agomips: fix stride handling in 2d
Guillaume Emont [Fri, 16 Nov 2012 17:33:37 +0000 (18:33 +0100)]
mips: fix stride handling in 2d

11 years agomips: handle case when n < (# of iterations to reach alignment)
Guillaume Emont [Thu, 15 Nov 2012 15:32:56 +0000 (16:32 +0100)]
mips: handle case when n < (# of iterations to reach alignment)

11 years agomips: addedsupport for bltz,bgtz with immediate offset
Guillaume Emont [Thu, 15 Nov 2012 15:32:00 +0000 (16:32 +0100)]
mips: addedsupport for bltz,bgtz with immediate offset

11 years agomips: _assemble: ensure we load n after LABEL_OUTER_LOOP
Guillaume Emont [Thu, 15 Nov 2012 12:29:44 +0000 (13:29 +0100)]
mips: _assemble: ensure we load n after LABEL_OUTER_LOOP

11 years agomips: handle 2d loops
Guillaume Emont [Mon, 12 Nov 2012 19:31:01 +0000 (20:31 +0100)]
mips: handle 2d loops

11 years agomips: generate loops for all (or most) alignment cases
Guillaume Emont [Fri, 9 Nov 2012 18:27:32 +0000 (19:27 +0100)]
mips: generate loops for all (or most) alignment cases

11 years agomips: addede orc_mips_emit_conditional_branch_with_offset()
Guillaume Emont [Fri, 9 Nov 2012 17:32:49 +0000 (18:32 +0100)]
mips: addede orc_mips_emit_conditional_branch_with_offset()

11 years agomips: added emit for beq, or, ori
Guillaume Emont [Fri, 9 Nov 2012 17:32:15 +0000 (18:32 +0100)]
mips: added emit for beq, or, ori

11 years agomips: a1-a3 registers do not need to be saved
Guillaume Emont [Fri, 9 Nov 2012 17:27:23 +0000 (18:27 +0100)]
mips: a1-a3 registers do not need to be saved

11 years agomips: introduced orc_mips_emit_full_loop() to avoid cut and pasted code
Guillaume Emont [Fri, 2 Nov 2012 17:51:11 +0000 (18:51 +0100)]
mips: introduced orc_mips_emit_full_loop() to avoid cut and pasted code

11 years agomips: added a special version of the region1 loop for the case where we can have...
Guillaume Emont [Fri, 2 Nov 2012 11:24:06 +0000 (12:24 +0100)]
mips: added a special version of the region1 loop for the case where we can have all the variables aligned

11 years agomips: Fix detection of mipsel host
Guillaume Emont [Thu, 1 Nov 2012 16:29:37 +0000 (17:29 +0100)]
mips: Fix detection of mipsel host

11 years agoAdd detection of mipsel host
Guillaume Emont [Thu, 1 Nov 2012 15:57:04 +0000 (16:57 +0100)]
Add detection of mipsel host

11 years agomips: error when trying to use load with a constant
Guillaume Emont [Tue, 30 Oct 2012 11:43:29 +0000 (12:43 +0100)]
mips: error when trying to use load with a constant

11 years agomips: added test for binary code generation
Guillaume Emont [Mon, 29 Oct 2012 15:54:33 +0000 (16:54 +0100)]
mips: added test for binary code generation

11 years agomips: add binary code generation
Guillaume Emont [Fri, 26 Oct 2012 15:19:15 +0000 (17:19 +0200)]
mips: add binary code generation

Also refactor a bit the branch emission code and handle labels properly.

11 years agomips: fix load and store for the unaligned cases
Guillaume Emont [Fri, 26 Oct 2012 09:32:20 +0000 (11:32 +0200)]
mips: fix load and store for the unaligned cases

Still, something needs to be done (probably in _assemble()) to use the aligned
load/store operations when we can.

11 years agomips: fix counters for loop_shift==0
Guillaume Emont [Fri, 26 Oct 2012 09:31:24 +0000 (11:31 +0200)]
mips: fix counters for loop_shift==0

11 years agomips: fix label naming in generated assembly
Guillaume Emont [Thu, 25 Oct 2012 14:43:30 +0000 (16:43 +0200)]
mips: fix label naming in generated assembly

Label names need to be function specific, else they clash when we have more
than one function in a file.

11 years agomips: fix mips_rule_addw() for the SIMD case
Guillaume Emont [Wed, 24 Oct 2012 17:24:26 +0000 (19:24 +0200)]
mips: fix mips_rule_addw() for the SIMD case

11 years agomips: reworked _assemble() to handle properly data sizes > 2
Guillaume Emont [Wed, 24 Oct 2012 17:14:28 +0000 (19:14 +0200)]
mips: reworked _assemble() to handle properly data sizes > 2

11 years agomips: factorised and mostly fixed load and store rules
Guillaume Emont [Wed, 24 Oct 2012 17:03:47 +0000 (19:03 +0200)]
mips: factorised and mostly fixed load and store rules

Code is assuming that all data is correctly aligned for now.

11 years agomips: add emitters for more instructions
Guillaume Emont [Wed, 24 Oct 2012 17:02:17 +0000 (19:02 +0200)]
mips: add emitters for more instructions

11 years agomips: added emit functions for beqz, addi, sub, srl, andi
Guillaume Emont [Wed, 17 Oct 2012 10:23:40 +0000 (11:23 +0100)]
mips: added emit functions for beqz, addi, sub, srl, andi

11 years agomips: add forgotten argument to lw
Guillaume Emont [Wed, 17 Oct 2012 10:17:12 +0000 (11:17 +0100)]
mips: add forgotten argument to lw

11 years agomips: started work for a proper loop organisation to handle simd instructions
Guillaume Emont [Tue, 16 Oct 2012 12:19:04 +0000 (13:19 +0100)]
mips: started work for a proper loop organisation to handle simd instructions

11 years agomips: added rules for loadb, storel, storeb and copyb
Guillaume Emont [Tue, 16 Oct 2012 12:17:41 +0000 (13:17 +0100)]
mips: added rules for loadb, storel, storeb and copyb

11 years agomips: added copyl
Guillaume Emont [Tue, 9 Oct 2012 15:47:43 +0000 (17:47 +0200)]
mips: added copyl

11 years agomips: do not trust ORC_STRUCT_OFFSET when we cross-compile into asm code
Guillaume Emont [Fri, 5 Oct 2012 16:22:19 +0000 (18:22 +0200)]
mips: do not trust ORC_STRUCT_OFFSET when we cross-compile into asm code

11 years agoFirst version of mips target
Guillaume Emont [Fri, 5 Oct 2012 14:03:32 +0000 (16:03 +0200)]
First version of mips target

Only generates asm code, and only support loadl, storel and addl for now.

11 years agocompile fix
David Schleef [Sat, 8 Dec 2012 20:08:37 +0000 (12:08 -0800)]
compile fix

11 years agoFix multiple typedefs
David Schleef [Sat, 8 Dec 2012 19:53:56 +0000 (11:53 -0800)]
Fix multiple typedefs

11 years agofix for more than one accumulator
Jonathan Rosser [Mon, 3 Dec 2012 21:08:27 +0000 (13:08 -0800)]
fix for more than one accumulator

11 years agoFix altivec implementation of cmpltf and cmplef operations
Andreas Schwab [Sun, 2 Dec 2012 01:15:03 +0000 (17:15 -0800)]
Fix altivec implementation of cmpltf and cmplef operations

11 years agoAdds support for PowerPC64
Andreas Schwab [Sun, 2 Dec 2012 01:12:53 +0000 (17:12 -0800)]
Adds support for PowerPC64