OLD | NEW |
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 are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // 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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 } | 537 } |
538 | 538 |
539 void addq(const Operand& dst, Immediate src) { | 539 void addq(const Operand& dst, Immediate src) { |
540 immediate_arithmetic_op(0x0, dst, src); | 540 immediate_arithmetic_op(0x0, dst, src); |
541 } | 541 } |
542 | 542 |
543 void addl(const Operand& dst, Immediate src) { | 543 void addl(const Operand& dst, Immediate src) { |
544 immediate_arithmetic_op_32(0x0, dst, src); | 544 immediate_arithmetic_op_32(0x0, dst, src); |
545 } | 545 } |
546 | 546 |
| 547 void cmpb(Register dst, Immediate src) { |
| 548 immediate_arithmetic_op_8(0x7, dst, src); |
| 549 } |
| 550 |
547 void cmpb(const Operand& dst, Immediate src) { | 551 void cmpb(const Operand& dst, Immediate src) { |
548 immediate_arithmetic_op_8(0x7, dst, src); | 552 immediate_arithmetic_op_8(0x7, dst, src); |
549 } | 553 } |
550 | 554 |
551 void cmpq(Register dst, Register src) { | 555 void cmpq(Register dst, Register src) { |
552 arithmetic_op(0x3B, dst, src); | 556 arithmetic_op(0x3B, dst, src); |
553 } | 557 } |
554 | 558 |
555 void cmpq(Register dst, const Operand& src) { | 559 void cmpq(Register dst, const Operand& src) { |
556 arithmetic_op(0x3B, dst, src); | 560 arithmetic_op(0x3B, dst, src); |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1070 void arithmetic_op(byte opcode, Register reg, const Operand& op); | 1074 void arithmetic_op(byte opcode, Register reg, const Operand& op); |
1071 void immediate_arithmetic_op(byte subcode, Register dst, Immediate src); | 1075 void immediate_arithmetic_op(byte subcode, Register dst, Immediate src); |
1072 void immediate_arithmetic_op(byte subcode, const Operand& dst, Immediate src); | 1076 void immediate_arithmetic_op(byte subcode, const Operand& dst, Immediate src); |
1073 // Operate on a 32-bit word in memory or register. | 1077 // Operate on a 32-bit word in memory or register. |
1074 void immediate_arithmetic_op_32(byte subcode, | 1078 void immediate_arithmetic_op_32(byte subcode, |
1075 const Operand& dst, | 1079 const Operand& dst, |
1076 Immediate src); | 1080 Immediate src); |
1077 void immediate_arithmetic_op_32(byte subcode, | 1081 void immediate_arithmetic_op_32(byte subcode, |
1078 Register dst, | 1082 Register dst, |
1079 Immediate src); | 1083 Immediate src); |
1080 // Operate on a byte in memory. | 1084 // Operate on a byte in memory or register. |
1081 void immediate_arithmetic_op_8(byte subcode, | 1085 void immediate_arithmetic_op_8(byte subcode, |
1082 const Operand& dst, | 1086 const Operand& dst, |
1083 Immediate src); | 1087 Immediate src); |
| 1088 void immediate_arithmetic_op_8(byte subcode, |
| 1089 Register dst, |
| 1090 Immediate src); |
1084 // Emit machine code for a shift operation. | 1091 // Emit machine code for a shift operation. |
1085 void shift(Register dst, Immediate shift_amount, int subcode); | 1092 void shift(Register dst, Immediate shift_amount, int subcode); |
1086 // Shift dst by cl % 64 bits. | 1093 // Shift dst by cl % 64 bits. |
1087 void shift(Register dst, int subcode); | 1094 void shift(Register dst, int subcode); |
1088 void shift_32(Register dst, int subcode); | 1095 void shift_32(Register dst, int subcode); |
1089 | 1096 |
1090 void emit_farith(int b1, int b2, int i); | 1097 void emit_farith(int b1, int b2, int i); |
1091 | 1098 |
1092 // labels | 1099 // labels |
1093 // void print(Label* L); | 1100 // void print(Label* L); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1147 private: | 1154 private: |
1148 Assembler* assembler_; | 1155 Assembler* assembler_; |
1149 #ifdef DEBUG | 1156 #ifdef DEBUG |
1150 int space_before_; | 1157 int space_before_; |
1151 #endif | 1158 #endif |
1152 }; | 1159 }; |
1153 | 1160 |
1154 } } // namespace v8::internal | 1161 } } // namespace v8::internal |
1155 | 1162 |
1156 #endif // V8_X64_ASSEMBLER_X64_H_ | 1163 #endif // V8_X64_ASSEMBLER_X64_H_ |
OLD | NEW |