diff options
| author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-02-22 19:44:05 +0000 |
|---|---|---|
| committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-02-22 19:44:05 +0000 |
| commit | 398b37124e870b3be69a03e5d89c5887204d6990 (patch) | |
| tree | 2f8da4ae1b5a47db97a298db5e6ffa916beed90b /apps/codecs/lib/setjmp_arm.S | |
| parent | c1bb06c3af4c5277e4a08c0084da86a69bc9d127 (diff) | |
| download | rockbox-398b37124e870b3be69a03e5d89c5887204d6990.zip rockbox-398b37124e870b3be69a03e5d89c5887204d6990.tar.gz rockbox-398b37124e870b3be69a03e5d89c5887204d6990.tar.bz2 rockbox-398b37124e870b3be69a03e5d89c5887204d6990.tar.xz | |
Remove all tabs within codec path.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24862 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/lib/setjmp_arm.S')
| -rw-r--r-- | apps/codecs/lib/setjmp_arm.S | 128 |
1 files changed, 64 insertions, 64 deletions
diff --git a/apps/codecs/lib/setjmp_arm.S b/apps/codecs/lib/setjmp_arm.S index 4bb2a46..a4d5a01 100644 --- a/apps/codecs/lib/setjmp_arm.S +++ b/apps/codecs/lib/setjmp_arm.S @@ -27,10 +27,10 @@ in both interworked and non-interworked environments as well as with older processors which do not have the BX instruction we do the following: - Test the return address. - If the bottom bit is clear perform an "old style" function exit. - (We know that we are in ARM mode and returning to an ARM mode caller). - Otherwise use the BX instruction to perform the function exit. + Test the return address. + If the bottom bit is clear perform an "old style" function exit. + (We know that we are in ARM mode and returning to an ARM mode caller). + Otherwise use the BX instruction to perform the function exit. We know that we will never attempt to perform the BX instruction on an older processor, because that kind of processor will never be @@ -47,7 +47,7 @@ test the bottom bit, because this is part of the processor status. Instead we just do a normal return, since we know that we cannot be returning to a Thumb caller - the Thumb does not support APCS-26. - + Function entry is much simpler. If we are compiling for the Thumb we just switch into ARM mode and then drop through into the rest of the function. The function exit code will take care of the restore to @@ -56,18 +56,18 @@ For Thumb-2 do everything in Thumb mode. */ #ifdef __APCS_26__ -#define RET movs pc, lr +#define RET movs pc, lr #elif defined(__thumb2__) -#define RET bx lr +#define RET bx lr #else -#define RET tst lr, #1; \ - moveq pc, lr ; \ -.word 0xe12fff1e /* bx lr */ +#define RET tst lr, #1; \ + moveq pc, lr ; \ +.word 0xe12fff1e /* bx lr */ #endif #ifdef __thumb2__ .macro COND where when - i\where \when + i\where \when .endm #else .macro COND where when @@ -77,96 +77,96 @@ #if defined(__thumb2__) .syntax unified .macro MODE - .thumb - .thumb_func + .thumb + .thumb_func .endm .macro PROLOGUE name .endm #elif defined(__thumb__) -#define MODE .thumb_func +#define MODE .thumb_func .macro PROLOGUE name - .code 16 - bx pc - nop - .code 32 + .code 16 + bx pc + nop + .code 32 SYM (.arm_start_of.\name): .endm #else /* Arm */ -#define MODE .code 32 +#define MODE .code 32 .macro PROLOGUE name .endm #endif - + .macro FUNC_START name - .text - .align 2 - MODE - .globl SYM (\name) - TYPE (\name) + .text + .align 2 + MODE + .globl SYM (\name) + TYPE (\name) SYM (\name): - PROLOGUE \name + PROLOGUE \name .endm .macro FUNC_END name - RET - SIZE (\name) + RET + SIZE (\name) .endm - + /* -------------------------------------------------------------------- int setjmp (jmp_buf); -------------------------------------------------------------------- */ - - FUNC_START setjmp + + FUNC_START setjmp - /* Save all the callee-preserved registers into the jump buffer. */ + /* Save all the callee-preserved registers into the jump buffer. */ #ifdef __thumb2__ - stmea a1!, { v1-v7, fp, ip, lr } - str sp, [a1],#+4 + stmea a1!, { v1-v7, fp, ip, lr } + str sp, [a1],#+4 #else - stmea a1!, { v1-v7, fp, ip, sp, lr } + stmea a1!, { v1-v7, fp, ip, sp, lr } #endif - -#if 0 /* Simulator does not cope with FP instructions yet. */ + +#if 0 /* Simulator does not cope with FP instructions yet. */ #ifndef __SOFTFP__ - /* Save the floating point registers. */ - sfmea f4, 4, [a1] + /* Save the floating point registers. */ + sfmea f4, 4, [a1] #endif -#endif - /* When setting up the jump buffer return 0. */ - mov a1, #0 +#endif + /* When setting up the jump buffer return 0. */ + mov a1, #0 - FUNC_END setjmp - + FUNC_END setjmp + /* -------------------------------------------------------------------- - volatile void longjmp (jmp_buf, int); + volatile void longjmp (jmp_buf, int); -------------------------------------------------------------------- */ - - FUNC_START longjmp + + FUNC_START longjmp - /* If we have stack extension code it ought to be handled here. */ - - /* Restore the registers, retrieving the state when setjmp() was called. */ + /* If we have stack extension code it ought to be handled here. */ + + /* Restore the registers, retrieving the state when setjmp() was called. */ #ifdef __thumb2__ - ldmfd a1!, { v1-v7, fp, ip, lr } - ldr sp, [a1],#+4 + ldmfd a1!, { v1-v7, fp, ip, lr } + ldr sp, [a1],#+4 #else - ldmfd a1!, { v1-v7, fp, ip, sp, lr } + ldmfd a1!, { v1-v7, fp, ip, sp, lr } #endif - -#if 0 /* Simulator does not cope with FP instructions yet. */ + +#if 0 /* Simulator does not cope with FP instructions yet. */ #ifndef __SOFTFP__ - /* Restore floating point registers as well. */ - lfmfd f4, 4, [a1] + /* Restore floating point registers as well. */ + lfmfd f4, 4, [a1] #endif -#endif - /* Put the return value into the integer result register. - But if it is zero then return 1 instead. */ - movs a1, a2 +#endif + /* Put the return value into the integer result register. + But if it is zero then return 1 instead. */ + movs a1, a2 #ifdef __thumb2__ - it eq + it eq #endif - moveq a1, #1 + moveq a1, #1 - FUNC_END longjmp + FUNC_END longjmp |