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

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

Issue 21521002: Use test(reg, imm) when the operand is a register on ia32 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 4 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 1220
1221 void Assembler::test_b(Register reg, const Operand& op) { 1221 void Assembler::test_b(Register reg, const Operand& op) {
1222 CHECK(reg.is_byte_register()); 1222 CHECK(reg.is_byte_register());
1223 EnsureSpace ensure_space(this); 1223 EnsureSpace ensure_space(this);
1224 EMIT(0x84); 1224 EMIT(0x84);
1225 emit_operand(reg, op); 1225 emit_operand(reg, op);
1226 } 1226 }
1227 1227
1228 1228
1229 void Assembler::test(const Operand& op, const Immediate& imm) { 1229 void Assembler::test(const Operand& op, const Immediate& imm) {
1230 if (op.is_reg_only()) {
1231 test(op.reg(), imm);
1232 return;
1233 }
1230 EnsureSpace ensure_space(this); 1234 EnsureSpace ensure_space(this);
1231 EMIT(0xF7); 1235 EMIT(0xF7);
1232 emit_operand(eax, op); 1236 emit_operand(eax, op);
1233 emit(imm); 1237 emit(imm);
1234 } 1238 }
1235 1239
1236 1240
1237 void Assembler::test_b(const Operand& op, uint8_t imm8) { 1241 void Assembler::test_b(const Operand& op, uint8_t imm8) {
1238 if (op.is_reg_only() && !op.reg().is_byte_register()) { 1242 if (op.is_reg_only() && !op.reg().is_byte_register()) {
1239 test(op, Immediate(imm8)); 1243 test(op, Immediate(imm8));
(...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after
2704 fprintf(coverage_log, "%s\n", file_line); 2708 fprintf(coverage_log, "%s\n", file_line);
2705 fflush(coverage_log); 2709 fflush(coverage_log);
2706 } 2710 }
2707 } 2711 }
2708 2712
2709 #endif 2713 #endif
2710 2714
2711 } } // namespace v8::internal 2715 } } // namespace v8::internal
2712 2716
2713 #endif // V8_TARGET_ARCH_IA32 2717 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698