| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 5 #ifndef V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
| 6 #define V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 6 #define V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
| 7 | 7 |
| 8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
| 9 #include "src/globals.h" | 9 #include "src/globals.h" |
| 10 #include "src/mips/assembler-mips.h" | 10 #include "src/mips/assembler-mips.h" |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 | 298 |
| 299 void Move(FPURegister dst, float imm); | 299 void Move(FPURegister dst, float imm); |
| 300 void Move(FPURegister dst, double imm); | 300 void Move(FPURegister dst, double imm); |
| 301 | 301 |
| 302 // Conditional move. | 302 // Conditional move. |
| 303 void Movz(Register rd, Register rs, Register rt); | 303 void Movz(Register rd, Register rs, Register rt); |
| 304 void Movn(Register rd, Register rs, Register rt); | 304 void Movn(Register rd, Register rs, Register rt); |
| 305 void Movt(Register rd, Register rs, uint16_t cc = 0); | 305 void Movt(Register rd, Register rs, uint16_t cc = 0); |
| 306 void Movf(Register rd, Register rs, uint16_t cc = 0); | 306 void Movf(Register rd, Register rs, uint16_t cc = 0); |
| 307 | 307 |
| 308 // Min, Max macros. | |
| 309 // On pre-r6 these functions may modify at and t8 registers. | |
| 310 void MinNaNCheck_d(FPURegister dst, FPURegister src1, FPURegister src2, | |
| 311 Label* nan = nullptr); | |
| 312 void MaxNaNCheck_d(FPURegister dst, FPURegister src1, FPURegister src2, | |
| 313 Label* nan = nullptr); | |
| 314 void MinNaNCheck_s(FPURegister dst, FPURegister src1, FPURegister src2, | |
| 315 Label* nan = nullptr); | |
| 316 void MaxNaNCheck_s(FPURegister dst, FPURegister src1, FPURegister src2, | |
| 317 Label* nan = nullptr); | |
| 318 | |
| 319 void Clz(Register rd, Register rs); | 308 void Clz(Register rd, Register rs); |
| 320 | 309 |
| 321 // Jump unconditionally to given label. | 310 // Jump unconditionally to given label. |
| 322 // We NEED a nop in the branch delay slot, as it used by v8, for example in | 311 // We NEED a nop in the branch delay slot, as it used by v8, for example in |
| 323 // CodeGenerator::ProcessDeferred(). | 312 // CodeGenerator::ProcessDeferred(). |
| 324 // Currently the branch delay slot is filled by the MacroAssembler. | 313 // Currently the branch delay slot is filled by the MacroAssembler. |
| 325 // Use rather b(Label) for code generation. | 314 // Use rather b(Label) for code generation. |
| 326 void jmp(Label* L) { | 315 void jmp(Label* L) { |
| 327 Branch(L); | 316 Branch(L); |
| 328 } | 317 } |
| (...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1289 } | 1278 } |
| 1290 | 1279 |
| 1291 void MulBranchOvf(Register dst, Register left, const Operand& right, | 1280 void MulBranchOvf(Register dst, Register left, const Operand& right, |
| 1292 Label* overflow_label, Label* no_overflow_label, | 1281 Label* overflow_label, Label* no_overflow_label, |
| 1293 Register scratch = at); | 1282 Register scratch = at); |
| 1294 | 1283 |
| 1295 void MulBranchOvf(Register dst, Register left, Register right, | 1284 void MulBranchOvf(Register dst, Register left, Register right, |
| 1296 Label* overflow_label, Label* no_overflow_label, | 1285 Label* overflow_label, Label* no_overflow_label, |
| 1297 Register scratch = at); | 1286 Register scratch = at); |
| 1298 | 1287 |
| 1288 // Perform a floating-point min or max operation with the |
| 1289 // (IEEE-754-compatible) semantics of MIPS32's Release 6 MIN.fmt/MAX.fmt. |
| 1290 // Some cases, typically NaNs or +/-0.0, are expected to be rare and are |
| 1291 // handled in out-of-line code. The specific behaviour depends on supported |
| 1292 // instructions. |
| 1293 // |
| 1294 // These functions assume (and assert) that !src1.is(src2). It is permitted |
| 1295 // for the result to alias either input register. |
| 1296 void Float32Max(FPURegister dst, FPURegister src1, FPURegister src2, |
| 1297 Label* out_of_line); |
| 1298 void Float32Min(FPURegister dst, FPURegister src1, FPURegister src2, |
| 1299 Label* out_of_line); |
| 1300 void Float64Max(DoubleRegister dst, DoubleRegister src1, DoubleRegister src2, |
| 1301 Label* out_of_line); |
| 1302 void Float64Min(DoubleRegister dst, DoubleRegister src1, DoubleRegister src2, |
| 1303 Label* out_of_line); |
| 1304 |
| 1305 // Generate out-of-line cases for the macros above. |
| 1306 void Float32MaxOutOfLine(FPURegister dst, FPURegister src1, FPURegister src2); |
| 1307 void Float32MinOutOfLine(FPURegister dst, FPURegister src1, FPURegister src2); |
| 1308 void Float64MaxOutOfLine(DoubleRegister dst, DoubleRegister src1, |
| 1309 DoubleRegister src2); |
| 1310 void Float64MinOutOfLine(DoubleRegister dst, DoubleRegister src1, |
| 1311 DoubleRegister src2); |
| 1312 |
| 1299 // ------------------------------------------------------------------------- | 1313 // ------------------------------------------------------------------------- |
| 1300 // Runtime calls. | 1314 // Runtime calls. |
| 1301 | 1315 |
| 1302 // See comments at the beginning of CEntryStub::Generate. | 1316 // See comments at the beginning of CEntryStub::Generate. |
| 1303 inline void PrepareCEntryArgs(int num_args) { li(a0, num_args); } | 1317 inline void PrepareCEntryArgs(int num_args) { li(a0, num_args); } |
| 1304 | 1318 |
| 1305 inline void PrepareCEntryFunction(const ExternalReference& ref) { | 1319 inline void PrepareCEntryFunction(const ExternalReference& ref) { |
| 1306 li(a1, Operand(ref)); | 1320 li(a1, Operand(ref)); |
| 1307 } | 1321 } |
| 1308 | 1322 |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1839 dd(GetLabelFunction(index)); | 1853 dd(GetLabelFunction(index)); |
| 1840 } | 1854 } |
| 1841 } | 1855 } |
| 1842 | 1856 |
| 1843 #define ACCESS_MASM(masm) masm-> | 1857 #define ACCESS_MASM(masm) masm-> |
| 1844 | 1858 |
| 1845 } // namespace internal | 1859 } // namespace internal |
| 1846 } // namespace v8 | 1860 } // namespace v8 |
| 1847 | 1861 |
| 1848 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 1862 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
| OLD | NEW |