OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "cpu.h" | 31 #include "cpu.h" |
32 #include "memory.h" | 32 #include "memory.h" |
33 | 33 |
34 namespace v8 { | 34 namespace v8 { |
35 namespace internal { | 35 namespace internal { |
36 | 36 |
37 Condition NegateCondition(Condition cc) { | 37 Condition NegateCondition(Condition cc) { |
38 return static_cast<Condition>(cc ^ 1); | 38 return static_cast<Condition>(cc ^ 1); |
39 } | 39 } |
40 | 40 |
41 // ----------------------------------------------------------------------------- | |
42 | |
43 Immediate::Immediate(Smi* value) { | |
44 value_ = static_cast<int32_t>(reinterpret_cast<intptr_t>(value)); | |
45 } | |
46 | 41 |
47 // ----------------------------------------------------------------------------- | 42 // ----------------------------------------------------------------------------- |
48 // Implementation of Assembler | 43 // Implementation of Assembler |
49 | 44 |
50 | 45 |
51 | 46 |
52 void Assembler::emitl(uint32_t x) { | 47 void Assembler::emitl(uint32_t x) { |
53 Memory::uint32_at(pc_) = x; | 48 Memory::uint32_at(pc_) = x; |
54 pc_ += sizeof(uint32_t); | 49 pc_ += sizeof(uint32_t); |
55 } | 50 } |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 ASSERT(len_ == 1 || len_ == 2); | 339 ASSERT(len_ == 1 || len_ == 2); |
345 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); | 340 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); |
346 *p = disp; | 341 *p = disp; |
347 len_ += sizeof(int32_t); | 342 len_ += sizeof(int32_t); |
348 } | 343 } |
349 | 344 |
350 | 345 |
351 } } // namespace v8::internal | 346 } } // namespace v8::internal |
352 | 347 |
353 #endif // V8_X64_ASSEMBLER_X64_INL_H_ | 348 #endif // V8_X64_ASSEMBLER_X64_INL_H_ |
OLD | NEW |