| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 // | 4 // |
| 5 // This is forked from Dart revision df52deea9f25690eb8b66c5995da92b70f7ac1fe | 5 // This is forked from Dart revision df52deea9f25690eb8b66c5995da92b70f7ac1fe |
| 6 // Please update the (git) revision if we merge changes from Dart. | 6 // Please update the (git) revision if we merge changes from Dart. |
| 7 // https://code.google.com/p/dart/wiki/GettingTheSource | 7 // https://code.google.com/p/dart/wiki/GettingTheSource |
| 8 | 8 |
| 9 #include "vm/globals.h" // NOLINT | 9 #include "vm/globals.h" // NOLINT |
| 10 #if defined(TARGET_ARCH_ARM) | 10 #if defined(TARGET_ARCH_ARM) |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 EmitMulOp(cond, 0, R0, rd, rn, rm); | 386 EmitMulOp(cond, 0, R0, rd, rn, rm); |
| 387 } | 387 } |
| 388 #endif | 388 #endif |
| 389 | 389 |
| 390 // Like mul, but sets condition flags. | 390 // Like mul, but sets condition flags. |
| 391 void Assembler::muls(Register rd, Register rn, Register rm, Condition cond) { | 391 void Assembler::muls(Register rd, Register rn, Register rm, Condition cond) { |
| 392 EmitMulOp(cond, B20, R0, rd, rn, rm); | 392 EmitMulOp(cond, B20, R0, rd, rn, rm); |
| 393 } | 393 } |
| 394 | 394 |
| 395 #if 0 | 395 #if 0 |
| 396 // Moved to ARM32::AssemblerARM32::mla | 396 // Moved to ARM32::AssemblerARM32::mla() |
| 397 void Assembler::mla(Register rd, Register rn, | 397 void Assembler::mla(Register rd, Register rn, |
| 398 Register rm, Register ra, Condition cond) { | 398 Register rm, Register ra, Condition cond) { |
| 399 // rd <- ra + rn * rm. | 399 // rd <- ra + rn * rm. |
| 400 // Assembler registers rd, rn, rm, ra are encoded as rn, rm, rs, rd. | 400 // Assembler registers rd, rn, rm, ra are encoded as rn, rm, rs, rd. |
| 401 EmitMulOp(cond, B21, ra, rd, rn, rm); | 401 EmitMulOp(cond, B21, ra, rd, rn, rm); |
| 402 } | 402 } |
| 403 #endif | 403 #endif |
| 404 | 404 |
| 405 | 405 |
| 406 void Assembler::mls(Register rd, Register rn, | 406 void Assembler::mls(Register rd, Register rn, |
| 407 Register rm, Register ra, Condition cond) { | 407 Register rm, Register ra, Condition cond) { |
| 408 // rd <- ra - rn * rm. | 408 // rd <- ra - rn * rm. |
| 409 if (TargetCPUFeatures::arm_version() == ARMv7) { | 409 if (TargetCPUFeatures::arm_version() == ARMv7) { |
| 410 // Assembler registers rd, rn, rm, ra are encoded as rn, rm, rs, rd. | 410 // Assembler registers rd, rn, rm, ra are encoded as rn, rm, rs, rd. |
| 411 EmitMulOp(cond, B22 | B21, ra, rd, rn, rm); | 411 EmitMulOp(cond, B22 | B21, ra, rd, rn, rm); |
| 412 } else { | 412 } else { |
| 413 mul(IP, rn, rm, cond); | 413 mul(IP, rn, rm, cond); |
| 414 sub(rd, ra, Operand(IP), cond); | 414 sub(rd, ra, Operand(IP), cond); |
| 415 } | 415 } |
| 416 } | 416 } |
| 417 | 417 |
| 418 | 418 |
| 419 void Assembler::smull(Register rd_lo, Register rd_hi, | 419 void Assembler::smull(Register rd_lo, Register rd_hi, |
| 420 Register rn, Register rm, Condition cond) { | 420 Register rn, Register rm, Condition cond) { |
| 421 // Assembler registers rd_lo, rd_hi, rn, rm are encoded as rd, rn, rm, rs. | 421 // Assembler registers rd_lo, rd_hi, rn, rm are encoded as rd, rn, rm, rs. |
| 422 EmitMulOp(cond, B23 | B22, rd_lo, rd_hi, rn, rm); | 422 EmitMulOp(cond, B23 | B22, rd_lo, rd_hi, rn, rm); |
| 423 } | 423 } |
| 424 | 424 |
| 425 | 425 #if 0 |
| 426 // Moved to ARM32::AssemblerARM32::umull() |
| 426 void Assembler::umull(Register rd_lo, Register rd_hi, | 427 void Assembler::umull(Register rd_lo, Register rd_hi, |
| 427 Register rn, Register rm, Condition cond) { | 428 Register rn, Register rm, Condition cond) { |
| 428 // Assembler registers rd_lo, rd_hi, rn, rm are encoded as rd, rn, rm, rs. | 429 // Assembler registers rd_lo, rd_hi, rn, rm are encoded as rd, rn, rm, rs. |
| 429 EmitMulOp(cond, B23, rd_lo, rd_hi, rn, rm); | 430 EmitMulOp(cond, B23, rd_lo, rd_hi, rn, rm); |
| 430 } | 431 } |
| 431 | 432 #endif |
| 432 | 433 |
| 433 void Assembler::umlal(Register rd_lo, Register rd_hi, | 434 void Assembler::umlal(Register rd_lo, Register rd_hi, |
| 434 Register rn, Register rm, Condition cond) { | 435 Register rn, Register rm, Condition cond) { |
| 435 // Assembler registers rd_lo, rd_hi, rn, rm are encoded as rd, rn, rm, rs. | 436 // Assembler registers rd_lo, rd_hi, rn, rm are encoded as rd, rn, rm, rs. |
| 436 EmitMulOp(cond, B23 | B21, rd_lo, rd_hi, rn, rm); | 437 EmitMulOp(cond, B23 | B21, rd_lo, rd_hi, rn, rm); |
| 437 } | 438 } |
| 438 | 439 |
| 439 | 440 |
| 440 void Assembler::umaal(Register rd_lo, Register rd_hi, | 441 void Assembler::umaal(Register rd_lo, Register rd_hi, |
| 441 Register rn, Register rm) { | 442 Register rn, Register rm) { |
| (...skipping 3248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3690 | 3691 |
| 3691 | 3692 |
| 3692 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 3693 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
| 3693 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); | 3694 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); |
| 3694 return fpu_reg_names[reg]; | 3695 return fpu_reg_names[reg]; |
| 3695 } | 3696 } |
| 3696 | 3697 |
| 3697 } // namespace dart | 3698 } // namespace dart |
| 3698 | 3699 |
| 3699 #endif // defined TARGET_ARCH_ARM | 3700 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |