[xiph-commits] r11683 - trunk/theora-exp/lib/x86
j at svn.xiph.org
j at svn.xiph.org
Sat Jul 1 14:33:59 PDT 2006
Author: j
Date: 2006-07-01 14:33:56 -0700 (Sat, 01 Jul 2006)
New Revision: 11683
Modified:
trunk/theora-exp/lib/x86/mmxfrag.c
trunk/theora-exp/lib/x86/mmxidct.c
Log:
asm fixed to compile with Apple's broken gas on Mac OS X Intel.
* replace .balign 16 with .p2align 4
* reference OC_IDCT_CONSTS as it is done for x86_64.
(this also works on i386, so no need for the ifdefs.)
Modified: trunk/theora-exp/lib/x86/mmxfrag.c
===================================================================
--- trunk/theora-exp/lib/x86/mmxfrag.c 2006-07-01 14:53:19 UTC (rev 11682)
+++ trunk/theora-exp/lib/x86/mmxfrag.c 2006-07-01 21:33:56 UTC (rev 11683)
@@ -21,7 +21,7 @@
const ogg_int16_t *_residue){
__asm__ __volatile__(
" mov $0x7, %%ecx \n\t" /* 8x loop */
- " .balign 16 \n\t"
+ " .p2align 4 \n\t"
"1:movq %3, %%mm0 \n\t" /* Set mm0 to 0x0080008000800080 */
" movq (%1), %%mm2 \n\t" /* First four input values */
" movq %%mm0, %%mm1 \n\t" /* Set mm1 == mm0 */
@@ -48,7 +48,7 @@
__asm__ __volatile__(
" movl $0x7, %%eax \n\t" /* 8x loop */
" pxor %%mm0, %%mm0 \n\t" /* zero mm0 */
- " .balign 16 \n\t"
+ " .p2align 4 \n\t"
"1: movq (%4), %%mm2 \n\t" /* load mm2 with _src */
" movq %%mm2, %%mm3 \n\t" /* copy mm2 to mm3 */
" punpckhbw %%mm0, %%mm2 \n\t" /* expand high part of _src to 16 bits */
@@ -81,7 +81,7 @@
" movl $0x7, %%eax \n\t" /* 8x loop */
" pxor %%mm0, %%mm0 \n\t" /* zero mm0 */
" movq (%4), %%mm2 \n\t" /* load mm2 with _src1 */
- " .balign 16 \n\t"
+ " .p2align 4 \n\t"
"1:movq (%6), %%mm4 \n\t" /* packed SRC2 */
" movq %%mm2, %%mm3 \n\t" /* copy to mm3 */
" movq %%mm4, %%mm5 \n\t" /* copy packed src2 to mm5 */
@@ -124,7 +124,7 @@
" movl $0x7, %7 \n\t" /* 8x loop */
" pxor %%mm0, %%mm0 \n\t" /* zero mm0 */
" movq (%4), %%mm2 \n\t" /* load mm2 with _src1 */
- " .balign 16 \n\t"
+ " .p2align 4 \n\t"
"1: movq (%6), %%mm4 \n\t" /* packed SRC2 */
" movq %%mm2, %%mm3 \n\t" /* copy to mm3 */
" movq %%mm4, %%mm5 \n\t" /* copy packed src2 to mm5 */
Modified: trunk/theora-exp/lib/x86/mmxidct.c
===================================================================
--- trunk/theora-exp/lib/x86/mmxidct.c 2006-07-01 14:53:19 UTC (rev 11682)
+++ trunk/theora-exp/lib/x86/mmxidct.c 2006-07-01 21:33:56 UTC (rev 11683)
@@ -269,21 +269,12 @@
void oc_idct8x8_mmx(ogg_int16_t _y[64]){
/*This routine accepts an 8x8 matrix, but in transposed form.
Every 4x4 submatrix is transposed.*/
-#if (defined(__amd64__) || defined(__x86_64__))
__asm__ __volatile__(
""
:
:"d" (_y),
"c" (OC_IDCT_CONSTS)
);
-#else
- __asm__ __volatile__(
- " movl $OC_IDCT_CONSTS,%%ecx\n\t"
- :
- :"d" (_y)
- :"ecx"
- );
-#endif
#define OC_I(_k) OC_M2STR((_k*16))"("OC_Y_REG")"
#define OC_J(_k) OC_M2STR(((_k-4)*16)+8)"("OC_Y_REG")"
OC_ROW_IDCT;
@@ -432,21 +423,12 @@
)
void oc_idct8x8_10_mmx(ogg_int16_t _y[64],const ogg_int16_t _x[64]){
-#if (defined(__amd64__) || defined(__x86_64__))
__asm__ __volatile__(
""
:
:"d" (_y),
"c" (OC_IDCT_CONSTS)
);
-#else
- __asm__ __volatile__(
- " mov $OC_IDCT_CONSTS,%%ecx\n\t"
- :
- :"d" (_y)
- :"ecx"
- );
-#endif
#define OC_I(_k) OC_M2STR((_k*16))"("OC_Y_REG")"
#define OC_J(_k) OC_M2STR(((_k-4)*16)+8)"("OC_Y_REG")"
/*Done with dequant, descramble, and partial transpose.
More information about the commits
mailing list