Overview
Comment: | Work around Clang not aligning ivars correctly |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
055e14fc75b603d54098c112fa727a58 |
User & Date: | js on 2023-11-04 13:06:52 |
Other Links: | manifest | tags |
Context
2023-11-04
| ||
13:10 | OFMatrix4x4: Restore SSE4.1 code check-in: 0eb97e4612 user: js tags: trunk | |
13:06 | Work around Clang not aligning ivars correctly check-in: 055e14fc75 user: js tags: trunk | |
2023-11-03
| ||
01:07 | OFMatrix4x4: Remove SSE4.1 due to Clang bugs check-in: 7e1dbda4b4 user: js tags: trunk | |
Changes
Modified src/OFMatrix4x4.h from [12afeb3f7a] to [ecc8ac5d95].
︙ | |||
19 20 21 22 23 24 25 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - + | /** * @brief A 4x4 matrix of floats. */ OF_SUBCLASSING_RESTRICTED @interface OFMatrix4x4: OFObject <OFCopying> { |
︙ |
Modified src/OFMatrix4x4.m from [740fcdd16f] to [1cf8596c69].
︙ | |||
34 35 36 37 38 39 40 | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | - - + + | # pragma GCC push_options # pragma GCC target("3dnow,3dnowa") # endif static void multiplyWithMatrix_enhanced3DNow(OFMatrix4x4 *self, SEL _cmd, OFMatrix4x4 *matrix) { |
︙ | |||
70 71 72 73 74 75 76 | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | - + | "jb 0b\n" "\n\t" "femms" : "+r"(resultPtr), "+r"(left), "+r"(right) :: "cx", "mm0", "mm1", "memory" ); |
︙ | |||
128 129 130 131 132 133 134 | 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | - + - - + + | "add $16, %1\n\t" "dec %0\n\t" "jnz 0b\n" "\n\t" "0:\n\t" "femms" : "+r"(count), "+r"(vectors) |
︙ | |||
180 181 182 183 184 185 186 | 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | - + | "jb 0b\n" "\n\t" "femms" : "+r"(resultPtr), "+r"(left), "+r"(right) :: "cx", "mm0", "mm1", "memory" ); |
︙ | |||
242 243 244 245 246 247 248 | 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | - + | "add $16, %1\n\t" "dec %0\n\t" "jnz 0b\n" "\n\t" "0:\n\t" "femms" : "+r"(count), "+r"(vectors) |
︙ | |||
279 280 281 282 283 284 285 286 287 288 289 290 291 292 | 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | + + + + + + + + + + + + | transformVectors_3DNow) } } # undef REPLACE } #endif + (instancetype)alloc { OFMatrix4x4 *instance; float (*values)[4]; instance = OFAllocObject(self, 16 * sizeof(float), 16, (void **)&values); instance->_values = values; return instance; } + (OFMatrix4x4 *)identityMatrix { return [[[OFMatrix4x4 alloc] initWithValues: identityValues] autorelease]; } |
︙ | |||
300 301 302 303 304 305 306 | 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 | - + - + - - + | OF_INVALID_INIT_METHOD } - (instancetype)initWithValues: (const float [4][4])values { self = [super init]; |
︙ | |||
351 352 353 354 355 356 357 | 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 | - + | for (uint_fast8_t j = 0; j < 4; j++) result[i][j] = matrix->_values[i][0] * _values[0][j] + matrix->_values[i][1] * _values[1][j] + matrix->_values[i][2] * _values[2][j] + matrix->_values[i][3] * _values[3][j]; |
︙ |