water111
060b125324
[Compiler/Decompiler] Better support for Bitfield and Enum types ( #374 )
...
* compiler fixes, a decent amount of decompiler stuff is working too
* more support in decompiler, fix some casts
* decompile static data too
2021-04-22 19:08:58 -04:00
ManDude
0560136f08
Allow enum names to serve as types (using the enum's type) ( #372 )
...
* Allow enum names to serve as types (using the enum's type)
* Formatting
* add doc to `get_enum_type_name`
* Ban enum forward-declaring, and remove unneeded checks
2021-04-19 20:29:38 -04:00
water111
c09e18f3a7
Fix stack new and add size-of to compiler ( #370 )
...
* make decompiler output stack-no-clear
* add size-of
2021-04-18 19:51:15 -04:00
water111
a863542fa3
[Compiler] Support dynamically constructed bitfields ( #354 )
...
* support dynamic bitfields
* update doc
2021-04-11 19:21:49 -04:00
water111
9969445cf7
[Decomp] Math library: transform and quaternion ( #344 )
...
* decompile transform
* types for quaternion
* part of quaternion
* finish quaternion
* fix offline test reference
* wip fix to let issue
* fix
2021-04-02 11:35:14 -04:00
water111
0a76e6e157
[Decompiler] Make matrix decompile ( #341 )
...
* small fixes
* update
* add instructions
* finish matrix
* add matrix test cases
2021-03-28 20:26:30 -04:00
water111
7fac11ddf5
Support 128-bit variables ( #336 )
...
* wip 128 bit support
* add a few more files to offline test
2021-03-25 16:02:48 -04:00
water111
99683c0dac
[decompiler] Add tests and fixes for vector-h and math ( #333 )
...
* before messing with ssa stuff
* fix ash
* bounding box
2021-03-24 19:16:31 -04:00
water111
0d8742241b
support for i128 ( #331 )
2021-03-23 15:56:23 -04:00
water111
fe336b7b5f
[compiler] fix warnings in repl lib and add macros to autocomplete ( #317 )
...
* fix warnings in repl lib and add macros to autocomplete
* fix crash on ctrl-c, build runtime as static lib and make goos prompt look fancier
* some tweaks for linux build
2021-03-11 12:54:16 -05:00
Tyler Wilding
8bba3d7fd7
REPL: Add clear-screen / auto-complete / basic hints and syntax highlighting ( #316 )
...
* swap to replxx from linenoise
* repl: Implement form auto-tab-completion
* repl: color coordinate the prompts
* repl: Add some basic syntax highlighting, bracket pairs and forms (all one color)
* repl: A more consistent starting screen for the repl
* repl: bug fix for auto-complete
* debug linux
* linting
2021-03-07 23:41:21 -05:00
water111
9074a35b9b
[Decompiler] Fix printing of lets ( #314 )
...
* fix let prints and windows warnings
* missing include for windows
* windows again
2021-03-07 12:01:59 -05:00
Tyler Wilding
f123bf368a
decomp - vector.gc - Decompile vector.gc ( #289 )
...
* temp: commit what i have so far
decomp: Fix nonempty_intersection impl for MSVC Debugging use-case
docs: Add info on getting ASan builds running on Visual Studio w/o exceptions
* decomp: initial rlet implementation
* decomp: cleanup pass of vector-rewrite stage
* decomp: Commit in-progress vector.gc, shortcomings are TODO commented
* decomp: More cleanup, rename from being `vector` instr specific
Fundamentally, this process can be used for re-writing ANY inline-asm instruction
* decomp: Support 4th arg ACC instructions
* decomp: Final pass of vector.gc before implementing last instructions
* decomp: Better warnings when hitting unimplemented instructs
* compiler: Implement inverse-sqrt and mov.vf
* decomp: Final manual pass over vector.gc, documented gaps
* decomp: Finish decompiling what currently is possible in vector.gc
* decomp: Fix Variable -> RegisterAccess conflict
* decomp: codacy lint
* Address review feedback
* Address feedback part 2
* Resolve build failures
2021-03-06 10:46:26 -05:00
water111
9168f03289
[Compiler] Add get-info
( #306 )
...
* wip symbol info
* finish implementation
2021-03-04 10:33:59 -05:00
water111
d9aa535dd0
[Decompiler] Fix issues in gcommon ( #305 )
...
* fix several issues
* small fixes
2021-03-03 20:52:25 -05:00
water111
413c1f5c74
[Decompiler] Add offline tests ( #303 )
...
* add offline test for gcommon as an example.
* fix test
* unused var
2021-03-03 15:42:55 -05:00
Tyler Wilding
2eca9ab801
repl: Support cross-session history ( #301 )
2021-03-03 00:05:13 -05:00
Tyler Wilding
3e0e370343
repl: Add a (repl-help) command for forgetful people like me ( #298 )
2021-03-02 13:16:47 -05:00
water111
d6d5203695
[Decomp] Minor fixes plus some math camera decomp ( #287 )
...
* make some progress on math camera
* minor fixes plus start of decomp of math camera
2021-02-26 15:27:13 -05:00
water111
cadd014add
[Compiler] Support array fields in static objects ( #284 )
...
* first part of static inline array fields
* level h
2021-02-25 22:49:46 -05:00
water111
791c4abfc0
[Decompiler] Static Data Decomp ( #280 )
...
* update all-types
* begin work on static data decompiler
* working for vif disasm array
* mostly working
* finish static data decompilation
2021-02-25 09:51:28 -05:00
water111
5ec9a91eb9
Decompiler fixes + decompiling ( #276 )
...
* decomp pad
* more decompilation
* update
* fix test name
2021-02-22 09:36:30 -05:00
water111
4b1b7e9507
[Decompile] DMA and similar ( #275 )
...
* add some dma
* clean up
* add progress script and make codacy happy
2021-02-21 11:02:28 -05:00
water111
8775840265
[Decomp] Decompile engine math library types ( #272 )
...
* decompile some stuff
* fix typo
* playing around with trigonometry
* more progress on trig
* more trig
* comments and small fixes
* finish trig
2021-02-20 11:42:46 -05:00
water111
db48d94270
[Decompiler] Clean Up ( #271 )
...
* clean up
* fix up until generic ops
* finish kernel
* documentation
* types
* add missing file
2021-02-18 11:35:45 -05:00
water111
1b5b9a2469
add sqrt ( #270 )
2021-02-17 00:57:21 -05:00
Tyler Wilding
cdce4d9612
compiler: Support the majority of the remaining VU VF instructions ( #258 )
...
* compiler: Support the majority of the remaining VU VF instructions
- VWAIT
- VMADD variants
- VMSUB variants
- VSQRT
- VDIV
- outer product (VOPMULA + VOPMSUB)
* compiler: Fix some bugs / optimize some instructions
* tests/compiler: Add test coverage for new instructions
* docs: Add documentation for new inline assembly functions
* lint: Formatting / fix failing test
* Remove my comment about ftf/fsf encoding, it's been fixed
* address review feedback
* correct VSQRTPS implementation
2021-02-16 21:41:33 -05:00
water111
126dfc1c45
[Decompiler] Misc fixes for gkernel/math ( #257 )
...
* more cases
* some work on math and floating point stuff
* some decompiling for fun
2021-02-13 11:32:52 -05:00
water111
43c1d223a6
[Decomp] Decompile gcommon, gstring-h, and gkernel-h ( #249 )
...
* begin decomp
* untabify
* finish decomp of gcommon
* warning with function name
* clean up gkernel-h
* fix all types
2021-02-11 09:49:15 -05:00
water111
e01e065170
[gcommon decomp] compiler and decompiler fixes ( #239 )
...
* wip
* decompile file-io
* a
* fix
2021-02-07 18:21:00 -05:00
water111
ddffda1e8c
[Decompilation] Fixes to compiler/decompiler for gcommon ( #227 )
...
* fix shift naming issue
* fix bad argument variable names
* fix missing variable issue
* small missing things
* wip
* cleanup
* wip
* fix conditions
* small bug fix in rewriter
* fix incredibly stupid printing bug
2021-02-05 19:41:09 -05:00
Tyler Wilding
65206823ef
Compiler - Implementing more VU Instructions (Part 1 of 2) ( #221 )
...
* A little project cleanup
* Script to grep decompiler results
* Compiler: Implement VNOP -> FNOP (.nop.vf)
temp: test new addition
* Compiler: Implement VMUL.xyzw (.mul.vf)
squash: cleaning up files i don't want to accidentally stage
* Compiler: Implement V[ADD|SUB|MUL].dest instructions
* Compiler: Implement V[ADD|SUB|MUL][x|y|w|z].dest instructions
* Compiler: Implement V[MIN|MAX]{[x|y|z|w]}.dest instructions
* Compiler: Implement V[ABS]{[x|y|z|w]}.dest instructions
* Cleanup review feedback before adding tests and docs
* Tests: Added missing emitter tests
* tests/compiler: Comprehensively test all new instructions
* docs: Add documentation for newly supported operations
* Remove unused vector-h function
* Address review feedback
2021-02-05 15:00:17 -05:00
water111
45f74f078a
[Compiler] Implement and/or in the compiler instead of a macro ( #231 )
...
* fix sc
* doc update
* another doc update
2021-02-03 16:12:51 -05:00
water111
425cc6794c
[Compiler] Bug fixes ( #230 )
...
* fix method name and use-after-free during compile error
* doc fix
2021-02-03 11:07:47 -05:00
water111
a870bb53e4
[Decompiler] Expression 5 ( #218 )
...
* new method of inline-array-class
* up to new array
* wip side effect stuff
* prepare for pop barrier stuff
* add pop barrier
* add local vars hack to compiler
* fix bug, make sort work
* add test for array
* bug fixes
* another bug fix
* refactoring env variable print for casts
* more tweaks
* updates
* final cleanup
* codacy fixes
2021-02-01 20:41:37 -05:00
water111
3331e9cd00
Replace spdlog ( #185 )
...
* remove spdlog
* clang format and fix windows
* add format shared
* windows sucks
2021-01-06 12:16:39 -05:00
water111
feead303aa
better array indexing ( #176 )
2020-12-31 22:15:17 -05:00
water111
a80b331c27
[Compiler] In-progress support for vector float (AVX) ( #171 )
...
* begin work on vf support
* split reg kind into reg hw kind and class, use class for ireg
* try test
* clang format
* add some more ops and some example functions
* better lvf on statics
* add documentation
2020-12-30 15:33:51 -05:00
water111
c811778d00
[Compiler] Add reset-here
option to colored and constrained rlet vars ( #169 )
...
* add reset-here to clear coloring at entry to rlet
* update doc
2020-12-27 14:21:48 -05:00
water111
6bf9d97c51
[Decompiler] Improve reverse field lookup ( #167 )
...
* start on new reverse lookup
* use new reverse lookup
2020-12-25 15:04:03 -05:00
water111
3355df809a
Add boxed array type ( #163 )
...
* add array
* support static arrays
2020-12-19 21:05:18 -05:00
water111
11a82bbf08
[Compiler] Add static data features ( #162 )
...
* support static pairs
* also support strings
* reorganize static stuff
* add test
* support inlined fields
* add missing type check
2020-12-19 15:21:29 -05:00
water111
e05f3ceefc
Implement gkernel
: Part 2 ( #155 )
...
* update
* small fixes
* deactivate
* simple kernel test
2020-12-08 21:41:36 -05:00
water111
d86964985a
Improve Register Allocator ( #154 )
...
* before adding IRegSet stuff
* use bitsets for live analysis
* speed up
* add stack structures
* organize new better
2020-12-06 15:42:26 -05:00
water111
06918e1fea
Implement gkernel
: Part 1 ( #150 )
...
* start gkernel implementation
* progress
* more of kernel
* swap to new dispatcher, will it work on windows
* update
2020-12-05 17:09:46 -05:00
water111
90e5c023f1
Basic Inline Assembly ( #149 )
...
* basic inline assembly support
* fix rlet
* clean up detail in IR and update documentation
2020-12-04 12:57:10 -05:00
water111
ea479bee98
Add enums and some cleanup ( #148 )
...
* support enums
* better compiler warnings
* tweaks to build with clang
2020-12-02 19:51:42 -05:00
water111
71dda76e2b
Add some compiler features and documentation ( #147 )
...
* update doc
* add disassemble and type checking
* improve compiler error messages
2020-12-01 21:39:46 -05:00
water111
21fbdce7aa
[Compiler] Bitfield Types ( #146 )
...
* add the ability to define and read bitfield types
* new set
* add bitfield setting
* add static bitfields
2020-11-29 18:01:30 -05:00
water
e93b54347f
add float min max to the compiler
2020-11-29 10:46:14 -05:00