| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <assert.h> // For assert | 5 #include <assert.h> // For assert |
| 6 #include <limits.h> // For LONG_MIN, LONG_MAX. | 6 #include <limits.h> // For LONG_MIN, LONG_MAX. |
| 7 | 7 |
| 8 #if V8_TARGET_ARCH_S390 | 8 #if V8_TARGET_ARCH_S390 |
| 9 | 9 |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 bind(&start); | 119 bind(&start); |
| 120 #endif | 120 #endif |
| 121 | 121 |
| 122 mov(ip, Operand(reinterpret_cast<intptr_t>(target), rmode)); | 122 mov(ip, Operand(reinterpret_cast<intptr_t>(target), rmode)); |
| 123 basr(r14, ip); | 123 basr(r14, ip); |
| 124 | 124 |
| 125 DCHECK_EQ(expected_size, SizeOfCodeGeneratedSince(&start)); | 125 DCHECK_EQ(expected_size, SizeOfCodeGeneratedSince(&start)); |
| 126 } | 126 } |
| 127 | 127 |
| 128 int MacroAssembler::CallSize(Handle<Code> code, RelocInfo::Mode rmode, | 128 int MacroAssembler::CallSize(Handle<Code> code, RelocInfo::Mode rmode, |
| 129 TypeFeedbackId ast_id, Condition cond) { | 129 Condition cond) { |
| 130 return 6; // BRASL | 130 return 6; // BRASL |
| 131 } | 131 } |
| 132 | 132 |
| 133 void MacroAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode, | 133 void MacroAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode, |
| 134 TypeFeedbackId ast_id, Condition cond) { | 134 Condition cond) { |
| 135 DCHECK(RelocInfo::IsCodeTarget(rmode) && cond == al); | 135 DCHECK(RelocInfo::IsCodeTarget(rmode) && cond == al); |
| 136 | 136 |
| 137 #ifdef DEBUG | 137 #ifdef DEBUG |
| 138 // Check the expected size before generating code to ensure we assume the same | 138 // Check the expected size before generating code to ensure we assume the same |
| 139 // constant pool availability (e.g., whether constant pool is full or not). | 139 // constant pool availability (e.g., whether constant pool is full or not). |
| 140 int expected_size = CallSize(code, rmode, ast_id, cond); | 140 int expected_size = CallSize(code, rmode, cond); |
| 141 Label start; | 141 Label start; |
| 142 bind(&start); | 142 bind(&start); |
| 143 #endif | 143 #endif |
| 144 call(code, rmode, ast_id); | 144 call(code, rmode); |
| 145 DCHECK_EQ(expected_size, SizeOfCodeGeneratedSince(&start)); | 145 DCHECK_EQ(expected_size, SizeOfCodeGeneratedSince(&start)); |
| 146 } | 146 } |
| 147 | 147 |
| 148 void MacroAssembler::Drop(int count) { | 148 void MacroAssembler::Drop(int count) { |
| 149 if (count > 0) { | 149 if (count > 0) { |
| 150 int total = count * kPointerSize; | 150 int total = count * kPointerSize; |
| 151 if (is_uint12(total)) { | 151 if (is_uint12(total)) { |
| 152 la(sp, MemOperand(sp, total)); | 152 la(sp, MemOperand(sp, total)); |
| 153 } else if (is_int20(total)) { | 153 } else if (is_int20(total)) { |
| 154 lay(sp, MemOperand(sp, total)); | 154 lay(sp, MemOperand(sp, total)); |
| (...skipping 1779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1934 LoadP(result, FieldMemOperand(map, Map::kConstructorOrBackPointerOffset)); | 1934 LoadP(result, FieldMemOperand(map, Map::kConstructorOrBackPointerOffset)); |
| 1935 bind(&loop); | 1935 bind(&loop); |
| 1936 JumpIfSmi(result, &done); | 1936 JumpIfSmi(result, &done); |
| 1937 CompareObjectType(result, temp, temp2, MAP_TYPE); | 1937 CompareObjectType(result, temp, temp2, MAP_TYPE); |
| 1938 bne(&done); | 1938 bne(&done); |
| 1939 LoadP(result, FieldMemOperand(result, Map::kConstructorOrBackPointerOffset)); | 1939 LoadP(result, FieldMemOperand(result, Map::kConstructorOrBackPointerOffset)); |
| 1940 b(&loop); | 1940 b(&loop); |
| 1941 bind(&done); | 1941 bind(&done); |
| 1942 } | 1942 } |
| 1943 | 1943 |
| 1944 void MacroAssembler::CallStub(CodeStub* stub, TypeFeedbackId ast_id, | 1944 void MacroAssembler::CallStub(CodeStub* stub, Condition cond) { |
| 1945 Condition cond) { | |
| 1946 DCHECK(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs. | 1945 DCHECK(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs. |
| 1947 Call(stub->GetCode(), RelocInfo::CODE_TARGET, ast_id, cond); | 1946 Call(stub->GetCode(), RelocInfo::CODE_TARGET, cond); |
| 1948 } | 1947 } |
| 1949 | 1948 |
| 1950 void MacroAssembler::TailCallStub(CodeStub* stub, Condition cond) { | 1949 void MacroAssembler::TailCallStub(CodeStub* stub, Condition cond) { |
| 1951 Jump(stub->GetCode(), RelocInfo::CODE_TARGET, cond); | 1950 Jump(stub->GetCode(), RelocInfo::CODE_TARGET, cond); |
| 1952 } | 1951 } |
| 1953 | 1952 |
| 1954 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { | 1953 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { |
| 1955 return has_frame_ || !stub->SometimesSetsUpAFrame(); | 1954 return has_frame_ || !stub->SometimesSetsUpAFrame(); |
| 1956 } | 1955 } |
| 1957 | 1956 |
| (...skipping 3428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5386 } | 5385 } |
| 5387 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); | 5386 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); |
| 5388 ExtractBit(r0, dividend, 31); | 5387 ExtractBit(r0, dividend, 31); |
| 5389 AddP(result, r0); | 5388 AddP(result, r0); |
| 5390 } | 5389 } |
| 5391 | 5390 |
| 5392 } // namespace internal | 5391 } // namespace internal |
| 5393 } // namespace v8 | 5392 } // namespace v8 |
| 5394 | 5393 |
| 5395 #endif // V8_TARGET_ARCH_S390 | 5394 #endif // V8_TARGET_ARCH_S390 |
| OLD | NEW |