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 #ifndef VM_ASSEMBLER_MIPS_H_ | 5 #ifndef VM_ASSEMBLER_MIPS_H_ |
6 #define VM_ASSEMBLER_MIPS_H_ | 6 #define VM_ASSEMBLER_MIPS_H_ |
7 | 7 |
8 #ifndef VM_ASSEMBLER_H_ | 8 #ifndef VM_ASSEMBLER_H_ |
9 #error Do not include assembler_mips.h directly; use assembler.h instead. | 9 #error Do not include assembler_mips.h directly; use assembler.h instead. |
10 #endif | 10 #endif |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
499 void sw(Register rt, const Address& addr) { | 499 void sw(Register rt, const Address& addr) { |
500 EmitLoadStore(SW, rt, addr); | 500 EmitLoadStore(SW, rt, addr); |
501 } | 501 } |
502 | 502 |
503 void xor_(Register rd, Register rs, Register rt) { | 503 void xor_(Register rd, Register rs, Register rt) { |
504 EmitRType(SPECIAL, rs, rt, rd, 0, XOR); | 504 EmitRType(SPECIAL, rs, rt, rd, 0, XOR); |
505 } | 505 } |
506 | 506 |
507 // Macros in alphabetical order. | 507 // Macros in alphabetical order. |
508 | 508 |
509 // Addition of rs and rt with the result placed in rd. | |
510 // After, ro < 0 if there was signed overflow, ro >= 0 otherwise. | |
511 // Clobbers TMP. | |
regis
2013/04/06 00:33:24
By definition, TMP can be clobbered by any asm mac
zra
2013/04/08 16:45:25
Done.
| |
512 void AdduDetectOverflow(Register rd, Register rs, Register rt, Register ro, | |
513 Register scratch); | |
514 | |
509 void Branch(const ExternalLabel* label) { | 515 void Branch(const ExternalLabel* label) { |
510 LoadImmediate(TMP, label->address()); | 516 LoadImmediate(TMP, label->address()); |
511 jr(TMP); | 517 jr(TMP); |
512 } | 518 } |
513 | 519 |
514 void BranchPatchable(const ExternalLabel* label) { | 520 void BranchPatchable(const ExternalLabel* label) { |
515 const uint16_t low = Utils::Low16Bits(label->address()); | 521 const uint16_t low = Utils::Low16Bits(label->address()); |
516 const uint16_t high = Utils::High16Bits(label->address()); | 522 const uint16_t high = Utils::High16Bits(label->address()); |
517 lui(TMP, Immediate(high)); | 523 lui(TMP, Immediate(high)); |
518 ori(TMP, TMP, Immediate(low)); | 524 ori(TMP, TMP, Immediate(low)); |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
729 delay_slot_available_ = true; | 735 delay_slot_available_ = true; |
730 } | 736 } |
731 | 737 |
732 DISALLOW_ALLOCATION(); | 738 DISALLOW_ALLOCATION(); |
733 DISALLOW_COPY_AND_ASSIGN(Assembler); | 739 DISALLOW_COPY_AND_ASSIGN(Assembler); |
734 }; | 740 }; |
735 | 741 |
736 } // namespace dart | 742 } // namespace dart |
737 | 743 |
738 #endif // VM_ASSEMBLER_MIPS_H_ | 744 #endif // VM_ASSEMBLER_MIPS_H_ |
OLD | NEW |