All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Fix some instructions missing their corresponding AccessType.
1.12.0 - 2024-07-21
RegistersTracker.getJrRegData
.- Does what the old
RegistersTracker.getJrInfo
method does, but it returns an actual object instead of an nullable tuple and offers extra information.
- Does what the old
RegistersTracker.processBranch
.- Allows tracking which registers has been used to decide branching.
RegistersTracker.getJrInfo
.- Use
RegistersTracker.getJrRegData
instead.
- Use
1.11.2 - 2024-07-16
- Implement the
rfe
("Restore From Exception") instruction.
- Fix
pmfhl
,pmthl
,vilwr
andviswr
missing the.fmt
specifier.
1.11.1 - 2024-07-12
Instruction.isFunctionCall
: Checks if the given instruciton is a function call.- If
config.toolchainTweaks_treatJAsUnconditionalBranch
is turned off thenj
instructions will be considered as function calls too. Useful for tail call optimizations.
- If
- Fix registers not being cleared after a
j
tail call, which was messing with the pointer pairing logic.
1.11.0 - 2024-05-22
- New global configuration:
misc_expandJalr
: IfTrue
thenjalr
instructions will be always emitted with two operands. Otherwise therd
register will be omitted if it is$ra
and will be used explicitly if it isn't$ra
. Defaults toFalse
.
- Fix crash in Rust bindings for to Rust 1.78.
- This happens because
slice.get_unchecked
now performs OoB checks in debug builds, which is is triggered when trying to dereference unsized C arrays.
- This happens because
- Fix heap corruption in Rust bindings (#62)
- The C API was returning string sizes without accounting for the null terminator, which produced issues on the Rust size which was not manually including it.
1.10.0 - 2024-04-22
- Add PSP's ALLEGREX instruction set support.
- The global
regNames.r4000AllegrexVfpuControlNamedRegisters
option controls if named registers should be used for the VFPU control registers of the R4000 ALLEGREX. Utils.floatRepr_32From16
function.- Converts a half float to a single precision float.
- Both the argument and the return value correspond to their hex representation instead of an actual float.
- Cleanups in tests code.
- Fix typo on C++ bindings.
- The registers getters of the R5900 instruction class was checking for the wrong operands.
1.9.5 - 2024-04-03
- Consider r5900's
paddub
as a possible move instruction. - Internal rework to avoid allocating memory when calculating required buffer
size for disassembly.
- This is part of the
RabbitizerInstruction_getSizeForBuffer
function. - This change may help recent Windows specific issues.
- This is part of the
1.9.4 - 2024-03-18
- Always use named registers for R5900's VU instructions.
1.9.3 - 2024-03-17
- Fix the disassembly of
pref
. - Fix typo on
c.seq.d
.- Was typed as
c.deq.d
.
- Was typed as
1.9.2 - 2024-03-10
- Fix possible stack overflow if
immOverride
is larger than 255 bytes.
1.9.1 - 2024-02-18
- Fix PyPI releases being broken due to a GHA update.
1.9.0 - 2024-02-18
- Implement
neg
pseudo.
Instruction.getProcessedImmediate
now raises an exception if the instruction does not contain an immediate field.Instruction.getInstrIndexAsVram
now raises an exception if the instruction does not contain an jump label field.Instruction.getBranchOffset
now raises an exception if the instruction does not contain an branch label field.- Extend Python's
Instruction
documentation.- Thanks to @Dragorn421 (PR #53)
Instruction.isImplemented
: UseInstruction.isValid
instead.
1.8.3 - 2024-01-28
- Fix Windows issue where jumptables where not properly identified.
- Caused because of an issue on
RegistersTracker.getJrInfo
not using the correct type width for the return value on the Python binding.
- Caused because of an issue on
1.8.2 - 2024-01-28
- Fix Windows issue on which symbols were not properly being paired.
- This was caused because of a misuse of the type widths on the Python binding.
1.8.1 - 2023-12-25
- Minor cleanups on Rust code.
- Enabled
-Werror=type-limits
in the Makefile.
getBranchVramGeneric
returns an unsigned type instead of a signed one.
1.8.0 - 2023-11-12
- Add
flag_r5900DisasmAsData
member to theInstruction
class.- This flag allows to fine-tune R5900 instruction set that are affected by
the global
gnuMode
option.- Currently these instructions are:
trunc.w.s
,cvt.w.s
,vclipw
andvsqrt
.
- Currently these instructions are:
TrinaryValue.TRUE
forces the instruction to be disassembled as data.TrinaryValue.FALSE
bypasses the global checks for disassembling a word as data. A word will still be disassembled as data if it can't be decoded.TrinaryValue.NONE
leaves this decision to the global settings.
- This flag allows to fine-tune R5900 instruction set that are affected by
the global
- Add
flag_r5900UseDollar
member to theInstruction
class.TrinaryValue.TRUE
forces the use of dollar signs ($) on R5900's VU instructions.TrinaryValue.FALSE
forces disassembling to not use of dollar signs ($) on R5900's VU instructions.TrinaryValue.NONE
leaves this decision to the global settings.
1.7.10 - 2023-09-24
- Add Python binding for
rabbitizer.__version_info__
- Add Python binding for
rabbitizer.__version__
- Add Python binding for
rabbitizer.__author__
- Add
CHANGELOG.md
- Add markdown linter to CI
- Fix passing
None
to third argument ofRegistersTracker.processLui
on the Python bindings - Fix passing
None
to first argument ofRegistersTracker
on the Python bindings
1.7.9 - 2023-09-18
- Don't attempt disassembling R5900's
vclipw
/vsqrt
in gnu mode (#44)- Thanks @ethteck
1.7.8 - 2023-09-13
- Consider
syscall
as an instruction that isn't emited by compilers - Add
$
to special PS2 regs (#41)- Thanks @ethteck
- The
treatJAsUnconditionalBranch
option is no longer deprecated
- Fix size calculation required for the buffer of the disassembled instruction for a few edge cases
- Properly implement r5900's
vcallms
operands
1.7.7 - 2023-08-27
- Reimplement hash function for Enum type.
- Fix type hints for Enum type missing the hash function.
1.7.6 - 2023-08-22
- Fix syscall having two arguments instead of just one
1.7.5 - 2023-08-08
- Catch more errors and raise Python exceptions on them in the instruction disassembly binding
- Fix bug where the buffer size for a decoded instruction would be computed
wrongly if the passed
extraLJust
parameter plus the globalopcodeLJust
option resulted in a negative value.
1.7.4 - 2023-06-13
- Provide macros to allow using gte instructions in both assembly and C. Those
are provided under the
docs/r3000gte
folder of the repository
- Fix R5900 vf registers not using the
$vf
prefix in numeric register mode.
1.7.3 - 2023-06-10
- Fix Rust release
1.7.2 - 2023-05-04
- Add
InstrIdType
- Add
clippy
rust linter and fix the new warnings
- Move all the tables and templates into the
tables/
folder - Format and cleanup rust code
1.7.1 - 2023-05-02
- General cleanups in the codebase. Not actual features or fixes were made
1.7.0 - 2023-04-30
- Support for R3000 GTE instructions (a.k.a. the PS1 specific instructions)
- PR #31
- Add CI for checking the repo is always formatted
- Add CI for checking the tables have been regenerated
- Only run the CI that builds the python bindings for every machine on new releases.
- This action was by far the slowest, so this should speed up PRs
- Other Github Actions cleanups
1.6.2 - 2023-04-27
- Fix
getInstrIndexAsVram
taking the upper 8 bits instead of 4 bits for the vram calculation
1.6.1 - 2023-04-18
- Expose
fs
,ft
andfd
registers to Python bindings. - Add enums for
RegCop1O32
,RegCop1N32
andRegCop1N64
registers for Python bindings
- Fix
Instruction
'svram
parameter not initialized if it was not passed to the constructor on the Python binding.
1.6.0 - 2023-04-17
- Adds
gnuMode
to the configuration.- Toggles various tweaks to allow building and matching with GNU
as
, which original compiler will not like. - Enabled by default.
- Turning this mode off makes the
div $0,
pseudo instruction to not be used
- Toggles various tweaks to allow building and matching with GNU
- Removed special treatment for R5900's
trunc.w.s
.cvt.w.s
andtrunc.w.s
will be decoded as-is whengnuMode
is turned off.- If
gnuMode
is turned on this instruction those two instructions are decoded as.word
s
- R5900's special operands
I
,Q
,R
andACC
will not longer be decoded with a$
prefix - All autogenerated files are added the
linguist-generated
attribute.
1.5.11 - 2023-04-02
- Fake version bump to convince CI to build binaries for Python 3.11
- Updates some Github Actions to newer versions
1.5.10 - 2023-02-23
- Add a unit test to ensure every bindings use the same version number
- This is enforced in CI
1.5.9 - 2023-02-23
- Implement
mfc2
,mtc2
,cfc2
andctc2
- Document C api usage
- Expand list of instructions not emitted by C compilers
- Fix "emitted" typo
1.5.8 - 2022-12-20
- New
modifiesF*
andreadsF*
properties in the InstructionDescriptor
- Column limit for C files has been changed to 120
- Fix source distribution of Python package
1.5.7 - 2022-12-20
- Fix a Rust binding not taking
&
1.5.6 - 2022-12-19
- Introduce
RegisterDescriptor
outputsToGprZero
method
jalr_rd
has been removed. Its old conditional behavior is now handled with the newcpu_maybe_rd_rs
operand
- Fix some typos in Rust bindings
1.5.5 - 2022-12-19
- Change the global option
treatJAsUnconditionalBranch
's default totrue
- Cleanup Rust bindings to reduce useless indirections
- Actually package the C files in the Rust crate
1.5.4 - 2022-12-18
- Why Are We Still Here? Just To Suffer?
- Try to fix Rust bindings packaging
1.5.3 - 2022-12-18
- Trying to fix crate publishing, again again
1.5.2 - 2022-12-18
- Try to fix automatic Rust crate publishing again
1.5.1 - 2022-12-18
- Attempt to fix Rust crate publishing
1.5.0 - 2022-12-18
1.5.0: Rust bindings
- Adds Rust bindings
- The table-macro-hell has been changed a little to include pre-processed versions of all the tables in the repository. This change should be more friendly to IDEs
1.4.0 - 2022-12-16
- New methods to know if an instruction reads the value of a GPR:
.readsRs
,.readsRd
and.readsRt
- Descriptor logic errors are now checked in CI
- A lot of descriptor information where corrected
- Deprecate
isJrRa()
, prefer newisReturn()
method - Deprecate
isJrNotRa()
, prefer newisJumptableJump()
method
- 3 non-existent RSP instructions where removed (
rsp_cache
,rsp_lwc1
andrsp_swc1
) - Remove
setup.cfg
and move all the info topyproject.toml
1.3.3 - 2022-11-30
- Fix RSP's jalr being marked as invalid
- Thanks to @Mr-Wiseguy for noticing
1.3.2 - 2022-11-30
- Check for
_INVALID
unique ids inisValid
- Fixed RSP using CPU cop0 .inc file instead of RSP cop0 and cop2 files (#13)
- Thanks to @Mr-Wiseguy
1.3.1 - 2022-10-16
- Removes signedness from
AccessType
1.3.0 - 2022-10-15
- Adds C++ bindings
- New functions/methods:
Instruction#getBranchOffsetGeneric()
: LikeInstruction#getGenericBranchOffset()
, but does not require thecurrentVram
parameterInstruction#getBranchVramGeneric()
Instruction#getDestinationGpr()
Instruction#hasOperandAlias()
Instruction#isJumpWithAddress()
Instruction#readsHI()
Instruction#readsLO()
Instruction#modifiesHI()
Instruction#modifiesLO()
Instruction#getAccessType()
InstrCategory#fromStr()
- New enums:
OperandType
AccessType
- Deprecated functions/methods:
Instruction#getImmediate()
: UseInstruction#getProcessedImmediate()
insteadInstruction#getGenericBranchOffset()
: UseInstruction#getBranchOffsetGeneric()
insteadInstruction#mapInstrToType()
: UseInstruction#getAccessType()
insteadInstruction#isUnknownType()
Instruction#isJType()
: UseInstruction#isJumpWithAddress()
insteadInstruction#isIType()
: UseInstruction#hasOperandAlias(OperandType.cpu_immediate)
insteadInstruction#isRType()
Instruction#isRegimmType()
- Fix missing operands on some trap instructions
- Fix buffer size calculation for disassembly
1.2.2 - 2022-10-09
1.2.2: bal
and proper \\
escape
- Add
bal
support
- Use special notation for branches which should produce matching instructions
even when no
immOverride
was passed - Escape
\
->\\
onRabbitizerUtils_escapeString
- Add
extern "C"
in every header
1.2.1 - 2022-09-26
1.2.1: Static library building in the Makefile
- Makefile now creates a
librabbitizer.a
file by default. - Makefile can also build a
librabbitizer.so
withmake dynamic
- New
include/rabbitizer.h
header which includes every other header - Added a version header
1.2.0 - 2022-09-17
1.2.0: %got
compatibility
- New methods in
RegistersTracker
to support tracking%got
accessesprocessGpLoad
, which works similar toprocessLui
preprocessLoAndGetInfo
, which replaces the now deprecatedgetLuiOffsetForLo
- Move operand types to the table format. Operands were also renamed to a more concise name.
- Fix the wrong returned value on
Utils.From2Complement
whenbits
equals 32.
RegistersTracker.getLuiOffsetForLo
. UseRegistersTracker.preprocessLoAndGetInfo
instead.
1.1.0 - 2022-08-27
1.1.0: RSP and R5900 support
- Add proper instruction decoding for N64's RSP
- Add support for decoding the R5900 processor (PS2's Emotion Engine processor)
- Cleanup internal instruction tables format
1.0.1 - 2022-07-12
- New function
Utils.escapeString
: Escapes escape characters.
- Allow taking
None
inAbi.fromStr
: returnso32
in that case. - Many cleanups and formats
1.0.0 - 2022-07-07
- New classes:
RegistersTracker
: Intended to facilitate tracking the state of the general purpose registers.
- New enums:
RegGprO32
andRegGprN32
- New configurations:
misc_omit0XOnSmallImm
: IfTrue
then the leading0x
of immediates in the [-9, 9] range is omitted. Defaults toFalse
.misc_upperCaseImm
: IfTrue
then immediates are outputted in uppercase. Defaults toTrue
.
- Many code cleanups
Instruction
changes:- Constructor can accept
vram
andcategory
parameters. isHiPair
renamed tocanBeHi
.isLoPair
renamed tocanBeLo
.- Added
doesLoad
,doesStore
,maybeIsMove
,isPseudo
andarchitectureVersion
toInstrDescriptor
. - Python API:
Instruction#rs
,Instruction#rt
and ``Instruction#rd` now return an enum gpr type and will raise an exception if the instruction does not reference the corresponding register. - New methods:
getOpcodeName
,getProcessedImmediate
,hasDelaySlot
andisValid
. - Added
__reduce__
method to allow pickling the object.
- Constructor can accept
0.1.0 - 2022-06-10
- First version