|
@@ -16,6 +16,7 @@ void FuncER16(u16 *x, u16 *y, u16 k)
|
|
|
|
|
|
*y = (((tmp_y)<<(2)) | (tmp_y>>(16-(2))));
|
|
|
*y = *y ^ *x;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -25,27 +26,26 @@ void FuncER16_ASM(u16 *x, u16 *y, u16 k)
|
|
|
{
|
|
|
|
|
|
asm volatile (
|
|
|
-"nop\n\t"
|
|
|
-"push {r4, r5, lr}\n\t"
|
|
|
-"ldrh r5, [r0, #0]\n\t"
|
|
|
-"ldrh r4, [r1, #0]\n\t"
|
|
|
-"lsls r3, r5, #9\n\t"
|
|
|
-"orr.w r3, r3, r5, lsr #7\n\t"
|
|
|
-"uxth r3, r3\n\t"
|
|
|
-"strh r3, [r0, #0]\n\t"
|
|
|
-"ldrh r5, [r1, #0]\n\t"
|
|
|
-"add r3, r5\n\t"
|
|
|
-"eors r2, r3\n\t"
|
|
|
-"lsls r3, r4, #2\n\t"
|
|
|
-"orr.w r3, r3, r4, lsr #14\n\t"
|
|
|
-"uxth r3, r3\n\t"
|
|
|
-"strh r2, [r0, #0]\n\t"
|
|
|
-"strh r3, [r1, #0]\n\t"
|
|
|
-"ldrh r2, [r0, #0]\n\t"
|
|
|
-"eors r3, r2\n\t"
|
|
|
-"strh r3, [r1, #0]\n\t"
|
|
|
-"pop {r4, r5, pc}\n\t"
|
|
|
-"nop\n\t"
|
|
|
+ "nop\n\t"
|
|
|
+ "push {r4, r5, lr}\n\t"
|
|
|
+ "ldrh r5, [r0, #0]\n\t"
|
|
|
+ "ldrh r4, [r1, #0]\n\t"
|
|
|
+ "lsls r3, r5, #9\n\t"
|
|
|
+ "orr.w r3, r3, r5, lsr #7\n\t"
|
|
|
+ "uxth r3, r3\n\t"
|
|
|
+ "strh r3, [r0, #0]\n\t"
|
|
|
+ "ldrh r5, [r1, #0]\n\t"
|
|
|
+ "add r3, r5\n\t"
|
|
|
+ "eors r2, r3\n\t"
|
|
|
+ "lsls r3, r4, #2\n\t"
|
|
|
+ "orr.w r3, r3, r4, lsr #14\n\t"
|
|
|
+ "uxth r3, r3\n\t"
|
|
|
+ "strh r2, [r0, #0]\n\t"
|
|
|
+ "strh r3, [r1, #0]\n\t"
|
|
|
+ "ldrh r2, [r0, #0]\n\t"
|
|
|
+ "eors r3, r2\n\t"
|
|
|
+ "strh r3, [r1, #0]\n\t"
|
|
|
+ "pop {r4, r5, pc}\n\t"
|
|
|
);
|
|
|
|
|
|
}
|