[llvm-dev] map memory regions accesses to own implementation

fiesta06 via llvm-dev llvm-dev at lists.llvm.org
Fri May 24 08:01:39 PDT 2019


Hi,

I want to use cling (based on clang) to run parts of a bare-metal
software which is

written for an embedded platform. The code uses pointers

of structs to access different device registers at physical addresses


e.g.

struct reg_map {

int control;

int status;

} *regs = 0xF0000000;

regs->control = r_reg->status + 2;


I want to emulate the external devices by virtual devices.

This would mean I need to implement my own behavior when

the software wants to transfer data to/from the dedicated memory regions.


Can I implement with LLVM this kind of mechanism ?

What would be the LLVM code parts I have to look to ?

Thanks for any hint !








More information about the llvm-dev mailing list