Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: src/arm/assembler-arm.cc

Issue 10829169: Refactor Math.min/max to be a single HInstruction. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 2384 matching lines...) Expand 10 before | Expand all | Expand 10 after
2395 const DwVfpRegister src, 2395 const DwVfpRegister src,
2396 const Condition cond) { 2396 const Condition cond) {
2397 // cond(31-28) | 11101 (27-23)| D=?(22) | 11 (21-20) | 0001 (19-16) | 2397 // cond(31-28) | 11101 (27-23)| D=?(22) | 11 (21-20) | 0001 (19-16) |
2398 // Vd(15-12) | 101(11-9) | sz(8)=1 | 11 (7-6) | M(5)=? | 0(4) | Vm(3-0) 2398 // Vd(15-12) | 101(11-9) | sz(8)=1 | 11 (7-6) | M(5)=? | 0(4) | Vm(3-0)
2399 ASSERT(CpuFeatures::IsEnabled(VFP2)); 2399 ASSERT(CpuFeatures::IsEnabled(VFP2));
2400 emit(cond | 0xE*B24 | B23 | 0x3*B20 | B16 | 2400 emit(cond | 0xE*B24 | B23 | 0x3*B20 | B16 |
2401 dst.code()*B12 | 0x5*B9 | B8 | 3*B6 | src.code()); 2401 dst.code()*B12 | 0x5*B9 | B8 | 3*B6 | src.code());
2402 } 2402 }
2403 2403
2404 2404
2405 void Assembler::vorr(const DwVfpRegister dst,
2406 const DwVfpRegister src1,
2407 const DwVfpRegister src2) {
2408 // Instruction details available in ARM DDI 0406A, A8-680.
2409 // 1111 (31-28) | 00100 (27-23) | D=?(22) | 10 (21-20) | Vn(19-16) |
2410 // Vd(15-12) | 0001 (11-8) | N=?(7) | Q=?(6) | M=?(5) | 1 (4) | Vm (3-0)
2411 ASSERT(CpuFeatures::IsEnabled(VFP2));
2412 emit((0xF << 28) | B25 | B21 | src1.code()*B16 |
2413 dst.code()*B12 | B8 | B4 | src2.code());
2414 }
2415
2416
2405 // Pseudo instructions. 2417 // Pseudo instructions.
2406 void Assembler::nop(int type) { 2418 void Assembler::nop(int type) {
2407 // This is mov rx, rx. 2419 // This is mov rx, rx.
2408 ASSERT(0 <= type && type <= 14); // mov pc, pc is not a nop. 2420 ASSERT(0 <= type && type <= 14); // mov pc, pc is not a nop.
2409 emit(al | 13*B21 | type*B12 | type); 2421 emit(al | 13*B21 | type*B12 | type);
2410 } 2422 }
2411 2423
2412 2424
2413 bool Assembler::IsNop(Instr instr, int type) { 2425 bool Assembler::IsNop(Instr instr, int type) {
2414 // Check for mov rx, rx where x = type. 2426 // Check for mov rx, rx where x = type.
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
2681 2693
2682 // Since a constant pool was just emitted, move the check offset forward by 2694 // Since a constant pool was just emitted, move the check offset forward by
2683 // the standard interval. 2695 // the standard interval.
2684 next_buffer_check_ = pc_offset() + kCheckPoolInterval; 2696 next_buffer_check_ = pc_offset() + kCheckPoolInterval;
2685 } 2697 }
2686 2698
2687 2699
2688 } } // namespace v8::internal 2700 } } // namespace v8::internal
2689 2701
2690 #endif // V8_TARGET_ARCH_ARM 2702 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.h ('k') | src/arm/disasm-arm.cc » ('j') | src/arm/disasm-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698