Skip to content

Commit 2b241b8

Browse files
authored
PC relative handling and instr category for AArch32 (#499)
* changes in AArch32 decoder to test using opt fuzz
1 parent eec3dee commit 2b241b8

File tree

11 files changed

+245
-148
lines changed

11 files changed

+245
-148
lines changed

include/remill/Arch/AArch32/Runtime/Types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ typedef RnW<uint32_t> R32W;
2828

2929
typedef Rn<uint8_t> R8;
3030

31-
//typedef Rn<uint16_t> R16;
31+
// typedef Rn<uint16_t> R16;
3232
typedef Rn<uint32_t> R32;
3333

3434
typedef Vn<vec8_t> V8;

include/remill/Arch/Instruction.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ class Operand {
6060
kTypeImmediate,
6161
kTypeAddress,
6262
kTypeExpression,
63+
kTypeRegisterExpression,
64+
kTypeImmediateExpression,
65+
kTypeAddressExpression,
6366
} type;
6467

6568
enum Action { kActionInvalid, kActionRead, kActionWrite } action;

include/remill/BC/Util.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,7 @@ std::string ModuleName(const std::unique_ptr<llvm::Module> &module);
252252
// Replace all uses of a constant `old_c` with `new_c` inside of `module`.
253253
//
254254
// Returns the number of constant uses of `old_c`.
255-
unsigned ReplaceAllUsesOfConstant(llvm::Constant *old_c,
256-
llvm::Constant *new_c,
255+
unsigned ReplaceAllUsesOfConstant(llvm::Constant *old_c, llvm::Constant *new_c,
257256
llvm::Module *module);
258257

259258
// Move a function from one module into another module.

lib/Arch/AArch32/Arch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ void AArch32Arch::PopulateBasicBlockFunction(llvm::Module *module,
124124
// auto v512 = llvm::ArrayType::get(llvm::Type::getInt8Ty(context), 512u / 8u);
125125
auto addr = llvm::Type::getIntNTy(context, address_size);
126126

127-
//auto zero_addr_val = llvm::Constant::getNullValue(addr);
127+
// auto zero_addr_val = llvm::Constant::getNullValue(addr);
128128

129129
const auto entry_block = &bb_func->getEntryBlock();
130130
llvm::IRBuilder<> ir(entry_block);

0 commit comments

Comments
 (0)