| 283 | } |
| 284 | |
| 285 | void testSse128f(U8 preOp1, U8 preOp2, U8 op, U64 value1l, U64 value1h, U64 value2l, U64 value2h, U32 flagsResult) { |
| 286 | for (U8 m=0;m<8;m++) { |
| 287 | for (U8 from=0;from<8;from++) { |
| 288 | if (m==from) { |
| 289 | continue; |
| 290 | } |
| 291 | initSseTest(); |
| 292 | loadSSE(m, 0, value1l, value1h); |
| 293 | loadSSE(from, 1, value2l, value2h); |
| 294 | cpu->flags = 0; |
| 295 | if (preOp1) { |
| 296 | pushCode8(preOp1); |
| 297 | } |
| 298 | if (preOp2) { |
| 299 | pushCode8(preOp2); |
| 300 | } |
| 301 | pushCode8(0x0f); |
| 302 | pushCode8(op); |
| 303 | pushCode8(0xC0 | (m << 3) | from); |
| 304 | runTestCPU(); |
| 305 | U32 flags = cpu->flags & FLAG_MASK; |
| 306 | if (flags != flagsResult) { |
| 307 | failed("sse failed"); |
| 308 | } |
| 309 | } |
| 310 | |
| 311 | initSseTest(); |
| 312 | loadSSE(m, 0, value1l, value1h); |
| 313 | memory->writeq(cpu->seg[DS].address+SSE_MEM_VALUE_TMP_OFFSET+16, value2l); |
| 314 | memory->writeq(cpu->seg[DS].address+SSE_MEM_VALUE_TMP_OFFSET+24, value2h); |
| 315 | cpu->flags = 0; |
| 316 | if (preOp1) { |
| 317 | pushCode8(preOp1); |
| 318 | } |
| 319 | if (preOp2) { |
| 320 | pushCode8(preOp2); |
| 321 | } |
| 322 | pushCode8(0x0f); |
| 323 | pushCode8(op); |
| 324 | pushCode8(0x04 | (m<<3)); |
| 325 | pushCode8(0x25); |
| 326 | pushCode32(SSE_MEM_VALUE_TMP_OFFSET+16); |
| 327 | runTestCPU(); |
| 328 | U32 flags = cpu->flags & FLAG_MASK; |
| 329 | if (flags != flagsResult) { |
| 330 | failed("sse failed"); |
| 331 | } |
| 332 | } |
| 333 | } |
| 334 | |
| 335 | void testSse128r(U8 preOp1, U8 preOp2, U8 op, U64 value1l, U64 value1h, U64 value2l, U64 value2h, U64 xmmResultl, U64 xmmResulth, U64 memResultl, U64 memResulth) { |
| 336 | if (!memResultl && !memResulth) { |
no test coverage detected