| 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 case greater_equal: | 242 case greater_equal: |
| 243 return less_equal; | 243 return less_equal; |
| 244 case less_equal: | 244 case less_equal: |
| 245 return greater_equal; | 245 return greater_equal; |
| 246 default: | 246 default: |
| 247 return cc; | 247 return cc; |
| 248 }; | 248 }; |
| 249 } | 249 } |
| 250 | 250 |
| 251 | 251 |
| 252 enum Hint { | |
| 253 no_hint = 0, | |
| 254 not_taken = 0x2e, | |
| 255 taken = 0x3e | |
| 256 }; | |
| 257 | |
| 258 | |
| 259 // The result of negating a hint is as if the corresponding condition | |
| 260 // were negated by NegateCondition. That is, no_hint is mapped to | |
| 261 // itself and not_taken and taken are mapped to each other. | |
| 262 inline Hint NegateHint(Hint hint) { | |
| 263 return (hint == no_hint) | |
| 264 ? no_hint | |
| 265 : ((hint == not_taken) ? taken : not_taken); | |
| 266 } | |
| 267 | |
| 268 | |
| 269 // ----------------------------------------------------------------------------- | 252 // ----------------------------------------------------------------------------- |
| 270 // Machine instruction Immediates | 253 // Machine instruction Immediates |
| 271 | 254 |
| 272 class Immediate BASE_EMBEDDED { | 255 class Immediate BASE_EMBEDDED { |
| 273 public: | 256 public: |
| 274 inline explicit Immediate(int x); | 257 inline explicit Immediate(int x); |
| 275 inline explicit Immediate(const ExternalReference& ext); | 258 inline explicit Immediate(const ExternalReference& ext); |
| 276 inline explicit Immediate(Handle<Object> handle); | 259 inline explicit Immediate(Handle<Object> handle); |
| 277 inline explicit Immediate(Smi* value); | 260 inline explicit Immediate(Smi* value); |
| 278 inline explicit Immediate(Address addr); | 261 inline explicit Immediate(Address addr); |
| (...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 // Jumps | 839 // Jumps |
| 857 // unconditional jump to L | 840 // unconditional jump to L |
| 858 void jmp(Label* L, Label::Distance distance = Label::kFar); | 841 void jmp(Label* L, Label::Distance distance = Label::kFar); |
| 859 void jmp(byte* entry, RelocInfo::Mode rmode); | 842 void jmp(byte* entry, RelocInfo::Mode rmode); |
| 860 void jmp(const Operand& adr); | 843 void jmp(const Operand& adr); |
| 861 void jmp(Handle<Code> code, RelocInfo::Mode rmode); | 844 void jmp(Handle<Code> code, RelocInfo::Mode rmode); |
| 862 | 845 |
| 863 // Conditional jumps | 846 // Conditional jumps |
| 864 void j(Condition cc, | 847 void j(Condition cc, |
| 865 Label* L, | 848 Label* L, |
| 866 Hint hint, | |
| 867 Label::Distance distance = Label::kFar); | 849 Label::Distance distance = Label::kFar); |
| 868 void j(Condition cc, Label* L, Label::Distance distance = Label::kFar) { | 850 void j(Condition cc, byte* entry, RelocInfo::Mode rmode); |
| 869 j(cc, L, no_hint, distance); | 851 void j(Condition cc, Handle<Code> code); |
| 870 } | |
| 871 void j(Condition cc, byte* entry, RelocInfo::Mode rmode, Hint hint = no_hint); | |
| 872 void j(Condition cc, Handle<Code> code, Hint hint = no_hint); | |
| 873 | 852 |
| 874 // Floating-point operations | 853 // Floating-point operations |
| 875 void fld(int i); | 854 void fld(int i); |
| 876 void fstp(int i); | 855 void fstp(int i); |
| 877 | 856 |
| 878 void fld1(); | 857 void fld1(); |
| 879 void fldz(); | 858 void fldz(); |
| 880 void fldpi(); | 859 void fldpi(); |
| 881 void fldln2(); | 860 void fldln2(); |
| 882 | 861 |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1155 private: | 1134 private: |
| 1156 Assembler* assembler_; | 1135 Assembler* assembler_; |
| 1157 #ifdef DEBUG | 1136 #ifdef DEBUG |
| 1158 int space_before_; | 1137 int space_before_; |
| 1159 #endif | 1138 #endif |
| 1160 }; | 1139 }; |
| 1161 | 1140 |
| 1162 } } // namespace v8::internal | 1141 } } // namespace v8::internal |
| 1163 | 1142 |
| 1164 #endif // V8_IA32_ASSEMBLER_IA32_H_ | 1143 #endif // V8_IA32_ASSEMBLER_IA32_H_ |
| OLD | NEW |