Skip to content

Commit

Permalink
v810: RzIL support (#4096)
Browse files Browse the repository at this point in the history
* RzIL v810 support
* Fix v810 asm tests
* Fix analysis/v810
* v810: move ESIL formation into a separate function
* bin/elf: autodetect v810 architecture
  • Loading branch information
imbillow committed Jan 14, 2024
1 parent 524fe19 commit 0263478
Show file tree
Hide file tree
Showing 9 changed files with 1,174 additions and 276 deletions.
46 changes: 46 additions & 0 deletions librz/analysis/arch/v810/v810.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// SPDX-FileCopyrightText: 2024 billow <[email protected]>
// SPDX-License-Identifier: LGPL-3.0-only

#ifndef RIZIN_V810_H
#define RIZIN_V810_H

#include <rz_analysis.h>
#include <v810_disas.h>

enum {
C_BGT = 0b1111,
C_BGE = 0b1110,
C_BLT = 0b0110,
C_BLE = 0b0111,

C_BH = 0b1011,
C_BNL = 0b1001,
C_BL = 0b0001,
C_BNH = 0b0011,

C_BE = 0b0010,
C_BNE = 0b1010,

C_BV = 0b000,
C_BNV = 0b1000,
C_BN = 0b0100,
C_BP = 0b1100,
C_BC = 0b0001,
C_BNC = 0b1001,
C_BZ = 0b0010,
C_BNZ = 0b1010,
C_BR = 0b0101,
C_NOP = 0b1101,
};

typedef struct {
RzAnalysis *a;
ut16 w1;
ut16 w2;
ut32 pc;
} V810AnalysisContext;

RzAnalysisILConfig *v810_il_config(RzAnalysis *a);
RzAnalysisLiftedILOp v810_il_op(const V810AnalysisContext *a);

#endif // RIZIN_V810_H
Loading

0 comments on commit 0263478

Please sign in to comment.