Changed ARM fix16_mul to be disabled for thumb.

This commit is contained in:
Flatmush 2011-03-13 18:39:26 +00:00
parent 98bbaf3b17
commit e83267f757
1 changed files with 5 additions and 5 deletions

View File

@ -14,16 +14,16 @@ fix16_t fix16_sadd(fix16_t inArg0, fix16_t inArg1) {
#if defined(__arm__) || defined(_ARM)
#if defined(__arm__) || defined(_ARM) && !defined(__thumb__)
fix16_t fix16_mul(int32_t inArg0, int32_t inArg1) {
fix16_t res;
asm(
"smull %1, r0, %2, %3\n\t"
"smull %0, r0, %1, %2\n\t"
#ifndef FIXMATH_NO_ROUNDING
"add %1, %1, #0x8000\n\t"
"add %0, %0, #0x8000\n\t"
#endif
"mov %1, %1, LSR #16\n\t"
"or %1, %1, r0, LSL #16"
"mov %0, %0, LSR #16\n\t"
"or %0, %0, r0, LSL #16"
: "=r"(res)
: "r"(inArg0), "r"(inArg1)
: "r0");