29 серпня 2006 о 21:09 +0200 Kurt Roeckx написав(-ла): > On Tue, Aug 29, 2006 at 01:14:12AM +0200, Eugeniy Meshcheryakov wrote: > > Hello, > > > > 27 ?????? 2006 ? 17:12 +0200 Eugeniy Meshcheryakov ???????(-??): > > > > Anyway, arm needs an arm_retval.c and arm_regs.c in backends/ > > > Ok, I'll work on arm then. > > > > Patch for arm support is attached. It however adds support for only one > > ABI variant supported by gcc (default one, -mabi=apcs-gnu -mhard-float). > > I've been looking at the ABI doc, and it's nice to see someone actually > documented this. This is like only the second arch for what I find it. Did you found some ABI documentation? Is it "DWARF for the ARM(R) Architecture" aka AADWARF from ARM? If it is not, could you give a link?
> > The ABI doc seems to say that 16-23 can be used for both f0-f7 and > s0-f7, and s0-s31 can also be in 64-95. I guess there is no way to see > which ABI is being used? One that I have also says that s0-s31 should be encoded as parts of D0-D15 (256-...). And it also says that f0-f7 used to be encoded in 96-103. GCC supports last encoding for -mabi=aapcs. AFAICS gcc cannot generate code that uses sN or dN registers. > > The gdb source seems to have r0-r12, sp, lr, pc, instead of r0-r15. rN are generic names, sp, lr, pc are aliaces for this ABI (like on most RISC architectures AFAIK). For elfutils it is cosmetic, so it is not problem to use any names. ABI that I found says that r0-r15 = a1-a4, v1-v8, ip, sp, lr, pc, and r6 also is 'sb' or 'tr'. > The ABI document also seem to be suggesting those. It seems those can > be used intermixed. The binutils source also seems to have an sl and > fp, for use with gcc at r11 and r12. > > gdb also seems to have fps and cpsr after f0-f7, where fps doesn't seem > to be documented, while the ABI doc seems to say that CPSR isn't > assigned a number. fps is probably FPSCR. It like CPRS is a status register. I do not know if they should have a number assigned. > > So, this looks good at first sight. > > > Support for -msoft-float can be added easily if if will be possible to > > get e_flags member from ELF header in arm_return_value_location(), but I > > do not see how it can be done. > > I am working on this now. > > I also do not see how it is possible to add support for other ABIs now, > > AFAIKS gcc/binutils do not put information about ABI to ELF file. > > I don't know, but you should try running elfutils -h on a binary or > something, maybe it can tell. I'll try once more. -- Eugeniy Meshcheryakov
signature.asc
Description: Digital signature

