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

Side by Side Diff: runtime/vm/assembler_ia32.cc

Issue 467103005: Fixes to support ARMv5 lego mindstorm. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
« no previous file with comments | « runtime/vm/assembler_ia32.h ('k') | runtime/vm/assembler_mips.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 2553 matching lines...) Expand 10 before | Expand all | Expand 10 after
2564 2564
2565 2565
2566 void Assembler::EnterDartFrame(intptr_t frame_size) { 2566 void Assembler::EnterDartFrame(intptr_t frame_size) {
2567 EnterFrame(0); 2567 EnterFrame(0);
2568 Label dart_entry; 2568 Label dart_entry;
2569 call(&dart_entry); 2569 call(&dart_entry);
2570 Bind(&dart_entry); 2570 Bind(&dart_entry);
2571 // The runtime system assumes that the code marker address is 2571 // The runtime system assumes that the code marker address is
2572 // kEntryPointToPcMarkerOffset bytes from the entry. If there is any code 2572 // kEntryPointToPcMarkerOffset bytes from the entry. If there is any code
2573 // generated before entering the frame, the address needs to be adjusted. 2573 // generated before entering the frame, the address needs to be adjusted.
2574 const intptr_t offset = kEntryPointToPcMarkerOffset - CodeSize(); 2574 const intptr_t offset = EntryPointToPcMarkerOffset() - CodeSize();
2575 if (offset != 0) { 2575 if (offset != 0) {
2576 addl(Address(ESP, 0), Immediate(offset)); 2576 addl(Address(ESP, 0), Immediate(offset));
2577 } 2577 }
2578 if (frame_size != 0) { 2578 if (frame_size != 0) {
2579 subl(ESP, Immediate(frame_size)); 2579 subl(ESP, Immediate(frame_size));
2580 } 2580 }
2581 } 2581 }
2582 2582
2583 2583
2584 // On entry to a function compiled for OSR, the caller's frame pointer, the 2584 // On entry to a function compiled for OSR, the caller's frame pointer, the
2585 // stack locals, and any copied parameters are already in place. The frame 2585 // stack locals, and any copied parameters are already in place. The frame
2586 // pointer is already set up. The PC marker is not correct for the 2586 // pointer is already set up. The PC marker is not correct for the
2587 // optimized function and there may be extra space for spill slots to 2587 // optimized function and there may be extra space for spill slots to
2588 // allocate. 2588 // allocate.
2589 void Assembler::EnterOsrFrame(intptr_t extra_size) { 2589 void Assembler::EnterOsrFrame(intptr_t extra_size) {
2590 Comment("EnterOsrFrame"); 2590 Comment("EnterOsrFrame");
2591 Label dart_entry; 2591 Label dart_entry;
2592 call(&dart_entry); 2592 call(&dart_entry);
2593 Bind(&dart_entry); 2593 Bind(&dart_entry);
2594 // The runtime system assumes that the code marker address is 2594 // The runtime system assumes that the code marker address is
2595 // kEntryPointToPcMarkerOffset bytes from the entry. Since there is no 2595 // kEntryPointToPcMarkerOffset bytes from the entry. Since there is no
2596 // code to set up the frame pointer, the address needs to be adjusted. 2596 // code to set up the frame pointer, the address needs to be adjusted.
2597 const intptr_t offset = kEntryPointToPcMarkerOffset - CodeSize(); 2597 const intptr_t offset = EntryPointToPcMarkerOffset() - CodeSize();
2598 if (offset != 0) { 2598 if (offset != 0) {
2599 addl(Address(ESP, 0), Immediate(offset)); 2599 addl(Address(ESP, 0), Immediate(offset));
2600 } 2600 }
2601 popl(Address(EBP, kPcMarkerSlotFromFp * kWordSize)); 2601 popl(Address(EBP, kPcMarkerSlotFromFp * kWordSize));
2602 if (extra_size != 0) { 2602 if (extra_size != 0) {
2603 subl(ESP, Immediate(extra_size)); 2603 subl(ESP, Immediate(extra_size));
2604 } 2604 }
2605 } 2605 }
2606 2606
2607 2607
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
2849 2849
2850 const char* Assembler::FpuRegisterName(FpuRegister reg) { 2850 const char* Assembler::FpuRegisterName(FpuRegister reg) {
2851 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); 2851 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
2852 return xmm_reg_names[reg]; 2852 return xmm_reg_names[reg];
2853 } 2853 }
2854 2854
2855 2855
2856 } // namespace dart 2856 } // namespace dart
2857 2857
2858 #endif // defined TARGET_ARCH_IA32 2858 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/assembler_ia32.h ('k') | runtime/vm/assembler_mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698