OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 | 260 |
261 __ vmla(d5, d6, d7); | 261 __ vmla(d5, d6, d7); |
262 __ vmls(d5, d5, d6); | 262 __ vmls(d5, d5, d6); |
263 | 263 |
264 __ vmov(r2, r3, d5); | 264 __ vmov(r2, r3, d5); |
265 __ vmov(d4, r2, r3); | 265 __ vmov(d4, r2, r3); |
266 __ vstr(d4, r4, offsetof(T, b)); | 266 __ vstr(d4, r4, offsetof(T, b)); |
267 | 267 |
268 // Load t.x and t.y, switch values, and store back to the struct. | 268 // Load t.x and t.y, switch values, and store back to the struct. |
269 __ vldr(s0, r4, offsetof(T, x)); | 269 __ vldr(s0, r4, offsetof(T, x)); |
270 __ vldr(s31, r4, offsetof(T, y)); | 270 __ vldr(s1, r4, offsetof(T, y)); |
271 __ vmov(s16, s0); | 271 __ vmov(s2, s0); |
272 __ vmov(s0, s31); | 272 __ vmov(s0, s1); |
273 __ vmov(s31, s16); | 273 __ vmov(s1, s2); |
274 __ vstr(s0, r4, offsetof(T, x)); | 274 __ vstr(s0, r4, offsetof(T, x)); |
275 __ vstr(s31, r4, offsetof(T, y)); | 275 __ vstr(s1, r4, offsetof(T, y)); |
276 | 276 |
277 // Move a literal into a register that can be encoded in the instruction. | 277 // Move a literal into a register that can be encoded in the instruction. |
278 __ vmov(d4, 1.0); | 278 __ vmov(d4, 1.0); |
279 __ vstr(d4, r4, offsetof(T, e)); | 279 __ vstr(d4, r4, offsetof(T, e)); |
280 | 280 |
281 // Move a literal into a register that requires 64 bits to encode. | 281 // Move a literal into a register that requires 64 bits to encode. |
282 // 0x3ff0000010000000 = 1.000000059604644775390625 | 282 // 0x3ff0000010000000 = 1.000000059604644775390625 |
283 __ vmov(d4, 1.000000059604644775390625); | 283 __ vmov(d4, 1.000000059604644775390625); |
284 __ vstr(d4, r4, offsetof(T, d)); | 284 __ vstr(d4, r4, offsetof(T, d)); |
285 | 285 |
286 // Convert from floating point to integer. | 286 // Convert from floating point to integer. |
287 __ vmov(d4, 2.0); | 287 __ vmov(d4, 2.0); |
288 __ vcvt_s32_f64(s31, d4); | 288 __ vcvt_s32_f64(s1, d4); |
289 __ vstr(s31, r4, offsetof(T, i)); | 289 __ vstr(s1, r4, offsetof(T, i)); |
290 | 290 |
291 // Convert from integer to floating point. | 291 // Convert from integer to floating point. |
292 __ mov(lr, Operand(42)); | 292 __ mov(lr, Operand(42)); |
293 __ vmov(s31, lr); | 293 __ vmov(s1, lr); |
294 __ vcvt_f64_s32(d4, s31); | 294 __ vcvt_f64_s32(d4, s1); |
295 __ vstr(d4, r4, offsetof(T, f)); | 295 __ vstr(d4, r4, offsetof(T, f)); |
296 | 296 |
297 // Convert from fixed point to floating point. | 297 // Convert from fixed point to floating point. |
298 __ mov(lr, Operand(2468)); | 298 __ mov(lr, Operand(2468)); |
299 __ vmov(s8, lr); | 299 __ vmov(s8, lr); |
300 __ vcvt_f64_s32(d4, 2); | 300 __ vcvt_f64_s32(d4, 2); |
301 __ vstr(d4, r4, offsetof(T, j)); | 301 __ vstr(d4, r4, offsetof(T, j)); |
302 | 302 |
303 // Test vabs. | 303 // Test vabs. |
304 __ vldr(d1, r4, offsetof(T, g)); | 304 __ vldr(d1, r4, offsetof(T, g)); |
(...skipping 2684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2989 HandleScope scope(isolate); | 2989 HandleScope scope(isolate); |
2990 | 2990 |
2991 Assembler assm(isolate, NULL, 0); | 2991 Assembler assm(isolate, NULL, 0); |
2992 __ mov(r0, Operand(isolate->factory()->infinity_value())); | 2992 __ mov(r0, Operand(isolate->factory()->infinity_value())); |
2993 __ BlockConstPoolFor(1019); | 2993 __ BlockConstPoolFor(1019); |
2994 for (int i = 0; i < 1019; ++i) __ nop(); | 2994 for (int i = 0; i < 1019; ++i) __ nop(); |
2995 __ vldr(d0, MemOperand(r0, 0)); | 2995 __ vldr(d0, MemOperand(r0, 0)); |
2996 } | 2996 } |
2997 | 2997 |
2998 #undef __ | 2998 #undef __ |
OLD | NEW |