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

Side by Side Diff: src/x64/assembler-x64-inl.h

Issue 196139: X64: Convert smis to holding 32 bits of payload. (Closed)
Patch Set: Addressed review comments. Forwarded to head. Created 11 years, 2 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 unified diff | Download patch
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698