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

Unified Diff: src/x64/assembler-x64.h

Issue 2075010: X64: Make all arithmetic ops, and a few other, try to avoid rsp and r12 as base register. (Closed)
Patch Set: Created 10 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/x64/assembler-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/assembler-x64.h
diff --git a/src/x64/assembler-x64.h b/src/x64/assembler-x64.h
index 0f06c3c448c4ca5d93f9ec522f9f0e68a07fa445..b55a7b72631046bdf442cbcf36374b34acea2f80 100644
--- a/src/x64/assembler-x64.h
+++ b/src/x64/assembler-x64.h
@@ -567,11 +567,7 @@ class Assembler : public Malloced {
// Arithmetics
void addl(Register dst, Register src) {
- if (dst.low_bits() == 4) { // Forces SIB byte.
- arithmetic_op_32(0x01, src, dst);
- } else {
- arithmetic_op_32(0x03, dst, src);
- }
+ arithmetic_op_32(0x03, dst, src);
}
void addl(Register dst, Immediate src) {
@@ -607,11 +603,7 @@ class Assembler : public Malloced {
}
void sbbl(Register dst, Register src) {
- if (dst.low_bits() == 4) { // Forces SIB byte if dst is base register.
- arithmetic_op_32(0x19, src, dst);
- } else {
- arithmetic_op_32(0x1b, dst, src);
- }
+ arithmetic_op_32(0x1b, dst, src);
}
void cmpb(Register dst, Immediate src) {
« no previous file with comments | « no previous file | src/x64/assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698