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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 82 |
83 | 83 |
84 TEST(1) { | 84 TEST(1) { |
85 InitializeVM(); | 85 InitializeVM(); |
86 v8::HandleScope scope; | 86 v8::HandleScope scope; |
87 | 87 |
88 Assembler assm(Isolate::Current(), NULL, 0); | 88 Assembler assm(Isolate::Current(), NULL, 0); |
89 Label L, C; | 89 Label L, C; |
90 | 90 |
91 __ mov(r1, Operand(r0)); | 91 __ mov(r1, Operand(r0)); |
92 __ mov(r0, Operand(0, RelocInfo::NONE)); | 92 __ mov(r0, Operand(0, RelocInfo::NONE32)); |
93 __ b(&C); | 93 __ b(&C); |
94 | 94 |
95 __ bind(&L); | 95 __ bind(&L); |
96 __ add(r0, r0, Operand(r1)); | 96 __ add(r0, r0, Operand(r1)); |
97 __ sub(r1, r1, Operand(1)); | 97 __ sub(r1, r1, Operand(1)); |
98 | 98 |
99 __ bind(&C); | 99 __ bind(&C); |
100 __ teq(r1, Operand(0, RelocInfo::NONE)); | 100 __ teq(r1, Operand(0, RelocInfo::NONE32)); |
101 __ b(ne, &L); | 101 __ b(ne, &L); |
102 __ mov(pc, Operand(lr)); | 102 __ mov(pc, Operand(lr)); |
103 | 103 |
104 CodeDesc desc; | 104 CodeDesc desc; |
105 assm.GetCode(&desc); | 105 assm.GetCode(&desc); |
106 Object* code = HEAP->CreateCode( | 106 Object* code = HEAP->CreateCode( |
107 desc, | 107 desc, |
108 Code::ComputeFlags(Code::STUB), | 108 Code::ComputeFlags(Code::STUB), |
109 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked(); | 109 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked(); |
110 CHECK(code->IsCode()); | 110 CHECK(code->IsCode()); |
(...skipping 16 matching lines...) Expand all Loading... |
127 | 127 |
128 __ mov(r1, Operand(r0)); | 128 __ mov(r1, Operand(r0)); |
129 __ mov(r0, Operand(1)); | 129 __ mov(r0, Operand(1)); |
130 __ b(&C); | 130 __ b(&C); |
131 | 131 |
132 __ bind(&L); | 132 __ bind(&L); |
133 __ mul(r0, r1, r0); | 133 __ mul(r0, r1, r0); |
134 __ sub(r1, r1, Operand(1)); | 134 __ sub(r1, r1, Operand(1)); |
135 | 135 |
136 __ bind(&C); | 136 __ bind(&C); |
137 __ teq(r1, Operand(0, RelocInfo::NONE)); | 137 __ teq(r1, Operand(0, RelocInfo::NONE32)); |
138 __ b(ne, &L); | 138 __ b(ne, &L); |
139 __ mov(pc, Operand(lr)); | 139 __ mov(pc, Operand(lr)); |
140 | 140 |
141 // some relocated stuff here, not executed | 141 // some relocated stuff here, not executed |
142 __ RecordComment("dead code, just testing relocations"); | 142 __ RecordComment("dead code, just testing relocations"); |
143 __ mov(r0, Operand(FACTORY->true_value())); | 143 __ mov(r0, Operand(FACTORY->true_value())); |
144 __ RecordComment("dead code, just testing immediate operands"); | 144 __ RecordComment("dead code, just testing immediate operands"); |
145 __ mov(r0, Operand(-1)); | 145 __ mov(r0, Operand(-1)); |
146 __ mov(r0, Operand(0xFF000000)); | 146 __ mov(r0, Operand(0xFF000000)); |
147 __ mov(r0, Operand(0xF0F0F0F0)); | 147 __ mov(r0, Operand(0xF0F0F0F0)); |
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1020 Assembler assm(Isolate::Current(), NULL, 0); | 1020 Assembler assm(Isolate::Current(), NULL, 0); |
1021 | 1021 |
1022 Label target; | 1022 Label target; |
1023 __ b(eq, &target); | 1023 __ b(eq, &target); |
1024 __ b(ne, &target); | 1024 __ b(ne, &target); |
1025 __ bind(&target); | 1025 __ bind(&target); |
1026 __ nop(); | 1026 __ nop(); |
1027 } | 1027 } |
1028 | 1028 |
1029 #undef __ | 1029 #undef __ |
OLD | NEW |