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

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

Issue 2801008: Port faster callbacks invocation to x64. (Closed)
Patch Set: Minor cosmetic changes Created 10 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
« 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 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after
1489 } 1489 }
1490 EnsureSpace ensure_space(this); 1490 EnsureSpace ensure_space(this);
1491 last_pc_ = pc_; 1491 last_pc_ = pc_;
1492 emit_rex_64(dst); 1492 emit_rex_64(dst);
1493 emit(0xB8 | dst.low_bits()); 1493 emit(0xB8 | dst.low_bits());
1494 emitq(value, rmode); 1494 emitq(value, rmode);
1495 } 1495 }
1496 1496
1497 1497
1498 void Assembler::movq(Register dst, ExternalReference ref) { 1498 void Assembler::movq(Register dst, ExternalReference ref) {
1499 EnsureSpace ensure_space(this); 1499 int64_t value = reinterpret_cast<int64_t>(ref.address());
1500 last_pc_ = pc_; 1500 movq(dst, value, RelocInfo::EXTERNAL_REFERENCE);
1501 emit_rex_64(dst);
1502 emit(0xB8 | dst.low_bits());
1503 emitq(reinterpret_cast<uintptr_t>(ref.address()),
1504 RelocInfo::EXTERNAL_REFERENCE);
1505 } 1501 }
1506 1502
1507 1503
1508 void Assembler::movq(const Operand& dst, Immediate value) { 1504 void Assembler::movq(const Operand& dst, Immediate value) {
1509 EnsureSpace ensure_space(this); 1505 EnsureSpace ensure_space(this);
1510 last_pc_ = pc_; 1506 last_pc_ = pc_;
1511 emit_rex_64(dst); 1507 emit_rex_64(dst);
1512 emit(0xC7); 1508 emit(0xC7);
1513 emit_operand(0, dst); 1509 emit_operand(0, dst);
1514 emit(value); 1510 emit(value);
(...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after
2954 // specially coded on x64 means that it is a relative 32 bit address, as used 2950 // specially coded on x64 means that it is a relative 32 bit address, as used
2955 // by branch instructions. 2951 // by branch instructions.
2956 return (1 << rmode_) & kApplyMask; 2952 return (1 << rmode_) & kApplyMask;
2957 } 2953 }
2958 2954
2959 2955
2960 2956
2961 } } // namespace v8::internal 2957 } } // namespace v8::internal
2962 2958
2963 #endif // V8_TARGET_ARCH_X64 2959 #endif // V8_TARGET_ARCH_X64
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