| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 float fg; | 271 float fg; |
| 272 } T; | 272 } T; |
| 273 T t; | 273 T t; |
| 274 | 274 |
| 275 // Create a function that accepts &t, and loads, manipulates, and stores | 275 // Create a function that accepts &t, and loads, manipulates, and stores |
| 276 // the doubles t.a ... t.f. | 276 // the doubles t.a ... t.f. |
| 277 MacroAssembler assm(isolate, NULL, 0); | 277 MacroAssembler assm(isolate, NULL, 0); |
| 278 Label L, C; | 278 Label L, C; |
| 279 | 279 |
| 280 // Double precision floating point instructions. | 280 // Double precision floating point instructions. |
| 281 __ ldc1(f4, MemOperand(a0, OFFSET_OF(T, a)) ); | 281 __ ldc1(f4, MemOperand(a0, offsetof(T, a)) ); |
| 282 __ ldc1(f6, MemOperand(a0, OFFSET_OF(T, b)) ); | 282 __ ldc1(f6, MemOperand(a0, offsetof(T, b)) ); |
| 283 __ add_d(f8, f4, f6); | 283 __ add_d(f8, f4, f6); |
| 284 __ sdc1(f8, MemOperand(a0, OFFSET_OF(T, c)) ); // c = a + b. | 284 __ sdc1(f8, MemOperand(a0, offsetof(T, c)) ); // c = a + b. |
| 285 | 285 |
| 286 __ mov_d(f10, f8); // c | 286 __ mov_d(f10, f8); // c |
| 287 __ neg_d(f12, f6); // -b | 287 __ neg_d(f12, f6); // -b |
| 288 __ sub_d(f10, f10, f12); | 288 __ sub_d(f10, f10, f12); |
| 289 __ sdc1(f10, MemOperand(a0, OFFSET_OF(T, d)) ); // d = c - (-b). | 289 __ sdc1(f10, MemOperand(a0, offsetof(T, d)) ); // d = c - (-b). |
| 290 | 290 |
| 291 __ sdc1(f4, MemOperand(a0, OFFSET_OF(T, b)) ); // b = a. | 291 __ sdc1(f4, MemOperand(a0, offsetof(T, b)) ); // b = a. |
| 292 | 292 |
| 293 __ li(t0, 120); | 293 __ li(t0, 120); |
| 294 __ mtc1(t0, f14); | 294 __ mtc1(t0, f14); |
| 295 __ cvt_d_w(f14, f14); // f14 = 120.0. | 295 __ cvt_d_w(f14, f14); // f14 = 120.0. |
| 296 __ mul_d(f10, f10, f14); | 296 __ mul_d(f10, f10, f14); |
| 297 __ sdc1(f10, MemOperand(a0, OFFSET_OF(T, e)) ); // e = d * 120 = 1.8066e16. | 297 __ sdc1(f10, MemOperand(a0, offsetof(T, e)) ); // e = d * 120 = 1.8066e16. |
| 298 | 298 |
| 299 __ div_d(f12, f10, f4); | 299 __ div_d(f12, f10, f4); |
| 300 __ sdc1(f12, MemOperand(a0, OFFSET_OF(T, f)) ); // f = e / a = 120.44. | 300 __ sdc1(f12, MemOperand(a0, offsetof(T, f)) ); // f = e / a = 120.44. |
| 301 | 301 |
| 302 __ sqrt_d(f14, f12); | 302 __ sqrt_d(f14, f12); |
| 303 __ sdc1(f14, MemOperand(a0, OFFSET_OF(T, g)) ); | 303 __ sdc1(f14, MemOperand(a0, offsetof(T, g)) ); |
| 304 // g = sqrt(f) = 10.97451593465515908537 | 304 // g = sqrt(f) = 10.97451593465515908537 |
| 305 | 305 |
| 306 if (IsMipsArchVariant(kMips32r2)) { | 306 if (IsMipsArchVariant(kMips32r2)) { |
| 307 __ ldc1(f4, MemOperand(a0, OFFSET_OF(T, h)) ); | 307 __ ldc1(f4, MemOperand(a0, offsetof(T, h)) ); |
| 308 __ ldc1(f6, MemOperand(a0, OFFSET_OF(T, i)) ); | 308 __ ldc1(f6, MemOperand(a0, offsetof(T, i)) ); |
| 309 __ madd_d(f14, f6, f4, f6); | 309 __ madd_d(f14, f6, f4, f6); |
| 310 __ sdc1(f14, MemOperand(a0, OFFSET_OF(T, h)) ); | 310 __ sdc1(f14, MemOperand(a0, offsetof(T, h)) ); |
| 311 } | 311 } |
| 312 | 312 |
| 313 // Single precision floating point instructions. | 313 // Single precision floating point instructions. |
| 314 __ lwc1(f4, MemOperand(a0, OFFSET_OF(T, fa)) ); | 314 __ lwc1(f4, MemOperand(a0, offsetof(T, fa)) ); |
| 315 __ lwc1(f6, MemOperand(a0, OFFSET_OF(T, fb)) ); | 315 __ lwc1(f6, MemOperand(a0, offsetof(T, fb)) ); |
| 316 __ add_s(f8, f4, f6); | 316 __ add_s(f8, f4, f6); |
| 317 __ swc1(f8, MemOperand(a0, OFFSET_OF(T, fc)) ); // fc = fa + fb. | 317 __ swc1(f8, MemOperand(a0, offsetof(T, fc)) ); // fc = fa + fb. |
| 318 | 318 |
| 319 __ neg_s(f10, f6); // -fb | 319 __ neg_s(f10, f6); // -fb |
| 320 __ sub_s(f10, f8, f10); | 320 __ sub_s(f10, f8, f10); |
| 321 __ swc1(f10, MemOperand(a0, OFFSET_OF(T, fd)) ); // fd = fc - (-fb). | 321 __ swc1(f10, MemOperand(a0, offsetof(T, fd)) ); // fd = fc - (-fb). |
| 322 | 322 |
| 323 __ swc1(f4, MemOperand(a0, OFFSET_OF(T, fb)) ); // fb = fa. | 323 __ swc1(f4, MemOperand(a0, offsetof(T, fb)) ); // fb = fa. |
| 324 | 324 |
| 325 __ li(t0, 120); | 325 __ li(t0, 120); |
| 326 __ mtc1(t0, f14); | 326 __ mtc1(t0, f14); |
| 327 __ cvt_s_w(f14, f14); // f14 = 120.0. | 327 __ cvt_s_w(f14, f14); // f14 = 120.0. |
| 328 __ mul_s(f10, f10, f14); | 328 __ mul_s(f10, f10, f14); |
| 329 __ swc1(f10, MemOperand(a0, OFFSET_OF(T, fe)) ); // fe = fd * 120 | 329 __ swc1(f10, MemOperand(a0, offsetof(T, fe)) ); // fe = fd * 120 |
| 330 | 330 |
| 331 __ div_s(f12, f10, f4); | 331 __ div_s(f12, f10, f4); |
| 332 __ swc1(f12, MemOperand(a0, OFFSET_OF(T, ff)) ); // ff = fe / fa | 332 __ swc1(f12, MemOperand(a0, offsetof(T, ff)) ); // ff = fe / fa |
| 333 | 333 |
| 334 __ sqrt_s(f14, f12); | 334 __ sqrt_s(f14, f12); |
| 335 __ swc1(f14, MemOperand(a0, OFFSET_OF(T, fg)) ); | 335 __ swc1(f14, MemOperand(a0, offsetof(T, fg)) ); |
| 336 | 336 |
| 337 __ jr(ra); | 337 __ jr(ra); |
| 338 __ nop(); | 338 __ nop(); |
| 339 | 339 |
| 340 CodeDesc desc; | 340 CodeDesc desc; |
| 341 assm.GetCode(&desc); | 341 assm.GetCode(&desc); |
| 342 Handle<Code> code = isolate->factory()->NewCode( | 342 Handle<Code> code = isolate->factory()->NewCode( |
| 343 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 343 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 344 F3 f = FUNCTION_CAST<F3>(code->entry()); | 344 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 345 // Double test values. | 345 // Double test values. |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 typedef struct { | 391 typedef struct { |
| 392 double a; | 392 double a; |
| 393 double b; | 393 double b; |
| 394 double c; | 394 double c; |
| 395 } T; | 395 } T; |
| 396 T t; | 396 T t; |
| 397 | 397 |
| 398 Assembler assm(isolate, NULL, 0); | 398 Assembler assm(isolate, NULL, 0); |
| 399 Label L, C; | 399 Label L, C; |
| 400 | 400 |
| 401 __ ldc1(f4, MemOperand(a0, OFFSET_OF(T, a)) ); | 401 __ ldc1(f4, MemOperand(a0, offsetof(T, a)) ); |
| 402 __ ldc1(f6, MemOperand(a0, OFFSET_OF(T, b)) ); | 402 __ ldc1(f6, MemOperand(a0, offsetof(T, b)) ); |
| 403 | 403 |
| 404 // Swap f4 and f6, by using four integer registers, t0-t3. | 404 // Swap f4 and f6, by using four integer registers, t0-t3. |
| 405 if (!IsFp64Mode()) { | 405 if (!IsFp64Mode()) { |
| 406 __ mfc1(t0, f4); | 406 __ mfc1(t0, f4); |
| 407 __ mfc1(t1, f5); | 407 __ mfc1(t1, f5); |
| 408 __ mfc1(t2, f6); | 408 __ mfc1(t2, f6); |
| 409 __ mfc1(t3, f7); | 409 __ mfc1(t3, f7); |
| 410 | 410 |
| 411 __ mtc1(t0, f6); | 411 __ mtc1(t0, f6); |
| 412 __ mtc1(t1, f7); | 412 __ mtc1(t1, f7); |
| 413 __ mtc1(t2, f4); | 413 __ mtc1(t2, f4); |
| 414 __ mtc1(t3, f5); | 414 __ mtc1(t3, f5); |
| 415 } else { | 415 } else { |
| 416 DCHECK(!IsMipsArchVariant(kMips32r1) && !IsMipsArchVariant(kLoongson)); | 416 DCHECK(!IsMipsArchVariant(kMips32r1) && !IsMipsArchVariant(kLoongson)); |
| 417 __ mfc1(t0, f4); | 417 __ mfc1(t0, f4); |
| 418 __ mfhc1(t1, f4); | 418 __ mfhc1(t1, f4); |
| 419 __ mfc1(t2, f6); | 419 __ mfc1(t2, f6); |
| 420 __ mfhc1(t3, f6); | 420 __ mfhc1(t3, f6); |
| 421 | 421 |
| 422 __ mtc1(t0, f6); | 422 __ mtc1(t0, f6); |
| 423 __ mthc1(t1, f6); | 423 __ mthc1(t1, f6); |
| 424 __ mtc1(t2, f4); | 424 __ mtc1(t2, f4); |
| 425 __ mthc1(t3, f4); | 425 __ mthc1(t3, f4); |
| 426 } | 426 } |
| 427 // Store the swapped f4 and f5 back to memory. | 427 // Store the swapped f4 and f5 back to memory. |
| 428 __ sdc1(f4, MemOperand(a0, OFFSET_OF(T, a)) ); | 428 __ sdc1(f4, MemOperand(a0, offsetof(T, a)) ); |
| 429 __ sdc1(f6, MemOperand(a0, OFFSET_OF(T, c)) ); | 429 __ sdc1(f6, MemOperand(a0, offsetof(T, c)) ); |
| 430 | 430 |
| 431 __ jr(ra); | 431 __ jr(ra); |
| 432 __ nop(); | 432 __ nop(); |
| 433 | 433 |
| 434 CodeDesc desc; | 434 CodeDesc desc; |
| 435 assm.GetCode(&desc); | 435 assm.GetCode(&desc); |
| 436 Handle<Code> code = isolate->factory()->NewCode( | 436 Handle<Code> code = isolate->factory()->NewCode( |
| 437 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 437 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 438 F3 f = FUNCTION_CAST<F3>(code->entry()); | 438 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 439 t.a = 1.5e22; | 439 t.a = 1.5e22; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 459 double b; | 459 double b; |
| 460 int i; | 460 int i; |
| 461 int j; | 461 int j; |
| 462 } T; | 462 } T; |
| 463 T t; | 463 T t; |
| 464 | 464 |
| 465 Assembler assm(isolate, NULL, 0); | 465 Assembler assm(isolate, NULL, 0); |
| 466 Label L, C; | 466 Label L, C; |
| 467 | 467 |
| 468 // Load all structure elements to registers. | 468 // Load all structure elements to registers. |
| 469 __ ldc1(f4, MemOperand(a0, OFFSET_OF(T, a)) ); | 469 __ ldc1(f4, MemOperand(a0, offsetof(T, a)) ); |
| 470 __ ldc1(f6, MemOperand(a0, OFFSET_OF(T, b)) ); | 470 __ ldc1(f6, MemOperand(a0, offsetof(T, b)) ); |
| 471 __ lw(t0, MemOperand(a0, OFFSET_OF(T, i)) ); | 471 __ lw(t0, MemOperand(a0, offsetof(T, i)) ); |
| 472 __ lw(t1, MemOperand(a0, OFFSET_OF(T, j)) ); | 472 __ lw(t1, MemOperand(a0, offsetof(T, j)) ); |
| 473 | 473 |
| 474 // Convert double in f4 to int in element i. | 474 // Convert double in f4 to int in element i. |
| 475 __ cvt_w_d(f8, f4); | 475 __ cvt_w_d(f8, f4); |
| 476 __ mfc1(t2, f8); | 476 __ mfc1(t2, f8); |
| 477 __ sw(t2, MemOperand(a0, OFFSET_OF(T, i)) ); | 477 __ sw(t2, MemOperand(a0, offsetof(T, i)) ); |
| 478 | 478 |
| 479 // Convert double in f6 to int in element j. | 479 // Convert double in f6 to int in element j. |
| 480 __ cvt_w_d(f10, f6); | 480 __ cvt_w_d(f10, f6); |
| 481 __ mfc1(t3, f10); | 481 __ mfc1(t3, f10); |
| 482 __ sw(t3, MemOperand(a0, OFFSET_OF(T, j)) ); | 482 __ sw(t3, MemOperand(a0, offsetof(T, j)) ); |
| 483 | 483 |
| 484 // Convert int in original i (t0) to double in a. | 484 // Convert int in original i (t0) to double in a. |
| 485 __ mtc1(t0, f12); | 485 __ mtc1(t0, f12); |
| 486 __ cvt_d_w(f0, f12); | 486 __ cvt_d_w(f0, f12); |
| 487 __ sdc1(f0, MemOperand(a0, OFFSET_OF(T, a)) ); | 487 __ sdc1(f0, MemOperand(a0, offsetof(T, a)) ); |
| 488 | 488 |
| 489 // Convert int in original j (t1) to double in b. | 489 // Convert int in original j (t1) to double in b. |
| 490 __ mtc1(t1, f14); | 490 __ mtc1(t1, f14); |
| 491 __ cvt_d_w(f2, f14); | 491 __ cvt_d_w(f2, f14); |
| 492 __ sdc1(f2, MemOperand(a0, OFFSET_OF(T, b)) ); | 492 __ sdc1(f2, MemOperand(a0, offsetof(T, b)) ); |
| 493 | 493 |
| 494 __ jr(ra); | 494 __ jr(ra); |
| 495 __ nop(); | 495 __ nop(); |
| 496 | 496 |
| 497 CodeDesc desc; | 497 CodeDesc desc; |
| 498 assm.GetCode(&desc); | 498 assm.GetCode(&desc); |
| 499 Handle<Code> code = isolate->factory()->NewCode( | 499 Handle<Code> code = isolate->factory()->NewCode( |
| 500 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 500 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 501 F3 f = FUNCTION_CAST<F3>(code->entry()); | 501 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 502 t.a = 1.5e4; | 502 t.a = 1.5e4; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 528 int32_t r4; | 528 int32_t r4; |
| 529 int32_t r5; | 529 int32_t r5; |
| 530 int32_t r6; | 530 int32_t r6; |
| 531 } T; | 531 } T; |
| 532 T t; | 532 T t; |
| 533 | 533 |
| 534 Assembler assm(isolate, NULL, 0); | 534 Assembler assm(isolate, NULL, 0); |
| 535 Label L, C; | 535 Label L, C; |
| 536 | 536 |
| 537 // Basic word load/store. | 537 // Basic word load/store. |
| 538 __ lw(t0, MemOperand(a0, OFFSET_OF(T, ui)) ); | 538 __ lw(t0, MemOperand(a0, offsetof(T, ui)) ); |
| 539 __ sw(t0, MemOperand(a0, OFFSET_OF(T, r1)) ); | 539 __ sw(t0, MemOperand(a0, offsetof(T, r1)) ); |
| 540 | 540 |
| 541 // lh with positive data. | 541 // lh with positive data. |
| 542 __ lh(t1, MemOperand(a0, OFFSET_OF(T, ui)) ); | 542 __ lh(t1, MemOperand(a0, offsetof(T, ui)) ); |
| 543 __ sw(t1, MemOperand(a0, OFFSET_OF(T, r2)) ); | 543 __ sw(t1, MemOperand(a0, offsetof(T, r2)) ); |
| 544 | 544 |
| 545 // lh with negative data. | 545 // lh with negative data. |
| 546 __ lh(t2, MemOperand(a0, OFFSET_OF(T, si)) ); | 546 __ lh(t2, MemOperand(a0, offsetof(T, si)) ); |
| 547 __ sw(t2, MemOperand(a0, OFFSET_OF(T, r3)) ); | 547 __ sw(t2, MemOperand(a0, offsetof(T, r3)) ); |
| 548 | 548 |
| 549 // lhu with negative data. | 549 // lhu with negative data. |
| 550 __ lhu(t3, MemOperand(a0, OFFSET_OF(T, si)) ); | 550 __ lhu(t3, MemOperand(a0, offsetof(T, si)) ); |
| 551 __ sw(t3, MemOperand(a0, OFFSET_OF(T, r4)) ); | 551 __ sw(t3, MemOperand(a0, offsetof(T, r4)) ); |
| 552 | 552 |
| 553 // lb with negative data. | 553 // lb with negative data. |
| 554 __ lb(t4, MemOperand(a0, OFFSET_OF(T, si)) ); | 554 __ lb(t4, MemOperand(a0, offsetof(T, si)) ); |
| 555 __ sw(t4, MemOperand(a0, OFFSET_OF(T, r5)) ); | 555 __ sw(t4, MemOperand(a0, offsetof(T, r5)) ); |
| 556 | 556 |
| 557 // sh writes only 1/2 of word. | 557 // sh writes only 1/2 of word. |
| 558 __ lui(t5, 0x3333); | 558 __ lui(t5, 0x3333); |
| 559 __ ori(t5, t5, 0x3333); | 559 __ ori(t5, t5, 0x3333); |
| 560 __ sw(t5, MemOperand(a0, OFFSET_OF(T, r6)) ); | 560 __ sw(t5, MemOperand(a0, offsetof(T, r6)) ); |
| 561 __ lhu(t5, MemOperand(a0, OFFSET_OF(T, si)) ); | 561 __ lhu(t5, MemOperand(a0, offsetof(T, si)) ); |
| 562 __ sh(t5, MemOperand(a0, OFFSET_OF(T, r6)) ); | 562 __ sh(t5, MemOperand(a0, offsetof(T, r6)) ); |
| 563 | 563 |
| 564 __ jr(ra); | 564 __ jr(ra); |
| 565 __ nop(); | 565 __ nop(); |
| 566 | 566 |
| 567 CodeDesc desc; | 567 CodeDesc desc; |
| 568 assm.GetCode(&desc); | 568 assm.GetCode(&desc); |
| 569 Handle<Code> code = isolate->factory()->NewCode( | 569 Handle<Code> code = isolate->factory()->NewCode( |
| 570 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 570 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 571 F3 f = FUNCTION_CAST<F3>(code->entry()); | 571 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 572 t.ui = 0x11223344; | 572 t.ui = 0x11223344; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 double f; | 608 double f; |
| 609 int32_t result; | 609 int32_t result; |
| 610 } T; | 610 } T; |
| 611 T t; | 611 T t; |
| 612 | 612 |
| 613 // Create a function that accepts &t, and loads, manipulates, and stores | 613 // Create a function that accepts &t, and loads, manipulates, and stores |
| 614 // the doubles t.a ... t.f. | 614 // the doubles t.a ... t.f. |
| 615 MacroAssembler assm(isolate, NULL, 0); | 615 MacroAssembler assm(isolate, NULL, 0); |
| 616 Label neither_is_nan, less_than, outa_here; | 616 Label neither_is_nan, less_than, outa_here; |
| 617 | 617 |
| 618 __ ldc1(f4, MemOperand(a0, OFFSET_OF(T, a)) ); | 618 __ ldc1(f4, MemOperand(a0, offsetof(T, a)) ); |
| 619 __ ldc1(f6, MemOperand(a0, OFFSET_OF(T, b)) ); | 619 __ ldc1(f6, MemOperand(a0, offsetof(T, b)) ); |
| 620 if (!IsMipsArchVariant(kMips32r6)) { | 620 if (!IsMipsArchVariant(kMips32r6)) { |
| 621 __ c(UN, D, f4, f6); | 621 __ c(UN, D, f4, f6); |
| 622 __ bc1f(&neither_is_nan); | 622 __ bc1f(&neither_is_nan); |
| 623 } else { | 623 } else { |
| 624 __ cmp(UN, L, f2, f4, f6); | 624 __ cmp(UN, L, f2, f4, f6); |
| 625 __ bc1eqz(&neither_is_nan, f2); | 625 __ bc1eqz(&neither_is_nan, f2); |
| 626 } | 626 } |
| 627 __ nop(); | 627 __ nop(); |
| 628 __ sw(zero_reg, MemOperand(a0, OFFSET_OF(T, result)) ); | 628 __ sw(zero_reg, MemOperand(a0, offsetof(T, result)) ); |
| 629 __ Branch(&outa_here); | 629 __ Branch(&outa_here); |
| 630 | 630 |
| 631 __ bind(&neither_is_nan); | 631 __ bind(&neither_is_nan); |
| 632 | 632 |
| 633 if (IsMipsArchVariant(kLoongson)) { | 633 if (IsMipsArchVariant(kLoongson)) { |
| 634 __ c(OLT, D, f6, f4); | 634 __ c(OLT, D, f6, f4); |
| 635 __ bc1t(&less_than); | 635 __ bc1t(&less_than); |
| 636 } else if (IsMipsArchVariant(kMips32r6)) { | 636 } else if (IsMipsArchVariant(kMips32r6)) { |
| 637 __ cmp(OLT, L, f2, f6, f4); | 637 __ cmp(OLT, L, f2, f6, f4); |
| 638 __ bc1nez(&less_than, f2); | 638 __ bc1nez(&less_than, f2); |
| 639 } else { | 639 } else { |
| 640 __ c(OLT, D, f6, f4, 2); | 640 __ c(OLT, D, f6, f4, 2); |
| 641 __ bc1t(&less_than, 2); | 641 __ bc1t(&less_than, 2); |
| 642 } | 642 } |
| 643 | 643 |
| 644 __ nop(); | 644 __ nop(); |
| 645 __ sw(zero_reg, MemOperand(a0, OFFSET_OF(T, result)) ); | 645 __ sw(zero_reg, MemOperand(a0, offsetof(T, result)) ); |
| 646 __ Branch(&outa_here); | 646 __ Branch(&outa_here); |
| 647 | 647 |
| 648 __ bind(&less_than); | 648 __ bind(&less_than); |
| 649 __ Addu(t0, zero_reg, Operand(1)); | 649 __ Addu(t0, zero_reg, Operand(1)); |
| 650 __ sw(t0, MemOperand(a0, OFFSET_OF(T, result)) ); // Set true. | 650 __ sw(t0, MemOperand(a0, offsetof(T, result)) ); // Set true. |
| 651 | 651 |
| 652 | 652 |
| 653 // This test-case should have additional tests. | 653 // This test-case should have additional tests. |
| 654 | 654 |
| 655 __ bind(&outa_here); | 655 __ bind(&outa_here); |
| 656 | 656 |
| 657 __ jr(ra); | 657 __ jr(ra); |
| 658 __ nop(); | 658 __ nop(); |
| 659 | 659 |
| 660 CodeDesc desc; | 660 CodeDesc desc; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 int32_t result_rotrv_16; | 699 int32_t result_rotrv_16; |
| 700 int32_t result_rotrv_20; | 700 int32_t result_rotrv_20; |
| 701 int32_t result_rotrv_24; | 701 int32_t result_rotrv_24; |
| 702 int32_t result_rotrv_28; | 702 int32_t result_rotrv_28; |
| 703 } T; | 703 } T; |
| 704 T t; | 704 T t; |
| 705 | 705 |
| 706 MacroAssembler assm(isolate, NULL, 0); | 706 MacroAssembler assm(isolate, NULL, 0); |
| 707 | 707 |
| 708 // Basic word load. | 708 // Basic word load. |
| 709 __ lw(t0, MemOperand(a0, OFFSET_OF(T, input)) ); | 709 __ lw(t0, MemOperand(a0, offsetof(T, input)) ); |
| 710 | 710 |
| 711 // ROTR instruction (called through the Ror macro). | 711 // ROTR instruction (called through the Ror macro). |
| 712 __ Ror(t1, t0, 0x0004); | 712 __ Ror(t1, t0, 0x0004); |
| 713 __ Ror(t2, t0, 0x0008); | 713 __ Ror(t2, t0, 0x0008); |
| 714 __ Ror(t3, t0, 0x000c); | 714 __ Ror(t3, t0, 0x000c); |
| 715 __ Ror(t4, t0, 0x0010); | 715 __ Ror(t4, t0, 0x0010); |
| 716 __ Ror(t5, t0, 0x0014); | 716 __ Ror(t5, t0, 0x0014); |
| 717 __ Ror(t6, t0, 0x0018); | 717 __ Ror(t6, t0, 0x0018); |
| 718 __ Ror(t7, t0, 0x001c); | 718 __ Ror(t7, t0, 0x001c); |
| 719 | 719 |
| 720 // Basic word store. | 720 // Basic word store. |
| 721 __ sw(t1, MemOperand(a0, OFFSET_OF(T, result_rotr_4)) ); | 721 __ sw(t1, MemOperand(a0, offsetof(T, result_rotr_4)) ); |
| 722 __ sw(t2, MemOperand(a0, OFFSET_OF(T, result_rotr_8)) ); | 722 __ sw(t2, MemOperand(a0, offsetof(T, result_rotr_8)) ); |
| 723 __ sw(t3, MemOperand(a0, OFFSET_OF(T, result_rotr_12)) ); | 723 __ sw(t3, MemOperand(a0, offsetof(T, result_rotr_12)) ); |
| 724 __ sw(t4, MemOperand(a0, OFFSET_OF(T, result_rotr_16)) ); | 724 __ sw(t4, MemOperand(a0, offsetof(T, result_rotr_16)) ); |
| 725 __ sw(t5, MemOperand(a0, OFFSET_OF(T, result_rotr_20)) ); | 725 __ sw(t5, MemOperand(a0, offsetof(T, result_rotr_20)) ); |
| 726 __ sw(t6, MemOperand(a0, OFFSET_OF(T, result_rotr_24)) ); | 726 __ sw(t6, MemOperand(a0, offsetof(T, result_rotr_24)) ); |
| 727 __ sw(t7, MemOperand(a0, OFFSET_OF(T, result_rotr_28)) ); | 727 __ sw(t7, MemOperand(a0, offsetof(T, result_rotr_28)) ); |
| 728 | 728 |
| 729 // ROTRV instruction (called through the Ror macro). | 729 // ROTRV instruction (called through the Ror macro). |
| 730 __ li(t7, 0x0004); | 730 __ li(t7, 0x0004); |
| 731 __ Ror(t1, t0, t7); | 731 __ Ror(t1, t0, t7); |
| 732 __ li(t7, 0x0008); | 732 __ li(t7, 0x0008); |
| 733 __ Ror(t2, t0, t7); | 733 __ Ror(t2, t0, t7); |
| 734 __ li(t7, 0x000C); | 734 __ li(t7, 0x000C); |
| 735 __ Ror(t3, t0, t7); | 735 __ Ror(t3, t0, t7); |
| 736 __ li(t7, 0x0010); | 736 __ li(t7, 0x0010); |
| 737 __ Ror(t4, t0, t7); | 737 __ Ror(t4, t0, t7); |
| 738 __ li(t7, 0x0014); | 738 __ li(t7, 0x0014); |
| 739 __ Ror(t5, t0, t7); | 739 __ Ror(t5, t0, t7); |
| 740 __ li(t7, 0x0018); | 740 __ li(t7, 0x0018); |
| 741 __ Ror(t6, t0, t7); | 741 __ Ror(t6, t0, t7); |
| 742 __ li(t7, 0x001C); | 742 __ li(t7, 0x001C); |
| 743 __ Ror(t7, t0, t7); | 743 __ Ror(t7, t0, t7); |
| 744 | 744 |
| 745 // Basic word store. | 745 // Basic word store. |
| 746 __ sw(t1, MemOperand(a0, OFFSET_OF(T, result_rotrv_4)) ); | 746 __ sw(t1, MemOperand(a0, offsetof(T, result_rotrv_4)) ); |
| 747 __ sw(t2, MemOperand(a0, OFFSET_OF(T, result_rotrv_8)) ); | 747 __ sw(t2, MemOperand(a0, offsetof(T, result_rotrv_8)) ); |
| 748 __ sw(t3, MemOperand(a0, OFFSET_OF(T, result_rotrv_12)) ); | 748 __ sw(t3, MemOperand(a0, offsetof(T, result_rotrv_12)) ); |
| 749 __ sw(t4, MemOperand(a0, OFFSET_OF(T, result_rotrv_16)) ); | 749 __ sw(t4, MemOperand(a0, offsetof(T, result_rotrv_16)) ); |
| 750 __ sw(t5, MemOperand(a0, OFFSET_OF(T, result_rotrv_20)) ); | 750 __ sw(t5, MemOperand(a0, offsetof(T, result_rotrv_20)) ); |
| 751 __ sw(t6, MemOperand(a0, OFFSET_OF(T, result_rotrv_24)) ); | 751 __ sw(t6, MemOperand(a0, offsetof(T, result_rotrv_24)) ); |
| 752 __ sw(t7, MemOperand(a0, OFFSET_OF(T, result_rotrv_28)) ); | 752 __ sw(t7, MemOperand(a0, offsetof(T, result_rotrv_28)) ); |
| 753 | 753 |
| 754 __ jr(ra); | 754 __ jr(ra); |
| 755 __ nop(); | 755 __ nop(); |
| 756 | 756 |
| 757 CodeDesc desc; | 757 CodeDesc desc; |
| 758 assm.GetCode(&desc); | 758 assm.GetCode(&desc); |
| 759 Handle<Code> code = isolate->factory()->NewCode( | 759 Handle<Code> code = isolate->factory()->NewCode( |
| 760 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 760 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 761 F3 f = FUNCTION_CAST<F3>(code->entry()); | 761 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 762 t.input = 0x12345678; | 762 t.input = 0x12345678; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 825 } T; | 825 } T; |
| 826 T t; | 826 T t; |
| 827 | 827 |
| 828 Assembler assm(isolate, NULL, 0); | 828 Assembler assm(isolate, NULL, 0); |
| 829 Label L, C; | 829 Label L, C; |
| 830 | 830 |
| 831 if (!IsMipsArchVariant(kMips32r2)) return; | 831 if (!IsMipsArchVariant(kMips32r2)) return; |
| 832 | 832 |
| 833 // Load all structure elements to registers. | 833 // Load all structure elements to registers. |
| 834 // (f0, f1) = a (fp32), f0 = a (fp64) | 834 // (f0, f1) = a (fp32), f0 = a (fp64) |
| 835 __ ldc1(f0, MemOperand(a0, OFFSET_OF(T, a))); | 835 __ ldc1(f0, MemOperand(a0, offsetof(T, a))); |
| 836 | 836 |
| 837 if (IsFp64Mode()) { | 837 if (IsFp64Mode()) { |
| 838 __ mfc1(t0, f0); // t0 = f0(31..0) | 838 __ mfc1(t0, f0); // t0 = f0(31..0) |
| 839 __ mfhc1(t1, f0); // t1 = sign_extend(f0(63..32)) | 839 __ mfhc1(t1, f0); // t1 = sign_extend(f0(63..32)) |
| 840 __ sw(t0, MemOperand(a0, OFFSET_OF(T, dbl_mant))); // dbl_mant = t0 | 840 __ sw(t0, MemOperand(a0, offsetof(T, dbl_mant))); // dbl_mant = t0 |
| 841 __ sw(t1, MemOperand(a0, OFFSET_OF(T, dbl_exp))); // dbl_exp = t1 | 841 __ sw(t1, MemOperand(a0, offsetof(T, dbl_exp))); // dbl_exp = t1 |
| 842 } else { | 842 } else { |
| 843 // Save the raw bits of the double. | 843 // Save the raw bits of the double. |
| 844 __ mfc1(t0, f0); // t0 = a1 | 844 __ mfc1(t0, f0); // t0 = a1 |
| 845 __ mfc1(t1, f1); // t1 = a2 | 845 __ mfc1(t1, f1); // t1 = a2 |
| 846 __ sw(t0, MemOperand(a0, OFFSET_OF(T, dbl_mant))); // dbl_mant = t0 | 846 __ sw(t0, MemOperand(a0, offsetof(T, dbl_mant))); // dbl_mant = t0 |
| 847 __ sw(t1, MemOperand(a0, OFFSET_OF(T, dbl_exp))); // dbl_exp = t1 | 847 __ sw(t1, MemOperand(a0, offsetof(T, dbl_exp))); // dbl_exp = t1 |
| 848 } | 848 } |
| 849 | 849 |
| 850 // Convert double in f0 to word, save hi/lo parts. | 850 // Convert double in f0 to word, save hi/lo parts. |
| 851 __ cvt_w_d(f0, f0); // a_word = (word)a | 851 __ cvt_w_d(f0, f0); // a_word = (word)a |
| 852 __ mfc1(t0, f0); // f0 has a 32-bits word. t0 = a_word | 852 __ mfc1(t0, f0); // f0 has a 32-bits word. t0 = a_word |
| 853 __ sw(t0, MemOperand(a0, OFFSET_OF(T, word))); // word = a_word | 853 __ sw(t0, MemOperand(a0, offsetof(T, word))); // word = a_word |
| 854 | 854 |
| 855 // Convert the b word to double b. | 855 // Convert the b word to double b. |
| 856 __ lw(t0, MemOperand(a0, OFFSET_OF(T, b_word))); | 856 __ lw(t0, MemOperand(a0, offsetof(T, b_word))); |
| 857 __ mtc1(t0, f8); // f8 has a 32-bits word. | 857 __ mtc1(t0, f8); // f8 has a 32-bits word. |
| 858 __ cvt_d_w(f10, f8); | 858 __ cvt_d_w(f10, f8); |
| 859 __ sdc1(f10, MemOperand(a0, OFFSET_OF(T, b))); | 859 __ sdc1(f10, MemOperand(a0, offsetof(T, b))); |
| 860 | 860 |
| 861 __ jr(ra); | 861 __ jr(ra); |
| 862 __ nop(); | 862 __ nop(); |
| 863 | 863 |
| 864 CodeDesc desc; | 864 CodeDesc desc; |
| 865 assm.GetCode(&desc); | 865 assm.GetCode(&desc); |
| 866 Handle<Code> code = isolate->factory()->NewCode( | 866 Handle<Code> code = isolate->factory()->NewCode( |
| 867 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 867 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 868 F3 f = FUNCTION_CAST<F3>(code->entry()); | 868 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 869 t.a = 2.147483646e+09; // 0x7FFFFFFE -> 0xFF80000041DFFFFF as double. | 869 t.a = 2.147483646e+09; // 0x7FFFFFFE -> 0xFF80000041DFFFFF as double. |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 904 int32_t swr_0; | 904 int32_t swr_0; |
| 905 int32_t swr_1; | 905 int32_t swr_1; |
| 906 int32_t swr_2; | 906 int32_t swr_2; |
| 907 int32_t swr_3; | 907 int32_t swr_3; |
| 908 } T; | 908 } T; |
| 909 T t; | 909 T t; |
| 910 | 910 |
| 911 Assembler assm(isolate, NULL, 0); | 911 Assembler assm(isolate, NULL, 0); |
| 912 | 912 |
| 913 // Test all combinations of LWL and vAddr. | 913 // Test all combinations of LWL and vAddr. |
| 914 __ lw(t0, MemOperand(a0, OFFSET_OF(T, reg_init)) ); | 914 __ lw(t0, MemOperand(a0, offsetof(T, reg_init)) ); |
| 915 __ lwl(t0, MemOperand(a0, OFFSET_OF(T, mem_init)) ); | 915 __ lwl(t0, MemOperand(a0, offsetof(T, mem_init)) ); |
| 916 __ sw(t0, MemOperand(a0, OFFSET_OF(T, lwl_0)) ); | 916 __ sw(t0, MemOperand(a0, offsetof(T, lwl_0)) ); |
| 917 | 917 |
| 918 __ lw(t1, MemOperand(a0, OFFSET_OF(T, reg_init)) ); | 918 __ lw(t1, MemOperand(a0, offsetof(T, reg_init)) ); |
| 919 __ lwl(t1, MemOperand(a0, OFFSET_OF(T, mem_init) + 1) ); | 919 __ lwl(t1, MemOperand(a0, offsetof(T, mem_init) + 1) ); |
| 920 __ sw(t1, MemOperand(a0, OFFSET_OF(T, lwl_1)) ); | 920 __ sw(t1, MemOperand(a0, offsetof(T, lwl_1)) ); |
| 921 | 921 |
| 922 __ lw(t2, MemOperand(a0, OFFSET_OF(T, reg_init)) ); | 922 __ lw(t2, MemOperand(a0, offsetof(T, reg_init)) ); |
| 923 __ lwl(t2, MemOperand(a0, OFFSET_OF(T, mem_init) + 2) ); | 923 __ lwl(t2, MemOperand(a0, offsetof(T, mem_init) + 2) ); |
| 924 __ sw(t2, MemOperand(a0, OFFSET_OF(T, lwl_2)) ); | 924 __ sw(t2, MemOperand(a0, offsetof(T, lwl_2)) ); |
| 925 | 925 |
| 926 __ lw(t3, MemOperand(a0, OFFSET_OF(T, reg_init)) ); | 926 __ lw(t3, MemOperand(a0, offsetof(T, reg_init)) ); |
| 927 __ lwl(t3, MemOperand(a0, OFFSET_OF(T, mem_init) + 3) ); | 927 __ lwl(t3, MemOperand(a0, offsetof(T, mem_init) + 3) ); |
| 928 __ sw(t3, MemOperand(a0, OFFSET_OF(T, lwl_3)) ); | 928 __ sw(t3, MemOperand(a0, offsetof(T, lwl_3)) ); |
| 929 | 929 |
| 930 // Test all combinations of LWR and vAddr. | 930 // Test all combinations of LWR and vAddr. |
| 931 __ lw(t0, MemOperand(a0, OFFSET_OF(T, reg_init)) ); | 931 __ lw(t0, MemOperand(a0, offsetof(T, reg_init)) ); |
| 932 __ lwr(t0, MemOperand(a0, OFFSET_OF(T, mem_init)) ); | 932 __ lwr(t0, MemOperand(a0, offsetof(T, mem_init)) ); |
| 933 __ sw(t0, MemOperand(a0, OFFSET_OF(T, lwr_0)) ); | 933 __ sw(t0, MemOperand(a0, offsetof(T, lwr_0)) ); |
| 934 | 934 |
| 935 __ lw(t1, MemOperand(a0, OFFSET_OF(T, reg_init)) ); | 935 __ lw(t1, MemOperand(a0, offsetof(T, reg_init)) ); |
| 936 __ lwr(t1, MemOperand(a0, OFFSET_OF(T, mem_init) + 1) ); | 936 __ lwr(t1, MemOperand(a0, offsetof(T, mem_init) + 1) ); |
| 937 __ sw(t1, MemOperand(a0, OFFSET_OF(T, lwr_1)) ); | 937 __ sw(t1, MemOperand(a0, offsetof(T, lwr_1)) ); |
| 938 | 938 |
| 939 __ lw(t2, MemOperand(a0, OFFSET_OF(T, reg_init)) ); | 939 __ lw(t2, MemOperand(a0, offsetof(T, reg_init)) ); |
| 940 __ lwr(t2, MemOperand(a0, OFFSET_OF(T, mem_init) + 2) ); | 940 __ lwr(t2, MemOperand(a0, offsetof(T, mem_init) + 2) ); |
| 941 __ sw(t2, MemOperand(a0, OFFSET_OF(T, lwr_2)) ); | 941 __ sw(t2, MemOperand(a0, offsetof(T, lwr_2)) ); |
| 942 | 942 |
| 943 __ lw(t3, MemOperand(a0, OFFSET_OF(T, reg_init)) ); | 943 __ lw(t3, MemOperand(a0, offsetof(T, reg_init)) ); |
| 944 __ lwr(t3, MemOperand(a0, OFFSET_OF(T, mem_init) + 3) ); | 944 __ lwr(t3, MemOperand(a0, offsetof(T, mem_init) + 3) ); |
| 945 __ sw(t3, MemOperand(a0, OFFSET_OF(T, lwr_3)) ); | 945 __ sw(t3, MemOperand(a0, offsetof(T, lwr_3)) ); |
| 946 | 946 |
| 947 // Test all combinations of SWL and vAddr. | 947 // Test all combinations of SWL and vAddr. |
| 948 __ lw(t0, MemOperand(a0, OFFSET_OF(T, mem_init)) ); | 948 __ lw(t0, MemOperand(a0, offsetof(T, mem_init)) ); |
| 949 __ sw(t0, MemOperand(a0, OFFSET_OF(T, swl_0)) ); | 949 __ sw(t0, MemOperand(a0, offsetof(T, swl_0)) ); |
| 950 __ lw(t0, MemOperand(a0, OFFSET_OF(T, reg_init)) ); | 950 __ lw(t0, MemOperand(a0, offsetof(T, reg_init)) ); |
| 951 __ swl(t0, MemOperand(a0, OFFSET_OF(T, swl_0)) ); | 951 __ swl(t0, MemOperand(a0, offsetof(T, swl_0)) ); |
| 952 | 952 |
| 953 __ lw(t1, MemOperand(a0, OFFSET_OF(T, mem_init)) ); | 953 __ lw(t1, MemOperand(a0, offsetof(T, mem_init)) ); |
| 954 __ sw(t1, MemOperand(a0, OFFSET_OF(T, swl_1)) ); | 954 __ sw(t1, MemOperand(a0, offsetof(T, swl_1)) ); |
| 955 __ lw(t1, MemOperand(a0, OFFSET_OF(T, reg_init)) ); | 955 __ lw(t1, MemOperand(a0, offsetof(T, reg_init)) ); |
| 956 __ swl(t1, MemOperand(a0, OFFSET_OF(T, swl_1) + 1) ); | 956 __ swl(t1, MemOperand(a0, offsetof(T, swl_1) + 1) ); |
| 957 | 957 |
| 958 __ lw(t2, MemOperand(a0, OFFSET_OF(T, mem_init)) ); | 958 __ lw(t2, MemOperand(a0, offsetof(T, mem_init)) ); |
| 959 __ sw(t2, MemOperand(a0, OFFSET_OF(T, swl_2)) ); | 959 __ sw(t2, MemOperand(a0, offsetof(T, swl_2)) ); |
| 960 __ lw(t2, MemOperand(a0, OFFSET_OF(T, reg_init)) ); | 960 __ lw(t2, MemOperand(a0, offsetof(T, reg_init)) ); |
| 961 __ swl(t2, MemOperand(a0, OFFSET_OF(T, swl_2) + 2) ); | 961 __ swl(t2, MemOperand(a0, offsetof(T, swl_2) + 2) ); |
| 962 | 962 |
| 963 __ lw(t3, MemOperand(a0, OFFSET_OF(T, mem_init)) ); | 963 __ lw(t3, MemOperand(a0, offsetof(T, mem_init)) ); |
| 964 __ sw(t3, MemOperand(a0, OFFSET_OF(T, swl_3)) ); | 964 __ sw(t3, MemOperand(a0, offsetof(T, swl_3)) ); |
| 965 __ lw(t3, MemOperand(a0, OFFSET_OF(T, reg_init)) ); | 965 __ lw(t3, MemOperand(a0, offsetof(T, reg_init)) ); |
| 966 __ swl(t3, MemOperand(a0, OFFSET_OF(T, swl_3) + 3) ); | 966 __ swl(t3, MemOperand(a0, offsetof(T, swl_3) + 3) ); |
| 967 | 967 |
| 968 // Test all combinations of SWR and vAddr. | 968 // Test all combinations of SWR and vAddr. |
| 969 __ lw(t0, MemOperand(a0, OFFSET_OF(T, mem_init)) ); | 969 __ lw(t0, MemOperand(a0, offsetof(T, mem_init)) ); |
| 970 __ sw(t0, MemOperand(a0, OFFSET_OF(T, swr_0)) ); | 970 __ sw(t0, MemOperand(a0, offsetof(T, swr_0)) ); |
| 971 __ lw(t0, MemOperand(a0, OFFSET_OF(T, reg_init)) ); | 971 __ lw(t0, MemOperand(a0, offsetof(T, reg_init)) ); |
| 972 __ swr(t0, MemOperand(a0, OFFSET_OF(T, swr_0)) ); | 972 __ swr(t0, MemOperand(a0, offsetof(T, swr_0)) ); |
| 973 | 973 |
| 974 __ lw(t1, MemOperand(a0, OFFSET_OF(T, mem_init)) ); | 974 __ lw(t1, MemOperand(a0, offsetof(T, mem_init)) ); |
| 975 __ sw(t1, MemOperand(a0, OFFSET_OF(T, swr_1)) ); | 975 __ sw(t1, MemOperand(a0, offsetof(T, swr_1)) ); |
| 976 __ lw(t1, MemOperand(a0, OFFSET_OF(T, reg_init)) ); | 976 __ lw(t1, MemOperand(a0, offsetof(T, reg_init)) ); |
| 977 __ swr(t1, MemOperand(a0, OFFSET_OF(T, swr_1) + 1) ); | 977 __ swr(t1, MemOperand(a0, offsetof(T, swr_1) + 1) ); |
| 978 | 978 |
| 979 __ lw(t2, MemOperand(a0, OFFSET_OF(T, mem_init)) ); | 979 __ lw(t2, MemOperand(a0, offsetof(T, mem_init)) ); |
| 980 __ sw(t2, MemOperand(a0, OFFSET_OF(T, swr_2)) ); | 980 __ sw(t2, MemOperand(a0, offsetof(T, swr_2)) ); |
| 981 __ lw(t2, MemOperand(a0, OFFSET_OF(T, reg_init)) ); | 981 __ lw(t2, MemOperand(a0, offsetof(T, reg_init)) ); |
| 982 __ swr(t2, MemOperand(a0, OFFSET_OF(T, swr_2) + 2) ); | 982 __ swr(t2, MemOperand(a0, offsetof(T, swr_2) + 2) ); |
| 983 | 983 |
| 984 __ lw(t3, MemOperand(a0, OFFSET_OF(T, mem_init)) ); | 984 __ lw(t3, MemOperand(a0, offsetof(T, mem_init)) ); |
| 985 __ sw(t3, MemOperand(a0, OFFSET_OF(T, swr_3)) ); | 985 __ sw(t3, MemOperand(a0, offsetof(T, swr_3)) ); |
| 986 __ lw(t3, MemOperand(a0, OFFSET_OF(T, reg_init)) ); | 986 __ lw(t3, MemOperand(a0, offsetof(T, reg_init)) ); |
| 987 __ swr(t3, MemOperand(a0, OFFSET_OF(T, swr_3) + 3) ); | 987 __ swr(t3, MemOperand(a0, offsetof(T, swr_3) + 3) ); |
| 988 | 988 |
| 989 __ jr(ra); | 989 __ jr(ra); |
| 990 __ nop(); | 990 __ nop(); |
| 991 | 991 |
| 992 CodeDesc desc; | 992 CodeDesc desc; |
| 993 assm.GetCode(&desc); | 993 assm.GetCode(&desc); |
| 994 Handle<Code> code = isolate->factory()->NewCode( | 994 Handle<Code> code = isolate->factory()->NewCode( |
| 995 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 995 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 996 F3 f = FUNCTION_CAST<F3>(code->entry()); | 996 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 997 t.reg_init = 0xaabbccdd; | 997 t.reg_init = 0xaabbccdd; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1058 int32_t y2; | 1058 int32_t y2; |
| 1059 int32_t y3; | 1059 int32_t y3; |
| 1060 int32_t y4; | 1060 int32_t y4; |
| 1061 } T; | 1061 } T; |
| 1062 T t; | 1062 T t; |
| 1063 | 1063 |
| 1064 MacroAssembler assm(isolate, NULL, 0); | 1064 MacroAssembler assm(isolate, NULL, 0); |
| 1065 | 1065 |
| 1066 __ mov(t6, fp); // Save frame pointer. | 1066 __ mov(t6, fp); // Save frame pointer. |
| 1067 __ mov(fp, a0); // Access struct T by fp. | 1067 __ mov(fp, a0); // Access struct T by fp. |
| 1068 __ lw(t0, MemOperand(a0, OFFSET_OF(T, y)) ); | 1068 __ lw(t0, MemOperand(a0, offsetof(T, y)) ); |
| 1069 __ lw(t3, MemOperand(a0, OFFSET_OF(T, y4)) ); | 1069 __ lw(t3, MemOperand(a0, offsetof(T, y4)) ); |
| 1070 | 1070 |
| 1071 __ addu(t1, t0, t3); | 1071 __ addu(t1, t0, t3); |
| 1072 __ subu(t4, t0, t3); | 1072 __ subu(t4, t0, t3); |
| 1073 __ nop(); | 1073 __ nop(); |
| 1074 __ push(t0); // These instructions disappear after opt. | 1074 __ push(t0); // These instructions disappear after opt. |
| 1075 __ Pop(); | 1075 __ Pop(); |
| 1076 __ addu(t0, t0, t0); | 1076 __ addu(t0, t0, t0); |
| 1077 __ nop(); | 1077 __ nop(); |
| 1078 __ Pop(); // These instructions disappear after opt. | 1078 __ Pop(); // These instructions disappear after opt. |
| 1079 __ push(t3); | 1079 __ push(t3); |
| 1080 __ nop(); | 1080 __ nop(); |
| 1081 __ push(t3); // These instructions disappear after opt. | 1081 __ push(t3); // These instructions disappear after opt. |
| 1082 __ pop(t3); | 1082 __ pop(t3); |
| 1083 __ nop(); | 1083 __ nop(); |
| 1084 __ push(t3); | 1084 __ push(t3); |
| 1085 __ pop(t4); | 1085 __ pop(t4); |
| 1086 __ nop(); | 1086 __ nop(); |
| 1087 __ sw(t0, MemOperand(fp, OFFSET_OF(T, y)) ); | 1087 __ sw(t0, MemOperand(fp, offsetof(T, y)) ); |
| 1088 __ lw(t0, MemOperand(fp, OFFSET_OF(T, y)) ); | 1088 __ lw(t0, MemOperand(fp, offsetof(T, y)) ); |
| 1089 __ nop(); | 1089 __ nop(); |
| 1090 __ sw(t0, MemOperand(fp, OFFSET_OF(T, y)) ); | 1090 __ sw(t0, MemOperand(fp, offsetof(T, y)) ); |
| 1091 __ lw(t1, MemOperand(fp, OFFSET_OF(T, y)) ); | 1091 __ lw(t1, MemOperand(fp, offsetof(T, y)) ); |
| 1092 __ nop(); | 1092 __ nop(); |
| 1093 __ push(t1); | 1093 __ push(t1); |
| 1094 __ lw(t1, MemOperand(fp, OFFSET_OF(T, y)) ); | 1094 __ lw(t1, MemOperand(fp, offsetof(T, y)) ); |
| 1095 __ pop(t1); | 1095 __ pop(t1); |
| 1096 __ nop(); | 1096 __ nop(); |
| 1097 __ push(t1); | 1097 __ push(t1); |
| 1098 __ lw(t2, MemOperand(fp, OFFSET_OF(T, y)) ); | 1098 __ lw(t2, MemOperand(fp, offsetof(T, y)) ); |
| 1099 __ pop(t1); | 1099 __ pop(t1); |
| 1100 __ nop(); | 1100 __ nop(); |
| 1101 __ push(t1); | 1101 __ push(t1); |
| 1102 __ lw(t2, MemOperand(fp, OFFSET_OF(T, y)) ); | 1102 __ lw(t2, MemOperand(fp, offsetof(T, y)) ); |
| 1103 __ pop(t2); | 1103 __ pop(t2); |
| 1104 __ nop(); | 1104 __ nop(); |
| 1105 __ push(t2); | 1105 __ push(t2); |
| 1106 __ lw(t2, MemOperand(fp, OFFSET_OF(T, y)) ); | 1106 __ lw(t2, MemOperand(fp, offsetof(T, y)) ); |
| 1107 __ pop(t1); | 1107 __ pop(t1); |
| 1108 __ nop(); | 1108 __ nop(); |
| 1109 __ push(t1); | 1109 __ push(t1); |
| 1110 __ lw(t2, MemOperand(fp, OFFSET_OF(T, y)) ); | 1110 __ lw(t2, MemOperand(fp, offsetof(T, y)) ); |
| 1111 __ pop(t3); | 1111 __ pop(t3); |
| 1112 __ nop(); | 1112 __ nop(); |
| 1113 | 1113 |
| 1114 __ mov(fp, t6); | 1114 __ mov(fp, t6); |
| 1115 __ jr(ra); | 1115 __ jr(ra); |
| 1116 __ nop(); | 1116 __ nop(); |
| 1117 | 1117 |
| 1118 CodeDesc desc; | 1118 CodeDesc desc; |
| 1119 assm.GetCode(&desc); | 1119 assm.GetCode(&desc); |
| 1120 Handle<Code> code = isolate->factory()->NewCode( | 1120 Handle<Code> code = isolate->factory()->NewCode( |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1145 double cvt_small_out; | 1145 double cvt_small_out; |
| 1146 uint32_t trunc_big_out; | 1146 uint32_t trunc_big_out; |
| 1147 uint32_t trunc_small_out; | 1147 uint32_t trunc_small_out; |
| 1148 uint32_t cvt_big_in; | 1148 uint32_t cvt_big_in; |
| 1149 uint32_t cvt_small_in; | 1149 uint32_t cvt_small_in; |
| 1150 } T; | 1150 } T; |
| 1151 T t; | 1151 T t; |
| 1152 | 1152 |
| 1153 MacroAssembler assm(isolate, NULL, 0); | 1153 MacroAssembler assm(isolate, NULL, 0); |
| 1154 | 1154 |
| 1155 __ sw(t0, MemOperand(a0, OFFSET_OF(T, cvt_small_in))); | 1155 __ sw(t0, MemOperand(a0, offsetof(T, cvt_small_in))); |
| 1156 __ Cvt_d_uw(f10, t0, f22); | 1156 __ Cvt_d_uw(f10, t0, f22); |
| 1157 __ sdc1(f10, MemOperand(a0, OFFSET_OF(T, cvt_small_out))); | 1157 __ sdc1(f10, MemOperand(a0, offsetof(T, cvt_small_out))); |
| 1158 | 1158 |
| 1159 __ Trunc_uw_d(f10, f10, f22); | 1159 __ Trunc_uw_d(f10, f10, f22); |
| 1160 __ swc1(f10, MemOperand(a0, OFFSET_OF(T, trunc_small_out))); | 1160 __ swc1(f10, MemOperand(a0, offsetof(T, trunc_small_out))); |
| 1161 | 1161 |
| 1162 __ sw(t0, MemOperand(a0, OFFSET_OF(T, cvt_big_in))); | 1162 __ sw(t0, MemOperand(a0, offsetof(T, cvt_big_in))); |
| 1163 __ Cvt_d_uw(f8, t0, f22); | 1163 __ Cvt_d_uw(f8, t0, f22); |
| 1164 __ sdc1(f8, MemOperand(a0, OFFSET_OF(T, cvt_big_out))); | 1164 __ sdc1(f8, MemOperand(a0, offsetof(T, cvt_big_out))); |
| 1165 | 1165 |
| 1166 __ Trunc_uw_d(f8, f8, f22); | 1166 __ Trunc_uw_d(f8, f8, f22); |
| 1167 __ swc1(f8, MemOperand(a0, OFFSET_OF(T, trunc_big_out))); | 1167 __ swc1(f8, MemOperand(a0, offsetof(T, trunc_big_out))); |
| 1168 | 1168 |
| 1169 __ jr(ra); | 1169 __ jr(ra); |
| 1170 __ nop(); | 1170 __ nop(); |
| 1171 | 1171 |
| 1172 CodeDesc desc; | 1172 CodeDesc desc; |
| 1173 assm.GetCode(&desc); | 1173 assm.GetCode(&desc); |
| 1174 Handle<Code> code = isolate->factory()->NewCode( | 1174 Handle<Code> code = isolate->factory()->NewCode( |
| 1175 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 1175 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 1176 F3 f = FUNCTION_CAST<F3>(code->entry()); | 1176 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 1177 | 1177 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1227 | 1227 |
| 1228 #undef ROUND_STRUCT_ELEMENT | 1228 #undef ROUND_STRUCT_ELEMENT |
| 1229 | 1229 |
| 1230 MacroAssembler assm(isolate, NULL, 0); | 1230 MacroAssembler assm(isolate, NULL, 0); |
| 1231 | 1231 |
| 1232 // Save FCSR. | 1232 // Save FCSR. |
| 1233 __ cfc1(a1, FCSR); | 1233 __ cfc1(a1, FCSR); |
| 1234 // Disable FPU exceptions. | 1234 // Disable FPU exceptions. |
| 1235 __ ctc1(zero_reg, FCSR); | 1235 __ ctc1(zero_reg, FCSR); |
| 1236 #define RUN_ROUND_TEST(x) \ | 1236 #define RUN_ROUND_TEST(x) \ |
| 1237 __ ldc1(f0, MemOperand(a0, OFFSET_OF(T, round_up_in))); \ | 1237 __ ldc1(f0, MemOperand(a0, offsetof(T, round_up_in))); \ |
| 1238 __ x##_w_d(f0, f0); \ | 1238 __ x##_w_d(f0, f0); \ |
| 1239 __ swc1(f0, MemOperand(a0, OFFSET_OF(T, x##_up_out))); \ | 1239 __ swc1(f0, MemOperand(a0, offsetof(T, x##_up_out))); \ |
| 1240 \ | 1240 \ |
| 1241 __ ldc1(f0, MemOperand(a0, OFFSET_OF(T, round_down_in))); \ | 1241 __ ldc1(f0, MemOperand(a0, offsetof(T, round_down_in))); \ |
| 1242 __ x##_w_d(f0, f0); \ | 1242 __ x##_w_d(f0, f0); \ |
| 1243 __ swc1(f0, MemOperand(a0, OFFSET_OF(T, x##_down_out))); \ | 1243 __ swc1(f0, MemOperand(a0, offsetof(T, x##_down_out))); \ |
| 1244 \ | 1244 \ |
| 1245 __ ldc1(f0, MemOperand(a0, OFFSET_OF(T, neg_round_up_in))); \ | 1245 __ ldc1(f0, MemOperand(a0, offsetof(T, neg_round_up_in))); \ |
| 1246 __ x##_w_d(f0, f0); \ | 1246 __ x##_w_d(f0, f0); \ |
| 1247 __ swc1(f0, MemOperand(a0, OFFSET_OF(T, neg_##x##_up_out))); \ | 1247 __ swc1(f0, MemOperand(a0, offsetof(T, neg_##x##_up_out))); \ |
| 1248 \ | 1248 \ |
| 1249 __ ldc1(f0, MemOperand(a0, OFFSET_OF(T, neg_round_down_in))); \ | 1249 __ ldc1(f0, MemOperand(a0, offsetof(T, neg_round_down_in))); \ |
| 1250 __ x##_w_d(f0, f0); \ | 1250 __ x##_w_d(f0, f0); \ |
| 1251 __ swc1(f0, MemOperand(a0, OFFSET_OF(T, neg_##x##_down_out))); \ | 1251 __ swc1(f0, MemOperand(a0, offsetof(T, neg_##x##_down_out))); \ |
| 1252 \ | 1252 \ |
| 1253 __ ldc1(f0, MemOperand(a0, OFFSET_OF(T, err1_in))); \ | 1253 __ ldc1(f0, MemOperand(a0, offsetof(T, err1_in))); \ |
| 1254 __ ctc1(zero_reg, FCSR); \ | 1254 __ ctc1(zero_reg, FCSR); \ |
| 1255 __ x##_w_d(f0, f0); \ | 1255 __ x##_w_d(f0, f0); \ |
| 1256 __ cfc1(a2, FCSR); \ | 1256 __ cfc1(a2, FCSR); \ |
| 1257 __ sw(a2, MemOperand(a0, OFFSET_OF(T, x##_err1_out))); \ | 1257 __ sw(a2, MemOperand(a0, offsetof(T, x##_err1_out))); \ |
| 1258 \ | 1258 \ |
| 1259 __ ldc1(f0, MemOperand(a0, OFFSET_OF(T, err2_in))); \ | 1259 __ ldc1(f0, MemOperand(a0, offsetof(T, err2_in))); \ |
| 1260 __ ctc1(zero_reg, FCSR); \ | 1260 __ ctc1(zero_reg, FCSR); \ |
| 1261 __ x##_w_d(f0, f0); \ | 1261 __ x##_w_d(f0, f0); \ |
| 1262 __ cfc1(a2, FCSR); \ | 1262 __ cfc1(a2, FCSR); \ |
| 1263 __ sw(a2, MemOperand(a0, OFFSET_OF(T, x##_err2_out))); \ | 1263 __ sw(a2, MemOperand(a0, offsetof(T, x##_err2_out))); \ |
| 1264 \ | 1264 \ |
| 1265 __ ldc1(f0, MemOperand(a0, OFFSET_OF(T, err3_in))); \ | 1265 __ ldc1(f0, MemOperand(a0, offsetof(T, err3_in))); \ |
| 1266 __ ctc1(zero_reg, FCSR); \ | 1266 __ ctc1(zero_reg, FCSR); \ |
| 1267 __ x##_w_d(f0, f0); \ | 1267 __ x##_w_d(f0, f0); \ |
| 1268 __ cfc1(a2, FCSR); \ | 1268 __ cfc1(a2, FCSR); \ |
| 1269 __ sw(a2, MemOperand(a0, OFFSET_OF(T, x##_err3_out))); \ | 1269 __ sw(a2, MemOperand(a0, offsetof(T, x##_err3_out))); \ |
| 1270 \ | 1270 \ |
| 1271 __ ldc1(f0, MemOperand(a0, OFFSET_OF(T, err4_in))); \ | 1271 __ ldc1(f0, MemOperand(a0, offsetof(T, err4_in))); \ |
| 1272 __ ctc1(zero_reg, FCSR); \ | 1272 __ ctc1(zero_reg, FCSR); \ |
| 1273 __ x##_w_d(f0, f0); \ | 1273 __ x##_w_d(f0, f0); \ |
| 1274 __ cfc1(a2, FCSR); \ | 1274 __ cfc1(a2, FCSR); \ |
| 1275 __ sw(a2, MemOperand(a0, OFFSET_OF(T, x##_err4_out))); \ | 1275 __ sw(a2, MemOperand(a0, offsetof(T, x##_err4_out))); \ |
| 1276 __ swc1(f0, MemOperand(a0, OFFSET_OF(T, x##_invalid_result))); | 1276 __ swc1(f0, MemOperand(a0, offsetof(T, x##_invalid_result))); |
| 1277 | 1277 |
| 1278 RUN_ROUND_TEST(round) | 1278 RUN_ROUND_TEST(round) |
| 1279 RUN_ROUND_TEST(floor) | 1279 RUN_ROUND_TEST(floor) |
| 1280 RUN_ROUND_TEST(ceil) | 1280 RUN_ROUND_TEST(ceil) |
| 1281 RUN_ROUND_TEST(trunc) | 1281 RUN_ROUND_TEST(trunc) |
| 1282 RUN_ROUND_TEST(cvt) | 1282 RUN_ROUND_TEST(cvt) |
| 1283 | 1283 |
| 1284 // Restore FCSR. | 1284 // Restore FCSR. |
| 1285 __ ctc1(a1, FCSR); | 1285 __ ctc1(a1, FCSR); |
| 1286 | 1286 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1357 float i; | 1357 float i; |
| 1358 float j; | 1358 float j; |
| 1359 float k; | 1359 float k; |
| 1360 float l; | 1360 float l; |
| 1361 } Test; | 1361 } Test; |
| 1362 | 1362 |
| 1363 Test test; | 1363 Test test; |
| 1364 // Integer part of test. | 1364 // Integer part of test. |
| 1365 __ addiu(t1, zero_reg, 1); // t1 = 1 | 1365 __ addiu(t1, zero_reg, 1); // t1 = 1 |
| 1366 __ seleqz(t3, t1, zero_reg); // t3 = 1 | 1366 __ seleqz(t3, t1, zero_reg); // t3 = 1 |
| 1367 __ sw(t3, MemOperand(a0, OFFSET_OF(Test, a))); // a = 1 | 1367 __ sw(t3, MemOperand(a0, offsetof(Test, a))); // a = 1 |
| 1368 __ seleqz(t2, t1, t1); // t2 = 0 | 1368 __ seleqz(t2, t1, t1); // t2 = 0 |
| 1369 __ sw(t2, MemOperand(a0, OFFSET_OF(Test, b))); // b = 0 | 1369 __ sw(t2, MemOperand(a0, offsetof(Test, b))); // b = 0 |
| 1370 __ selnez(t3, t1, zero_reg); // t3 = 1; | 1370 __ selnez(t3, t1, zero_reg); // t3 = 1; |
| 1371 __ sw(t3, MemOperand(a0, OFFSET_OF(Test, c))); // c = 0 | 1371 __ sw(t3, MemOperand(a0, offsetof(Test, c))); // c = 0 |
| 1372 __ selnez(t3, t1, t1); // t3 = 1 | 1372 __ selnez(t3, t1, t1); // t3 = 1 |
| 1373 __ sw(t3, MemOperand(a0, OFFSET_OF(Test, d))); // d = 1 | 1373 __ sw(t3, MemOperand(a0, offsetof(Test, d))); // d = 1 |
| 1374 // Floating point part of test. | 1374 // Floating point part of test. |
| 1375 __ ldc1(f0, MemOperand(a0, OFFSET_OF(Test, e)) ); // src | 1375 __ ldc1(f0, MemOperand(a0, offsetof(Test, e)) ); // src |
| 1376 __ ldc1(f2, MemOperand(a0, OFFSET_OF(Test, f)) ); // test | 1376 __ ldc1(f2, MemOperand(a0, offsetof(Test, f)) ); // test |
| 1377 __ lwc1(f8, MemOperand(a0, OFFSET_OF(Test, i)) ); // src | 1377 __ lwc1(f8, MemOperand(a0, offsetof(Test, i)) ); // src |
| 1378 __ lwc1(f10, MemOperand(a0, OFFSET_OF(Test, j)) ); // test | 1378 __ lwc1(f10, MemOperand(a0, offsetof(Test, j)) ); // test |
| 1379 __ seleqz_d(f4, f0, f2); | 1379 __ seleqz_d(f4, f0, f2); |
| 1380 __ selnez_d(f6, f0, f2); | 1380 __ selnez_d(f6, f0, f2); |
| 1381 __ seleqz_s(f12, f8, f10); | 1381 __ seleqz_s(f12, f8, f10); |
| 1382 __ selnez_s(f14, f8, f10); | 1382 __ selnez_s(f14, f8, f10); |
| 1383 __ sdc1(f4, MemOperand(a0, OFFSET_OF(Test, g)) ); // src | 1383 __ sdc1(f4, MemOperand(a0, offsetof(Test, g)) ); // src |
| 1384 __ sdc1(f6, MemOperand(a0, OFFSET_OF(Test, h)) ); // src | 1384 __ sdc1(f6, MemOperand(a0, offsetof(Test, h)) ); // src |
| 1385 __ swc1(f12, MemOperand(a0, OFFSET_OF(Test, k)) ); // src | 1385 __ swc1(f12, MemOperand(a0, offsetof(Test, k)) ); // src |
| 1386 __ swc1(f14, MemOperand(a0, OFFSET_OF(Test, l)) ); // src | 1386 __ swc1(f14, MemOperand(a0, offsetof(Test, l)) ); // src |
| 1387 __ jr(ra); | 1387 __ jr(ra); |
| 1388 __ nop(); | 1388 __ nop(); |
| 1389 CodeDesc desc; | 1389 CodeDesc desc; |
| 1390 assm.GetCode(&desc); | 1390 assm.GetCode(&desc); |
| 1391 Handle<Code> code = isolate->factory()->NewCode( | 1391 Handle<Code> code = isolate->factory()->NewCode( |
| 1392 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 1392 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 1393 F3 f = FUNCTION_CAST<F3>(code->entry()); | 1393 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 1394 | 1394 |
| 1395 (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0)); | 1395 (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0)); |
| 1396 | 1396 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1464 double inputsa[tableLength] = {2.0, 3.0, dblNaN, 3.0, dblNaN}; | 1464 double inputsa[tableLength] = {2.0, 3.0, dblNaN, 3.0, dblNaN}; |
| 1465 double inputsb[tableLength] = {3.0, 2.0, 3.0, dblNaN, dblNaN}; | 1465 double inputsb[tableLength] = {3.0, 2.0, 3.0, dblNaN, dblNaN}; |
| 1466 double outputsdmin[tableLength] = {2.0, 2.0, 3.0, 3.0, dblNaN}; | 1466 double outputsdmin[tableLength] = {2.0, 2.0, 3.0, 3.0, dblNaN}; |
| 1467 double outputsdmax[tableLength] = {3.0, 3.0, 3.0, 3.0, dblNaN}; | 1467 double outputsdmax[tableLength] = {3.0, 3.0, 3.0, 3.0, dblNaN}; |
| 1468 | 1468 |
| 1469 float inputse[tableLength] = {2.0, 3.0, fltNaN, 3.0, fltNaN}; | 1469 float inputse[tableLength] = {2.0, 3.0, fltNaN, 3.0, fltNaN}; |
| 1470 float inputsf[tableLength] = {3.0, 2.0, 3.0, fltNaN, fltNaN}; | 1470 float inputsf[tableLength] = {3.0, 2.0, 3.0, fltNaN, fltNaN}; |
| 1471 float outputsfmin[tableLength] = {2.0, 2.0, 3.0, 3.0, fltNaN}; | 1471 float outputsfmin[tableLength] = {2.0, 2.0, 3.0, 3.0, fltNaN}; |
| 1472 float outputsfmax[tableLength] = {3.0, 3.0, 3.0, 3.0, fltNaN}; | 1472 float outputsfmax[tableLength] = {3.0, 3.0, 3.0, 3.0, fltNaN}; |
| 1473 | 1473 |
| 1474 __ ldc1(f4, MemOperand(a0, OFFSET_OF(TestFloat, a))); | 1474 __ ldc1(f4, MemOperand(a0, offsetof(TestFloat, a))); |
| 1475 __ ldc1(f8, MemOperand(a0, OFFSET_OF(TestFloat, b))); | 1475 __ ldc1(f8, MemOperand(a0, offsetof(TestFloat, b))); |
| 1476 __ lwc1(f2, MemOperand(a0, OFFSET_OF(TestFloat, e))); | 1476 __ lwc1(f2, MemOperand(a0, offsetof(TestFloat, e))); |
| 1477 __ lwc1(f6, MemOperand(a0, OFFSET_OF(TestFloat, f))); | 1477 __ lwc1(f6, MemOperand(a0, offsetof(TestFloat, f))); |
| 1478 __ min_d(f10, f4, f8); | 1478 __ min_d(f10, f4, f8); |
| 1479 __ max_d(f12, f4, f8); | 1479 __ max_d(f12, f4, f8); |
| 1480 __ min_s(f14, f2, f6); | 1480 __ min_s(f14, f2, f6); |
| 1481 __ max_s(f16, f2, f6); | 1481 __ max_s(f16, f2, f6); |
| 1482 __ sdc1(f10, MemOperand(a0, OFFSET_OF(TestFloat, c))); | 1482 __ sdc1(f10, MemOperand(a0, offsetof(TestFloat, c))); |
| 1483 __ sdc1(f12, MemOperand(a0, OFFSET_OF(TestFloat, d))); | 1483 __ sdc1(f12, MemOperand(a0, offsetof(TestFloat, d))); |
| 1484 __ swc1(f14, MemOperand(a0, OFFSET_OF(TestFloat, g))); | 1484 __ swc1(f14, MemOperand(a0, offsetof(TestFloat, g))); |
| 1485 __ swc1(f16, MemOperand(a0, OFFSET_OF(TestFloat, h))); | 1485 __ swc1(f16, MemOperand(a0, offsetof(TestFloat, h))); |
| 1486 __ jr(ra); | 1486 __ jr(ra); |
| 1487 __ nop(); | 1487 __ nop(); |
| 1488 | 1488 |
| 1489 CodeDesc desc; | 1489 CodeDesc desc; |
| 1490 assm.GetCode(&desc); | 1490 assm.GetCode(&desc); |
| 1491 Handle<Code> code = isolate->factory()->NewCode( | 1491 Handle<Code> code = isolate->factory()->NewCode( |
| 1492 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 1492 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 1493 F3 f = FUNCTION_CAST<F3>(code->entry()); | 1493 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 1494 for (int i = 0; i < tableLength; i++) { | 1494 for (int i = 0; i < tableLength; i++) { |
| 1495 test.a = inputsa[i]; | 1495 test.a = inputsa[i]; |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1586 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, | 1586 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, |
| 1587 -3.0, -3.0, -3.0, -4.0, -4.0, -4.0, | 1587 -3.0, -3.0, -3.0, -4.0, -4.0, -4.0, |
| 1588 37778931862957161709568.0, 37778931862957161709569.0, | 1588 37778931862957161709568.0, 37778931862957161709569.0, |
| 1589 37778931862957161709580.0, 37778931862957161709581.0, | 1589 37778931862957161709580.0, 37778931862957161709581.0, |
| 1590 37778931862957161709582.0, 37778931862957161709583.0, | 1590 37778931862957161709582.0, 37778931862957161709583.0, |
| 1591 37778931862957161709584.0, 37778931862957161709585.0, | 1591 37778931862957161709584.0, 37778931862957161709585.0, |
| 1592 37778931862957161709586.0, 37778931862957161709587.0}; | 1592 37778931862957161709586.0, 37778931862957161709587.0}; |
| 1593 int fcsr_inputs[4] = | 1593 int fcsr_inputs[4] = |
| 1594 {kRoundToNearest, kRoundToZero, kRoundToPlusInf, kRoundToMinusInf}; | 1594 {kRoundToNearest, kRoundToZero, kRoundToPlusInf, kRoundToMinusInf}; |
| 1595 double* outputs[4] = {outputs_RN, outputs_RZ, outputs_RP, outputs_RM}; | 1595 double* outputs[4] = {outputs_RN, outputs_RZ, outputs_RP, outputs_RM}; |
| 1596 __ ldc1(f4, MemOperand(a0, OFFSET_OF(TestFloat, a)) ); | 1596 __ ldc1(f4, MemOperand(a0, offsetof(TestFloat, a)) ); |
| 1597 __ lw(t0, MemOperand(a0, OFFSET_OF(TestFloat, fcsr)) ); | 1597 __ lw(t0, MemOperand(a0, offsetof(TestFloat, fcsr)) ); |
| 1598 __ cfc1(t1, FCSR); | 1598 __ cfc1(t1, FCSR); |
| 1599 __ ctc1(t0, FCSR); | 1599 __ ctc1(t0, FCSR); |
| 1600 __ rint_d(f8, f4); | 1600 __ rint_d(f8, f4); |
| 1601 __ sdc1(f8, MemOperand(a0, OFFSET_OF(TestFloat, b)) ); | 1601 __ sdc1(f8, MemOperand(a0, offsetof(TestFloat, b)) ); |
| 1602 __ ctc1(t1, FCSR); | 1602 __ ctc1(t1, FCSR); |
| 1603 __ jr(ra); | 1603 __ jr(ra); |
| 1604 __ nop(); | 1604 __ nop(); |
| 1605 | 1605 |
| 1606 CodeDesc desc; | 1606 CodeDesc desc; |
| 1607 assm.GetCode(&desc); | 1607 assm.GetCode(&desc); |
| 1608 Handle<Code> code = isolate->factory()->NewCode( | 1608 Handle<Code> code = isolate->factory()->NewCode( |
| 1609 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 1609 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 1610 F3 f = FUNCTION_CAST<F3>(code->entry()); | 1610 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 1611 | 1611 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1631 typedef struct test { | 1631 typedef struct test { |
| 1632 double dd; | 1632 double dd; |
| 1633 double ds; | 1633 double ds; |
| 1634 double dt; | 1634 double dt; |
| 1635 float fd; | 1635 float fd; |
| 1636 float fs; | 1636 float fs; |
| 1637 float ft; | 1637 float ft; |
| 1638 } Test; | 1638 } Test; |
| 1639 | 1639 |
| 1640 Test test; | 1640 Test test; |
| 1641 __ ldc1(f0, MemOperand(a0, OFFSET_OF(Test, dd)) ); // test | 1641 __ ldc1(f0, MemOperand(a0, offsetof(Test, dd)) ); // test |
| 1642 __ ldc1(f2, MemOperand(a0, OFFSET_OF(Test, ds)) ); // src1 | 1642 __ ldc1(f2, MemOperand(a0, offsetof(Test, ds)) ); // src1 |
| 1643 __ ldc1(f4, MemOperand(a0, OFFSET_OF(Test, dt)) ); // src2 | 1643 __ ldc1(f4, MemOperand(a0, offsetof(Test, dt)) ); // src2 |
| 1644 __ lwc1(f6, MemOperand(a0, OFFSET_OF(Test, fd)) ); // test | 1644 __ lwc1(f6, MemOperand(a0, offsetof(Test, fd)) ); // test |
| 1645 __ lwc1(f8, MemOperand(a0, OFFSET_OF(Test, fs)) ); // src1 | 1645 __ lwc1(f8, MemOperand(a0, offsetof(Test, fs)) ); // src1 |
| 1646 __ lwc1(f10, MemOperand(a0, OFFSET_OF(Test, ft)) ); // src2 | 1646 __ lwc1(f10, MemOperand(a0, offsetof(Test, ft)) ); // src2 |
| 1647 __ sel_d(f0, f2, f4); | 1647 __ sel_d(f0, f2, f4); |
| 1648 __ sel_s(f6, f8, f10); | 1648 __ sel_s(f6, f8, f10); |
| 1649 __ sdc1(f0, MemOperand(a0, OFFSET_OF(Test, dd)) ); | 1649 __ sdc1(f0, MemOperand(a0, offsetof(Test, dd)) ); |
| 1650 __ swc1(f6, MemOperand(a0, OFFSET_OF(Test, fd)) ); | 1650 __ swc1(f6, MemOperand(a0, offsetof(Test, fd)) ); |
| 1651 __ jr(ra); | 1651 __ jr(ra); |
| 1652 __ nop(); | 1652 __ nop(); |
| 1653 CodeDesc desc; | 1653 CodeDesc desc; |
| 1654 assm.GetCode(&desc); | 1654 assm.GetCode(&desc); |
| 1655 Handle<Code> code = isolate->factory()->NewCode( | 1655 Handle<Code> code = isolate->factory()->NewCode( |
| 1656 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 1656 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 1657 F3 f = FUNCTION_CAST<F3>(code->entry()); | 1657 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 1658 | 1658 |
| 1659 const int test_size = 3; | 1659 const int test_size = 3; |
| 1660 const int input_size = 5; | 1660 const int input_size = 5; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1765 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, | 1765 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, |
| 1766 -3.0, -3.0, -3.0, -4.0, -4.0, -4.0, | 1766 -3.0, -3.0, -3.0, -4.0, -4.0, -4.0, |
| 1767 37778931862957161709568.0, 37778931862957161709569.0, | 1767 37778931862957161709568.0, 37778931862957161709569.0, |
| 1768 37778931862957161709580.0, 37778931862957161709581.0, | 1768 37778931862957161709580.0, 37778931862957161709581.0, |
| 1769 37778931862957161709582.0, 37778931862957161709583.0, | 1769 37778931862957161709582.0, 37778931862957161709583.0, |
| 1770 37778931862957161709584.0, 37778931862957161709585.0, | 1770 37778931862957161709584.0, 37778931862957161709585.0, |
| 1771 37778931862957161709586.0, 37778931862957161709587.0}; | 1771 37778931862957161709586.0, 37778931862957161709587.0}; |
| 1772 int fcsr_inputs[4] = | 1772 int fcsr_inputs[4] = |
| 1773 {kRoundToNearest, kRoundToZero, kRoundToPlusInf, kRoundToMinusInf}; | 1773 {kRoundToNearest, kRoundToZero, kRoundToPlusInf, kRoundToMinusInf}; |
| 1774 float* outputs[4] = {outputs_RN, outputs_RZ, outputs_RP, outputs_RM}; | 1774 float* outputs[4] = {outputs_RN, outputs_RZ, outputs_RP, outputs_RM}; |
| 1775 __ lwc1(f4, MemOperand(a0, OFFSET_OF(TestFloat, a)) ); | 1775 __ lwc1(f4, MemOperand(a0, offsetof(TestFloat, a)) ); |
| 1776 __ lw(t0, MemOperand(a0, OFFSET_OF(TestFloat, fcsr)) ); | 1776 __ lw(t0, MemOperand(a0, offsetof(TestFloat, fcsr)) ); |
| 1777 __ cfc1(t1, FCSR); | 1777 __ cfc1(t1, FCSR); |
| 1778 __ ctc1(t0, FCSR); | 1778 __ ctc1(t0, FCSR); |
| 1779 __ rint_s(f8, f4); | 1779 __ rint_s(f8, f4); |
| 1780 __ swc1(f8, MemOperand(a0, OFFSET_OF(TestFloat, b)) ); | 1780 __ swc1(f8, MemOperand(a0, offsetof(TestFloat, b)) ); |
| 1781 __ ctc1(t1, FCSR); | 1781 __ ctc1(t1, FCSR); |
| 1782 __ jr(ra); | 1782 __ jr(ra); |
| 1783 __ nop(); | 1783 __ nop(); |
| 1784 | 1784 |
| 1785 CodeDesc desc; | 1785 CodeDesc desc; |
| 1786 assm.GetCode(&desc); | 1786 assm.GetCode(&desc); |
| 1787 Handle<Code> code = isolate->factory()->NewCode( | 1787 Handle<Code> code = isolate->factory()->NewCode( |
| 1788 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 1788 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 1789 F3 f = FUNCTION_CAST<F3>(code->entry()); | 1789 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 1790 | 1790 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1862 9.8, -8.9, 9.8, | 1862 9.8, -8.9, 9.8, |
| 1863 -9.8, -8.9, -9.8 | 1863 -9.8, -8.9, -9.8 |
| 1864 }; | 1864 }; |
| 1865 float resf1[tableLength] = { | 1865 float resf1[tableLength] = { |
| 1866 5.3, 5.3, 6.1, | 1866 5.3, 5.3, 6.1, |
| 1867 -10.0, 9.8, 9.8, | 1867 -10.0, 9.8, 9.8, |
| 1868 -10.0, 9.8, 9.8, | 1868 -10.0, 9.8, 9.8, |
| 1869 -10.0, -11.2, -9.8 | 1869 -10.0, -11.2, -9.8 |
| 1870 }; | 1870 }; |
| 1871 | 1871 |
| 1872 __ ldc1(f2, MemOperand(a0, OFFSET_OF(TestFloat, a)) ); | 1872 __ ldc1(f2, MemOperand(a0, offsetof(TestFloat, a)) ); |
| 1873 __ ldc1(f4, MemOperand(a0, OFFSET_OF(TestFloat, b)) ); | 1873 __ ldc1(f4, MemOperand(a0, offsetof(TestFloat, b)) ); |
| 1874 __ lwc1(f8, MemOperand(a0, OFFSET_OF(TestFloat, c)) ); | 1874 __ lwc1(f8, MemOperand(a0, offsetof(TestFloat, c)) ); |
| 1875 __ lwc1(f10, MemOperand(a0, OFFSET_OF(TestFloat, d)) ); | 1875 __ lwc1(f10, MemOperand(a0, offsetof(TestFloat, d)) ); |
| 1876 __ mina_d(f6, f2, f4); | 1876 __ mina_d(f6, f2, f4); |
| 1877 __ mina_s(f12, f8, f10); | 1877 __ mina_s(f12, f8, f10); |
| 1878 __ maxa_d(f14, f2, f4); | 1878 __ maxa_d(f14, f2, f4); |
| 1879 __ maxa_s(f16, f8, f10); | 1879 __ maxa_s(f16, f8, f10); |
| 1880 __ swc1(f12, MemOperand(a0, OFFSET_OF(TestFloat, resf)) ); | 1880 __ swc1(f12, MemOperand(a0, offsetof(TestFloat, resf)) ); |
| 1881 __ sdc1(f6, MemOperand(a0, OFFSET_OF(TestFloat, resd)) ); | 1881 __ sdc1(f6, MemOperand(a0, offsetof(TestFloat, resd)) ); |
| 1882 __ swc1(f16, MemOperand(a0, OFFSET_OF(TestFloat, resf1)) ); | 1882 __ swc1(f16, MemOperand(a0, offsetof(TestFloat, resf1)) ); |
| 1883 __ sdc1(f14, MemOperand(a0, OFFSET_OF(TestFloat, resd1)) ); | 1883 __ sdc1(f14, MemOperand(a0, offsetof(TestFloat, resd1)) ); |
| 1884 __ jr(ra); | 1884 __ jr(ra); |
| 1885 __ nop(); | 1885 __ nop(); |
| 1886 | 1886 |
| 1887 CodeDesc desc; | 1887 CodeDesc desc; |
| 1888 assm.GetCode(&desc); | 1888 assm.GetCode(&desc); |
| 1889 Handle<Code> code = isolate->factory()->NewCode( | 1889 Handle<Code> code = isolate->factory()->NewCode( |
| 1890 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 1890 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 1891 F3 f = FUNCTION_CAST<F3>(code->entry()); | 1891 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 1892 for (int i = 0; i < tableLength; i++) { | 1892 for (int i = 0; i < tableLength; i++) { |
| 1893 test.a = inputsa[i]; | 1893 test.a = inputsa[i]; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1932 2147483648.0, | 1932 2147483648.0, |
| 1933 std::numeric_limits<float>::quiet_NaN(), | 1933 std::numeric_limits<float>::quiet_NaN(), |
| 1934 std::numeric_limits<float>::infinity() | 1934 std::numeric_limits<float>::infinity() |
| 1935 }; | 1935 }; |
| 1936 double outputs[tableLength] = { | 1936 double outputs[tableLength] = { |
| 1937 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, | 1937 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, |
| 1938 -2.0, -2.0, -2.0, -3.0, -3.0, -3.0, | 1938 -2.0, -2.0, -2.0, -3.0, -3.0, -3.0, |
| 1939 2147483648.0, dFPU64InvalidResult, | 1939 2147483648.0, dFPU64InvalidResult, |
| 1940 dFPU64InvalidResult}; | 1940 dFPU64InvalidResult}; |
| 1941 | 1941 |
| 1942 __ ldc1(f4, MemOperand(a0, OFFSET_OF(Test, a)) ); | 1942 __ ldc1(f4, MemOperand(a0, offsetof(Test, a)) ); |
| 1943 __ lwc1(f6, MemOperand(a0, OFFSET_OF(Test, b)) ); | 1943 __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) ); |
| 1944 __ trunc_l_d(f8, f4); | 1944 __ trunc_l_d(f8, f4); |
| 1945 __ trunc_l_s(f10, f6); | 1945 __ trunc_l_s(f10, f6); |
| 1946 __ sdc1(f8, MemOperand(a0, OFFSET_OF(Test, c)) ); | 1946 __ sdc1(f8, MemOperand(a0, offsetof(Test, c)) ); |
| 1947 __ sdc1(f10, MemOperand(a0, OFFSET_OF(Test, d)) ); | 1947 __ sdc1(f10, MemOperand(a0, offsetof(Test, d)) ); |
| 1948 __ jr(ra); | 1948 __ jr(ra); |
| 1949 __ nop(); | 1949 __ nop(); |
| 1950 Test test; | 1950 Test test; |
| 1951 CodeDesc desc; | 1951 CodeDesc desc; |
| 1952 assm.GetCode(&desc); | 1952 assm.GetCode(&desc); |
| 1953 Handle<Code> code = isolate->factory()->NewCode( | 1953 Handle<Code> code = isolate->factory()->NewCode( |
| 1954 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 1954 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 1955 F3 f = FUNCTION_CAST<F3>(code->entry()); | 1955 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 1956 for (int i = 0; i < tableLength; i++) { | 1956 for (int i = 0; i < tableLength; i++) { |
| 1957 test.a = inputs_D[i]; | 1957 test.a = inputs_D[i]; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1994 4.8, 4.8, -4.8, -0.29 | 1994 4.8, 4.8, -4.8, -0.29 |
| 1995 }; | 1995 }; |
| 1996 | 1996 |
| 1997 float outputs_S[tableLength] = { | 1997 float outputs_S[tableLength] = { |
| 1998 4.8, 4.8, -4.8, -0.29 | 1998 4.8, 4.8, -4.8, -0.29 |
| 1999 }; | 1999 }; |
| 2000 double outputs_D[tableLength] = { | 2000 double outputs_D[tableLength] = { |
| 2001 5.3, -5.3, 5.3, -2.9 | 2001 5.3, -5.3, 5.3, -2.9 |
| 2002 }; | 2002 }; |
| 2003 | 2003 |
| 2004 __ ldc1(f2, MemOperand(a0, OFFSET_OF(TestFloat, a)) ); | 2004 __ ldc1(f2, MemOperand(a0, offsetof(TestFloat, a)) ); |
| 2005 __ lwc1(f6, MemOperand(a0, OFFSET_OF(TestFloat, c)) ); | 2005 __ lwc1(f6, MemOperand(a0, offsetof(TestFloat, c)) ); |
| 2006 __ lw(t0, MemOperand(a0, OFFSET_OF(TestFloat, rt)) ); | 2006 __ lw(t0, MemOperand(a0, offsetof(TestFloat, rt)) ); |
| 2007 __ li(t1, 0x0); | 2007 __ li(t1, 0x0); |
| 2008 __ mtc1(t1, f12); | 2008 __ mtc1(t1, f12); |
| 2009 __ mtc1(t1, f10); | 2009 __ mtc1(t1, f10); |
| 2010 __ mtc1(t1, f16); | 2010 __ mtc1(t1, f16); |
| 2011 __ mtc1(t1, f14); | 2011 __ mtc1(t1, f14); |
| 2012 __ sdc1(f12, MemOperand(a0, OFFSET_OF(TestFloat, bold)) ); | 2012 __ sdc1(f12, MemOperand(a0, offsetof(TestFloat, bold)) ); |
| 2013 __ swc1(f10, MemOperand(a0, OFFSET_OF(TestFloat, dold)) ); | 2013 __ swc1(f10, MemOperand(a0, offsetof(TestFloat, dold)) ); |
| 2014 __ sdc1(f16, MemOperand(a0, OFFSET_OF(TestFloat, bold1)) ); | 2014 __ sdc1(f16, MemOperand(a0, offsetof(TestFloat, bold1)) ); |
| 2015 __ swc1(f14, MemOperand(a0, OFFSET_OF(TestFloat, dold1)) ); | 2015 __ swc1(f14, MemOperand(a0, offsetof(TestFloat, dold1)) ); |
| 2016 __ movz_s(f10, f6, t0); | 2016 __ movz_s(f10, f6, t0); |
| 2017 __ movz_d(f12, f2, t0); | 2017 __ movz_d(f12, f2, t0); |
| 2018 __ movn_s(f14, f6, t0); | 2018 __ movn_s(f14, f6, t0); |
| 2019 __ movn_d(f16, f2, t0); | 2019 __ movn_d(f16, f2, t0); |
| 2020 __ swc1(f10, MemOperand(a0, OFFSET_OF(TestFloat, d)) ); | 2020 __ swc1(f10, MemOperand(a0, offsetof(TestFloat, d)) ); |
| 2021 __ sdc1(f12, MemOperand(a0, OFFSET_OF(TestFloat, b)) ); | 2021 __ sdc1(f12, MemOperand(a0, offsetof(TestFloat, b)) ); |
| 2022 __ swc1(f14, MemOperand(a0, OFFSET_OF(TestFloat, d1)) ); | 2022 __ swc1(f14, MemOperand(a0, offsetof(TestFloat, d1)) ); |
| 2023 __ sdc1(f16, MemOperand(a0, OFFSET_OF(TestFloat, b1)) ); | 2023 __ sdc1(f16, MemOperand(a0, offsetof(TestFloat, b1)) ); |
| 2024 __ jr(ra); | 2024 __ jr(ra); |
| 2025 __ nop(); | 2025 __ nop(); |
| 2026 | 2026 |
| 2027 CodeDesc desc; | 2027 CodeDesc desc; |
| 2028 assm.GetCode(&desc); | 2028 assm.GetCode(&desc); |
| 2029 Handle<Code> code = isolate->factory()->NewCode( | 2029 Handle<Code> code = isolate->factory()->NewCode( |
| 2030 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 2030 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 2031 F3 f = FUNCTION_CAST<F3>(code->entry()); | 2031 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 2032 for (int i = 0; i < tableLength; i++) { | 2032 for (int i = 0; i < tableLength; i++) { |
| 2033 test.a = inputs_D[i]; | 2033 test.a = inputs_D[i]; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2094 | 2094 |
| 2095 for (int j = 0; j< 8; j++) { | 2095 for (int j = 0; j< 8; j++) { |
| 2096 test.cc = condition_flags[j]; | 2096 test.cc = condition_flags[j]; |
| 2097 if (test.cc == 0) { | 2097 if (test.cc == 0) { |
| 2098 test.fcsr = 1 << 23; | 2098 test.fcsr = 1 << 23; |
| 2099 } else { | 2099 } else { |
| 2100 test.fcsr = 1 << (24+condition_flags[j]); | 2100 test.fcsr = 1 << (24+condition_flags[j]); |
| 2101 } | 2101 } |
| 2102 HandleScope scope(isolate); | 2102 HandleScope scope(isolate); |
| 2103 MacroAssembler assm(isolate, NULL, 0); | 2103 MacroAssembler assm(isolate, NULL, 0); |
| 2104 __ ldc1(f2, MemOperand(a0, OFFSET_OF(TestFloat, srcd)) ); | 2104 __ ldc1(f2, MemOperand(a0, offsetof(TestFloat, srcd)) ); |
| 2105 __ lwc1(f4, MemOperand(a0, OFFSET_OF(TestFloat, srcf)) ); | 2105 __ lwc1(f4, MemOperand(a0, offsetof(TestFloat, srcf)) ); |
| 2106 __ lw(t1, MemOperand(a0, OFFSET_OF(TestFloat, fcsr)) ); | 2106 __ lw(t1, MemOperand(a0, offsetof(TestFloat, fcsr)) ); |
| 2107 __ cfc1(t0, FCSR); | 2107 __ cfc1(t0, FCSR); |
| 2108 __ ctc1(t1, FCSR); | 2108 __ ctc1(t1, FCSR); |
| 2109 __ li(t2, 0x0); | 2109 __ li(t2, 0x0); |
| 2110 __ mtc1(t2, f12); | 2110 __ mtc1(t2, f12); |
| 2111 __ mtc1(t2, f10); | 2111 __ mtc1(t2, f10); |
| 2112 __ sdc1(f10, MemOperand(a0, OFFSET_OF(TestFloat, dstdold)) ); | 2112 __ sdc1(f10, MemOperand(a0, offsetof(TestFloat, dstdold)) ); |
| 2113 __ swc1(f12, MemOperand(a0, OFFSET_OF(TestFloat, dstfold)) ); | 2113 __ swc1(f12, MemOperand(a0, offsetof(TestFloat, dstfold)) ); |
| 2114 __ movt_s(f12, f4, test.cc); | 2114 __ movt_s(f12, f4, test.cc); |
| 2115 __ movt_d(f10, f2, test.cc); | 2115 __ movt_d(f10, f2, test.cc); |
| 2116 __ swc1(f12, MemOperand(a0, OFFSET_OF(TestFloat, dstf)) ); | 2116 __ swc1(f12, MemOperand(a0, offsetof(TestFloat, dstf)) ); |
| 2117 __ sdc1(f10, MemOperand(a0, OFFSET_OF(TestFloat, dstd)) ); | 2117 __ sdc1(f10, MemOperand(a0, offsetof(TestFloat, dstd)) ); |
| 2118 __ sdc1(f10, MemOperand(a0, OFFSET_OF(TestFloat, dstdold1)) ); | 2118 __ sdc1(f10, MemOperand(a0, offsetof(TestFloat, dstdold1)) ); |
| 2119 __ swc1(f12, MemOperand(a0, OFFSET_OF(TestFloat, dstfold1)) ); | 2119 __ swc1(f12, MemOperand(a0, offsetof(TestFloat, dstfold1)) ); |
| 2120 __ movf_s(f12, f4, test.cc); | 2120 __ movf_s(f12, f4, test.cc); |
| 2121 __ movf_d(f10, f2, test.cc); | 2121 __ movf_d(f10, f2, test.cc); |
| 2122 __ swc1(f12, MemOperand(a0, OFFSET_OF(TestFloat, dstf1)) ); | 2122 __ swc1(f12, MemOperand(a0, offsetof(TestFloat, dstf1)) ); |
| 2123 __ sdc1(f10, MemOperand(a0, OFFSET_OF(TestFloat, dstd1)) ); | 2123 __ sdc1(f10, MemOperand(a0, offsetof(TestFloat, dstd1)) ); |
| 2124 __ ctc1(t0, FCSR); | 2124 __ ctc1(t0, FCSR); |
| 2125 __ jr(ra); | 2125 __ jr(ra); |
| 2126 __ nop(); | 2126 __ nop(); |
| 2127 | 2127 |
| 2128 CodeDesc desc; | 2128 CodeDesc desc; |
| 2129 assm.GetCode(&desc); | 2129 assm.GetCode(&desc); |
| 2130 Handle<Code> code = isolate->factory()->NewCode( | 2130 Handle<Code> code = isolate->factory()->NewCode( |
| 2131 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 2131 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 2132 F3 f = FUNCTION_CAST<F3>(code->entry()); | 2132 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 2133 | 2133 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2193 double outputs_RM[tableLength] = { | 2193 double outputs_RM[tableLength] = { |
| 2194 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, | 2194 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, |
| 2195 -3.0, -3.0, -3.0, -4.0, -4.0, -4.0, | 2195 -3.0, -3.0, -3.0, -4.0, -4.0, -4.0, |
| 2196 2147483637.0, 2147483638.0, 2147483639.0, | 2196 2147483637.0, 2147483638.0, 2147483639.0, |
| 2197 2147483640.0, 2147483641.0, 2147483642.0, | 2197 2147483640.0, 2147483641.0, 2147483642.0, |
| 2198 2147483643.0, 2147483644.0, 2147483645.0, | 2198 2147483643.0, 2147483644.0, 2147483645.0, |
| 2199 2147483646.0, 2147483647.0, kFPUInvalidResult}; | 2199 2147483646.0, 2147483647.0, kFPUInvalidResult}; |
| 2200 int fcsr_inputs[4] = | 2200 int fcsr_inputs[4] = |
| 2201 {kRoundToNearest, kRoundToZero, kRoundToPlusInf, kRoundToMinusInf}; | 2201 {kRoundToNearest, kRoundToZero, kRoundToPlusInf, kRoundToMinusInf}; |
| 2202 double* outputs[4] = {outputs_RN, outputs_RZ, outputs_RP, outputs_RM}; | 2202 double* outputs[4] = {outputs_RN, outputs_RZ, outputs_RP, outputs_RM}; |
| 2203 __ ldc1(f4, MemOperand(a0, OFFSET_OF(Test, a)) ); | 2203 __ ldc1(f4, MemOperand(a0, offsetof(Test, a)) ); |
| 2204 __ lw(t0, MemOperand(a0, OFFSET_OF(Test, fcsr)) ); | 2204 __ lw(t0, MemOperand(a0, offsetof(Test, fcsr)) ); |
| 2205 __ cfc1(t1, FCSR); | 2205 __ cfc1(t1, FCSR); |
| 2206 __ ctc1(t0, FCSR); | 2206 __ ctc1(t0, FCSR); |
| 2207 __ cvt_w_d(f8, f4); | 2207 __ cvt_w_d(f8, f4); |
| 2208 __ swc1(f8, MemOperand(a0, OFFSET_OF(Test, b)) ); | 2208 __ swc1(f8, MemOperand(a0, offsetof(Test, b)) ); |
| 2209 __ ctc1(t1, FCSR); | 2209 __ ctc1(t1, FCSR); |
| 2210 __ jr(ra); | 2210 __ jr(ra); |
| 2211 __ nop(); | 2211 __ nop(); |
| 2212 Test test; | 2212 Test test; |
| 2213 CodeDesc desc; | 2213 CodeDesc desc; |
| 2214 assm.GetCode(&desc); | 2214 assm.GetCode(&desc); |
| 2215 Handle<Code> code = isolate->factory()->NewCode( | 2215 Handle<Code> code = isolate->factory()->NewCode( |
| 2216 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 2216 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 2217 F3 f = FUNCTION_CAST<F3>(code->entry()); | 2217 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 2218 for (int j = 0; j < 4; j++) { | 2218 for (int j = 0; j < 4; j++) { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2252 2147483648.0, | 2252 2147483648.0, |
| 2253 std::numeric_limits<float>::quiet_NaN(), | 2253 std::numeric_limits<float>::quiet_NaN(), |
| 2254 std::numeric_limits<float>::infinity() | 2254 std::numeric_limits<float>::infinity() |
| 2255 }; | 2255 }; |
| 2256 double outputs[tableLength] = { | 2256 double outputs[tableLength] = { |
| 2257 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, | 2257 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, |
| 2258 -2.0, -2.0, -2.0, -3.0, -3.0, -3.0, | 2258 -2.0, -2.0, -2.0, -3.0, -3.0, -3.0, |
| 2259 kFPUInvalidResult, kFPUInvalidResult, | 2259 kFPUInvalidResult, kFPUInvalidResult, |
| 2260 kFPUInvalidResult}; | 2260 kFPUInvalidResult}; |
| 2261 | 2261 |
| 2262 __ ldc1(f4, MemOperand(a0, OFFSET_OF(Test, a)) ); | 2262 __ ldc1(f4, MemOperand(a0, offsetof(Test, a)) ); |
| 2263 __ lwc1(f6, MemOperand(a0, OFFSET_OF(Test, b)) ); | 2263 __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) ); |
| 2264 __ trunc_w_d(f8, f4); | 2264 __ trunc_w_d(f8, f4); |
| 2265 __ trunc_w_s(f10, f6); | 2265 __ trunc_w_s(f10, f6); |
| 2266 __ swc1(f8, MemOperand(a0, OFFSET_OF(Test, c)) ); | 2266 __ swc1(f8, MemOperand(a0, offsetof(Test, c)) ); |
| 2267 __ swc1(f10, MemOperand(a0, OFFSET_OF(Test, d)) ); | 2267 __ swc1(f10, MemOperand(a0, offsetof(Test, d)) ); |
| 2268 __ jr(ra); | 2268 __ jr(ra); |
| 2269 __ nop(); | 2269 __ nop(); |
| 2270 Test test; | 2270 Test test; |
| 2271 CodeDesc desc; | 2271 CodeDesc desc; |
| 2272 assm.GetCode(&desc); | 2272 assm.GetCode(&desc); |
| 2273 Handle<Code> code = isolate->factory()->NewCode( | 2273 Handle<Code> code = isolate->factory()->NewCode( |
| 2274 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 2274 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 2275 F3 f = FUNCTION_CAST<F3>(code->entry()); | 2275 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 2276 for (int i = 0; i < tableLength; i++) { | 2276 for (int i = 0; i < tableLength; i++) { |
| 2277 test.a = inputs_D[i]; | 2277 test.a = inputs_D[i]; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2309 2147483648.0, | 2309 2147483648.0, |
| 2310 std::numeric_limits<float>::quiet_NaN(), | 2310 std::numeric_limits<float>::quiet_NaN(), |
| 2311 std::numeric_limits<float>::infinity() | 2311 std::numeric_limits<float>::infinity() |
| 2312 }; | 2312 }; |
| 2313 double outputs[tableLength] = { | 2313 double outputs[tableLength] = { |
| 2314 2.0, 3.0, 2.0, 3.0, 4.0, 4.0, | 2314 2.0, 3.0, 2.0, 3.0, 4.0, 4.0, |
| 2315 -2.0, -3.0, -2.0, -3.0, -4.0, -4.0, | 2315 -2.0, -3.0, -2.0, -3.0, -4.0, -4.0, |
| 2316 kFPUInvalidResult, kFPUInvalidResult, | 2316 kFPUInvalidResult, kFPUInvalidResult, |
| 2317 kFPUInvalidResult}; | 2317 kFPUInvalidResult}; |
| 2318 | 2318 |
| 2319 __ ldc1(f4, MemOperand(a0, OFFSET_OF(Test, a)) ); | 2319 __ ldc1(f4, MemOperand(a0, offsetof(Test, a)) ); |
| 2320 __ lwc1(f6, MemOperand(a0, OFFSET_OF(Test, b)) ); | 2320 __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) ); |
| 2321 __ round_w_d(f8, f4); | 2321 __ round_w_d(f8, f4); |
| 2322 __ round_w_s(f10, f6); | 2322 __ round_w_s(f10, f6); |
| 2323 __ swc1(f8, MemOperand(a0, OFFSET_OF(Test, c)) ); | 2323 __ swc1(f8, MemOperand(a0, offsetof(Test, c)) ); |
| 2324 __ swc1(f10, MemOperand(a0, OFFSET_OF(Test, d)) ); | 2324 __ swc1(f10, MemOperand(a0, offsetof(Test, d)) ); |
| 2325 __ jr(ra); | 2325 __ jr(ra); |
| 2326 __ nop(); | 2326 __ nop(); |
| 2327 Test test; | 2327 Test test; |
| 2328 CodeDesc desc; | 2328 CodeDesc desc; |
| 2329 assm.GetCode(&desc); | 2329 assm.GetCode(&desc); |
| 2330 Handle<Code> code = isolate->factory()->NewCode( | 2330 Handle<Code> code = isolate->factory()->NewCode( |
| 2331 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 2331 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 2332 F3 f = FUNCTION_CAST<F3>(code->entry()); | 2332 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 2333 for (int i = 0; i < tableLength; i++) { | 2333 for (int i = 0; i < tableLength; i++) { |
| 2334 test.a = inputs_D[i]; | 2334 test.a = inputs_D[i]; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2367 2147483648.0, | 2367 2147483648.0, |
| 2368 std::numeric_limits<float>::quiet_NaN(), | 2368 std::numeric_limits<float>::quiet_NaN(), |
| 2369 std::numeric_limits<float>::infinity() | 2369 std::numeric_limits<float>::infinity() |
| 2370 }; | 2370 }; |
| 2371 double outputs[tableLength] = { | 2371 double outputs[tableLength] = { |
| 2372 2.0, 3.0, 2.0, 3.0, 4.0, 4.0, | 2372 2.0, 3.0, 2.0, 3.0, 4.0, 4.0, |
| 2373 -2.0, -3.0, -2.0, -3.0, -4.0, -4.0, | 2373 -2.0, -3.0, -2.0, -3.0, -4.0, -4.0, |
| 2374 2147483648.0, dFPU64InvalidResult, | 2374 2147483648.0, dFPU64InvalidResult, |
| 2375 dFPU64InvalidResult}; | 2375 dFPU64InvalidResult}; |
| 2376 | 2376 |
| 2377 __ ldc1(f4, MemOperand(a0, OFFSET_OF(Test, a)) ); | 2377 __ ldc1(f4, MemOperand(a0, offsetof(Test, a)) ); |
| 2378 __ lwc1(f6, MemOperand(a0, OFFSET_OF(Test, b)) ); | 2378 __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) ); |
| 2379 __ round_l_d(f8, f4); | 2379 __ round_l_d(f8, f4); |
| 2380 __ round_l_s(f10, f6); | 2380 __ round_l_s(f10, f6); |
| 2381 __ sdc1(f8, MemOperand(a0, OFFSET_OF(Test, c)) ); | 2381 __ sdc1(f8, MemOperand(a0, offsetof(Test, c)) ); |
| 2382 __ sdc1(f10, MemOperand(a0, OFFSET_OF(Test, d)) ); | 2382 __ sdc1(f10, MemOperand(a0, offsetof(Test, d)) ); |
| 2383 __ jr(ra); | 2383 __ jr(ra); |
| 2384 __ nop(); | 2384 __ nop(); |
| 2385 Test test; | 2385 Test test; |
| 2386 CodeDesc desc; | 2386 CodeDesc desc; |
| 2387 assm.GetCode(&desc); | 2387 assm.GetCode(&desc); |
| 2388 Handle<Code> code = isolate->factory()->NewCode( | 2388 Handle<Code> code = isolate->factory()->NewCode( |
| 2389 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 2389 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 2390 F3 f = FUNCTION_CAST<F3>(code->entry()); | 2390 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 2391 for (int i = 0; i < tableLength; i++) { | 2391 for (int i = 0; i < tableLength; i++) { |
| 2392 test.a = inputs_D[i]; | 2392 test.a = inputs_D[i]; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2433 5.3, 4.8, 2.9, -5.3, -4.8, -2.9 | 2433 5.3, 4.8, 2.9, -5.3, -4.8, -2.9 |
| 2434 }; | 2434 }; |
| 2435 float inputft_S[tableLength] = { | 2435 float inputft_S[tableLength] = { |
| 2436 4.8, 5.3, 2.9, 4.8, 5.3, 2.9, | 2436 4.8, 5.3, 2.9, 4.8, 5.3, 2.9, |
| 2437 -4.8, -5.3, -2.9, -4.8, -5.3, -2.9 | 2437 -4.8, -5.3, -2.9, -4.8, -5.3, -2.9 |
| 2438 }; | 2438 }; |
| 2439 float outputs_S[tableLength] = { | 2439 float outputs_S[tableLength] = { |
| 2440 0.5, -0.5, 0.0, -10.1, -10.1, -5.8, | 2440 0.5, -0.5, 0.0, -10.1, -10.1, -5.8, |
| 2441 10.1, 10.1, 5.8, -0.5, 0.5, 0.0 | 2441 10.1, 10.1, 5.8, -0.5, 0.5, 0.0 |
| 2442 }; | 2442 }; |
| 2443 __ lwc1(f2, MemOperand(a0, OFFSET_OF(TestFloat, a)) ); | 2443 __ lwc1(f2, MemOperand(a0, offsetof(TestFloat, a)) ); |
| 2444 __ lwc1(f4, MemOperand(a0, OFFSET_OF(TestFloat, b)) ); | 2444 __ lwc1(f4, MemOperand(a0, offsetof(TestFloat, b)) ); |
| 2445 __ ldc1(f8, MemOperand(a0, OFFSET_OF(TestFloat, c)) ); | 2445 __ ldc1(f8, MemOperand(a0, offsetof(TestFloat, c)) ); |
| 2446 __ ldc1(f10, MemOperand(a0, OFFSET_OF(TestFloat, d)) ); | 2446 __ ldc1(f10, MemOperand(a0, offsetof(TestFloat, d)) ); |
| 2447 __ sub_s(f6, f2, f4); | 2447 __ sub_s(f6, f2, f4); |
| 2448 __ sub_d(f12, f8, f10); | 2448 __ sub_d(f12, f8, f10); |
| 2449 __ swc1(f6, MemOperand(a0, OFFSET_OF(TestFloat, resultS)) ); | 2449 __ swc1(f6, MemOperand(a0, offsetof(TestFloat, resultS)) ); |
| 2450 __ sdc1(f12, MemOperand(a0, OFFSET_OF(TestFloat, resultD)) ); | 2450 __ sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD)) ); |
| 2451 __ jr(ra); | 2451 __ jr(ra); |
| 2452 __ nop(); | 2452 __ nop(); |
| 2453 | 2453 |
| 2454 CodeDesc desc; | 2454 CodeDesc desc; |
| 2455 assm.GetCode(&desc); | 2455 assm.GetCode(&desc); |
| 2456 Handle<Code> code = isolate->factory()->NewCode( | 2456 Handle<Code> code = isolate->factory()->NewCode( |
| 2457 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 2457 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 2458 F3 f = FUNCTION_CAST<F3>(code->entry()); | 2458 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 2459 for (int i = 0; i < tableLength; i++) { | 2459 for (int i = 0; i < tableLength; i++) { |
| 2460 test.a = inputfs_S[i]; | 2460 test.a = inputfs_S[i]; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2500 }; | 2500 }; |
| 2501 float inputs_S[tableLength] = { | 2501 float inputs_S[tableLength] = { |
| 2502 0.0, 4.0, 2.0, 4e-28 | 2502 0.0, 4.0, 2.0, 4e-28 |
| 2503 }; | 2503 }; |
| 2504 | 2504 |
| 2505 float outputs_S[tableLength] = { | 2505 float outputs_S[tableLength] = { |
| 2506 0.0, 2.0, sqrt2_s, 2e-14 | 2506 0.0, 2.0, sqrt2_s, 2e-14 |
| 2507 }; | 2507 }; |
| 2508 | 2508 |
| 2509 | 2509 |
| 2510 __ lwc1(f2, MemOperand(a0, OFFSET_OF(TestFloat, a)) ); | 2510 __ lwc1(f2, MemOperand(a0, offsetof(TestFloat, a)) ); |
| 2511 __ ldc1(f8, MemOperand(a0, OFFSET_OF(TestFloat, c)) ); | 2511 __ ldc1(f8, MemOperand(a0, offsetof(TestFloat, c)) ); |
| 2512 __ sqrt_s(f6, f2); | 2512 __ sqrt_s(f6, f2); |
| 2513 __ sqrt_d(f12, f8); | 2513 __ sqrt_d(f12, f8); |
| 2514 __ rsqrt_d(f14, f8); | 2514 __ rsqrt_d(f14, f8); |
| 2515 __ rsqrt_s(f16, f2); | 2515 __ rsqrt_s(f16, f2); |
| 2516 __ recip_d(f18, f8); | 2516 __ recip_d(f18, f8); |
| 2517 __ recip_s(f20, f2); | 2517 __ recip_s(f20, f2); |
| 2518 __ swc1(f6, MemOperand(a0, OFFSET_OF(TestFloat, resultS)) ); | 2518 __ swc1(f6, MemOperand(a0, offsetof(TestFloat, resultS)) ); |
| 2519 __ sdc1(f12, MemOperand(a0, OFFSET_OF(TestFloat, resultD)) ); | 2519 __ sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD)) ); |
| 2520 __ swc1(f16, MemOperand(a0, OFFSET_OF(TestFloat, resultS1)) ); | 2520 __ swc1(f16, MemOperand(a0, offsetof(TestFloat, resultS1)) ); |
| 2521 __ sdc1(f14, MemOperand(a0, OFFSET_OF(TestFloat, resultD1)) ); | 2521 __ sdc1(f14, MemOperand(a0, offsetof(TestFloat, resultD1)) ); |
| 2522 __ swc1(f20, MemOperand(a0, OFFSET_OF(TestFloat, resultS2)) ); | 2522 __ swc1(f20, MemOperand(a0, offsetof(TestFloat, resultS2)) ); |
| 2523 __ sdc1(f18, MemOperand(a0, OFFSET_OF(TestFloat, resultD2)) ); | 2523 __ sdc1(f18, MemOperand(a0, offsetof(TestFloat, resultD2)) ); |
| 2524 __ jr(ra); | 2524 __ jr(ra); |
| 2525 __ nop(); | 2525 __ nop(); |
| 2526 | 2526 |
| 2527 CodeDesc desc; | 2527 CodeDesc desc; |
| 2528 assm.GetCode(&desc); | 2528 assm.GetCode(&desc); |
| 2529 Handle<Code> code = isolate->factory()->NewCode( | 2529 Handle<Code> code = isolate->factory()->NewCode( |
| 2530 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 2530 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 2531 F3 f = FUNCTION_CAST<F3>(code->entry()); | 2531 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 2532 | 2532 |
| 2533 for (int i = 0; i < tableLength; i++) { | 2533 for (int i = 0; i < tableLength; i++) { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2586 double outputs_D[tableLength] = { | 2586 double outputs_D[tableLength] = { |
| 2587 0.0, -4.0, 2.0 | 2587 0.0, -4.0, 2.0 |
| 2588 }; | 2588 }; |
| 2589 float inputs_S[tableLength] = { | 2589 float inputs_S[tableLength] = { |
| 2590 0.0, 4.0, -2.0 | 2590 0.0, 4.0, -2.0 |
| 2591 }; | 2591 }; |
| 2592 | 2592 |
| 2593 float outputs_S[tableLength] = { | 2593 float outputs_S[tableLength] = { |
| 2594 0.0, -4.0, 2.0 | 2594 0.0, -4.0, 2.0 |
| 2595 }; | 2595 }; |
| 2596 __ lwc1(f2, MemOperand(a0, OFFSET_OF(TestFloat, a)) ); | 2596 __ lwc1(f2, MemOperand(a0, offsetof(TestFloat, a)) ); |
| 2597 __ ldc1(f8, MemOperand(a0, OFFSET_OF(TestFloat, c)) ); | 2597 __ ldc1(f8, MemOperand(a0, offsetof(TestFloat, c)) ); |
| 2598 __ neg_s(f6, f2); | 2598 __ neg_s(f6, f2); |
| 2599 __ neg_d(f12, f8); | 2599 __ neg_d(f12, f8); |
| 2600 __ swc1(f6, MemOperand(a0, OFFSET_OF(TestFloat, resultS)) ); | 2600 __ swc1(f6, MemOperand(a0, offsetof(TestFloat, resultS)) ); |
| 2601 __ sdc1(f12, MemOperand(a0, OFFSET_OF(TestFloat, resultD)) ); | 2601 __ sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD)) ); |
| 2602 __ jr(ra); | 2602 __ jr(ra); |
| 2603 __ nop(); | 2603 __ nop(); |
| 2604 | 2604 |
| 2605 CodeDesc desc; | 2605 CodeDesc desc; |
| 2606 assm.GetCode(&desc); | 2606 assm.GetCode(&desc); |
| 2607 Handle<Code> code = isolate->factory()->NewCode( | 2607 Handle<Code> code = isolate->factory()->NewCode( |
| 2608 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 2608 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 2609 F3 f = FUNCTION_CAST<F3>(code->entry()); | 2609 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 2610 for (int i = 0; i < tableLength; i++) { | 2610 for (int i = 0; i < tableLength; i++) { |
| 2611 test.a = inputs_S[i]; | 2611 test.a = inputs_S[i]; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 2641 4.8, 4.8, -4.8, -0.29 | 2641 4.8, 4.8, -4.8, -0.29 |
| 2642 }; | 2642 }; |
| 2643 | 2643 |
| 2644 float inputfs_S[tableLength] = { | 2644 float inputfs_S[tableLength] = { |
| 2645 5.3, -5.3, 5.3, -2.9 | 2645 5.3, -5.3, 5.3, -2.9 |
| 2646 }; | 2646 }; |
| 2647 float inputft_S[tableLength] = { | 2647 float inputft_S[tableLength] = { |
| 2648 4.8, 4.8, -4.8, -0.29 | 2648 4.8, 4.8, -4.8, -0.29 |
| 2649 }; | 2649 }; |
| 2650 | 2650 |
| 2651 __ lwc1(f2, MemOperand(a0, OFFSET_OF(TestFloat, a)) ); | 2651 __ lwc1(f2, MemOperand(a0, offsetof(TestFloat, a)) ); |
| 2652 __ lwc1(f4, MemOperand(a0, OFFSET_OF(TestFloat, b)) ); | 2652 __ lwc1(f4, MemOperand(a0, offsetof(TestFloat, b)) ); |
| 2653 __ ldc1(f6, MemOperand(a0, OFFSET_OF(TestFloat, c)) ); | 2653 __ ldc1(f6, MemOperand(a0, offsetof(TestFloat, c)) ); |
| 2654 __ ldc1(f8, MemOperand(a0, OFFSET_OF(TestFloat, d)) ); | 2654 __ ldc1(f8, MemOperand(a0, offsetof(TestFloat, d)) ); |
| 2655 __ mul_s(f10, f2, f4); | 2655 __ mul_s(f10, f2, f4); |
| 2656 __ mul_d(f12, f6, f8); | 2656 __ mul_d(f12, f6, f8); |
| 2657 __ swc1(f10, MemOperand(a0, OFFSET_OF(TestFloat, resultS)) ); | 2657 __ swc1(f10, MemOperand(a0, offsetof(TestFloat, resultS)) ); |
| 2658 __ sdc1(f12, MemOperand(a0, OFFSET_OF(TestFloat, resultD)) ); | 2658 __ sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD)) ); |
| 2659 __ jr(ra); | 2659 __ jr(ra); |
| 2660 __ nop(); | 2660 __ nop(); |
| 2661 | 2661 |
| 2662 CodeDesc desc; | 2662 CodeDesc desc; |
| 2663 assm.GetCode(&desc); | 2663 assm.GetCode(&desc); |
| 2664 Handle<Code> code = isolate->factory()->NewCode( | 2664 Handle<Code> code = isolate->factory()->NewCode( |
| 2665 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 2665 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 2666 F3 f = FUNCTION_CAST<F3>(code->entry()); | 2666 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 2667 for (int i = 0; i < tableLength; i++) { | 2667 for (int i = 0; i < tableLength; i++) { |
| 2668 test.a = inputfs_S[i]; | 2668 test.a = inputfs_S[i]; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 2698 4.8, 4.8, -4.8, -0.29 | 2698 4.8, 4.8, -4.8, -0.29 |
| 2699 }; | 2699 }; |
| 2700 | 2700 |
| 2701 float outputs_S[tableLength] = { | 2701 float outputs_S[tableLength] = { |
| 2702 4.8, 4.8, -4.8, -0.29 | 2702 4.8, 4.8, -4.8, -0.29 |
| 2703 }; | 2703 }; |
| 2704 double outputs_D[tableLength] = { | 2704 double outputs_D[tableLength] = { |
| 2705 5.3, -5.3, 5.3, -2.9 | 2705 5.3, -5.3, 5.3, -2.9 |
| 2706 }; | 2706 }; |
| 2707 | 2707 |
| 2708 __ ldc1(f2, MemOperand(a0, OFFSET_OF(TestFloat, a)) ); | 2708 __ ldc1(f2, MemOperand(a0, offsetof(TestFloat, a)) ); |
| 2709 __ lwc1(f6, MemOperand(a0, OFFSET_OF(TestFloat, c)) ); | 2709 __ lwc1(f6, MemOperand(a0, offsetof(TestFloat, c)) ); |
| 2710 __ mov_s(f18, f6); | 2710 __ mov_s(f18, f6); |
| 2711 __ mov_d(f20, f2); | 2711 __ mov_d(f20, f2); |
| 2712 __ swc1(f18, MemOperand(a0, OFFSET_OF(TestFloat, d)) ); | 2712 __ swc1(f18, MemOperand(a0, offsetof(TestFloat, d)) ); |
| 2713 __ sdc1(f20, MemOperand(a0, OFFSET_OF(TestFloat, b)) ); | 2713 __ sdc1(f20, MemOperand(a0, offsetof(TestFloat, b)) ); |
| 2714 __ jr(ra); | 2714 __ jr(ra); |
| 2715 __ nop(); | 2715 __ nop(); |
| 2716 | 2716 |
| 2717 CodeDesc desc; | 2717 CodeDesc desc; |
| 2718 assm.GetCode(&desc); | 2718 assm.GetCode(&desc); |
| 2719 Handle<Code> code = isolate->factory()->NewCode( | 2719 Handle<Code> code = isolate->factory()->NewCode( |
| 2720 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 2720 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 2721 F3 f = FUNCTION_CAST<F3>(code->entry()); | 2721 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 2722 for (int i = 0; i < tableLength; i++) { | 2722 for (int i = 0; i < tableLength; i++) { |
| 2723 test.a = inputs_D[i]; | 2723 test.a = inputs_D[i]; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2756 2147483648.0, | 2756 2147483648.0, |
| 2757 std::numeric_limits<float>::quiet_NaN(), | 2757 std::numeric_limits<float>::quiet_NaN(), |
| 2758 std::numeric_limits<float>::infinity() | 2758 std::numeric_limits<float>::infinity() |
| 2759 }; | 2759 }; |
| 2760 double outputs[tableLength] = { | 2760 double outputs[tableLength] = { |
| 2761 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, | 2761 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, |
| 2762 -3.0, -3.0, -3.0, -4.0, -4.0, -4.0, | 2762 -3.0, -3.0, -3.0, -4.0, -4.0, -4.0, |
| 2763 kFPUInvalidResult, kFPUInvalidResult, | 2763 kFPUInvalidResult, kFPUInvalidResult, |
| 2764 kFPUInvalidResult}; | 2764 kFPUInvalidResult}; |
| 2765 | 2765 |
| 2766 __ ldc1(f4, MemOperand(a0, OFFSET_OF(Test, a)) ); | 2766 __ ldc1(f4, MemOperand(a0, offsetof(Test, a)) ); |
| 2767 __ lwc1(f6, MemOperand(a0, OFFSET_OF(Test, b)) ); | 2767 __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) ); |
| 2768 __ floor_w_d(f8, f4); | 2768 __ floor_w_d(f8, f4); |
| 2769 __ floor_w_s(f10, f6); | 2769 __ floor_w_s(f10, f6); |
| 2770 __ swc1(f8, MemOperand(a0, OFFSET_OF(Test, c)) ); | 2770 __ swc1(f8, MemOperand(a0, offsetof(Test, c)) ); |
| 2771 __ swc1(f10, MemOperand(a0, OFFSET_OF(Test, d)) ); | 2771 __ swc1(f10, MemOperand(a0, offsetof(Test, d)) ); |
| 2772 __ jr(ra); | 2772 __ jr(ra); |
| 2773 __ nop(); | 2773 __ nop(); |
| 2774 Test test; | 2774 Test test; |
| 2775 CodeDesc desc; | 2775 CodeDesc desc; |
| 2776 assm.GetCode(&desc); | 2776 assm.GetCode(&desc); |
| 2777 Handle<Code> code = isolate->factory()->NewCode( | 2777 Handle<Code> code = isolate->factory()->NewCode( |
| 2778 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 2778 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 2779 F3 f = FUNCTION_CAST<F3>(code->entry()); | 2779 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 2780 for (int i = 0; i < tableLength; i++) { | 2780 for (int i = 0; i < tableLength; i++) { |
| 2781 test.a = inputs_D[i]; | 2781 test.a = inputs_D[i]; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2814 2147483648.0, | 2814 2147483648.0, |
| 2815 std::numeric_limits<float>::quiet_NaN(), | 2815 std::numeric_limits<float>::quiet_NaN(), |
| 2816 std::numeric_limits<float>::infinity() | 2816 std::numeric_limits<float>::infinity() |
| 2817 }; | 2817 }; |
| 2818 double outputs[tableLength] = { | 2818 double outputs[tableLength] = { |
| 2819 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, | 2819 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, |
| 2820 -3.0, -3.0, -3.0, -4.0, -4.0, -4.0, | 2820 -3.0, -3.0, -3.0, -4.0, -4.0, -4.0, |
| 2821 2147483648.0, dFPU64InvalidResult, | 2821 2147483648.0, dFPU64InvalidResult, |
| 2822 dFPU64InvalidResult}; | 2822 dFPU64InvalidResult}; |
| 2823 | 2823 |
| 2824 __ ldc1(f4, MemOperand(a0, OFFSET_OF(Test, a)) ); | 2824 __ ldc1(f4, MemOperand(a0, offsetof(Test, a)) ); |
| 2825 __ lwc1(f6, MemOperand(a0, OFFSET_OF(Test, b)) ); | 2825 __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) ); |
| 2826 __ floor_l_d(f8, f4); | 2826 __ floor_l_d(f8, f4); |
| 2827 __ floor_l_s(f10, f6); | 2827 __ floor_l_s(f10, f6); |
| 2828 __ sdc1(f8, MemOperand(a0, OFFSET_OF(Test, c)) ); | 2828 __ sdc1(f8, MemOperand(a0, offsetof(Test, c)) ); |
| 2829 __ sdc1(f10, MemOperand(a0, OFFSET_OF(Test, d)) ); | 2829 __ sdc1(f10, MemOperand(a0, offsetof(Test, d)) ); |
| 2830 __ jr(ra); | 2830 __ jr(ra); |
| 2831 __ nop(); | 2831 __ nop(); |
| 2832 Test test; | 2832 Test test; |
| 2833 CodeDesc desc; | 2833 CodeDesc desc; |
| 2834 assm.GetCode(&desc); | 2834 assm.GetCode(&desc); |
| 2835 Handle<Code> code = isolate->factory()->NewCode( | 2835 Handle<Code> code = isolate->factory()->NewCode( |
| 2836 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 2836 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 2837 F3 f = FUNCTION_CAST<F3>(code->entry()); | 2837 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 2838 for (int i = 0; i < tableLength; i++) { | 2838 for (int i = 0; i < tableLength; i++) { |
| 2839 test.a = inputs_D[i]; | 2839 test.a = inputs_D[i]; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2872 2147483648.0, | 2872 2147483648.0, |
| 2873 std::numeric_limits<float>::quiet_NaN(), | 2873 std::numeric_limits<float>::quiet_NaN(), |
| 2874 std::numeric_limits<float>::infinity() | 2874 std::numeric_limits<float>::infinity() |
| 2875 }; | 2875 }; |
| 2876 double outputs[tableLength] = { | 2876 double outputs[tableLength] = { |
| 2877 3.0, 3.0, 3.0, 4.0, 4.0, 4.0, | 2877 3.0, 3.0, 3.0, 4.0, 4.0, 4.0, |
| 2878 -2.0, -2.0, -2.0, -3.0, -3.0, -3.0, | 2878 -2.0, -2.0, -2.0, -3.0, -3.0, -3.0, |
| 2879 kFPUInvalidResult, kFPUInvalidResult, | 2879 kFPUInvalidResult, kFPUInvalidResult, |
| 2880 kFPUInvalidResult}; | 2880 kFPUInvalidResult}; |
| 2881 | 2881 |
| 2882 __ ldc1(f4, MemOperand(a0, OFFSET_OF(Test, a)) ); | 2882 __ ldc1(f4, MemOperand(a0, offsetof(Test, a)) ); |
| 2883 __ lwc1(f6, MemOperand(a0, OFFSET_OF(Test, b)) ); | 2883 __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) ); |
| 2884 __ ceil_w_d(f8, f4); | 2884 __ ceil_w_d(f8, f4); |
| 2885 __ ceil_w_s(f10, f6); | 2885 __ ceil_w_s(f10, f6); |
| 2886 __ swc1(f8, MemOperand(a0, OFFSET_OF(Test, c)) ); | 2886 __ swc1(f8, MemOperand(a0, offsetof(Test, c)) ); |
| 2887 __ swc1(f10, MemOperand(a0, OFFSET_OF(Test, d)) ); | 2887 __ swc1(f10, MemOperand(a0, offsetof(Test, d)) ); |
| 2888 __ jr(ra); | 2888 __ jr(ra); |
| 2889 __ nop(); | 2889 __ nop(); |
| 2890 Test test; | 2890 Test test; |
| 2891 CodeDesc desc; | 2891 CodeDesc desc; |
| 2892 assm.GetCode(&desc); | 2892 assm.GetCode(&desc); |
| 2893 Handle<Code> code = isolate->factory()->NewCode( | 2893 Handle<Code> code = isolate->factory()->NewCode( |
| 2894 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 2894 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 2895 F3 f = FUNCTION_CAST<F3>(code->entry()); | 2895 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 2896 for (int i = 0; i < tableLength; i++) { | 2896 for (int i = 0; i < tableLength; i++) { |
| 2897 test.a = inputs_D[i]; | 2897 test.a = inputs_D[i]; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2930 2147483648.0, | 2930 2147483648.0, |
| 2931 std::numeric_limits<float>::quiet_NaN(), | 2931 std::numeric_limits<float>::quiet_NaN(), |
| 2932 std::numeric_limits<float>::infinity() | 2932 std::numeric_limits<float>::infinity() |
| 2933 }; | 2933 }; |
| 2934 double outputs[tableLength] = { | 2934 double outputs[tableLength] = { |
| 2935 3.0, 3.0, 3.0, 4.0, 4.0, 4.0, | 2935 3.0, 3.0, 3.0, 4.0, 4.0, 4.0, |
| 2936 -2.0, -2.0, -2.0, -3.0, -3.0, -3.0, | 2936 -2.0, -2.0, -2.0, -3.0, -3.0, -3.0, |
| 2937 2147483648.0, dFPU64InvalidResult, | 2937 2147483648.0, dFPU64InvalidResult, |
| 2938 dFPU64InvalidResult}; | 2938 dFPU64InvalidResult}; |
| 2939 | 2939 |
| 2940 __ ldc1(f4, MemOperand(a0, OFFSET_OF(Test, a)) ); | 2940 __ ldc1(f4, MemOperand(a0, offsetof(Test, a)) ); |
| 2941 __ lwc1(f6, MemOperand(a0, OFFSET_OF(Test, b)) ); | 2941 __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) ); |
| 2942 __ ceil_l_d(f8, f4); | 2942 __ ceil_l_d(f8, f4); |
| 2943 __ ceil_l_s(f10, f6); | 2943 __ ceil_l_s(f10, f6); |
| 2944 __ sdc1(f8, MemOperand(a0, OFFSET_OF(Test, c)) ); | 2944 __ sdc1(f8, MemOperand(a0, offsetof(Test, c)) ); |
| 2945 __ sdc1(f10, MemOperand(a0, OFFSET_OF(Test, d)) ); | 2945 __ sdc1(f10, MemOperand(a0, offsetof(Test, d)) ); |
| 2946 __ jr(ra); | 2946 __ jr(ra); |
| 2947 __ nop(); | 2947 __ nop(); |
| 2948 Test test; | 2948 Test test; |
| 2949 CodeDesc desc; | 2949 CodeDesc desc; |
| 2950 assm.GetCode(&desc); | 2950 assm.GetCode(&desc); |
| 2951 Handle<Code> code = isolate->factory()->NewCode( | 2951 Handle<Code> code = isolate->factory()->NewCode( |
| 2952 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 2952 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 2953 F3 f = FUNCTION_CAST<F3>(code->entry()); | 2953 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 2954 for (int i = 0; i < tableLength; i++) { | 2954 for (int i = 0; i < tableLength; i++) { |
| 2955 test.a = inputs_D[i]; | 2955 test.a = inputs_D[i]; |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3183 typedef struct { | 3183 typedef struct { |
| 3184 int32_t r1; | 3184 int32_t r1; |
| 3185 int32_t r2; | 3185 int32_t r2; |
| 3186 int32_t r3; | 3186 int32_t r3; |
| 3187 int32_t r4; | 3187 int32_t r4; |
| 3188 } T; | 3188 } T; |
| 3189 T t; | 3189 T t; |
| 3190 | 3190 |
| 3191 Assembler assm(isolate, NULL, 0); | 3191 Assembler assm(isolate, NULL, 0); |
| 3192 | 3192 |
| 3193 __ lw(a2, MemOperand(a0, OFFSET_OF(T, r1))); | 3193 __ lw(a2, MemOperand(a0, offsetof(T, r1))); |
| 3194 __ nop(); | 3194 __ nop(); |
| 3195 __ bitswap(a1, a2); | 3195 __ bitswap(a1, a2); |
| 3196 __ sw(a1, MemOperand(a0, OFFSET_OF(T, r1))); | 3196 __ sw(a1, MemOperand(a0, offsetof(T, r1))); |
| 3197 | 3197 |
| 3198 __ lw(a2, MemOperand(a0, OFFSET_OF(T, r2))); | 3198 __ lw(a2, MemOperand(a0, offsetof(T, r2))); |
| 3199 __ nop(); | 3199 __ nop(); |
| 3200 __ bitswap(a1, a2); | 3200 __ bitswap(a1, a2); |
| 3201 __ sw(a1, MemOperand(a0, OFFSET_OF(T, r2))); | 3201 __ sw(a1, MemOperand(a0, offsetof(T, r2))); |
| 3202 | 3202 |
| 3203 __ jr(ra); | 3203 __ jr(ra); |
| 3204 __ nop(); | 3204 __ nop(); |
| 3205 | 3205 |
| 3206 CodeDesc desc; | 3206 CodeDesc desc; |
| 3207 assm.GetCode(&desc); | 3207 assm.GetCode(&desc); |
| 3208 Handle<Code> code = isolate->factory()->NewCode( | 3208 Handle<Code> code = isolate->factory()->NewCode( |
| 3209 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 3209 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 3210 F3 f = FUNCTION_CAST<F3>(code->entry()); | 3210 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 3211 t.r1 = 0x781A15C3; | 3211 t.r1 = 0x781A15C3; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3246 float fPosInf; | 3246 float fPosInf; |
| 3247 float fPosNorm; | 3247 float fPosNorm; |
| 3248 float fPosSubnorm; | 3248 float fPosSubnorm; |
| 3249 float fPosZero; } T; | 3249 float fPosZero; } T; |
| 3250 T t; | 3250 T t; |
| 3251 | 3251 |
| 3252 // Create a function that accepts &t, and loads, manipulates, and stores | 3252 // Create a function that accepts &t, and loads, manipulates, and stores |
| 3253 // the doubles t.a ... t.f. | 3253 // the doubles t.a ... t.f. |
| 3254 MacroAssembler assm(isolate, NULL, 0); | 3254 MacroAssembler assm(isolate, NULL, 0); |
| 3255 | 3255 |
| 3256 __ ldc1(f4, MemOperand(a0, OFFSET_OF(T, dSignalingNan))); | 3256 __ ldc1(f4, MemOperand(a0, offsetof(T, dSignalingNan))); |
| 3257 __ class_d(f6, f4); | 3257 __ class_d(f6, f4); |
| 3258 __ sdc1(f6, MemOperand(a0, OFFSET_OF(T, dSignalingNan))); | 3258 __ sdc1(f6, MemOperand(a0, offsetof(T, dSignalingNan))); |
| 3259 | 3259 |
| 3260 __ ldc1(f4, MemOperand(a0, OFFSET_OF(T, dQuietNan))); | 3260 __ ldc1(f4, MemOperand(a0, offsetof(T, dQuietNan))); |
| 3261 __ class_d(f6, f4); | 3261 __ class_d(f6, f4); |
| 3262 __ sdc1(f6, MemOperand(a0, OFFSET_OF(T, dQuietNan))); | 3262 __ sdc1(f6, MemOperand(a0, offsetof(T, dQuietNan))); |
| 3263 | 3263 |
| 3264 __ ldc1(f4, MemOperand(a0, OFFSET_OF(T, dNegInf))); | 3264 __ ldc1(f4, MemOperand(a0, offsetof(T, dNegInf))); |
| 3265 __ class_d(f6, f4); | 3265 __ class_d(f6, f4); |
| 3266 __ sdc1(f6, MemOperand(a0, OFFSET_OF(T, dNegInf))); | 3266 __ sdc1(f6, MemOperand(a0, offsetof(T, dNegInf))); |
| 3267 | 3267 |
| 3268 __ ldc1(f4, MemOperand(a0, OFFSET_OF(T, dNegNorm))); | 3268 __ ldc1(f4, MemOperand(a0, offsetof(T, dNegNorm))); |
| 3269 __ class_d(f6, f4); | 3269 __ class_d(f6, f4); |
| 3270 __ sdc1(f6, MemOperand(a0, OFFSET_OF(T, dNegNorm))); | 3270 __ sdc1(f6, MemOperand(a0, offsetof(T, dNegNorm))); |
| 3271 | 3271 |
| 3272 __ ldc1(f4, MemOperand(a0, OFFSET_OF(T, dNegSubnorm))); | 3272 __ ldc1(f4, MemOperand(a0, offsetof(T, dNegSubnorm))); |
| 3273 __ class_d(f6, f4); | 3273 __ class_d(f6, f4); |
| 3274 __ sdc1(f6, MemOperand(a0, OFFSET_OF(T, dNegSubnorm))); | 3274 __ sdc1(f6, MemOperand(a0, offsetof(T, dNegSubnorm))); |
| 3275 | 3275 |
| 3276 __ ldc1(f4, MemOperand(a0, OFFSET_OF(T, dNegZero))); | 3276 __ ldc1(f4, MemOperand(a0, offsetof(T, dNegZero))); |
| 3277 __ class_d(f6, f4); | 3277 __ class_d(f6, f4); |
| 3278 __ sdc1(f6, MemOperand(a0, OFFSET_OF(T, dNegZero))); | 3278 __ sdc1(f6, MemOperand(a0, offsetof(T, dNegZero))); |
| 3279 | 3279 |
| 3280 __ ldc1(f4, MemOperand(a0, OFFSET_OF(T, dPosInf))); | 3280 __ ldc1(f4, MemOperand(a0, offsetof(T, dPosInf))); |
| 3281 __ class_d(f6, f4); | 3281 __ class_d(f6, f4); |
| 3282 __ sdc1(f6, MemOperand(a0, OFFSET_OF(T, dPosInf))); | 3282 __ sdc1(f6, MemOperand(a0, offsetof(T, dPosInf))); |
| 3283 | 3283 |
| 3284 __ ldc1(f4, MemOperand(a0, OFFSET_OF(T, dPosNorm))); | 3284 __ ldc1(f4, MemOperand(a0, offsetof(T, dPosNorm))); |
| 3285 __ class_d(f6, f4); | 3285 __ class_d(f6, f4); |
| 3286 __ sdc1(f6, MemOperand(a0, OFFSET_OF(T, dPosNorm))); | 3286 __ sdc1(f6, MemOperand(a0, offsetof(T, dPosNorm))); |
| 3287 | 3287 |
| 3288 __ ldc1(f4, MemOperand(a0, OFFSET_OF(T, dPosSubnorm))); | 3288 __ ldc1(f4, MemOperand(a0, offsetof(T, dPosSubnorm))); |
| 3289 __ class_d(f6, f4); | 3289 __ class_d(f6, f4); |
| 3290 __ sdc1(f6, MemOperand(a0, OFFSET_OF(T, dPosSubnorm))); | 3290 __ sdc1(f6, MemOperand(a0, offsetof(T, dPosSubnorm))); |
| 3291 | 3291 |
| 3292 __ ldc1(f4, MemOperand(a0, OFFSET_OF(T, dPosZero))); | 3292 __ ldc1(f4, MemOperand(a0, offsetof(T, dPosZero))); |
| 3293 __ class_d(f6, f4); | 3293 __ class_d(f6, f4); |
| 3294 __ sdc1(f6, MemOperand(a0, OFFSET_OF(T, dPosZero))); | 3294 __ sdc1(f6, MemOperand(a0, offsetof(T, dPosZero))); |
| 3295 | 3295 |
| 3296 // Testing instruction CLASS.S | 3296 // Testing instruction CLASS.S |
| 3297 __ lwc1(f4, MemOperand(a0, OFFSET_OF(T, fSignalingNan))); | 3297 __ lwc1(f4, MemOperand(a0, offsetof(T, fSignalingNan))); |
| 3298 __ class_s(f6, f4); | 3298 __ class_s(f6, f4); |
| 3299 __ swc1(f6, MemOperand(a0, OFFSET_OF(T, fSignalingNan))); | 3299 __ swc1(f6, MemOperand(a0, offsetof(T, fSignalingNan))); |
| 3300 | 3300 |
| 3301 __ lwc1(f4, MemOperand(a0, OFFSET_OF(T, fQuietNan))); | 3301 __ lwc1(f4, MemOperand(a0, offsetof(T, fQuietNan))); |
| 3302 __ class_s(f6, f4); | 3302 __ class_s(f6, f4); |
| 3303 __ swc1(f6, MemOperand(a0, OFFSET_OF(T, fQuietNan))); | 3303 __ swc1(f6, MemOperand(a0, offsetof(T, fQuietNan))); |
| 3304 | 3304 |
| 3305 __ lwc1(f4, MemOperand(a0, OFFSET_OF(T, fNegInf))); | 3305 __ lwc1(f4, MemOperand(a0, offsetof(T, fNegInf))); |
| 3306 __ class_s(f6, f4); | 3306 __ class_s(f6, f4); |
| 3307 __ swc1(f6, MemOperand(a0, OFFSET_OF(T, fNegInf))); | 3307 __ swc1(f6, MemOperand(a0, offsetof(T, fNegInf))); |
| 3308 | 3308 |
| 3309 __ lwc1(f4, MemOperand(a0, OFFSET_OF(T, fNegNorm))); | 3309 __ lwc1(f4, MemOperand(a0, offsetof(T, fNegNorm))); |
| 3310 __ class_s(f6, f4); | 3310 __ class_s(f6, f4); |
| 3311 __ swc1(f6, MemOperand(a0, OFFSET_OF(T, fNegNorm))); | 3311 __ swc1(f6, MemOperand(a0, offsetof(T, fNegNorm))); |
| 3312 | 3312 |
| 3313 __ lwc1(f4, MemOperand(a0, OFFSET_OF(T, fNegSubnorm))); | 3313 __ lwc1(f4, MemOperand(a0, offsetof(T, fNegSubnorm))); |
| 3314 __ class_s(f6, f4); | 3314 __ class_s(f6, f4); |
| 3315 __ swc1(f6, MemOperand(a0, OFFSET_OF(T, fNegSubnorm))); | 3315 __ swc1(f6, MemOperand(a0, offsetof(T, fNegSubnorm))); |
| 3316 | 3316 |
| 3317 __ lwc1(f4, MemOperand(a0, OFFSET_OF(T, fNegZero))); | 3317 __ lwc1(f4, MemOperand(a0, offsetof(T, fNegZero))); |
| 3318 __ class_s(f6, f4); | 3318 __ class_s(f6, f4); |
| 3319 __ swc1(f6, MemOperand(a0, OFFSET_OF(T, fNegZero))); | 3319 __ swc1(f6, MemOperand(a0, offsetof(T, fNegZero))); |
| 3320 | 3320 |
| 3321 __ lwc1(f4, MemOperand(a0, OFFSET_OF(T, fPosInf))); | 3321 __ lwc1(f4, MemOperand(a0, offsetof(T, fPosInf))); |
| 3322 __ class_s(f6, f4); | 3322 __ class_s(f6, f4); |
| 3323 __ swc1(f6, MemOperand(a0, OFFSET_OF(T, fPosInf))); | 3323 __ swc1(f6, MemOperand(a0, offsetof(T, fPosInf))); |
| 3324 | 3324 |
| 3325 __ lwc1(f4, MemOperand(a0, OFFSET_OF(T, fPosNorm))); | 3325 __ lwc1(f4, MemOperand(a0, offsetof(T, fPosNorm))); |
| 3326 __ class_s(f6, f4); | 3326 __ class_s(f6, f4); |
| 3327 __ swc1(f6, MemOperand(a0, OFFSET_OF(T, fPosNorm))); | 3327 __ swc1(f6, MemOperand(a0, offsetof(T, fPosNorm))); |
| 3328 | 3328 |
| 3329 __ lwc1(f4, MemOperand(a0, OFFSET_OF(T, fPosSubnorm))); | 3329 __ lwc1(f4, MemOperand(a0, offsetof(T, fPosSubnorm))); |
| 3330 __ class_s(f6, f4); | 3330 __ class_s(f6, f4); |
| 3331 __ swc1(f6, MemOperand(a0, OFFSET_OF(T, fPosSubnorm))); | 3331 __ swc1(f6, MemOperand(a0, offsetof(T, fPosSubnorm))); |
| 3332 | 3332 |
| 3333 __ lwc1(f4, MemOperand(a0, OFFSET_OF(T, fPosZero))); | 3333 __ lwc1(f4, MemOperand(a0, offsetof(T, fPosZero))); |
| 3334 __ class_s(f6, f4); | 3334 __ class_s(f6, f4); |
| 3335 __ swc1(f6, MemOperand(a0, OFFSET_OF(T, fPosZero))); | 3335 __ swc1(f6, MemOperand(a0, offsetof(T, fPosZero))); |
| 3336 | 3336 |
| 3337 __ jr(ra); | 3337 __ jr(ra); |
| 3338 __ nop(); | 3338 __ nop(); |
| 3339 | 3339 |
| 3340 CodeDesc desc; | 3340 CodeDesc desc; |
| 3341 assm.GetCode(&desc); | 3341 assm.GetCode(&desc); |
| 3342 Handle<Code> code = isolate->factory()->NewCode( | 3342 Handle<Code> code = isolate->factory()->NewCode( |
| 3343 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 3343 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 3344 F3 f = FUNCTION_CAST<F3>(code->entry()); | 3344 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 3345 | 3345 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3408 double fcsr; | 3408 double fcsr; |
| 3409 } TestFloat; | 3409 } TestFloat; |
| 3410 | 3410 |
| 3411 TestFloat test; | 3411 TestFloat test; |
| 3412 | 3412 |
| 3413 // Save FIR. | 3413 // Save FIR. |
| 3414 __ cfc1(a1, FCSR); | 3414 __ cfc1(a1, FCSR); |
| 3415 // Disable FPU exceptions. | 3415 // Disable FPU exceptions. |
| 3416 __ ctc1(zero_reg, FCSR); | 3416 __ ctc1(zero_reg, FCSR); |
| 3417 | 3417 |
| 3418 __ ldc1(f4, MemOperand(a0, OFFSET_OF(TestFloat, a))); | 3418 __ ldc1(f4, MemOperand(a0, offsetof(TestFloat, a))); |
| 3419 __ abs_d(f10, f4); | 3419 __ abs_d(f10, f4); |
| 3420 __ sdc1(f10, MemOperand(a0, OFFSET_OF(TestFloat, a))); | 3420 __ sdc1(f10, MemOperand(a0, offsetof(TestFloat, a))); |
| 3421 | 3421 |
| 3422 __ lwc1(f4, MemOperand(a0, OFFSET_OF(TestFloat, b))); | 3422 __ lwc1(f4, MemOperand(a0, offsetof(TestFloat, b))); |
| 3423 __ abs_s(f10, f4); | 3423 __ abs_s(f10, f4); |
| 3424 __ swc1(f10, MemOperand(a0, OFFSET_OF(TestFloat, b))); | 3424 __ swc1(f10, MemOperand(a0, offsetof(TestFloat, b))); |
| 3425 | 3425 |
| 3426 // Restore FCSR. | 3426 // Restore FCSR. |
| 3427 __ ctc1(a1, FCSR); | 3427 __ ctc1(a1, FCSR); |
| 3428 | 3428 |
| 3429 __ jr(ra); | 3429 __ jr(ra); |
| 3430 __ nop(); | 3430 __ nop(); |
| 3431 | 3431 |
| 3432 CodeDesc desc; | 3432 CodeDesc desc; |
| 3433 assm.GetCode(&desc); | 3433 assm.GetCode(&desc); |
| 3434 Handle<Code> code = isolate->factory()->NewCode( | 3434 Handle<Code> code = isolate->factory()->NewCode( |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3502 double a; | 3502 double a; |
| 3503 double b; | 3503 double b; |
| 3504 double c; | 3504 double c; |
| 3505 float fa; | 3505 float fa; |
| 3506 float fb; | 3506 float fb; |
| 3507 float fc; | 3507 float fc; |
| 3508 } TestFloat; | 3508 } TestFloat; |
| 3509 | 3509 |
| 3510 TestFloat test; | 3510 TestFloat test; |
| 3511 | 3511 |
| 3512 __ ldc1(f4, MemOperand(a0, OFFSET_OF(TestFloat, a))); | 3512 __ ldc1(f4, MemOperand(a0, offsetof(TestFloat, a))); |
| 3513 __ ldc1(f8, MemOperand(a0, OFFSET_OF(TestFloat, b))); | 3513 __ ldc1(f8, MemOperand(a0, offsetof(TestFloat, b))); |
| 3514 __ add_d(f10, f8, f4); | 3514 __ add_d(f10, f8, f4); |
| 3515 __ sdc1(f10, MemOperand(a0, OFFSET_OF(TestFloat, c))); | 3515 __ sdc1(f10, MemOperand(a0, offsetof(TestFloat, c))); |
| 3516 | 3516 |
| 3517 __ lwc1(f4, MemOperand(a0, OFFSET_OF(TestFloat, fa))); | 3517 __ lwc1(f4, MemOperand(a0, offsetof(TestFloat, fa))); |
| 3518 __ lwc1(f8, MemOperand(a0, OFFSET_OF(TestFloat, fb))); | 3518 __ lwc1(f8, MemOperand(a0, offsetof(TestFloat, fb))); |
| 3519 __ add_s(f10, f8, f4); | 3519 __ add_s(f10, f8, f4); |
| 3520 __ swc1(f10, MemOperand(a0, OFFSET_OF(TestFloat, fc))); | 3520 __ swc1(f10, MemOperand(a0, offsetof(TestFloat, fc))); |
| 3521 | 3521 |
| 3522 __ jr(ra); | 3522 __ jr(ra); |
| 3523 __ nop(); | 3523 __ nop(); |
| 3524 | 3524 |
| 3525 CodeDesc desc; | 3525 CodeDesc desc; |
| 3526 assm.GetCode(&desc); | 3526 assm.GetCode(&desc); |
| 3527 Handle<Code> code = isolate->factory()->NewCode( | 3527 Handle<Code> code = isolate->factory()->NewCode( |
| 3528 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 3528 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 3529 F3 f = FUNCTION_CAST<F3>(code->entry()); | 3529 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 3530 test.a = 2.0; | 3530 test.a = 2.0; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3588 uint32_t fOlt; | 3588 uint32_t fOlt; |
| 3589 uint32_t fUlt; | 3589 uint32_t fUlt; |
| 3590 uint32_t fOle; | 3590 uint32_t fOle; |
| 3591 uint32_t fUle; | 3591 uint32_t fUle; |
| 3592 } TestFloat; | 3592 } TestFloat; |
| 3593 | 3593 |
| 3594 TestFloat test; | 3594 TestFloat test; |
| 3595 | 3595 |
| 3596 __ li(t1, 1); | 3596 __ li(t1, 1); |
| 3597 | 3597 |
| 3598 __ ldc1(f4, MemOperand(a0, OFFSET_OF(TestFloat, dOp1))); | 3598 __ ldc1(f4, MemOperand(a0, offsetof(TestFloat, dOp1))); |
| 3599 __ ldc1(f6, MemOperand(a0, OFFSET_OF(TestFloat, dOp2))); | 3599 __ ldc1(f6, MemOperand(a0, offsetof(TestFloat, dOp2))); |
| 3600 | 3600 |
| 3601 __ lwc1(f14, MemOperand(a0, OFFSET_OF(TestFloat, fOp1))); | 3601 __ lwc1(f14, MemOperand(a0, offsetof(TestFloat, fOp1))); |
| 3602 __ lwc1(f16, MemOperand(a0, OFFSET_OF(TestFloat, fOp2))); | 3602 __ lwc1(f16, MemOperand(a0, offsetof(TestFloat, fOp2))); |
| 3603 | 3603 |
| 3604 __ mov(t2, zero_reg); | 3604 __ mov(t2, zero_reg); |
| 3605 __ mov(t3, zero_reg); | 3605 __ mov(t3, zero_reg); |
| 3606 __ c_d(F, f4, f6, 0); | 3606 __ c_d(F, f4, f6, 0); |
| 3607 __ c_s(F, f14, f16, 2); | 3607 __ c_s(F, f14, f16, 2); |
| 3608 __ movt(t2, t1, 0); | 3608 __ movt(t2, t1, 0); |
| 3609 __ movt(t3, t1, 2); | 3609 __ movt(t3, t1, 2); |
| 3610 __ sw(t2, MemOperand(a0, OFFSET_OF(TestFloat, dF)) ); | 3610 __ sw(t2, MemOperand(a0, offsetof(TestFloat, dF)) ); |
| 3611 __ sw(t3, MemOperand(a0, OFFSET_OF(TestFloat, fF)) ); | 3611 __ sw(t3, MemOperand(a0, offsetof(TestFloat, fF)) ); |
| 3612 | 3612 |
| 3613 __ mov(t2, zero_reg); | 3613 __ mov(t2, zero_reg); |
| 3614 __ mov(t3, zero_reg); | 3614 __ mov(t3, zero_reg); |
| 3615 __ c_d(UN, f4, f6, 2); | 3615 __ c_d(UN, f4, f6, 2); |
| 3616 __ c_s(UN, f14, f16, 4); | 3616 __ c_s(UN, f14, f16, 4); |
| 3617 __ movt(t2, t1, 2); | 3617 __ movt(t2, t1, 2); |
| 3618 __ movt(t3, t1, 4); | 3618 __ movt(t3, t1, 4); |
| 3619 __ sw(t2, MemOperand(a0, OFFSET_OF(TestFloat, dUn)) ); | 3619 __ sw(t2, MemOperand(a0, offsetof(TestFloat, dUn)) ); |
| 3620 __ sw(t3, MemOperand(a0, OFFSET_OF(TestFloat, fUn)) ); | 3620 __ sw(t3, MemOperand(a0, offsetof(TestFloat, fUn)) ); |
| 3621 | 3621 |
| 3622 __ mov(t2, zero_reg); | 3622 __ mov(t2, zero_reg); |
| 3623 __ mov(t3, zero_reg); | 3623 __ mov(t3, zero_reg); |
| 3624 __ c_d(EQ, f4, f6, 4); | 3624 __ c_d(EQ, f4, f6, 4); |
| 3625 __ c_s(EQ, f14, f16, 6); | 3625 __ c_s(EQ, f14, f16, 6); |
| 3626 __ movt(t2, t1, 4); | 3626 __ movt(t2, t1, 4); |
| 3627 __ movt(t3, t1, 6); | 3627 __ movt(t3, t1, 6); |
| 3628 __ sw(t2, MemOperand(a0, OFFSET_OF(TestFloat, dEq)) ); | 3628 __ sw(t2, MemOperand(a0, offsetof(TestFloat, dEq)) ); |
| 3629 __ sw(t3, MemOperand(a0, OFFSET_OF(TestFloat, fEq)) ); | 3629 __ sw(t3, MemOperand(a0, offsetof(TestFloat, fEq)) ); |
| 3630 | 3630 |
| 3631 __ mov(t2, zero_reg); | 3631 __ mov(t2, zero_reg); |
| 3632 __ mov(t3, zero_reg); | 3632 __ mov(t3, zero_reg); |
| 3633 __ c_d(UEQ, f4, f6, 6); | 3633 __ c_d(UEQ, f4, f6, 6); |
| 3634 __ c_s(UEQ, f14, f16, 0); | 3634 __ c_s(UEQ, f14, f16, 0); |
| 3635 __ movt(t2, t1, 6); | 3635 __ movt(t2, t1, 6); |
| 3636 __ movt(t3, t1, 0); | 3636 __ movt(t3, t1, 0); |
| 3637 __ sw(t2, MemOperand(a0, OFFSET_OF(TestFloat, dUeq)) ); | 3637 __ sw(t2, MemOperand(a0, offsetof(TestFloat, dUeq)) ); |
| 3638 __ sw(t3, MemOperand(a0, OFFSET_OF(TestFloat, fUeq)) ); | 3638 __ sw(t3, MemOperand(a0, offsetof(TestFloat, fUeq)) ); |
| 3639 | 3639 |
| 3640 __ mov(t2, zero_reg); | 3640 __ mov(t2, zero_reg); |
| 3641 __ mov(t3, zero_reg); | 3641 __ mov(t3, zero_reg); |
| 3642 __ c_d(OLT, f4, f6, 0); | 3642 __ c_d(OLT, f4, f6, 0); |
| 3643 __ c_s(OLT, f14, f16, 2); | 3643 __ c_s(OLT, f14, f16, 2); |
| 3644 __ movt(t2, t1, 0); | 3644 __ movt(t2, t1, 0); |
| 3645 __ movt(t3, t1, 2); | 3645 __ movt(t3, t1, 2); |
| 3646 __ sw(t2, MemOperand(a0, OFFSET_OF(TestFloat, dOlt)) ); | 3646 __ sw(t2, MemOperand(a0, offsetof(TestFloat, dOlt)) ); |
| 3647 __ sw(t3, MemOperand(a0, OFFSET_OF(TestFloat, fOlt)) ); | 3647 __ sw(t3, MemOperand(a0, offsetof(TestFloat, fOlt)) ); |
| 3648 | 3648 |
| 3649 __ mov(t2, zero_reg); | 3649 __ mov(t2, zero_reg); |
| 3650 __ mov(t3, zero_reg); | 3650 __ mov(t3, zero_reg); |
| 3651 __ c_d(ULT, f4, f6, 2); | 3651 __ c_d(ULT, f4, f6, 2); |
| 3652 __ c_s(ULT, f14, f16, 4); | 3652 __ c_s(ULT, f14, f16, 4); |
| 3653 __ movt(t2, t1, 2); | 3653 __ movt(t2, t1, 2); |
| 3654 __ movt(t3, t1, 4); | 3654 __ movt(t3, t1, 4); |
| 3655 __ sw(t2, MemOperand(a0, OFFSET_OF(TestFloat, dUlt)) ); | 3655 __ sw(t2, MemOperand(a0, offsetof(TestFloat, dUlt)) ); |
| 3656 __ sw(t3, MemOperand(a0, OFFSET_OF(TestFloat, fUlt)) ); | 3656 __ sw(t3, MemOperand(a0, offsetof(TestFloat, fUlt)) ); |
| 3657 | 3657 |
| 3658 __ mov(t2, zero_reg); | 3658 __ mov(t2, zero_reg); |
| 3659 __ mov(t3, zero_reg); | 3659 __ mov(t3, zero_reg); |
| 3660 __ c_d(OLE, f4, f6, 4); | 3660 __ c_d(OLE, f4, f6, 4); |
| 3661 __ c_s(OLE, f14, f16, 6); | 3661 __ c_s(OLE, f14, f16, 6); |
| 3662 __ movt(t2, t1, 4); | 3662 __ movt(t2, t1, 4); |
| 3663 __ movt(t3, t1, 6); | 3663 __ movt(t3, t1, 6); |
| 3664 __ sw(t2, MemOperand(a0, OFFSET_OF(TestFloat, dOle)) ); | 3664 __ sw(t2, MemOperand(a0, offsetof(TestFloat, dOle)) ); |
| 3665 __ sw(t3, MemOperand(a0, OFFSET_OF(TestFloat, fOle)) ); | 3665 __ sw(t3, MemOperand(a0, offsetof(TestFloat, fOle)) ); |
| 3666 | 3666 |
| 3667 __ mov(t2, zero_reg); | 3667 __ mov(t2, zero_reg); |
| 3668 __ mov(t3, zero_reg); | 3668 __ mov(t3, zero_reg); |
| 3669 __ c_d(ULE, f4, f6, 6); | 3669 __ c_d(ULE, f4, f6, 6); |
| 3670 __ c_s(ULE, f14, f16, 0); | 3670 __ c_s(ULE, f14, f16, 0); |
| 3671 __ movt(t2, t1, 6); | 3671 __ movt(t2, t1, 6); |
| 3672 __ movt(t3, t1, 0); | 3672 __ movt(t3, t1, 0); |
| 3673 __ sw(t2, MemOperand(a0, OFFSET_OF(TestFloat, dUle)) ); | 3673 __ sw(t2, MemOperand(a0, offsetof(TestFloat, dUle)) ); |
| 3674 __ sw(t3, MemOperand(a0, OFFSET_OF(TestFloat, fUle)) ); | 3674 __ sw(t3, MemOperand(a0, offsetof(TestFloat, fUle)) ); |
| 3675 | 3675 |
| 3676 __ jr(ra); | 3676 __ jr(ra); |
| 3677 __ nop(); | 3677 __ nop(); |
| 3678 | 3678 |
| 3679 CodeDesc desc; | 3679 CodeDesc desc; |
| 3680 assm.GetCode(&desc); | 3680 assm.GetCode(&desc); |
| 3681 Handle<Code> code = isolate->factory()->NewCode( | 3681 Handle<Code> code = isolate->factory()->NewCode( |
| 3682 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 3682 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 3683 F3 f = FUNCTION_CAST<F3>(code->entry()); | 3683 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 3684 test.dOp1 = 2.0; | 3684 test.dOp1 = 2.0; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3805 float fUle; | 3805 float fUle; |
| 3806 float fOr; | 3806 float fOr; |
| 3807 float fUne; | 3807 float fUne; |
| 3808 float fNe; | 3808 float fNe; |
| 3809 } TestFloat; | 3809 } TestFloat; |
| 3810 | 3810 |
| 3811 TestFloat test; | 3811 TestFloat test; |
| 3812 | 3812 |
| 3813 __ li(t1, 1); | 3813 __ li(t1, 1); |
| 3814 | 3814 |
| 3815 __ ldc1(f4, MemOperand(a0, OFFSET_OF(TestFloat, dOp1))); | 3815 __ ldc1(f4, MemOperand(a0, offsetof(TestFloat, dOp1))); |
| 3816 __ ldc1(f6, MemOperand(a0, OFFSET_OF(TestFloat, dOp2))); | 3816 __ ldc1(f6, MemOperand(a0, offsetof(TestFloat, dOp2))); |
| 3817 | 3817 |
| 3818 __ lwc1(f14, MemOperand(a0, OFFSET_OF(TestFloat, fOp1))); | 3818 __ lwc1(f14, MemOperand(a0, offsetof(TestFloat, fOp1))); |
| 3819 __ lwc1(f16, MemOperand(a0, OFFSET_OF(TestFloat, fOp2))); | 3819 __ lwc1(f16, MemOperand(a0, offsetof(TestFloat, fOp2))); |
| 3820 | 3820 |
| 3821 __ cmp_d(F, f2, f4, f6); | 3821 __ cmp_d(F, f2, f4, f6); |
| 3822 __ cmp_s(F, f12, f14, f16); | 3822 __ cmp_s(F, f12, f14, f16); |
| 3823 __ sdc1(f2, MemOperand(a0, OFFSET_OF(TestFloat, dF)) ); | 3823 __ sdc1(f2, MemOperand(a0, offsetof(TestFloat, dF)) ); |
| 3824 __ swc1(f12, MemOperand(a0, OFFSET_OF(TestFloat, fF)) ); | 3824 __ swc1(f12, MemOperand(a0, offsetof(TestFloat, fF)) ); |
| 3825 | 3825 |
| 3826 __ cmp_d(UN, f2, f4, f6); | 3826 __ cmp_d(UN, f2, f4, f6); |
| 3827 __ cmp_s(UN, f12, f14, f16); | 3827 __ cmp_s(UN, f12, f14, f16); |
| 3828 __ sdc1(f2, MemOperand(a0, OFFSET_OF(TestFloat, dUn)) ); | 3828 __ sdc1(f2, MemOperand(a0, offsetof(TestFloat, dUn)) ); |
| 3829 __ swc1(f12, MemOperand(a0, OFFSET_OF(TestFloat, fUn)) ); | 3829 __ swc1(f12, MemOperand(a0, offsetof(TestFloat, fUn)) ); |
| 3830 | 3830 |
| 3831 __ cmp_d(EQ, f2, f4, f6); | 3831 __ cmp_d(EQ, f2, f4, f6); |
| 3832 __ cmp_s(EQ, f12, f14, f16); | 3832 __ cmp_s(EQ, f12, f14, f16); |
| 3833 __ sdc1(f2, MemOperand(a0, OFFSET_OF(TestFloat, dEq)) ); | 3833 __ sdc1(f2, MemOperand(a0, offsetof(TestFloat, dEq)) ); |
| 3834 __ swc1(f12, MemOperand(a0, OFFSET_OF(TestFloat, fEq)) ); | 3834 __ swc1(f12, MemOperand(a0, offsetof(TestFloat, fEq)) ); |
| 3835 | 3835 |
| 3836 __ cmp_d(UEQ, f2, f4, f6); | 3836 __ cmp_d(UEQ, f2, f4, f6); |
| 3837 __ cmp_s(UEQ, f12, f14, f16); | 3837 __ cmp_s(UEQ, f12, f14, f16); |
| 3838 __ sdc1(f2, MemOperand(a0, OFFSET_OF(TestFloat, dUeq)) ); | 3838 __ sdc1(f2, MemOperand(a0, offsetof(TestFloat, dUeq)) ); |
| 3839 __ swc1(f12, MemOperand(a0, OFFSET_OF(TestFloat, fUeq)) ); | 3839 __ swc1(f12, MemOperand(a0, offsetof(TestFloat, fUeq)) ); |
| 3840 | 3840 |
| 3841 __ cmp_d(LT, f2, f4, f6); | 3841 __ cmp_d(LT, f2, f4, f6); |
| 3842 __ cmp_s(LT, f12, f14, f16); | 3842 __ cmp_s(LT, f12, f14, f16); |
| 3843 __ sdc1(f2, MemOperand(a0, OFFSET_OF(TestFloat, dOlt)) ); | 3843 __ sdc1(f2, MemOperand(a0, offsetof(TestFloat, dOlt)) ); |
| 3844 __ swc1(f12, MemOperand(a0, OFFSET_OF(TestFloat, fOlt)) ); | 3844 __ swc1(f12, MemOperand(a0, offsetof(TestFloat, fOlt)) ); |
| 3845 | 3845 |
| 3846 __ cmp_d(ULT, f2, f4, f6); | 3846 __ cmp_d(ULT, f2, f4, f6); |
| 3847 __ cmp_s(ULT, f12, f14, f16); | 3847 __ cmp_s(ULT, f12, f14, f16); |
| 3848 __ sdc1(f2, MemOperand(a0, OFFSET_OF(TestFloat, dUlt)) ); | 3848 __ sdc1(f2, MemOperand(a0, offsetof(TestFloat, dUlt)) ); |
| 3849 __ swc1(f12, MemOperand(a0, OFFSET_OF(TestFloat, fUlt)) ); | 3849 __ swc1(f12, MemOperand(a0, offsetof(TestFloat, fUlt)) ); |
| 3850 | 3850 |
| 3851 __ cmp_d(LE, f2, f4, f6); | 3851 __ cmp_d(LE, f2, f4, f6); |
| 3852 __ cmp_s(LE, f12, f14, f16); | 3852 __ cmp_s(LE, f12, f14, f16); |
| 3853 __ sdc1(f2, MemOperand(a0, OFFSET_OF(TestFloat, dOle)) ); | 3853 __ sdc1(f2, MemOperand(a0, offsetof(TestFloat, dOle)) ); |
| 3854 __ swc1(f12, MemOperand(a0, OFFSET_OF(TestFloat, fOle)) ); | 3854 __ swc1(f12, MemOperand(a0, offsetof(TestFloat, fOle)) ); |
| 3855 | 3855 |
| 3856 __ cmp_d(ULE, f2, f4, f6); | 3856 __ cmp_d(ULE, f2, f4, f6); |
| 3857 __ cmp_s(ULE, f12, f14, f16); | 3857 __ cmp_s(ULE, f12, f14, f16); |
| 3858 __ sdc1(f2, MemOperand(a0, OFFSET_OF(TestFloat, dUle)) ); | 3858 __ sdc1(f2, MemOperand(a0, offsetof(TestFloat, dUle)) ); |
| 3859 __ swc1(f12, MemOperand(a0, OFFSET_OF(TestFloat, fUle)) ); | 3859 __ swc1(f12, MemOperand(a0, offsetof(TestFloat, fUle)) ); |
| 3860 | 3860 |
| 3861 __ cmp_d(ORD, f2, f4, f6); | 3861 __ cmp_d(ORD, f2, f4, f6); |
| 3862 __ cmp_s(ORD, f12, f14, f16); | 3862 __ cmp_s(ORD, f12, f14, f16); |
| 3863 __ sdc1(f2, MemOperand(a0, OFFSET_OF(TestFloat, dOr)) ); | 3863 __ sdc1(f2, MemOperand(a0, offsetof(TestFloat, dOr)) ); |
| 3864 __ swc1(f12, MemOperand(a0, OFFSET_OF(TestFloat, fOr)) ); | 3864 __ swc1(f12, MemOperand(a0, offsetof(TestFloat, fOr)) ); |
| 3865 | 3865 |
| 3866 __ cmp_d(UNE, f2, f4, f6); | 3866 __ cmp_d(UNE, f2, f4, f6); |
| 3867 __ cmp_s(UNE, f12, f14, f16); | 3867 __ cmp_s(UNE, f12, f14, f16); |
| 3868 __ sdc1(f2, MemOperand(a0, OFFSET_OF(TestFloat, dUne)) ); | 3868 __ sdc1(f2, MemOperand(a0, offsetof(TestFloat, dUne)) ); |
| 3869 __ swc1(f12, MemOperand(a0, OFFSET_OF(TestFloat, fUne)) ); | 3869 __ swc1(f12, MemOperand(a0, offsetof(TestFloat, fUne)) ); |
| 3870 | 3870 |
| 3871 __ cmp_d(NE, f2, f4, f6); | 3871 __ cmp_d(NE, f2, f4, f6); |
| 3872 __ cmp_s(NE, f12, f14, f16); | 3872 __ cmp_s(NE, f12, f14, f16); |
| 3873 __ sdc1(f2, MemOperand(a0, OFFSET_OF(TestFloat, dNe)) ); | 3873 __ sdc1(f2, MemOperand(a0, offsetof(TestFloat, dNe)) ); |
| 3874 __ swc1(f12, MemOperand(a0, OFFSET_OF(TestFloat, fNe)) ); | 3874 __ swc1(f12, MemOperand(a0, offsetof(TestFloat, fNe)) ); |
| 3875 | 3875 |
| 3876 __ jr(ra); | 3876 __ jr(ra); |
| 3877 __ nop(); | 3877 __ nop(); |
| 3878 | 3878 |
| 3879 CodeDesc desc; | 3879 CodeDesc desc; |
| 3880 assm.GetCode(&desc); | 3880 assm.GetCode(&desc); |
| 3881 Handle<Code> code = isolate->factory()->NewCode( | 3881 Handle<Code> code = isolate->factory()->NewCode( |
| 3882 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 3882 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 3883 F3 f = FUNCTION_CAST<F3>(code->entry()); | 3883 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 3884 uint64_t dTrue = 0xFFFFFFFFFFFFFFFF; | 3884 uint64_t dTrue = 0xFFFFFFFFFFFFFFFF; |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4022 } TestFloat; | 4022 } TestFloat; |
| 4023 | 4023 |
| 4024 TestFloat test; | 4024 TestFloat test; |
| 4025 | 4025 |
| 4026 // Save FCSR. | 4026 // Save FCSR. |
| 4027 __ cfc1(a1, FCSR); | 4027 __ cfc1(a1, FCSR); |
| 4028 // Disable FPU exceptions. | 4028 // Disable FPU exceptions. |
| 4029 __ ctc1(zero_reg, FCSR); | 4029 __ ctc1(zero_reg, FCSR); |
| 4030 | 4030 |
| 4031 #define GENERATE_CVT_TEST(x, y, z) \ | 4031 #define GENERATE_CVT_TEST(x, y, z) \ |
| 4032 __ y##c1(f0, MemOperand(a0, OFFSET_OF(TestFloat, x##_in))); \ | 4032 __ y##c1(f0, MemOperand(a0, offsetof(TestFloat, x##_in))); \ |
| 4033 __ x(f0, f0); \ | 4033 __ x(f0, f0); \ |
| 4034 __ nop(); \ | 4034 __ nop(); \ |
| 4035 __ z##c1(f0, MemOperand(a0, OFFSET_OF(TestFloat, x##_out))); | 4035 __ z##c1(f0, MemOperand(a0, offsetof(TestFloat, x##_out))); |
| 4036 | 4036 |
| 4037 GENERATE_CVT_TEST(cvt_d_s, lw, sd) | 4037 GENERATE_CVT_TEST(cvt_d_s, lw, sd) |
| 4038 GENERATE_CVT_TEST(cvt_d_w, lw, sd) | 4038 GENERATE_CVT_TEST(cvt_d_w, lw, sd) |
| 4039 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { | 4039 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { |
| 4040 GENERATE_CVT_TEST(cvt_d_l, ld, sd) | 4040 GENERATE_CVT_TEST(cvt_d_l, ld, sd) |
| 4041 } | 4041 } |
| 4042 | 4042 |
| 4043 if (IsFp64Mode()) { | 4043 if (IsFp64Mode()) { |
| 4044 GENERATE_CVT_TEST(cvt_l_s, lw, sd) | 4044 GENERATE_CVT_TEST(cvt_l_s, lw, sd) |
| 4045 GENERATE_CVT_TEST(cvt_l_d, ld, sd) | 4045 GENERATE_CVT_TEST(cvt_l_d, ld, sd) |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4238 float fRes; | 4238 float fRes; |
| 4239 } Test; | 4239 } Test; |
| 4240 | 4240 |
| 4241 Test test; | 4241 Test test; |
| 4242 | 4242 |
| 4243 // Save FCSR. | 4243 // Save FCSR. |
| 4244 __ cfc1(a1, FCSR); | 4244 __ cfc1(a1, FCSR); |
| 4245 // Disable FPU exceptions. | 4245 // Disable FPU exceptions. |
| 4246 __ ctc1(zero_reg, FCSR); | 4246 __ ctc1(zero_reg, FCSR); |
| 4247 | 4247 |
| 4248 __ ldc1(f4, MemOperand(a0, OFFSET_OF(Test, dOp1)) ); | 4248 __ ldc1(f4, MemOperand(a0, offsetof(Test, dOp1)) ); |
| 4249 __ ldc1(f2, MemOperand(a0, OFFSET_OF(Test, dOp2)) ); | 4249 __ ldc1(f2, MemOperand(a0, offsetof(Test, dOp2)) ); |
| 4250 __ nop(); | 4250 __ nop(); |
| 4251 __ div_d(f6, f4, f2); | 4251 __ div_d(f6, f4, f2); |
| 4252 __ sdc1(f6, MemOperand(a0, OFFSET_OF(Test, dRes)) ); | 4252 __ sdc1(f6, MemOperand(a0, offsetof(Test, dRes)) ); |
| 4253 | 4253 |
| 4254 __ lwc1(f4, MemOperand(a0, OFFSET_OF(Test, fOp1)) ); | 4254 __ lwc1(f4, MemOperand(a0, offsetof(Test, fOp1)) ); |
| 4255 __ lwc1(f2, MemOperand(a0, OFFSET_OF(Test, fOp2)) ); | 4255 __ lwc1(f2, MemOperand(a0, offsetof(Test, fOp2)) ); |
| 4256 __ nop(); | 4256 __ nop(); |
| 4257 __ div_s(f6, f4, f2); | 4257 __ div_s(f6, f4, f2); |
| 4258 __ swc1(f6, MemOperand(a0, OFFSET_OF(Test, fRes)) ); | 4258 __ swc1(f6, MemOperand(a0, offsetof(Test, fRes)) ); |
| 4259 | 4259 |
| 4260 // Restore FCSR. | 4260 // Restore FCSR. |
| 4261 __ ctc1(a1, FCSR); | 4261 __ ctc1(a1, FCSR); |
| 4262 | 4262 |
| 4263 __ jr(ra); | 4263 __ jr(ra); |
| 4264 __ nop(); | 4264 __ nop(); |
| 4265 CodeDesc desc; | 4265 CodeDesc desc; |
| 4266 assm.GetCode(&desc); | 4266 assm.GetCode(&desc); |
| 4267 Handle<Code> code = isolate->factory()->NewCode( | 4267 Handle<Code> code = isolate->factory()->NewCode( |
| 4268 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 4268 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4337 test.fOp1 = std::numeric_limits<float>::quiet_NaN(); | 4337 test.fOp1 = std::numeric_limits<float>::quiet_NaN(); |
| 4338 test.fOp2 = -5.0; | 4338 test.fOp2 = -5.0; |
| 4339 | 4339 |
| 4340 (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0)); | 4340 (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0)); |
| 4341 CHECK_EQ(true, std::isnan(test.dRes)); | 4341 CHECK_EQ(true, std::isnan(test.dRes)); |
| 4342 CHECK_EQ(true, std::isnan(test.fRes)); | 4342 CHECK_EQ(true, std::isnan(test.fRes)); |
| 4343 } | 4343 } |
| 4344 | 4344 |
| 4345 | 4345 |
| 4346 #undef __ | 4346 #undef __ |
| OLD | NEW |