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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 __ vcvt_s32_f64(s31, d4); | 285 __ vcvt_s32_f64(s31, d4); |
286 __ vstr(s31, r4, OFFSET_OF(T, i)); | 286 __ vstr(s31, r4, OFFSET_OF(T, i)); |
287 | 287 |
288 // Convert from integer to floating point. | 288 // Convert from integer to floating point. |
289 __ mov(lr, Operand(42)); | 289 __ mov(lr, Operand(42)); |
290 __ vmov(s31, lr); | 290 __ vmov(s31, lr); |
291 __ vcvt_f64_s32(d4, s31); | 291 __ vcvt_f64_s32(d4, s31); |
292 __ vstr(d4, r4, OFFSET_OF(T, f)); | 292 __ vstr(d4, r4, OFFSET_OF(T, f)); |
293 | 293 |
294 // Convert from fixed point to floating point. | 294 // Convert from fixed point to floating point. |
295 __ mov(lr, Operand(1234)); | 295 __ mov(lr, Operand(2468)); |
296 __ vmov(s8, lr); | 296 __ vmov(s8, lr); |
297 __ vcvt_f64_s32(d4, 1); | 297 __ vcvt_f64_s32(d4, 2); |
298 __ vstr(d4, r4, OFFSET_OF(T, j)); | 298 __ vstr(d4, r4, OFFSET_OF(T, j)); |
299 | 299 |
300 // Test vabs. | 300 // Test vabs. |
301 __ vldr(d1, r4, OFFSET_OF(T, g)); | 301 __ vldr(d1, r4, OFFSET_OF(T, g)); |
302 __ vabs(d0, d1); | 302 __ vabs(d0, d1); |
303 __ vstr(d0, r4, OFFSET_OF(T, g)); | 303 __ vstr(d0, r4, OFFSET_OF(T, g)); |
304 __ vldr(d2, r4, OFFSET_OF(T, h)); | 304 __ vldr(d2, r4, OFFSET_OF(T, h)); |
305 __ vabs(d0, d2); | 305 __ vabs(d0, d2); |
306 __ vstr(d0, r4, OFFSET_OF(T, h)); | 306 __ vstr(d0, r4, OFFSET_OF(T, h)); |
307 | 307 |
(...skipping 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1589 Handle<Code> code = isolate->factory()->NewCode(desc, | 1589 Handle<Code> code = isolate->factory()->NewCode(desc, |
1590 Code::ComputeFlags(Code::STUB), code_object); | 1590 Code::ComputeFlags(Code::STUB), code_object); |
1591 CHECK(code->IsCode()); | 1591 CHECK(code->IsCode()); |
1592 F1 f = FUNCTION_CAST<F1>(code->entry()); | 1592 F1 f = FUNCTION_CAST<F1>(code->entry()); |
1593 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 21, 0, 0, 0, 0)); | 1593 int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 21, 0, 0, 0, 0)); |
1594 ::printf("f() = %d\n", res); | 1594 ::printf("f() = %d\n", res); |
1595 CHECK_EQ(42, res); | 1595 CHECK_EQ(42, res); |
1596 } | 1596 } |
1597 | 1597 |
1598 #undef __ | 1598 #undef __ |
OLD | NEW |