Commit b2d17d7c4ecd31cba36ef79909e2e819217a0971
- Diff rendering mode:
- inline
- side by side
src/gui/painting/qdrawhelper.cpp
(20 / 6)
|   | |||
| 1214 | 1214 | return b; | |
| 1215 | 1215 | } | |
| 1216 | 1216 | ||
| 1217 | #if defined(Q_CC_RVCT) | ||
| 1218 | 1217 | // Force ARM code generation for comp_func_* -methods | |
| 1218 | #if defined(Q_CC_RVCT) | ||
| 1219 | 1219 | # pragma push | |
| 1220 | 1220 | # pragma arm | |
| 1221 | # if defined(QT_HAVE_ARMV6) | ||
| 1221 | #endif | ||
| 1222 | |||
| 1223 | |||
| 1224 | // Use PLD on ARM core that have them in two assembly flavors | ||
| 1225 | #ifdef QT_ARM_HAS_PLD | ||
| 1226 | |||
| 1227 | // assembly flavors | ||
| 1228 | # if defined (Q_CC_RVCT) | ||
| 1222 | 1229 | static __forceinline void preload(const uint *start) | |
| 1223 | 1230 | { | |
| 1224 | 1231 | asm( "pld [start]" ); | |
| 1225 | 1232 | } | |
| 1233 | # elif defined (Q_CC_GNU) | ||
| 1234 | static __attribute__((always_inline)) void preload(const uint *start) | ||
| 1235 | { | ||
| 1236 | asm __volatile__("pld [%[addr]]\n" | ||
| 1237 | : | ||
| 1238 | : [addr] "r"(start)); | ||
| 1239 | } | ||
| 1240 | # endif | ||
| 1241 | |||
| 1226 | 1242 | static const uint L2CacheLineLength = 32; | |
| 1227 | 1243 | static const uint L2CacheLineLengthInInts = L2CacheLineLength/sizeof(uint); | |
| 1228 | 1244 | # define PRELOAD_INIT(x) preload(x); | |
| … | … | ||
| 1247 | 1247 | // Two consecutive preloads stall, so space them out a bit by using different modulus. | |
| 1248 | 1248 | # define PRELOAD_COND2(x,y) if (((uint)&x[i])%L2CacheLineLength == 0) preload(&x[i] + L2CacheLineLengthInInts); \ | |
| 1249 | 1249 | if (((uint)&y[i])%L2CacheLineLength == 16) preload(&y[i] + L2CacheLineLengthInInts); | |
| 1250 | # endif // QT_HAVE_ARMV6 | ||
| 1251 | #endif // Q_CC_RVCT | ||
| 1252 | 1250 | ||
| 1253 | #if !defined(Q_CC_RVCT) || !defined(QT_HAVE_ARMV6) | ||
| 1251 | #else | ||
| 1254 | 1252 | # define PRELOAD_INIT(x) | |
| 1255 | 1253 | # define PRELOAD_INIT2(x,y) | |
| 1256 | 1254 | # define PRELOAD_COND(x) | |
| 1257 | 1255 | # define PRELOAD_COND2(x,y) | |
| 1258 | #endif | ||
| 1256 | #endif // QT_ARM_HAS_PLD | ||
| 1259 | 1257 | ||
| 1260 | 1258 | /* The constant alpha factor describes an alpha factor that gets applied | |
| 1261 | 1259 | to the result of the composition operation combining it with the destination. |
Comments
Add a new comment:
Login or create an account to post a comment
Add your comment
Please log in to comment

