Commit graph

26 commits

Author SHA1 Message Date
Nekotekina 2ade3c594c LLVM DSL: expression matching (preview 2)
Implement more instructions.
2019-04-25 03:33:18 +03:00
Nekotekina aca61fdcf9 LLVM DSL: implement expression matching (preview)
Only literal match for binary ops implemented.
2019-04-24 23:55:41 +03:00
Nekotekina 8754bbd444 SPU LLVM: add match_vr<> template
Returns reg value only if type is compatible, avoiding bitcast.
2019-04-24 23:55:41 +03:00
Nekotekina 3e0b45719d LLVM DSL: rewrite zshuffle, shuffle2, build
Add llvm_const_vector template.
2019-04-24 23:55:41 +03:00
Nekotekina b02503963e LLVM DSL: rewrite splat, fsplat, vsplat
Add llvm_const_float and llvm_splat templates.
2019-04-24 23:55:41 +03:00
Nekotekina c83e65f29e LLVM DSL: rewrite extract and insert 2019-04-24 23:55:41 +03:00
Nekotekina 2eac59f59a LLVM DSL: rewrite add_sat and sub_sat
Simplify constant folding logic
2019-04-24 23:55:41 +03:00
Nekotekina ac473eb400 Rewrite cpu_translator::rol, add fshl and fshr
Use new funnel shift intrinsics
2019-04-24 23:55:41 +03:00
Nekotekina 42448cf3e5 Remove cpu_translator::scarry, cpu_translator::merge 2019-04-24 23:55:41 +03:00
Nekotekina 524aac75ed LLVM DSL: rewrite bitcast, zext, sext, trunc, select, min, max ops
Are made composable in expressions similar to arithmetic ops.
Implement noncast in addition to bitcast (no-op case).
Implement bitcast constant folding.
Fixed some misuse of sext<>.
2019-04-24 23:55:41 +03:00
Nekotekina 3925cb59ac LLVM DSL: fix pointer type traits
Clear and match 'void' type
2019-04-24 23:55:41 +03:00
Nekotekina dc9118ef50 LLVM DSL refactoring
Properly forward value categories in expression structs.
Simplify SFINAE tests (is_llvm_expr, llvm_common_t) in global operators.
Add llvm_const_int and remove llvm_add_const, llvm_sub_const, etc.
Add llvm_ord and llvm_uno for FP comparison via >=< operators.
Replace cpu_translator::fcmp with fcmp_ord and fcmp_uno.
2019-04-24 23:55:41 +03:00
Nekotekina d873802b9c Use LLVM 9
Use new add/sub with saturation intrinsics
2019-03-30 01:36:48 +03:00
Nekotekina 71b88cdc82 New SPU interpreter (SPU fast)
Use LLVM to build SPU interpreter.
Simplify interpreter loop.
2019-03-27 20:33:44 +03:00
scribam 3072571a4f cpu: use correct type when defining llvm value is_int constexpr 2018-09-10 19:59:37 +03:00
Nekotekina fdd4f03b93 SPU LLVM: improve xfloat precision
Use doubles for intermediate representation
Add option "Accurate xfloat" to enable
2018-08-12 15:42:47 +03:00
Nekotekina 89fe3705a4 Remove cpu_translator::ucarry<> 2018-07-21 12:18:07 +03:00
Nekotekina a0bf103e8b Implement cpu_translator::pshufb<>()
Remove spu_translator::pshufb<>()
Improve PSHUFB emulation (pre-SSSE3)
Emit static shufflevector for the constant mask
PPU: Inline VPERM instruction
2018-07-06 00:33:52 +03:00
Nekotekina c86dc133cf Rewrite cpu_translator::avg() 2018-07-05 22:26:35 +03:00
Nekotekina 88d0316aad Update cpu_translator
Add get_const_vector<v128>()
Add make_const_vector<v128>()
Add i2 and i4 types
Add build<>() for vector constants
Fix comparisons, allow EQ/NE for bool/char/i2/i4 types
2018-07-05 22:26:35 +03:00
Nekotekina 944e89058e SPU: improve SHUFB 2018-05-30 20:35:35 +03:00
Nekotekina 8b704588d0 Update cpu_translator 2018-05-08 13:05:29 +03:00
Nekotekina 53f8b03acc CPUTranslator: implement ICmp ops
Added operators ==, !=, >, <, >=, <=
2018-03-01 16:13:35 +03:00
Nekotekina fa04ff6d90 CPUTranslator: add bitcast, trunc, zext, sext 2018-02-10 15:57:01 +03:00
Nekotekina db83113316 Initial cpu_translator impl 2018-02-08 21:10:03 +03:00
Nekotekina a8bebcba55 LLVM AOT 2016-06-19 21:29:48 +03:00