OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 12 matching lines...) Expand all Loading... |
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #include "v8.h" | 28 #include "v8.h" |
29 | 29 |
30 #if defined(V8_TARGET_ARCH_IA32) | 30 #if defined(V8_TARGET_ARCH_IA32) |
31 | 31 |
32 #include "bootstrapper.h" | 32 #include "bootstrapper.h" |
33 #include "codegen-inl.h" | 33 #include "codegen.h" |
34 #include "debug.h" | 34 #include "debug.h" |
35 #include "runtime.h" | 35 #include "runtime.h" |
36 #include "serialize.h" | 36 #include "serialize.h" |
37 | 37 |
38 namespace v8 { | 38 namespace v8 { |
39 namespace internal { | 39 namespace internal { |
40 | 40 |
41 // ------------------------------------------------------------------------- | 41 // ------------------------------------------------------------------------- |
42 // MacroAssembler implementation. | 42 // MacroAssembler implementation. |
43 | 43 |
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1023 mov_b(Operand(destination, 0), scratch); | 1023 mov_b(Operand(destination, 0), scratch); |
1024 inc(source); | 1024 inc(source); |
1025 inc(destination); | 1025 inc(destination); |
1026 dec(length); | 1026 dec(length); |
1027 j(not_zero, &short_loop); | 1027 j(not_zero, &short_loop); |
1028 | 1028 |
1029 bind(&done); | 1029 bind(&done); |
1030 } | 1030 } |
1031 | 1031 |
1032 | 1032 |
1033 void MacroAssembler::NegativeZeroTest(CodeGenerator* cgen, | |
1034 Register result, | |
1035 Register op, | |
1036 JumpTarget* then_target) { | |
1037 JumpTarget ok; | |
1038 test(result, Operand(result)); | |
1039 ok.Branch(not_zero, taken); | |
1040 test(op, Operand(op)); | |
1041 then_target->Branch(sign, not_taken); | |
1042 ok.Bind(); | |
1043 } | |
1044 | |
1045 | |
1046 void MacroAssembler::NegativeZeroTest(Register result, | 1033 void MacroAssembler::NegativeZeroTest(Register result, |
1047 Register op, | 1034 Register op, |
1048 Label* then_label) { | 1035 Label* then_label) { |
1049 Label ok; | 1036 Label ok; |
1050 test(result, Operand(result)); | 1037 test(result, Operand(result)); |
1051 j(not_zero, &ok, taken); | 1038 j(not_zero, &ok, taken); |
1052 test(op, Operand(op)); | 1039 test(op, Operand(op)); |
1053 j(sign, then_label, not_taken); | 1040 j(sign, then_label, not_taken); |
1054 bind(&ok); | 1041 bind(&ok); |
1055 } | 1042 } |
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2047 | 2034 |
2048 // Check that the code was patched as expected. | 2035 // Check that the code was patched as expected. |
2049 ASSERT(masm_.pc_ == address_ + size_); | 2036 ASSERT(masm_.pc_ == address_ + size_); |
2050 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2037 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
2051 } | 2038 } |
2052 | 2039 |
2053 | 2040 |
2054 } } // namespace v8::internal | 2041 } } // namespace v8::internal |
2055 | 2042 |
2056 #endif // V8_TARGET_ARCH_IA32 | 2043 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |