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

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

Issue 155083: X64: Make comparisons work on zero-extended smis. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 5 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 | « src/x64/assembler-x64.h ('k') | src/x64/codegen-x64.cc » ('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 2009 the V8 project authors. All rights reserved. 1 // Copyright 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 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after
1442 store_rax(ref.address(), RelocInfo::EXTERNAL_REFERENCE); 1442 store_rax(ref.address(), RelocInfo::EXTERNAL_REFERENCE);
1443 } 1443 }
1444 1444
1445 1445
1446 void Assembler::testb(Register reg, Immediate mask) { 1446 void Assembler::testb(Register reg, Immediate mask) {
1447 ASSERT(is_int8(mask.value_)); 1447 ASSERT(is_int8(mask.value_));
1448 EnsureSpace ensure_space(this); 1448 EnsureSpace ensure_space(this);
1449 last_pc_ = pc_; 1449 last_pc_ = pc_;
1450 if (reg.is(rax)) { 1450 if (reg.is(rax)) {
1451 emit(0xA8); 1451 emit(0xA8);
1452 emit(mask); 1452 emit(mask.value_); // Low byte emitted.
1453 } else { 1453 } else {
1454 if (reg.code() > 3) { 1454 if (reg.code() > 3) {
1455 // Register is not one of al, bl, cl, dl. Its encoding needs REX. 1455 // Register is not one of al, bl, cl, dl. Its encoding needs REX.
1456 emit_rex_32(reg); 1456 emit_rex_32(reg);
1457 } 1457 }
1458 emit(0xF6); 1458 emit(0xF6);
1459 emit_modrm(0x0, reg); 1459 emit_modrm(0x0, reg);
1460 emit(mask.value_); // Low byte emitted. 1460 emit(mask.value_); // Low byte emitted.
1461 } 1461 }
1462 } 1462 }
1463 1463
1464 1464
1465 void Assembler::testb(const Operand& op, Immediate mask) { 1465 void Assembler::testb(const Operand& op, Immediate mask) {
1466 ASSERT(is_int8(mask.value_)); 1466 ASSERT(is_int8(mask.value_));
1467 EnsureSpace ensure_space(this); 1467 EnsureSpace ensure_space(this);
1468 last_pc_ = pc_; 1468 last_pc_ = pc_;
1469 emit_optional_rex_32(rax, op); 1469 emit_optional_rex_32(rax, op);
1470 emit(0xF6); 1470 emit(0xF6);
1471 emit_operand(rax, op); // Operation code 0 1471 emit_operand(rax, op); // Operation code 0
1472 emit(mask.value_); // Low byte emitted. 1472 emit(mask.value_); // Low byte emitted.
1473 } 1473 }
1474 1474
1475 1475
1476 void Assembler::testl(Register dst, Register src) {
1477 EnsureSpace ensure_space(this);
1478 last_pc_ = pc_;
1479 emit_optional_rex_32(dst, src);
1480 emit(0x85);
1481 emit_modrm(dst, src);
1482 }
1483
1484
1476 void Assembler::testl(Register reg, Immediate mask) { 1485 void Assembler::testl(Register reg, Immediate mask) {
1477 EnsureSpace ensure_space(this); 1486 EnsureSpace ensure_space(this);
1478 last_pc_ = pc_; 1487 last_pc_ = pc_;
1479 if (reg.is(rax)) { 1488 if (reg.is(rax)) {
1480 emit(0xA9); 1489 emit(0xA9);
1481 emit(mask); 1490 emit(mask);
1482 } else { 1491 } else {
1483 emit_optional_rex_32(rax, reg); 1492 emit_optional_rex_32(rax, reg);
1484 emit(0xF7); 1493 emit(0xF7);
1485 emit_modrm(0x0, reg); 1494 emit_modrm(0x0, reg);
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
2135 bool BreakLocationIterator::IsDebugBreakAtReturn() { 2144 bool BreakLocationIterator::IsDebugBreakAtReturn() {
2136 UNIMPLEMENTED(); 2145 UNIMPLEMENTED();
2137 return false; 2146 return false;
2138 } 2147 }
2139 2148
2140 void BreakLocationIterator::SetDebugBreakAtReturn() { 2149 void BreakLocationIterator::SetDebugBreakAtReturn() {
2141 UNIMPLEMENTED(); 2150 UNIMPLEMENTED();
2142 } 2151 }
2143 2152
2144 } } // namespace v8::internal 2153 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.h ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698