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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 bool is_byte_register() const { return code_ <= 3; } | 70 bool is_byte_register() const { return code_ <= 3; } |
71 int code() const { | 71 int code() const { |
72 ASSERT(is_valid()); | 72 ASSERT(is_valid()); |
73 return code_; | 73 return code_; |
74 } | 74 } |
75 int bit() const { | 75 int bit() const { |
76 ASSERT(is_valid()); | 76 ASSERT(is_valid()); |
77 return 1 << code_; | 77 return 1 << code_; |
78 } | 78 } |
79 | 79 |
80 // (unfortunately we can't make this private in a struct) | 80 // Unfortunately we can't make this private in a struct. |
81 int code_; | 81 int code_; |
82 }; | 82 }; |
83 | 83 |
84 const Register eax = { 0 }; | 84 const Register eax = { 0 }; |
85 const Register ecx = { 1 }; | 85 const Register ecx = { 1 }; |
86 const Register edx = { 2 }; | 86 const Register edx = { 2 }; |
87 const Register ebx = { 3 }; | 87 const Register ebx = { 3 }; |
88 const Register esp = { 4 }; | 88 const Register esp = { 4 }; |
89 const Register ebp = { 5 }; | 89 const Register ebp = { 5 }; |
90 const Register esi = { 6 }; | 90 const Register esi = { 6 }; |
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
909 private: | 909 private: |
910 Assembler* assembler_; | 910 Assembler* assembler_; |
911 #ifdef DEBUG | 911 #ifdef DEBUG |
912 int space_before_; | 912 int space_before_; |
913 #endif | 913 #endif |
914 }; | 914 }; |
915 | 915 |
916 } } // namespace v8::internal | 916 } } // namespace v8::internal |
917 | 917 |
918 #endif // V8_IA32_ASSEMBLER_IA32_H_ | 918 #endif // V8_IA32_ASSEMBLER_IA32_H_ |
OLD | NEW |