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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 int32_t r5; | 73 int32_t r5; |
74 }; | 74 }; |
75 T t; | 75 T t; |
76 | 76 |
77 MacroAssembler assembler(isolate, NULL, 0, | 77 MacroAssembler assembler(isolate, NULL, 0, |
78 v8::internal::CodeObjectRequired::kYes); | 78 v8::internal::CodeObjectRequired::kYes); |
79 MacroAssembler* masm = &assembler; | 79 MacroAssembler* masm = &assembler; |
80 | 80 |
81 __ lw(a2, MemOperand(a0, offsetof(T, r1))); | 81 __ lw(a2, MemOperand(a0, offsetof(T, r1))); |
82 __ nop(); | 82 __ nop(); |
83 __ ByteSwapSigned(a2, 4); | 83 __ ByteSwapSigned(a2, a2, 4); |
84 __ sw(a2, MemOperand(a0, offsetof(T, r1))); | 84 __ sw(a2, MemOperand(a0, offsetof(T, r1))); |
85 | 85 |
86 __ lw(a2, MemOperand(a0, offsetof(T, r2))); | 86 __ lw(a2, MemOperand(a0, offsetof(T, r2))); |
87 __ nop(); | 87 __ nop(); |
88 __ ByteSwapSigned(a2, 2); | 88 __ ByteSwapSigned(a2, a2, 2); |
89 __ sw(a2, MemOperand(a0, offsetof(T, r2))); | 89 __ sw(a2, MemOperand(a0, offsetof(T, r2))); |
90 | 90 |
91 __ lw(a2, MemOperand(a0, offsetof(T, r3))); | 91 __ lw(a2, MemOperand(a0, offsetof(T, r3))); |
92 __ nop(); | 92 __ nop(); |
93 __ ByteSwapSigned(a2, 1); | 93 __ ByteSwapSigned(a2, a2, 1); |
94 __ sw(a2, MemOperand(a0, offsetof(T, r3))); | 94 __ sw(a2, MemOperand(a0, offsetof(T, r3))); |
95 | 95 |
96 __ lw(a2, MemOperand(a0, offsetof(T, r4))); | 96 __ lw(a2, MemOperand(a0, offsetof(T, r4))); |
97 __ nop(); | 97 __ nop(); |
98 __ ByteSwapUnsigned(a2, 1); | 98 __ ByteSwapUnsigned(a2, a2, 1); |
99 __ sw(a2, MemOperand(a0, offsetof(T, r4))); | 99 __ sw(a2, MemOperand(a0, offsetof(T, r4))); |
100 | 100 |
101 __ lw(a2, MemOperand(a0, offsetof(T, r5))); | 101 __ lw(a2, MemOperand(a0, offsetof(T, r5))); |
102 __ nop(); | 102 __ nop(); |
103 __ ByteSwapUnsigned(a2, 2); | 103 __ ByteSwapUnsigned(a2, a2, 2); |
104 __ sw(a2, MemOperand(a0, offsetof(T, r5))); | 104 __ sw(a2, MemOperand(a0, offsetof(T, r5))); |
105 | 105 |
106 __ jr(ra); | 106 __ jr(ra); |
107 __ nop(); | 107 __ nop(); |
108 | 108 |
109 CodeDesc desc; | 109 CodeDesc desc; |
110 masm->GetCode(&desc); | 110 masm->GetCode(&desc); |
111 Handle<Code> code = isolate->factory()->NewCode( | 111 Handle<Code> code = isolate->factory()->NewCode( |
112 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 112 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
113 ::F3 f = FUNCTION_CAST<::F3>(code->entry()); | 113 ::F3 f = FUNCTION_CAST<::F3>(code->entry()); |
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1300 int32_t out_offset) { | 1300 int32_t out_offset) { |
1301 __ Uldc1(f0, MemOperand(a0, in_offset), t0); | 1301 __ Uldc1(f0, MemOperand(a0, in_offset), t0); |
1302 __ Usdc1(f0, MemOperand(a0, out_offset), t0); | 1302 __ Usdc1(f0, MemOperand(a0, out_offset), t0); |
1303 })); | 1303 })); |
1304 } | 1304 } |
1305 } | 1305 } |
1306 } | 1306 } |
1307 } | 1307 } |
1308 | 1308 |
1309 #undef __ | 1309 #undef __ |
OLD | NEW |