21 #ifndef AVUTIL_AVR32_INTREADWRITE_H 22 #define AVUTIL_AVR32_INTREADWRITE_H 42 #define AV_RL16 AV_RL16 47 "ldins.b %0:l, %2 \n\t" 53 #define AV_RB16 AV_RB16 58 "ldins.b %0:l, %1 \n\t" 64 #define AV_RB24 AV_RB24 69 "ldins.b %0:l, %2 \n\t" 70 "ldins.b %0:u, %1 \n\t" 73 "RKs12"(*((
const uint8_t*)p+1)),
78 #define AV_RL24 AV_RL24 83 "ldins.b %0:l, %2 \n\t" 84 "ldins.b %0:u, %3 \n\t" 87 "RKs12"(*((
const uint8_t*)p+1)),
88 "RKs12"(*((
const uint8_t*)p+2)));
94 #define AV_RB32 AV_RB32 98 __asm__ (
"ld.w %0, %1" :
"=r"(v) :
"m"(*(
const uint32_t*)p));
102 #define AV_WB32 AV_WB32 105 __asm__ (
"st.w %0, %1" :
"=m"(*(uint32_t*)p) :
"r"(v));
109 #define AV_RL32(p) av_bswap32(AV_RB32(p)) 110 #define AV_WL32(p, v) AV_WB32(p, av_bswap32(v)) 112 #define AV_WB64 AV_WB64 115 union { uint64_t v; uint32_t hl[2]; } vv = { v };
117 AV_WB32((uint32_t*)p+1, vv.hl[1]);
120 #define AV_WL64 AV_WL64 123 union { uint64_t v; uint32_t hl[2]; } vv = { v };
125 AV_WL32((uint32_t*)p+1, vv.hl[0]);
130 #define AV_RB32 AV_RB32 135 "ldins.b %0:l, %3 \n\t" 136 "ldins.b %0:u, %2 \n\t" 137 "ldins.b %0:t, %1 \n\t" 139 :
"RKs12"(* (
const uint8_t*)p),
140 "RKs12"(*((
const uint8_t*)p+1)),
141 "RKs12"(*((
const uint8_t*)p+2)),
146 #define AV_RL32 AV_RL32 151 "ldins.b %0:l, %2 \n\t" 152 "ldins.b %0:u, %3 \n\t" 153 "ldins.b %0:t, %4 \n\t" 156 "RKs12"(*((
const uint8_t*)p+1)),
157 "RKs12"(*((
const uint8_t*)p+2)),
158 "RKs12"(*((
const uint8_t*)p+3)));
164 #define AV_RB64 AV_RB64 167 union { uint64_t v; uint32_t hl[2]; } v;
169 v.hl[1] =
AV_RB32((
const uint32_t*)p+1);
173 #define AV_RL64 AV_RL64 176 union { uint64_t v; uint32_t hl[2]; } v;
178 v.hl[0] =
AV_RL32((
const uint32_t*)p+1);
__asm__(".macro parse_r var r\n\t""\\var = -1\n\t"_IFC_REG(0) _IFC_REG(1) _IFC_REG(2) _IFC_REG(3) _IFC_REG(4) _IFC_REG(5) _IFC_REG(6) _IFC_REG(7) _IFC_REG(8) _IFC_REG(9) _IFC_REG(10) _IFC_REG(11) _IFC_REG(12) _IFC_REG(13) _IFC_REG(14) _IFC_REG(15) _IFC_REG(16) _IFC_REG(17) _IFC_REG(18) _IFC_REG(19) _IFC_REG(20) _IFC_REG(21) _IFC_REG(22) _IFC_REG(23) _IFC_REG(24) _IFC_REG(25) _IFC_REG(26) _IFC_REG(27) _IFC_REG(28) _IFC_REG(29) _IFC_REG(30) _IFC_REG(31)".iflt \\var\n\t"".error \"Unable to parse register name \\r\"\n\t"".endif\n\t"".endm")