Commit Graph

30 Commits

Author SHA1 Message Date
angie
eb11d93da9 Implement mfc2, mtc2, cfc2 and ctc2 2023-01-21 15:42:40 -03:00
angie
2e74fc914f outputsToGprZero 2022-12-19 19:04:26 -03:00
Anghelo Carvajal
fb8c1edbd7
Rust bindings (#17)
* Generate bindings for enums

* Add .gitignore Cargo didn't automatically made

* Actually build the files into the library

* `pub` in `mod` to fix warning

* instruction struct

* Instruction rust binding

* Add InstrId::ALL_MAX

* link C library to rust

* Publish crate CI

* test

* config bindings

* add getters for registers

* add names methods for register enums

* get_operand_type

* feedback from simon

* Forgot to add new file to python setup.py

* get_operands_slice

* add stuff to cargo.toml
2022-12-18 15:15:39 -03:00
angie
61ccff4e42 Rename isJrRa to isReturn and isJrNotRa to isJumptableJump 2022-12-15 20:33:02 -03:00
Angie
6fad5e740a InstrCategory.fromStr 2022-10-14 18:49:59 -03:00
angie
71d241150f getDestinationGpr 2022-10-14 13:55:20 -03:00
angie
7cec779b85 AccessType enum 2022-10-13 19:41:46 -03:00
angie
c1a6abe186 Deprecate getGenericBranchOffset, add getBranchOffsetGeneric and getBranchVramGeneric 2022-10-13 17:41:50 -03:00
angie
34f2e2e6a5 Remove getImmediate and getInstrIndex 2022-10-13 16:45:01 -03:00
Angie
4ebd49711b add missing operand to trap instructions 2022-10-09 18:29:31 -03:00
angie
9bf973e82d Add extern "C" in all the headers 2022-10-04 08:31:02 -03:00
Anghelo Carvajal
136fb7a09a
Add R5900 support (#5)
* starting r5900 stuff

* operands of pmaddh

* expose R5900 to python

* fix merge issues

* move to subtables

* mmi0 and mmi3

* the rest of mmi instructions

* normal, special, regimm and cop0

* fpu_s

* cop2 special1

* starting cop2 special2

* the rest of special2

* operands for normal, special, mmi and mmi0

* mmi1 and mmi2

* Fix mmi

* sync.p

* mmi3 and cop1

* add r5900 opcodes to InstrId.pyi

* add invalid bits to unknown instruction comment

* progress on cop2 special1

* kinda finish cop2 special1

* cop2 special2 progress

* Special case for R5900 cvt.w.s -> trunc.w.s

* R5900 c.olt.s and c.ole.s

* Fix a bunch of VU0 instructions

* I'm getting tired of this bullshit

* vlqi, vsqi, vlqd, vsqd

* fix some operands

* fix div1

* lqc2 and sqc2

* sqrt.s and mult

* fix mtsa and bc2

* Remove redundant .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN

* RabbitizerInstrSuffix

* Impleme instr suffix type

* add instr suffix to remaining instructions

* ifdef out xyzw suffix from registers

* format

* fix warnings

* uncomment stuff on InstrId.pyi

* readme
2022-08-27 12:22:48 -04:00
Angie
5b59b2dff7 finish up cpu instructions 2022-08-23 12:31:03 -04:00
Angie
2ebb5f7712 Tables for cpu except cop1 2022-08-23 10:55:14 -04:00
Anghelo Carvajal
f8979ede3e
Fix RSP instruction decoding (#4)
* Use the proper registers on RSP GPR instructions

* Add IMM_base operand to RSP instructions

* Use `ra` on RSP GPR registers

* Fix RABBITIZER_OPERAND_TYPE_RSP_rd

* ??

* fix vector register element index

* fix RSP mfc2 and mtc2

* fix vmov and similar instructions

* format

* update readme

* version pump
2022-08-22 16:27:51 -04:00
angie
a539a8a39d Annotate functions with attributes 2022-07-09 19:19:53 -04:00
angie
ecc8de8df2 Add a makefile for testing and fix one warning 2022-07-09 16:54:42 -04:00
angie
dc314098d0 hasDelaySlot 2022-07-07 15:12:26 -04:00
angie
19579a183a Allow pickling Instruction type 2022-07-07 14:22:41 -04:00
Angie
c129447463 getProcessedImmediate 2022-07-06 20:12:37 -04:00
Angie
6fc7be4517 RabbitizerInstruction_disassembleOperands 2022-07-06 19:17:29 -04:00
angie
63591003f6 RabbitizerInstruction_hasOperandAlias 2022-07-05 09:18:48 -04:00
Angie
568a0662f2 remove redundant functions 2022-07-05 00:53:28 -04:00
Angie
bed5d928dd RabbitizerInstruction_isValid 2022-07-03 19:28:13 -04:00
Angie
a725e0281a minor cleanups 2022-07-03 11:34:46 -04:00
Angie
0c678ab6df remove specific registers from instruction struct
do bitwise operations to access them instead
2022-07-03 08:34:26 -04:00
Angie
d0b39c6f8c introduce macros for reading the bits from the instruction word 2022-07-02 18:49:05 -04:00
angie
cca3a10100 Expose InstrCategory enum to python 2022-06-09 12:06:49 -04:00
angie
bab16d24a5 Add more stuff to Descriptor 2022-06-08 02:17:48 -04:00
angie
d68751a1f9 Rename RabbitizerInstr to RabbitizerInstruction 2022-06-08 00:30:58 -04:00