GCC not allowing SWI calls
Pages: 1 2
Graeme (8815) 106 posts |
Thanks. I’ve got it working after looking at the assembly that C was making. It turns out that my vldr64 and vstr64 were not compatible with each other! It has taken me some time to realise that adding 1 to a pointer increases it by sizeof the type and doesn’t just add one byte. In the code above I have used vfpregs+4*a and I do not need to multiply by four as C does that for you. So good news. The include assembler.h has been dropped from that file and the ldr/str assembler functions are deleted! |
Sprow (202) 1158 posts |
You may (or may not!) wish to consider using decgen which is a tool used by the Kernel and parts of the Debugger and of course VFPSupport to describe an instruction set in textual form, then generates a load of decision trees to do the hard work of the decoding, then calls a leaf C function to do While it can be a bit more bloaty than a hand-optimised-to-infinity version, the initial textual input at least avoids accidentally wrongly decoding the opcode, and spots overlapping instruction space, making it potentially easier to extend in future. |
Pages: 1 2