Revision: 2680
Author: [email protected]
Date: Thu Aug 13 05:35:09 2009
Log: X64: Change testl to testb if mask fits in 1 byte. Shortens smi test.
Review URL: http://codereview.chromium.org/164472
http://code.google.com/p/v8/source/detail?r=2680
Modified:
/branches/bleeding_edge/src/x64/assembler-x64.cc
=======================================
--- /branches/bleeding_edge/src/x64/assembler-x64.cc Fri Aug 7 04:16:26
2009
+++ /branches/bleeding_edge/src/x64/assembler-x64.cc Thu Aug 13 05:35:09
2009
@@ -1608,6 +1608,11 @@
void Assembler::testl(Register reg, Immediate mask) {
+ // testl with a mask that fits in the low byte is exactly testb.
+ if (is_uint8(mask.value_)) {
+ testb(reg, mask);
+ return;
+ }
EnsureSpace ensure_space(this);
last_pc_ = pc_;
if (reg.is(rax)) {
@@ -1623,6 +1628,11 @@
void Assembler::testl(const Operand& op, Immediate mask) {
+ // testl with a mask that fits in the low byte is exactly testb.
+ if (is_uint8(mask.value_)) {
+ testb(op, mask);
+ return;
+ }
EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(rax, op);
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---