00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef AVCODEC_PS2_MMI_H
00022 #define AVCODEC_PS2_MMI_H
00023
00024 #define align16 __attribute__ ((aligned (16)))
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062 #define lq(base, off, reg) \
00063 __asm__ volatile ("lq " #reg ", %0("#base ")" : : "i" (off) )
00064
00065 #define lq2(mem, reg) \
00066 __asm__ volatile ("lq " #reg ", %0" : : "r" (mem))
00067
00068 #define sq(reg, off, base) \
00069 __asm__ volatile ("sq " #reg ", %0("#base ")" : : "i" (off) )
00070
00071
00072
00073
00074
00075
00076 #define ld3(base, off, reg) \
00077 __asm__ volatile (".word %0" : : "i" ( 0xdc000000 | (base<<21) | (reg<<16) | (off)))
00078
00079 #define ldr3(base, off, reg) \
00080 __asm__ volatile (".word %0" : : "i" ( 0x6c000000 | (base<<21) | (reg<<16) | (off)))
00081
00082 #define ldl3(base, off, reg) \
00083 __asm__ volatile (".word %0" : : "i" ( 0x68000000 | (base<<21) | (reg<<16) | (off)))
00084
00085
00086
00087
00088
00089
00090 #define sd3(reg, off, base) \
00091 __asm__ volatile (".word %0" : : "i" ( 0xfc000000 | (base<<21) | (reg<<16) | (off)))
00092
00093 #define sw(reg, off, base) \
00094 __asm__ volatile ("sw " #reg ", " #off "("#base ")")
00095
00096 #define sq2(reg, mem) \
00097 __asm__ volatile ("sq " #reg ", %0" : : "m" (*(mem)))
00098
00099 #define pinth(rs, rt, rd) \
00100 __asm__ volatile ("pinth " #rd ", " #rs ", " #rt )
00101
00102 #define phmadh(rs, rt, rd) \
00103 __asm__ volatile ("phmadh " #rd ", " #rs ", " #rt )
00104
00105 #define pcpyud(rs, rt, rd) \
00106 __asm__ volatile ("pcpyud " #rd ", " #rs ", " #rt )
00107
00108 #define pcpyld(rs, rt, rd) \
00109 __asm__ volatile ("pcpyld " #rd ", " #rs ", " #rt )
00110
00111 #define pcpyh(rt, rd) \
00112 __asm__ volatile ("pcpyh " #rd ", " #rt )
00113
00114 #define paddw(rs, rt, rd) \
00115 __asm__ volatile ("paddw " #rd ", " #rs ", " #rt )
00116
00117 #define pextlw(rs, rt, rd) \
00118 __asm__ volatile ("pextlw " #rd ", " #rs ", " #rt )
00119
00120 #define pextuw(rs, rt, rd) \
00121 __asm__ volatile ("pextuw " #rd ", " #rs ", " #rt )
00122
00123 #define pextlh(rs, rt, rd) \
00124 __asm__ volatile ("pextlh " #rd ", " #rs ", " #rt )
00125
00126 #define pextuh(rs, rt, rd) \
00127 __asm__ volatile ("pextuh " #rd ", " #rs ", " #rt )
00128
00129 #define psubw(rs, rt, rd) \
00130 __asm__ volatile ("psubw " #rd ", " #rs ", " #rt )
00131
00132 #define psraw(rt, sa, rd) \
00133 __asm__ volatile ("psraw " #rd ", " #rt ", %0" : : "i"(sa) )
00134
00135 #define ppach(rs, rt, rd) \
00136 __asm__ volatile ("ppach " #rd ", " #rs ", " #rt )
00137
00138 #define ppacb(rs, rt, rd) \
00139 __asm__ volatile ("ppacb " #rd ", " #rs ", " #rt )
00140
00141 #define prevh(rt, rd) \
00142 __asm__ volatile ("prevh " #rd ", " #rt )
00143
00144 #define pmulth(rs, rt, rd) \
00145 __asm__ volatile ("pmulth " #rd ", " #rs ", " #rt )
00146
00147 #define pmaxh(rs, rt, rd) \
00148 __asm__ volatile ("pmaxh " #rd ", " #rs ", " #rt )
00149
00150 #define pminh(rs, rt, rd) \
00151 __asm__ volatile ("pminh " #rd ", " #rs ", " #rt )
00152
00153 #define pinteh(rs, rt, rd) \
00154 __asm__ volatile ("pinteh " #rd ", " #rs ", " #rt )
00155
00156 #define paddh(rs, rt, rd) \
00157 __asm__ volatile ("paddh " #rd ", " #rs ", " #rt )
00158
00159 #define psubh(rs, rt, rd) \
00160 __asm__ volatile ("psubh " #rd ", " #rs ", " #rt )
00161
00162 #define psrah(rt, sa, rd) \
00163 __asm__ volatile ("psrah " #rd ", " #rt ", %0" : : "i"(sa) )
00164
00165 #define pmfhl_uw(rd) \
00166 __asm__ volatile ("pmfhl.uw " #rd)
00167
00168 #define pextlb(rs, rt, rd) \
00169 __asm__ volatile ("pextlb " #rd ", " #rs ", " #rt )
00170
00171 #endif