From: John M. <ato...@gm...> - 2010-11-04 17:24:32
|
On Thu, Nov 4, 2010 at 7:52 AM, Borja Ferrer <bor...@gm...> wrote: > As far as i know LLVM has address space identifiers in its IR so in theory > it's possible to do it, however i havent looked yet how to implement this in > the backend. Another thing, i havent checked if clang supports named address > spaces, i know gcc does, but at the end we should end up using only clang as > the frontend? > > Can somebody clarify me if GCC has support for 24 bit ptrs for largest > devices and 8 bit ptrs for the smallests? i'm only used to 16 bit ptrs so i > dont what gcc does outside this case. > Implementing 24bit ptrs should be possible, same for 8bit. > I was playing around with this a while ago, so I created the clang patch to enable address space type qualifiers. so adding __eeprom__ or __flash__ will put the object in a different address space. It produces the correct LLVM IR but I didn't put the time in to figuring out how to get it to add the appropriate section name in asm. If we want to have generic pointers (like Keil, SDCC...) we will also need 32 bit pointer. Generic pointers allow the user to create a pointer that can access all the address space's. |