Skip to content

Commit

Permalink
v850: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
imbillow committed Jan 25, 2024
1 parent 5980d98 commit d36b941
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions librz/asm/arch/v850/v850_disas.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@

#define V850_INSTR_MAXLEN 24

#define SIGN_EXT_T5(imm) (((imm) & 0x10) ? (imm) | 0xE0 : (imm))
#define SIGN_EXT_T9(imm) (((imm) & 0x100) ? (imm) | 0xFFFFFE00 : (imm))
#define SIGN_EXT_T26(imm) (((imm) & 0x2000000) ? (imm) | 0xFC000000 : (imm))
static inline ut32 SIGN_EXT_T5(ut32 imm) {
return (imm & 0x10) ? (imm | 0xE0) : imm;
}
static inline ut32 SIGN_EXT_T9(ut32 imm) {
return (imm & 0x100) ? (imm | 0xFFFFFE00) : imm;
}
static inline ut32 SIGN_EXT_T26(ut32 imm) {
return (imm & 0x2000000) ? (imm | 0xFC000000) : imm;
}

typedef enum {
V850_MOV = 0x0,
Expand Down

0 comments on commit d36b941

Please sign in to comment.