Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
AngheloAlf committed Nov 11, 2023
1 parent 111ee90 commit 6b39156
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
1 change: 0 additions & 1 deletion cplusplus/src/instructions/InstructionBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,6 @@ void InstructionBase::FlagSet_r5900UseDollar(TrinaryValue value) {

/* flags */


/* more getters */

uint32_t InstructionBase::getRaw() const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ bool RabbitizerInstruction_mustDisasmAsData(const RabbitizerInstruction *self) {
case RABBITIZER_INSTR_ID_cpu_cvt_w_s:
if (self->category == RABBITIZER_INSTRCAT_R5900) {
/**
* Due to the R5900's FPU being non properly complaint, the instruction cvt.w.s always behaves as
* trunc.w.s because EE can only do round-to-zero.
* Due to the R5900's FPU being non properly complaint, the instruction cvt.w.s always
* behaves as trunc.w.s because EE can only do round-to-zero.
*
* Assemblers like GAS workaround this issue by decoding cvt.w.s as trunc.w.s, but other assemblers
* just use trunc.w.s and cvt.w.s as-is.
* Assemblers like GAS workaround this issue by decoding cvt.w.s as trunc.w.s, but other
* assemblers just use trunc.w.s and cvt.w.s as-is.
*
* Here's some reading about the binutils rationale:
* - https://sourceware.org/legacy-ml/binutils/2012-11/msg00360.html
Expand All @@ -128,19 +128,19 @@ bool RabbitizerInstruction_mustDisasmAsData(const RabbitizerInstruction *self) {
* - trunc.w.s is built as the cvt.w.s instruction.
* - cvt.w.s errors complaining as not being supported by the processor.
*
* To ensure the produced disassembly will still match when built with GAS, we decode this two
* instructions as .word
* To ensure the produced disassembly will still match when built with GAS, we decode this
* two instructions as .word
*/
return true;
}
break;
case RABBITIZER_INSTR_ID_r5900_vclipw:
// The vclipw instruction has variants that are undocumented (vclipw.xy, vclipw.z) and don't assemble in
// gnu as
// The vclipw instruction has variants that are undocumented (vclipw.xy, vclipw.z) and don't
// assemble in gnu as
return true;
case RABBITIZER_INSTR_ID_r5900_vsqrt:
// The vclipw instruction seems to be representable in multiple ways, and we only disassemble one of
// them
// The vclipw instruction seems to be representable in multiple ways, and we only disassemble
// one of them
return true;

default:
Expand Down

0 comments on commit 6b39156

Please sign in to comment.