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

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 197037: Use fucomi instruction to compare floats and put results directly into EFLAGS... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 3 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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 } 312 }
313 313
314 314
315 void MacroAssembler::CmpInstanceType(Register map, InstanceType type) { 315 void MacroAssembler::CmpInstanceType(Register map, InstanceType type) {
316 cmpb(FieldOperand(map, Map::kInstanceTypeOffset), 316 cmpb(FieldOperand(map, Map::kInstanceTypeOffset),
317 static_cast<int8_t>(type)); 317 static_cast<int8_t>(type));
318 } 318 }
319 319
320 320
321 void MacroAssembler::FCmp() { 321 void MacroAssembler::FCmp() {
322 fcompp(); 322 if (CpuFeatures::IsSupported(CpuFeatures::CMOV)) {
323 push(eax); 323 fucomip();
324 fnstsw_ax(); 324 ffree(0);
325 sahf(); 325 fincstp();
326 pop(eax); 326 } else {
327 fucompp();
328 push(eax);
329 fnstsw_ax();
330 sahf();
331 pop(eax);
332 }
327 } 333 }
328 334
329 335
330 void MacroAssembler::EnterFrame(StackFrame::Type type) { 336 void MacroAssembler::EnterFrame(StackFrame::Type type) {
331 push(ebp); 337 push(ebp);
332 mov(ebp, Operand(esp)); 338 mov(ebp, Operand(esp));
333 push(esi); 339 push(esi);
334 push(Immediate(Smi::FromInt(type))); 340 push(Immediate(Smi::FromInt(type)));
335 push(Immediate(CodeObject())); 341 push(Immediate(CodeObject()));
336 if (FLAG_debug_code) { 342 if (FLAG_debug_code) {
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 // Indicate that code has changed. 1183 // Indicate that code has changed.
1178 CPU::FlushICache(address_, size_); 1184 CPU::FlushICache(address_, size_);
1179 1185
1180 // Check that the code was patched as expected. 1186 // Check that the code was patched as expected.
1181 ASSERT(masm_.pc_ == address_ + size_); 1187 ASSERT(masm_.pc_ == address_ + size_);
1182 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 1188 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
1183 } 1189 }
1184 1190
1185 1191
1186 } } // namespace v8::internal 1192 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698