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 #ifndef V8_PPC_MACRO_ASSEMBLER_PPC_H_ | 5 #ifndef V8_PPC_MACRO_ASSEMBLER_PPC_H_ |
6 #define V8_PPC_MACRO_ASSEMBLER_PPC_H_ | 6 #define V8_PPC_MACRO_ASSEMBLER_PPC_H_ |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
10 #include "src/frames.h" | 10 #include "src/frames.h" |
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
880 // Compute dst = left - right, setting condition codes. dst may be same as | 880 // Compute dst = left - right, setting condition codes. dst may be same as |
881 // either left or right (or a unique register). left and right must not be | 881 // either left or right (or a unique register). left and right must not be |
882 // the same register. | 882 // the same register. |
883 void SubAndCheckForOverflow(Register dst, Register left, Register right, | 883 void SubAndCheckForOverflow(Register dst, Register left, Register right, |
884 Register overflow_dst, Register scratch = r0); | 884 Register overflow_dst, Register scratch = r0); |
885 | 885 |
886 void BranchOnOverflow(Label* label) { blt(label, cr0); } | 886 void BranchOnOverflow(Label* label) { blt(label, cr0); } |
887 | 887 |
888 void BranchOnNoOverflow(Label* label) { bge(label, cr0); } | 888 void BranchOnNoOverflow(Label* label) { bge(label, cr0); } |
889 | 889 |
890 void RetOnOverflow(void) { | 890 void RetOnOverflow(void) { Ret(lt, cr0); } |
891 Label label; | |
892 | 891 |
893 blt(&label, cr0); | 892 void RetOnNoOverflow(void) { Ret(ge, cr0); } |
894 Ret(); | |
895 bind(&label); | |
896 } | |
897 | |
898 void RetOnNoOverflow(void) { | |
899 Label label; | |
900 | |
901 bge(&label, cr0); | |
902 Ret(); | |
903 bind(&label); | |
904 } | |
905 | 893 |
906 // --------------------------------------------------------------------------- | 894 // --------------------------------------------------------------------------- |
907 // Runtime calls | 895 // Runtime calls |
908 | 896 |
909 // Call a code stub. | 897 // Call a code stub. |
910 void CallStub(CodeStub* stub, TypeFeedbackId ast_id = TypeFeedbackId::None(), | 898 void CallStub(CodeStub* stub, TypeFeedbackId ast_id = TypeFeedbackId::None(), |
911 Condition cond = al); | 899 Condition cond = al); |
912 | 900 |
913 // Call a code stub. | 901 // Call a code stub. |
914 void TailCallStub(CodeStub* stub, Condition cond = al); | 902 void TailCallStub(CodeStub* stub, Condition cond = al); |
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1573 #define ACCESS_MASM(masm) \ | 1561 #define ACCESS_MASM(masm) \ |
1574 masm->stop(__FILE_LINE__); \ | 1562 masm->stop(__FILE_LINE__); \ |
1575 masm-> | 1563 masm-> |
1576 #else | 1564 #else |
1577 #define ACCESS_MASM(masm) masm-> | 1565 #define ACCESS_MASM(masm) masm-> |
1578 #endif | 1566 #endif |
1579 } | 1567 } |
1580 } // namespace v8::internal | 1568 } // namespace v8::internal |
1581 | 1569 |
1582 #endif // V8_PPC_MACRO_ASSEMBLER_PPC_H_ | 1570 #endif // V8_PPC_MACRO_ASSEMBLER_PPC_H_ |
OLD | NEW |