GP2X Fp Emulator On Arm


namco

Member
Joined
Mar 22, 2006
Messages
410
Age
41
Location
Manchester, UK
Website
www.stupendous-stuff.com
This may be something everyone knows, but I've been searching for ARM assembly and found a useful site that shows how to program with ARM assembly (only it seems to be with ARMv3 and in basic):

ARM assembly

However, the main point of this thread is this section within the site concerning the floating point emulator on the ARM processors:

floating point instructions

Would this be useful for hardware hacking the GP2X?
 
Very few ARM processors actually support the floating point instructions. The one is the GP2X also does not support these instructions.

If you use these instructions in your code, through custom assembler, or by setting the -march= or -mcpu= value in GCC to that of a ARM architecture/cpu that supports these instructions, the program will silently throw something similar to an exception (its a hardware related term, I forget what) and the kernel will trap it, and then emulate the instructions.

However, if instead you use the -msoft-float flag in GCC, it will use GCC's software FP library for support, which is much faster than kernel emulation.
 
yes including this bit:

QUOTE

If you use these instructions in your code, through custom assembler, or by setting the -march= or -mcpu= value in GCC to that of a ARM architecture/cpu that supports these instructions, the program will silently throw something similar to an exception (its a hardware related term, I forget what) and the kernel will trap it, and then emulate the instructions.

However, if instead you use the -msoft-float flag in GCC, it will use GCC's software FP library for support, which is much faster than kernel emulation.
 
Back
Top