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

Side by Side Diff: bleeding_edge/src/ia32/macro-assembler-ia32.h

Issue 501113: Refactor smi tagging and untagging on IA-32. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years 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 | Annotate | Revision Log
« no previous file with comments | « bleeding_edge/src/ia32/codegen-ia32.cc ('k') | bleeding_edge/src/ia32/stub-cache-ia32.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // Incoming register is heap_object and outgoing register is map. 135 // Incoming register is heap_object and outgoing register is map.
136 void CmpObjectType(Register heap_object, InstanceType type, Register map); 136 void CmpObjectType(Register heap_object, InstanceType type, Register map);
137 137
138 // Compare instance type for map. 138 // Compare instance type for map.
139 void CmpInstanceType(Register map, InstanceType type); 139 void CmpInstanceType(Register map, InstanceType type);
140 140
141 // FCmp is similar to integer cmp, but requires unsigned 141 // FCmp is similar to integer cmp, but requires unsigned
142 // jcc instructions (je, ja, jae, jb, jbe, je, and jz). 142 // jcc instructions (je, ja, jae, jb, jbe, je, and jz).
143 void FCmp(); 143 void FCmp();
144 144
145 // Smi tagging support.
146 void SmiTag(Register reg) {
147 ASSERT(kSmiTag == 0);
148 shl(reg, kSmiTagSize);
149 }
150 void SmiUntag(Register reg) {
151 sar(reg, kSmiTagSize);
152 }
153
145 // --------------------------------------------------------------------------- 154 // ---------------------------------------------------------------------------
146 // Exception handling 155 // Exception handling
147 156
148 // Push a new try handler and link into try handler chain. The return 157 // Push a new try handler and link into try handler chain. The return
149 // address must be pushed before calling this helper. 158 // address must be pushed before calling this helper.
150 void PushTryHandler(CodeLocation try_location, HandlerType type); 159 void PushTryHandler(CodeLocation try_location, HandlerType type);
151 160
152 // Unlink the stack handler on top of the stack from the try handler chain. 161 // Unlink the stack handler on top of the stack from the try handler chain.
153 void PopTryHandler(); 162 void PopTryHandler();
154 163
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 } \ 486 } \
478 masm-> 487 masm->
479 #else 488 #else
480 #define ACCESS_MASM(masm) masm-> 489 #define ACCESS_MASM(masm) masm->
481 #endif 490 #endif
482 491
483 492
484 } } // namespace v8::internal 493 } } // namespace v8::internal
485 494
486 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ 495 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « bleeding_edge/src/ia32/codegen-ia32.cc ('k') | bleeding_edge/src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698