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

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

Issue 146082: X64 implementation: comparison operations. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 6 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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 emit(src.value_); 497 emit(src.value_);
498 } else { 498 } else {
499 emit(0x81); 499 emit(0x81);
500 emit_operand(subcode, dst); 500 emit_operand(subcode, dst);
501 emitl(src.value_); 501 emitl(src.value_);
502 } 502 }
503 } 503 }
504 504
505 505
506 void Assembler::immediate_arithmetic_op_8(byte subcode, 506 void Assembler::immediate_arithmetic_op_8(byte subcode,
507 const Operand& dst, 507 const Operand& dst,
508 Immediate src) { 508 Immediate src) {
509 EnsureSpace ensure_space(this); 509 EnsureSpace ensure_space(this);
510 last_pc_ = pc_; 510 last_pc_ = pc_;
511 emit_optional_rex_32(dst); 511 emit_optional_rex_32(dst);
512 ASSERT(is_int8(src.value_)); 512 ASSERT(is_int8(src.value_) || is_uint8(src.value_));
513 emit(0x80); 513 emit(0x80);
514 emit_operand(subcode, dst); 514 emit_operand(subcode, dst);
515 emit(src.value_); 515 emit(src.value_);
516 } 516 }
517 517
518 518
519 void Assembler::immediate_arithmetic_op_8(byte subcode,
520 Register dst,
521 Immediate src) {
522 EnsureSpace ensure_space(this);
523 last_pc_ = pc_;
524 if (dst.code() > 3) {
525 // Use 64-bit mode byte registers.
526 emit_rex_64(dst);
527 }
528 ASSERT(is_int8(src.value_) || is_uint8(src.value_));
529 emit(0x80);
530 emit_modrm(subcode, dst);
531 emit(src.value_);
532 }
533
534
519 void Assembler::shift(Register dst, Immediate shift_amount, int subcode) { 535 void Assembler::shift(Register dst, Immediate shift_amount, int subcode) {
520 EnsureSpace ensure_space(this); 536 EnsureSpace ensure_space(this);
521 last_pc_ = pc_; 537 last_pc_ = pc_;
522 ASSERT(is_uint6(shift_amount.value_)); // illegal shift count 538 ASSERT(is_uint6(shift_amount.value_)); // illegal shift count
523 if (shift_amount.value_ == 1) { 539 if (shift_amount.value_ == 1) {
524 emit_rex_64(dst); 540 emit_rex_64(dst);
525 emit(0xD1); 541 emit(0xD1);
526 emit_modrm(subcode, dst); 542 emit_modrm(subcode, dst);
527 } else { 543 } else {
528 emit_rex_64(dst); 544 emit_rex_64(dst);
(...skipping 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after
2089 bool BreakLocationIterator::IsDebugBreakAtReturn() { 2105 bool BreakLocationIterator::IsDebugBreakAtReturn() {
2090 UNIMPLEMENTED(); 2106 UNIMPLEMENTED();
2091 return false; 2107 return false;
2092 } 2108 }
2093 2109
2094 void BreakLocationIterator::SetDebugBreakAtReturn() { 2110 void BreakLocationIterator::SetDebugBreakAtReturn() {
2095 UNIMPLEMENTED(); 2111 UNIMPLEMENTED();
2096 } 2112 }
2097 2113
2098 } } // namespace v8::internal 2114 } } // 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