comparison ps2/dsputil_mmi.c @ 8031:eebc7209c47f libavcodec

Convert asm keyword into __asm__. Neither the asm() nor the __asm__() keyword is part of the C99 standard, but while GCC accepts the former in C89 syntax, it is not accepted in C99 unless GNU extensions are turned on (with -fasm). The latter form is accepted in any syntax as an extension (without requiring further command-line options). Sun Studio C99 compiler also does not accept asm() while accepting __asm__(), albeit reporting warnings that it's not valid C99 syntax.
author flameeyes
date Thu, 16 Oct 2008 13:34:09 +0000
parents f7cbb7733146
children 04423b2f6e0b
comparison
equal deleted inserted replaced
8030:a512ac8fa540 8031:eebc7209c47f
29 void ff_mmi_idct_add(uint8_t *dest, int line_size, DCTELEM *block); 29 void ff_mmi_idct_add(uint8_t *dest, int line_size, DCTELEM *block);
30 void ff_mmi_idct(DCTELEM *block); 30 void ff_mmi_idct(DCTELEM *block);
31 31
32 static void clear_blocks_mmi(DCTELEM * blocks) 32 static void clear_blocks_mmi(DCTELEM * blocks)
33 { 33 {
34 asm volatile( 34 __asm__ volatile(
35 ".set noreorder \n" 35 ".set noreorder \n"
36 "addiu $9, %0, 768 \n" 36 "addiu $9, %0, 768 \n"
37 "nop \n" 37 "nop \n"
38 "1: \n" 38 "1: \n"
39 "sq $0, 0(%0) \n" 39 "sq $0, 0(%0) \n"
49 } 49 }
50 50
51 51
52 static void get_pixels_mmi(DCTELEM *block, const uint8_t *pixels, int line_size) 52 static void get_pixels_mmi(DCTELEM *block, const uint8_t *pixels, int line_size)
53 { 53 {
54 asm volatile( 54 __asm__ volatile(
55 ".set push \n\t" 55 ".set push \n\t"
56 ".set mips3 \n\t" 56 ".set mips3 \n\t"
57 "ld $8, 0(%0) \n\t" 57 "ld $8, 0(%0) \n\t"
58 "add %0, %0, %2 \n\t" 58 "add %0, %0, %2 \n\t"
59 "ld $9, 0(%0) \n\t" 59 "ld $9, 0(%0) \n\t"
90 } 90 }
91 91
92 92
93 static void put_pixels8_mmi(uint8_t *block, const uint8_t *pixels, int line_size, int h) 93 static void put_pixels8_mmi(uint8_t *block, const uint8_t *pixels, int line_size, int h)
94 { 94 {
95 asm volatile( 95 __asm__ volatile(
96 ".set push \n\t" 96 ".set push \n\t"
97 ".set mips3 \n\t" 97 ".set mips3 \n\t"
98 "1: \n\t" 98 "1: \n\t"
99 "ldr $8, 0(%1) \n\t" 99 "ldr $8, 0(%1) \n\t"
100 "addiu %2, %2, -1 \n\t" 100 "addiu %2, %2, -1 \n\t"
109 } 109 }
110 110
111 111
112 static void put_pixels16_mmi(uint8_t *block, const uint8_t *pixels, int line_size, int h) 112 static void put_pixels16_mmi(uint8_t *block, const uint8_t *pixels, int line_size, int h)
113 { 113 {
114 asm volatile ( 114 __asm__ volatile (
115 ".set push \n\t" 115 ".set push \n\t"
116 ".set mips3 \n\t" 116 ".set mips3 \n\t"
117 "1: \n\t" 117 "1: \n\t"
118 "ldr $8, 0(%1) \n\t" 118 "ldr $8, 0(%1) \n\t"
119 "add $11, %1, %3 \n\t" 119 "add $11, %1, %3 \n\t"