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 2513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2524 | 2524 |
2525 // The top-of-stack (tos) is 7 if there is one item pushed. | 2525 // The top-of-stack (tos) is 7 if there is one item pushed. |
2526 int tos = (8 - depth) % 8; | 2526 int tos = (8 - depth) % 8; |
2527 const int kTopMask = 0x3800; | 2527 const int kTopMask = 0x3800; |
2528 push(eax); | 2528 push(eax); |
2529 fwait(); | 2529 fwait(); |
2530 fnstsw_ax(); | 2530 fnstsw_ax(); |
2531 and_(eax, kTopMask); | 2531 and_(eax, kTopMask); |
2532 shr(eax, 11); | 2532 shr(eax, 11); |
2533 cmp(eax, Immediate(tos)); | 2533 cmp(eax, Immediate(tos)); |
2534 Label all_ok; | |
2535 j(equal, &all_ok); | |
2536 Check(equal, "Unexpected FPU stack depth after instruction"); | 2534 Check(equal, "Unexpected FPU stack depth after instruction"); |
2537 bind(&all_ok); | |
2538 fnclex(); | 2535 fnclex(); |
2539 pop(eax); | 2536 pop(eax); |
2540 } | 2537 } |
2541 | 2538 |
2542 | 2539 |
2543 void MacroAssembler::Drop(int stack_elements) { | 2540 void MacroAssembler::Drop(int stack_elements) { |
2544 if (stack_elements > 0) { | 2541 if (stack_elements > 0) { |
2545 add(esp, Immediate(stack_elements * kPointerSize)); | 2542 add(esp, Immediate(stack_elements * kPointerSize)); |
2546 } | 2543 } |
2547 } | 2544 } |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3115 j(greater, &no_info_available); | 3112 j(greater, &no_info_available); |
3116 cmp(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), | 3113 cmp(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), |
3117 Immediate(Handle<Map>(isolate()->heap()->allocation_site_info_map()))); | 3114 Immediate(Handle<Map>(isolate()->heap()->allocation_site_info_map()))); |
3118 bind(&no_info_available); | 3115 bind(&no_info_available); |
3119 } | 3116 } |
3120 | 3117 |
3121 | 3118 |
3122 } } // namespace v8::internal | 3119 } } // namespace v8::internal |
3123 | 3120 |
3124 #endif // V8_TARGET_ARCH_IA32 | 3121 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |