Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Side by Side Diff: test/cctest/test-assembler-mips.cc

Issue 23534067: bulk replace Isolate::Current in tests (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-assembler-arm.cc ('k') | test/cctest/test-assembler-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 typedef Object* (*F1)(int x, int p1, int p2, int p3, int p4); 42 typedef Object* (*F1)(int x, int p1, int p2, int p3, int p4);
43 typedef Object* (*F2)(int x, int y, int p2, int p3, int p4); 43 typedef Object* (*F2)(int x, int y, int p2, int p3, int p4);
44 typedef Object* (*F3)(void* p, int p1, int p2, int p3, int p4); 44 typedef Object* (*F3)(void* p, int p1, int p2, int p3, int p4);
45 45
46 46
47 #define __ assm. 47 #define __ assm.
48 48
49 49
50 TEST(MIPS0) { 50 TEST(MIPS0) {
51 CcTest::InitializeVM(); 51 CcTest::InitializeVM();
52 Isolate* isolate = Isolate::Current(); 52 Isolate* isolate = CcTest::i_isolate();
53 HandleScope scope(isolate); 53 HandleScope scope(isolate);
54 54
55 MacroAssembler assm(isolate, NULL, 0); 55 MacroAssembler assm(isolate, NULL, 0);
56 56
57 // Addition. 57 // Addition.
58 __ addu(v0, a0, a1); 58 __ addu(v0, a0, a1);
59 __ jr(ra); 59 __ jr(ra);
60 __ nop(); 60 __ nop();
61 61
62 CodeDesc desc; 62 CodeDesc desc;
63 assm.GetCode(&desc); 63 assm.GetCode(&desc);
64 Object* code = HEAP->CreateCode( 64 Object* code = HEAP->CreateCode(
65 desc, 65 desc,
66 Code::ComputeFlags(Code::STUB), 66 Code::ComputeFlags(Code::STUB),
67 Handle<Code>())->ToObjectChecked(); 67 Handle<Code>())->ToObjectChecked();
68 CHECK(code->IsCode()); 68 CHECK(code->IsCode());
69 F2 f = FUNCTION_CAST<F2>(Code::cast(code)->entry()); 69 F2 f = FUNCTION_CAST<F2>(Code::cast(code)->entry());
70 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 0xab0, 0xc, 0, 0, 0)); 70 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 0xab0, 0xc, 0, 0, 0));
71 ::printf("f() = %d\n", res); 71 ::printf("f() = %d\n", res);
72 CHECK_EQ(0xabc, res); 72 CHECK_EQ(0xabc, res);
73 } 73 }
74 74
75 75
76 TEST(MIPS1) { 76 TEST(MIPS1) {
77 CcTest::InitializeVM(); 77 CcTest::InitializeVM();
78 Isolate* isolate = Isolate::Current(); 78 Isolate* isolate = CcTest::i_isolate();
79 HandleScope scope(isolate); 79 HandleScope scope(isolate);
80 80
81 MacroAssembler assm(isolate, NULL, 0); 81 MacroAssembler assm(isolate, NULL, 0);
82 Label L, C; 82 Label L, C;
83 83
84 __ mov(a1, a0); 84 __ mov(a1, a0);
85 __ li(v0, 0); 85 __ li(v0, 0);
86 __ b(&C); 86 __ b(&C);
87 __ nop(); 87 __ nop();
88 88
(...skipping 18 matching lines...) Expand all
107 CHECK(code->IsCode()); 107 CHECK(code->IsCode());
108 F1 f = FUNCTION_CAST<F1>(Code::cast(code)->entry()); 108 F1 f = FUNCTION_CAST<F1>(Code::cast(code)->entry());
109 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 50, 0, 0, 0, 0)); 109 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 50, 0, 0, 0, 0));
110 ::printf("f() = %d\n", res); 110 ::printf("f() = %d\n", res);
111 CHECK_EQ(1275, res); 111 CHECK_EQ(1275, res);
112 } 112 }
113 113
114 114
115 TEST(MIPS2) { 115 TEST(MIPS2) {
116 CcTest::InitializeVM(); 116 CcTest::InitializeVM();
117 Isolate* isolate = Isolate::Current(); 117 Isolate* isolate = CcTest::i_isolate();
118 HandleScope scope(isolate); 118 HandleScope scope(isolate);
119 119
120 MacroAssembler assm(isolate, NULL, 0); 120 MacroAssembler assm(isolate, NULL, 0);
121 121
122 Label exit, error; 122 Label exit, error;
123 123
124 // ----- Test all instructions. 124 // ----- Test all instructions.
125 125
126 // Test lui, ori, and addiu, used in the li pseudo-instruction. 126 // Test lui, ori, and addiu, used in the li pseudo-instruction.
127 // This way we can then safely load registers with chosen values. 127 // This way we can then safely load registers with chosen values.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 F2 f = FUNCTION_CAST<F2>(Code::cast(code)->entry()); 249 F2 f = FUNCTION_CAST<F2>(Code::cast(code)->entry());
250 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 0xab0, 0xc, 0, 0, 0)); 250 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 0xab0, 0xc, 0, 0, 0));
251 ::printf("f() = %d\n", res); 251 ::printf("f() = %d\n", res);
252 CHECK_EQ(0x31415926, res); 252 CHECK_EQ(0x31415926, res);
253 } 253 }
254 254
255 255
256 TEST(MIPS3) { 256 TEST(MIPS3) {
257 // Test floating point instructions. 257 // Test floating point instructions.
258 CcTest::InitializeVM(); 258 CcTest::InitializeVM();
259 Isolate* isolate = Isolate::Current(); 259 Isolate* isolate = CcTest::i_isolate();
260 HandleScope scope(isolate); 260 HandleScope scope(isolate);
261 261
262 typedef struct { 262 typedef struct {
263 double a; 263 double a;
264 double b; 264 double b;
265 double c; 265 double c;
266 double d; 266 double d;
267 double e; 267 double e;
268 double f; 268 double f;
269 double g; 269 double g;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 CHECK_EQ(10.97451593465515908537, t.g); 339 CHECK_EQ(10.97451593465515908537, t.g);
340 if (kArchVariant == kMips32r2) { 340 if (kArchVariant == kMips32r2) {
341 CHECK_EQ(6.875, t.h); 341 CHECK_EQ(6.875, t.h);
342 } 342 }
343 } 343 }
344 344
345 345
346 TEST(MIPS4) { 346 TEST(MIPS4) {
347 // Test moves between floating point and integer registers. 347 // Test moves between floating point and integer registers.
348 CcTest::InitializeVM(); 348 CcTest::InitializeVM();
349 Isolate* isolate = Isolate::Current(); 349 Isolate* isolate = CcTest::i_isolate();
350 HandleScope scope(isolate); 350 HandleScope scope(isolate);
351 351
352 typedef struct { 352 typedef struct {
353 double a; 353 double a;
354 double b; 354 double b;
355 double c; 355 double c;
356 } T; 356 } T;
357 T t; 357 T t;
358 358
359 Assembler assm(isolate, NULL, 0); 359 Assembler assm(isolate, NULL, 0);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 396
397 CHECK_EQ(2.75e11, t.a); 397 CHECK_EQ(2.75e11, t.a);
398 CHECK_EQ(2.75e11, t.b); 398 CHECK_EQ(2.75e11, t.b);
399 CHECK_EQ(1.5e22, t.c); 399 CHECK_EQ(1.5e22, t.c);
400 } 400 }
401 401
402 402
403 TEST(MIPS5) { 403 TEST(MIPS5) {
404 // Test conversions between doubles and integers. 404 // Test conversions between doubles and integers.
405 CcTest::InitializeVM(); 405 CcTest::InitializeVM();
406 Isolate* isolate = Isolate::Current(); 406 Isolate* isolate = CcTest::i_isolate();
407 HandleScope scope(isolate); 407 HandleScope scope(isolate);
408 408
409 typedef struct { 409 typedef struct {
410 double a; 410 double a;
411 double b; 411 double b;
412 int i; 412 int i;
413 int j; 413 int j;
414 } T; 414 } T;
415 T t; 415 T t;
416 416
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 CHECK_EQ(12345678.0, t.a); 464 CHECK_EQ(12345678.0, t.a);
465 CHECK_EQ(-100000.0, t.b); 465 CHECK_EQ(-100000.0, t.b);
466 CHECK_EQ(15000, t.i); 466 CHECK_EQ(15000, t.i);
467 CHECK_EQ(275000000, t.j); 467 CHECK_EQ(275000000, t.j);
468 } 468 }
469 469
470 470
471 TEST(MIPS6) { 471 TEST(MIPS6) {
472 // Test simple memory loads and stores. 472 // Test simple memory loads and stores.
473 CcTest::InitializeVM(); 473 CcTest::InitializeVM();
474 Isolate* isolate = Isolate::Current(); 474 Isolate* isolate = CcTest::i_isolate();
475 HandleScope scope(isolate); 475 HandleScope scope(isolate);
476 476
477 typedef struct { 477 typedef struct {
478 uint32_t ui; 478 uint32_t ui;
479 int32_t si; 479 int32_t si;
480 int32_t r1; 480 int32_t r1;
481 int32_t r2; 481 int32_t r2;
482 int32_t r3; 482 int32_t r3;
483 int32_t r4; 483 int32_t r4;
484 int32_t r5; 484 int32_t r5;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 CHECK_EQ(0xffffbbcc, t.r3); 537 CHECK_EQ(0xffffbbcc, t.r3);
538 CHECK_EQ(0x0000bbcc, t.r4); 538 CHECK_EQ(0x0000bbcc, t.r4);
539 CHECK_EQ(0xffffffcc, t.r5); 539 CHECK_EQ(0xffffffcc, t.r5);
540 CHECK_EQ(0x3333bbcc, t.r6); 540 CHECK_EQ(0x3333bbcc, t.r6);
541 } 541 }
542 542
543 543
544 TEST(MIPS7) { 544 TEST(MIPS7) {
545 // Test floating point compare and branch instructions. 545 // Test floating point compare and branch instructions.
546 CcTest::InitializeVM(); 546 CcTest::InitializeVM();
547 Isolate* isolate = Isolate::Current(); 547 Isolate* isolate = CcTest::i_isolate();
548 HandleScope scope(isolate); 548 HandleScope scope(isolate);
549 549
550 typedef struct { 550 typedef struct {
551 double a; 551 double a;
552 double b; 552 double b;
553 double c; 553 double c;
554 double d; 554 double d;
555 double e; 555 double e;
556 double f; 556 double f;
557 int32_t result; 557 int32_t result;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 USE(dummy); 615 USE(dummy);
616 CHECK_EQ(1.5e14, t.a); 616 CHECK_EQ(1.5e14, t.a);
617 CHECK_EQ(2.75e11, t.b); 617 CHECK_EQ(2.75e11, t.b);
618 CHECK_EQ(1, t.result); 618 CHECK_EQ(1, t.result);
619 } 619 }
620 620
621 621
622 TEST(MIPS8) { 622 TEST(MIPS8) {
623 // Test ROTR and ROTRV instructions. 623 // Test ROTR and ROTRV instructions.
624 CcTest::InitializeVM(); 624 CcTest::InitializeVM();
625 Isolate* isolate = Isolate::Current(); 625 Isolate* isolate = CcTest::i_isolate();
626 HandleScope scope(isolate); 626 HandleScope scope(isolate);
627 627
628 typedef struct { 628 typedef struct {
629 int32_t input; 629 int32_t input;
630 int32_t result_rotr_4; 630 int32_t result_rotr_4;
631 int32_t result_rotr_8; 631 int32_t result_rotr_8;
632 int32_t result_rotr_12; 632 int32_t result_rotr_12;
633 int32_t result_rotr_16; 633 int32_t result_rotr_16;
634 int32_t result_rotr_20; 634 int32_t result_rotr_20;
635 int32_t result_rotr_24; 635 int32_t result_rotr_24;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 CHECK_EQ(0x56781234, t.result_rotrv_16); 720 CHECK_EQ(0x56781234, t.result_rotrv_16);
721 CHECK_EQ(0x45678123, t.result_rotrv_20); 721 CHECK_EQ(0x45678123, t.result_rotrv_20);
722 CHECK_EQ(0x34567812, t.result_rotrv_24); 722 CHECK_EQ(0x34567812, t.result_rotrv_24);
723 CHECK_EQ(0x23456781, t.result_rotrv_28); 723 CHECK_EQ(0x23456781, t.result_rotrv_28);
724 } 724 }
725 725
726 726
727 TEST(MIPS9) { 727 TEST(MIPS9) {
728 // Test BRANCH improvements. 728 // Test BRANCH improvements.
729 CcTest::InitializeVM(); 729 CcTest::InitializeVM();
730 Isolate* isolate = Isolate::Current(); 730 Isolate* isolate = CcTest::i_isolate();
731 HandleScope scope(isolate); 731 HandleScope scope(isolate);
732 732
733 MacroAssembler assm(isolate, NULL, 0); 733 MacroAssembler assm(isolate, NULL, 0);
734 Label exit, exit2, exit3; 734 Label exit, exit2, exit3;
735 735
736 __ Branch(&exit, ge, a0, Operand(0x00000000)); 736 __ Branch(&exit, ge, a0, Operand(0x00000000));
737 __ Branch(&exit2, ge, a0, Operand(0x00001FFF)); 737 __ Branch(&exit2, ge, a0, Operand(0x00001FFF));
738 __ Branch(&exit3, ge, a0, Operand(0x0001FFFF)); 738 __ Branch(&exit3, ge, a0, Operand(0x0001FFFF));
739 739
740 __ bind(&exit); 740 __ bind(&exit);
741 __ bind(&exit2); 741 __ bind(&exit2);
742 __ bind(&exit3); 742 __ bind(&exit3);
743 __ jr(ra); 743 __ jr(ra);
744 __ nop(); 744 __ nop();
745 745
746 CodeDesc desc; 746 CodeDesc desc;
747 assm.GetCode(&desc); 747 assm.GetCode(&desc);
748 Object* code = HEAP->CreateCode( 748 Object* code = HEAP->CreateCode(
749 desc, 749 desc,
750 Code::ComputeFlags(Code::STUB), 750 Code::ComputeFlags(Code::STUB),
751 Handle<Code>())->ToObjectChecked(); 751 Handle<Code>())->ToObjectChecked();
752 CHECK(code->IsCode()); 752 CHECK(code->IsCode());
753 } 753 }
754 754
755 755
756 TEST(MIPS10) { 756 TEST(MIPS10) {
757 // Test conversions between doubles and long integers. 757 // Test conversions between doubles and long integers.
758 // Test hos the long ints map to FP regs pairs. 758 // Test hos the long ints map to FP regs pairs.
759 CcTest::InitializeVM(); 759 CcTest::InitializeVM();
760 Isolate* isolate = Isolate::Current(); 760 Isolate* isolate = CcTest::i_isolate();
761 HandleScope scope(isolate); 761 HandleScope scope(isolate);
762 762
763 typedef struct { 763 typedef struct {
764 double a; 764 double a;
765 double b; 765 double b;
766 int32_t dbl_mant; 766 int32_t dbl_mant;
767 int32_t dbl_exp; 767 int32_t dbl_exp;
768 int32_t long_hi; 768 int32_t long_hi;
769 int32_t long_lo; 769 int32_t long_lo;
770 int32_t b_long_hi; 770 int32_t b_long_hi;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 CHECK_EQ(0x7fffffff, t.long_lo); 823 CHECK_EQ(0x7fffffff, t.long_lo);
824 // 0xFF00FF00FF -> 1.095233372415e12. 824 // 0xFF00FF00FF -> 1.095233372415e12.
825 CHECK_EQ(1.095233372415e12, t.b); 825 CHECK_EQ(1.095233372415e12, t.b);
826 } 826 }
827 } 827 }
828 828
829 829
830 TEST(MIPS11) { 830 TEST(MIPS11) {
831 // Test LWL, LWR, SWL and SWR instructions. 831 // Test LWL, LWR, SWL and SWR instructions.
832 CcTest::InitializeVM(); 832 CcTest::InitializeVM();
833 Isolate* isolate = Isolate::Current(); 833 Isolate* isolate = CcTest::i_isolate();
834 HandleScope scope(isolate); 834 HandleScope scope(isolate);
835 835
836 typedef struct { 836 typedef struct {
837 int32_t reg_init; 837 int32_t reg_init;
838 int32_t mem_init; 838 int32_t mem_init;
839 int32_t lwl_0; 839 int32_t lwl_0;
840 int32_t lwl_1; 840 int32_t lwl_1;
841 int32_t lwl_2; 841 int32_t lwl_2;
842 int32_t lwl_3; 842 int32_t lwl_3;
843 int32_t lwr_0; 843 int32_t lwr_0;
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 967
968 CHECK_EQ(0xaabbccdd, t.swr_0); 968 CHECK_EQ(0xaabbccdd, t.swr_0);
969 CHECK_EQ(0xbbccdd44, t.swr_1); 969 CHECK_EQ(0xbbccdd44, t.swr_1);
970 CHECK_EQ(0xccdd3344, t.swr_2); 970 CHECK_EQ(0xccdd3344, t.swr_2);
971 CHECK_EQ(0xdd223344, t.swr_3); 971 CHECK_EQ(0xdd223344, t.swr_3);
972 } 972 }
973 973
974 974
975 TEST(MIPS12) { 975 TEST(MIPS12) {
976 CcTest::InitializeVM(); 976 CcTest::InitializeVM();
977 Isolate* isolate = Isolate::Current(); 977 Isolate* isolate = CcTest::i_isolate();
978 HandleScope scope(isolate); 978 HandleScope scope(isolate);
979 979
980 typedef struct { 980 typedef struct {
981 int32_t x; 981 int32_t x;
982 int32_t y; 982 int32_t y;
983 int32_t y1; 983 int32_t y1;
984 int32_t y2; 984 int32_t y2;
985 int32_t y3; 985 int32_t y3;
986 int32_t y4; 986 int32_t y4;
987 } T; 987 } T;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0); 1059 Object* dummy = CALL_GENERATED_CODE(f, &t, 0, 0, 0, 0);
1060 USE(dummy); 1060 USE(dummy);
1061 1061
1062 CHECK_EQ(3, t.y1); 1062 CHECK_EQ(3, t.y1);
1063 } 1063 }
1064 1064
1065 1065
1066 TEST(MIPS13) { 1066 TEST(MIPS13) {
1067 // Test Cvt_d_uw and Trunc_uw_d macros. 1067 // Test Cvt_d_uw and Trunc_uw_d macros.
1068 CcTest::InitializeVM(); 1068 CcTest::InitializeVM();
1069 Isolate* isolate = Isolate::Current(); 1069 Isolate* isolate = CcTest::i_isolate();
1070 HandleScope scope(isolate); 1070 HandleScope scope(isolate);
1071 1071
1072 typedef struct { 1072 typedef struct {
1073 double cvt_big_out; 1073 double cvt_big_out;
1074 double cvt_small_out; 1074 double cvt_small_out;
1075 uint32_t trunc_big_out; 1075 uint32_t trunc_big_out;
1076 uint32_t trunc_small_out; 1076 uint32_t trunc_small_out;
1077 uint32_t cvt_big_in; 1077 uint32_t cvt_big_in;
1078 uint32_t cvt_small_in; 1078 uint32_t cvt_small_in;
1079 } T; 1079 } T;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 1118
1119 CHECK_EQ(static_cast<int>(t.trunc_big_out), static_cast<int>(t.cvt_big_in)); 1119 CHECK_EQ(static_cast<int>(t.trunc_big_out), static_cast<int>(t.cvt_big_in));
1120 CHECK_EQ(static_cast<int>(t.trunc_small_out), 1120 CHECK_EQ(static_cast<int>(t.trunc_small_out),
1121 static_cast<int>(t.cvt_small_in)); 1121 static_cast<int>(t.cvt_small_in));
1122 } 1122 }
1123 1123
1124 1124
1125 TEST(MIPS14) { 1125 TEST(MIPS14) {
1126 // Test round, floor, ceil, trunc, cvt. 1126 // Test round, floor, ceil, trunc, cvt.
1127 CcTest::InitializeVM(); 1127 CcTest::InitializeVM();
1128 Isolate* isolate = Isolate::Current(); 1128 Isolate* isolate = CcTest::i_isolate();
1129 HandleScope scope(isolate); 1129 HandleScope scope(isolate);
1130 1130
1131 #define ROUND_STRUCT_ELEMENT(x) \ 1131 #define ROUND_STRUCT_ELEMENT(x) \
1132 int32_t x##_up_out; \ 1132 int32_t x##_up_out; \
1133 int32_t x##_down_out; \ 1133 int32_t x##_down_out; \
1134 int32_t neg_##x##_up_out; \ 1134 int32_t neg_##x##_up_out; \
1135 int32_t neg_##x##_down_out; \ 1135 int32_t neg_##x##_down_out; \
1136 uint32_t x##_err1_out; \ 1136 uint32_t x##_err1_out; \
1137 uint32_t x##_err2_out; \ 1137 uint32_t x##_err2_out; \
1138 uint32_t x##_err3_out; \ 1138 uint32_t x##_err3_out; \
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
1251 CHECK_ROUND_RESULT(round); 1251 CHECK_ROUND_RESULT(round);
1252 CHECK_ROUND_RESULT(floor); 1252 CHECK_ROUND_RESULT(floor);
1253 CHECK_ROUND_RESULT(ceil); 1253 CHECK_ROUND_RESULT(ceil);
1254 CHECK_ROUND_RESULT(cvt); 1254 CHECK_ROUND_RESULT(cvt);
1255 } 1255 }
1256 1256
1257 1257
1258 TEST(MIPS15) { 1258 TEST(MIPS15) {
1259 // Test chaining of label usages within instructions (issue 1644). 1259 // Test chaining of label usages within instructions (issue 1644).
1260 CcTest::InitializeVM(); 1260 CcTest::InitializeVM();
1261 Isolate* isolate = Isolate::Current(); 1261 Isolate* isolate = CcTest::i_isolate();
1262 HandleScope scope(isolate); 1262 HandleScope scope(isolate);
1263 Assembler assm(isolate, NULL, 0); 1263 Assembler assm(isolate, NULL, 0);
1264 1264
1265 Label target; 1265 Label target;
1266 __ beq(v0, v1, &target); 1266 __ beq(v0, v1, &target);
1267 __ nop(); 1267 __ nop();
1268 __ bne(v0, v1, &target); 1268 __ bne(v0, v1, &target);
1269 __ nop(); 1269 __ nop();
1270 __ bind(&target); 1270 __ bind(&target);
1271 __ nop(); 1271 __ nop();
1272 } 1272 }
1273 1273
1274 #undef __ 1274 #undef __
OLDNEW
« no previous file with comments | « test/cctest/test-assembler-arm.cc ('k') | test/cctest/test-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698