mirror of
https://github.com/Decompollaborate/rabbitizer.git
synced 2025-01-14 03:37:46 +00:00
format tidy
This commit is contained in:
parent
ef2acdb328
commit
8a9824bbd3
@ -1,4 +1,4 @@
|
|||||||
Checks: 'readability-*,-readability-magic-numbers,clang-diagnostic-*,clang-analyzer-*,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,bugprone*,-bugprone-branch-clone,modernize*,performance*,portability*,diagnostic-*,analyzer-*,misc*,-misc-no-recursion'
|
Checks: 'readability-*,-readability-magic-numbers,clang-diagnostic-*,clang-analyzer-*,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,-clang-analyzer-optin.performance.Padding,bugprone*,-bugprone-branch-clone,modernize*,performance*,portability*,diagnostic-*,analyzer-*,misc*,-misc-no-recursion'
|
||||||
WarningsAsErrors: ''
|
WarningsAsErrors: ''
|
||||||
HeaderFilterRegex: '(src|include)\/.*\.h$'
|
HeaderFilterRegex: '(src|include)\/.*\.h$'
|
||||||
FormatStyle: 'file'
|
FormatStyle: 'file'
|
||||||
|
2
Makefile
2
Makefile
@ -117,7 +117,7 @@ format:
|
|||||||
clang-format-11 -i -style=file $(CXX_FILES)
|
clang-format-11 -i -style=file $(CXX_FILES)
|
||||||
|
|
||||||
tidy:
|
tidy:
|
||||||
clang-tidy-11 -p . --fix --fix-errors $(C_FILES) $(H_FILES) -- $(CSTD) $(OPTFLAGS) $(IINC) $(WARNINGS) $(WARNINGS_C) $(CFLAGS)
|
clang-tidy-11 -p . --fix --fix-errors $(C_FILES) -- $(CSTD) $(OPTFLAGS) $(IINC) $(WARNINGS) $(WARNINGS_C) $(CFLAGS)
|
||||||
|
|
||||||
tests: $(TESTS_ELFS)
|
tests: $(TESTS_ELFS)
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ class OperandType:
|
|||||||
cpu_immediate: Enum
|
cpu_immediate: Enum
|
||||||
cpu_branch_target_label: Enum
|
cpu_branch_target_label: Enum
|
||||||
cpu_immediate_base: Enum
|
cpu_immediate_base: Enum
|
||||||
|
cpu_maybe_rd_rs: Enum
|
||||||
|
|
||||||
rsp_rs: Enum
|
rsp_rs: Enum
|
||||||
rsp_rt: Enum
|
rsp_rt: Enum
|
||||||
@ -46,6 +47,7 @@ class OperandType:
|
|||||||
rsp_vs_index: Enum
|
rsp_vs_index: Enum
|
||||||
rsp_offset_rs: Enum
|
rsp_offset_rs: Enum
|
||||||
rsp_immediate_base: Enum
|
rsp_immediate_base: Enum
|
||||||
|
rsp_maybe_rd_rs: Enum
|
||||||
|
|
||||||
r5900_I: Enum
|
r5900_I: Enum
|
||||||
r5900_Q: Enum
|
r5900_Q: Enum
|
||||||
|
@ -76,7 +76,7 @@ bool RabbitizerInstrDescriptor_hasOperandAlias(const RabbitizerInstrDescriptor *
|
|||||||
|
|
||||||
case RAB_OPERAND_cpu_sa:
|
case RAB_OPERAND_cpu_sa:
|
||||||
case RAB_OPERAND_cpu_zero:
|
case RAB_OPERAND_cpu_zero:
|
||||||
// case RAB_OPERAND_cpu_function:
|
// case RAB_OPERAND_cpu_function:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RAB_OPERAND_cpu_cop0d:
|
case RAB_OPERAND_cpu_cop0d:
|
||||||
@ -478,7 +478,6 @@ bool RabbitizerInstrDescriptor_hasOperandAlias(const RabbitizerInstrDescriptor *
|
|||||||
return RabbitizerInstrDescriptor_hasSpecificOperand(self, operand);
|
return RabbitizerInstrDescriptor_hasSpecificOperand(self, operand);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool RabbitizerInstrDescriptor_isUnknownType(const RabbitizerInstrDescriptor *self) {
|
bool RabbitizerInstrDescriptor_isUnknownType(const RabbitizerInstrDescriptor *self) {
|
||||||
return self->instrType == RABBITIZER_INSTR_TYPE_UNKNOWN;
|
return self->instrType == RABBITIZER_INSTR_TYPE_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ bool RabbitizerInstrId_isValid(RabbitizerInstrId uniqueId) {
|
|||||||
case RABBITIZER_INSTR_ID_cpu_MAX:
|
case RABBITIZER_INSTR_ID_cpu_MAX:
|
||||||
case RABBITIZER_INSTR_ID_rsp_MAX:
|
case RABBITIZER_INSTR_ID_rsp_MAX:
|
||||||
case RABBITIZER_INSTR_ID_r5900_MAX:
|
case RABBITIZER_INSTR_ID_r5900_MAX:
|
||||||
// case RABBITIZER_INSTR_ID_ALL_MAX: Same as last MAX
|
// case RABBITIZER_INSTR_ID_ALL_MAX: Same as last MAX
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
|
|
||||||
#include "common/RabbitizerConfig.h"
|
#include "common/RabbitizerConfig.h"
|
||||||
|
|
||||||
|
|
||||||
size_t RabbitizerInstruction_getSizeForBufferInstrDisasm(const RabbitizerInstruction *self, size_t immOverrideLength, int extraLJust) {
|
size_t RabbitizerInstruction_getSizeForBufferInstrDisasm(const RabbitizerInstruction *self, size_t immOverrideLength, int extraLJust) {
|
||||||
size_t totalSize = 0;
|
size_t totalSize = 0;
|
||||||
size_t opcodeNameLength;
|
size_t opcodeNameLength;
|
||||||
|
@ -117,7 +117,7 @@ const char *RabbitizerInstruction_mapInstrToType(const RabbitizerInstruction *se
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool RabbitizerInstruction_sameOpcode(const RabbitizerInstruction *self, const RabbitizerInstruction *other) {
|
bool RabbitizerInstruction_sameOpcode(const RabbitizerInstruction *self, const RabbitizerInstruction *other) {
|
||||||
if (!RabbitizerInstrId_isValid(self->uniqueId) || !RabbitizerInstrId_isValid(self->uniqueId)) {
|
if (!RabbitizerInstrId_isValid(self->uniqueId) || !RabbitizerInstrId_isValid(other->uniqueId)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return self->uniqueId == other->uniqueId;
|
return self->uniqueId == other->uniqueId;
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
#include "instrOpercandCallbacks_array.table.h"
|
#include "instrOpercandCallbacks_array.table.h"
|
||||||
|
|
||||||
|
|
||||||
size_t RabbitizerOperandType_getBufferSize(RabbitizerOperandType operand, const RabbitizerInstruction *instr, size_t immOverrideLength) {
|
size_t RabbitizerOperandType_getBufferSize(RabbitizerOperandType operand, const RabbitizerInstruction *instr, size_t immOverrideLength) {
|
||||||
char auxBuffer[0x100] = { 0 };
|
char auxBuffer[0x100] = { 0 };
|
||||||
char immOverride[0x100] = { 0 };
|
char immOverride[0x100] = { 0 };
|
||||||
@ -36,7 +35,8 @@ size_t RabbitizerInstruction_getSizeForBufferOperandsDisasm(const RabbitizerInst
|
|||||||
return totalSize;
|
return totalSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t RabbitizerOperandType_disassemble(RabbitizerOperandType operand, const RabbitizerInstruction *instr, char *dst, const char *immOverride, size_t immOverrideLength) {
|
size_t RabbitizerOperandType_disassemble(RabbitizerOperandType operand, const RabbitizerInstruction *instr, char *dst, const char *immOverride,
|
||||||
|
size_t immOverrideLength) {
|
||||||
OperandCallback callback;
|
OperandCallback callback;
|
||||||
|
|
||||||
assert(operand > RAB_OPERAND_ALL_INVALID);
|
assert(operand > RAB_OPERAND_ALL_INVALID);
|
||||||
|
Loading…
Reference in New Issue
Block a user