OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 }; | 78 }; |
79 T t; | 79 T t; |
80 | 80 |
81 MacroAssembler assembler(isolate, NULL, 0, | 81 MacroAssembler assembler(isolate, NULL, 0, |
82 v8::internal::CodeObjectRequired::kYes); | 82 v8::internal::CodeObjectRequired::kYes); |
83 | 83 |
84 MacroAssembler* masm = &assembler; | 84 MacroAssembler* masm = &assembler; |
85 | 85 |
86 __ ld(a4, MemOperand(a0, offsetof(T, r1))); | 86 __ ld(a4, MemOperand(a0, offsetof(T, r1))); |
87 __ nop(); | 87 __ nop(); |
88 __ ByteSwapSigned(a4, 8); | 88 __ ByteSwapSigned(a4, a4, 8); |
89 __ sd(a4, MemOperand(a0, offsetof(T, r1))); | 89 __ sd(a4, MemOperand(a0, offsetof(T, r1))); |
90 | 90 |
91 __ ld(a4, MemOperand(a0, offsetof(T, r2))); | 91 __ ld(a4, MemOperand(a0, offsetof(T, r2))); |
92 __ nop(); | 92 __ nop(); |
93 __ ByteSwapSigned(a4, 4); | 93 __ ByteSwapSigned(a4, a4, 4); |
94 __ sd(a4, MemOperand(a0, offsetof(T, r2))); | 94 __ sd(a4, MemOperand(a0, offsetof(T, r2))); |
95 | 95 |
96 __ ld(a4, MemOperand(a0, offsetof(T, r3))); | 96 __ ld(a4, MemOperand(a0, offsetof(T, r3))); |
97 __ nop(); | 97 __ nop(); |
98 __ ByteSwapSigned(a4, 2); | 98 __ ByteSwapSigned(a4, a4, 2); |
99 __ sd(a4, MemOperand(a0, offsetof(T, r3))); | 99 __ sd(a4, MemOperand(a0, offsetof(T, r3))); |
100 | 100 |
101 __ ld(a4, MemOperand(a0, offsetof(T, r4))); | 101 __ ld(a4, MemOperand(a0, offsetof(T, r4))); |
102 __ nop(); | 102 __ nop(); |
103 __ ByteSwapSigned(a4, 1); | 103 __ ByteSwapSigned(a4, a4, 1); |
104 __ sd(a4, MemOperand(a0, offsetof(T, r4))); | 104 __ sd(a4, MemOperand(a0, offsetof(T, r4))); |
105 | 105 |
106 __ ld(a4, MemOperand(a0, offsetof(T, r5))); | 106 __ ld(a4, MemOperand(a0, offsetof(T, r5))); |
107 __ nop(); | 107 __ nop(); |
108 __ ByteSwapUnsigned(a4, 1); | 108 __ ByteSwapUnsigned(a4, a4, 1); |
109 __ sd(a4, MemOperand(a0, offsetof(T, r5))); | 109 __ sd(a4, MemOperand(a0, offsetof(T, r5))); |
110 | 110 |
111 __ ld(a4, MemOperand(a0, offsetof(T, r6))); | 111 __ ld(a4, MemOperand(a0, offsetof(T, r6))); |
112 __ nop(); | 112 __ nop(); |
113 __ ByteSwapUnsigned(a4, 2); | 113 __ ByteSwapUnsigned(a4, a4, 2); |
114 __ sd(a4, MemOperand(a0, offsetof(T, r6))); | 114 __ sd(a4, MemOperand(a0, offsetof(T, r6))); |
115 | 115 |
116 __ ld(a4, MemOperand(a0, offsetof(T, r7))); | 116 __ ld(a4, MemOperand(a0, offsetof(T, r7))); |
117 __ nop(); | 117 __ nop(); |
118 __ ByteSwapUnsigned(a4, 4); | 118 __ ByteSwapUnsigned(a4, a4, 4); |
119 __ sd(a4, MemOperand(a0, offsetof(T, r7))); | 119 __ sd(a4, MemOperand(a0, offsetof(T, r7))); |
120 | 120 |
121 __ jr(ra); | 121 __ jr(ra); |
122 __ nop(); | 122 __ nop(); |
123 | 123 |
124 CodeDesc desc; | 124 CodeDesc desc; |
125 masm->GetCode(&desc); | 125 masm->GetCode(&desc); |
126 Handle<Code> code = isolate->factory()->NewCode( | 126 Handle<Code> code = isolate->factory()->NewCode( |
127 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 127 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
128 ::F3 f = FUNCTION_CAST<::F3>(code->entry()); | 128 ::F3 f = FUNCTION_CAST<::F3>(code->entry()); |
(...skipping 1766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1895 int32_t out_offset) { | 1895 int32_t out_offset) { |
1896 __ Uldc1(f0, MemOperand(a0, in_offset), t0); | 1896 __ Uldc1(f0, MemOperand(a0, in_offset), t0); |
1897 __ Usdc1(f0, MemOperand(a0, out_offset), t0); | 1897 __ Usdc1(f0, MemOperand(a0, out_offset), t0); |
1898 })); | 1898 })); |
1899 } | 1899 } |
1900 } | 1900 } |
1901 } | 1901 } |
1902 } | 1902 } |
1903 | 1903 |
1904 #undef __ | 1904 #undef __ |
OLD | NEW |