8357855f6f
Now using read_deserialize and to_bytes in more places.
2021-06-02 14:14:40 +01:00
47736dabb8
Renamed methods and types in Bytes.
2021-06-02 13:51:45 +01:00
92938b97d9
Updated to 1.54.0-nightly
2021-05-19 19:12:56 +01:00
16f8f3c643
Fixed documentation issues.
...
Removed unused error types in `dcb-exe`.
2021-05-16 14:07:08 +01:00
51d06ea1c5
Fixed formatting.
2021-05-14 06:40:12 +01:00
ab15d12099
Added FromStr impl for DataType.
2021-05-09 04:17:01 +01:00
aeb373c3ba
Removed the need to specify kind on known / foreign data.
2021-05-09 04:13:59 +01:00
7cbd82f9a3
Removed Extend<Data> and FromIterator<Data> impls for DataTable.
2021-05-09 03:10:09 +01:00
1aa6400f43
Added DataTable::insert.
...
Data in the data table is now kept in `Rc`.
Data table now properly accessable by it's name.
2021-05-09 03:05:59 +01:00
230ef291e7
Added l{b, bu, h, hu, w}arr instruction.
2021-05-08 16:12:07 +01:00
7398f43188
Added s{w, h, b}arr pseudo instruction to store an array of registers.
...
Added a lifetime to `pseudo::Encodable` for instructions to be able to return borrowed iterators.
2021-05-08 16:02:41 +01:00
fdbd30e806
Added j[al]b{a, b, c} pseudo instruction for calling bios functions.
...
Renamed `Inst::may_jump` to `Inst::expects_branch_delay` to reflect it's nature.
2021-05-08 15:00:32 +01:00
972deb68f2
Removed Label.
...
Renamed `LabelName` to `label` and moved it to it's own module.
2021-05-07 23:40:11 +01:00
b2fad358f2
Added helper methods to LineArg and LineArgExpr.
...
`LineLabelFunc` is now `Copy`.
2021-05-07 23:39:33 +01:00
8ac0df949a
Changes from 3fc494759e6decc7b7692ee2cbbe13dd16676974 are now formatted.
2021-05-07 21:32:03 +01:00
6b3528507f
Now parsing and requiring branch delay slot markers.
...
Fixes #2 .
2021-05-07 21:27:01 +01:00
3fc494759e
Changed ParseCtx to have a lifetime associated and Parsable::parse to not allow the instruction to borrow the context itself, only it's values.
2021-05-07 21:13:25 +01:00
f6e0f529fa
Non-single pseudo instructions following a jump are now decoded as basic instructions.
2021-05-01 20:15:38 +01:00
4c3c940181
Renamed .ascii to .asciiz
2021-05-01 19:36:56 +01:00
d9be541f2e
Improved syscall handling.
2021-05-01 19:30:06 +01:00
e50d8f0ec4
Moved ExecError to it's own module.
2021-05-01 18:02:09 +01:00
8913219908
Moved ExecState out of dcb-exe and replaced it with the trait ExecCtx.
2021-05-01 18:00:24 +01:00
275592a6ba
Added dcb-dbg for debugging programs.
...
Fixed issue with `ExecState::exec` skipping instructions.
2021-05-01 17:26:25 +01:00
3c02d93dd9
Added initial support for executing instructions.
2021-05-01 16:24:07 +01:00
8487c3714c
Added serde::Deserialize impl for FuncTable.
2021-04-30 16:44:04 +01:00
1749b78fed
Added function validation.
...
Fixed issue with function `modify_spu_delay1`.
`dcb_util::fmt_err{_wrapper}` not supports non-static errors.
2021-04-30 15:54:49 +01:00
e04317c091
Functions now have a kind.
2021-04-30 15:00:15 +01:00
3eed1e930a
Moved known/foreign data/func loading into the executable.
...
Slightly revised the data / func table interface.
2021-04-29 16:36:27 +01:00
4b559b7ce1
Added some more documentation to psx header.
2021-04-29 15:38:26 +01:00
3485d10e21
Removed unnecessary features flags.
2021-04-29 15:20:28 +01:00
c211a2fc86
Revised some names in parse::line and added some unit tests.
2021-04-29 12:06:25 +01:00
b572f1d922
Removed existing Addr{Hi, Lo} and renamed AddrSigned{Hi, Lo} to Addr{Hi, Lo}, as all addresses are siged when obtaining their lo and hi.
2021-04-28 20:13:04 +01:00
64c7d09b4b
Added AddrSignedLo and AddrSignedHi label functions.
2021-04-28 19:40:37 +01:00
b152773621
Implemented validation for argument overrides.
2021-04-28 16:12:14 +01:00
cd6f64cb34
Updated parse::line to support label functions.
...
Fixed single-argument "nop" not being parsed.
2021-04-28 15:25:56 +01:00
926e2669f7
Renamed ParsingIter to DecodeIter.
2021-04-28 13:15:26 +01:00
cb07f9cd60
Added better instruction argument override.
...
Added more instruction argument overrides.
2021-04-27 19:58:41 +01:00
23c98ecd47
nop now doesn't have any arguments if only 1 nop exists.
...
Renamed and added some data / functions.
2021-04-27 17:48:06 +01:00
e2761ac842
Removed old line and renamed line2 to line.
2021-04-27 16:43:12 +01:00
f7c8572dd9
Added line2 for parsing.
2021-04-27 16:40:59 +01:00
53963b5a7e
Switched to a 120 max width.
2021-04-26 18:07:33 +01:00
443c6f6c38
Fixed jalr not supporting parsing single argument.
...
Fixed `[ls]wc{n}` not supporting non-offset register arguments.
Fixed `li` prefering unsigned values.
`pseudo::{load, store}` now use their unique mnemonics to avoid collision with basic instructions.
`ParseCtx:arg_pos` now supports label offsets.
Added `Inst::write` to write instructions.
Added `Pos + i64` impl.
Brought back and fixed `dcb-compiler`.
Fixed current function labels not having a leading `.`.
2021-04-26 17:58:05 +01:00
be3a9d6ec0
main Inst, pseudo::Inst and Directive are now Parsable.
2021-04-26 16:32:19 +01:00
9b79f3b5c9
Added lifetime to Parsable trait.
2021-04-26 16:05:07 +01:00
f54325bafe
Removed InstFmt, InstTargetFmt and InstTarget.
2021-04-26 15:39:27 +01:00
8d027e580f
dcb-decompiler now uses the new instruction display trait.
...
`DisplayCtx` now supports custom label types.
`Directive::Dw` now returns a target instead of literal.
Main `Inst` now implements `InstDisplay`.
2021-04-26 15:25:41 +01:00
c066f3f2f8
Implemented InstDisplay for pseudo instructions and directives.
...
Added a lifetime and string variant for `InstFmtArg`.
Added a lifetime to `InstDisplay`.
Added `InstFmtArg::write` to write an argument.
2021-04-26 14:55:46 +01:00
d0bd0d22b3
Added InstDisplay for better instruction formatting.
2021-04-26 14:24:43 +01:00
3c7bed14e6
Store instructions now don't print a register offset if the offset is 0.
2021-04-26 12:24:42 +01:00
8c24f616e2
Renamed Encodable to Encode and Decodable to Decode.
...
Added `TryEncode` for fallible encodings.
2021-04-26 12:21:00 +01:00