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

Side by Side Diff: src/codegen-ia32.cc

Issue 18270: Experimental: switch back to using MacroAssembler::Set instead of... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 11 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/virtual-frame-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-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 2891 matching lines...) Expand 10 before | Expand all | Expand 10 after
2902 2902
2903 2903
2904 void CodeGenerator::VisitLiteral(Literal* node) { 2904 void CodeGenerator::VisitLiteral(Literal* node) {
2905 Comment cmnt(masm_, "[ Literal"); 2905 Comment cmnt(masm_, "[ Literal");
2906 if (node->handle()->IsSmi() && !IsInlineSmi(node)) { 2906 if (node->handle()->IsSmi() && !IsInlineSmi(node)) {
2907 // To prevent long attacker-controlled byte sequences in code, larger 2907 // To prevent long attacker-controlled byte sequences in code, larger
2908 // Smis are loaded in two steps via a temporary register. 2908 // Smis are loaded in two steps via a temporary register.
2909 Result temp = allocator_->Allocate(); 2909 Result temp = allocator_->Allocate();
2910 ASSERT(temp.is_valid()); 2910 ASSERT(temp.is_valid());
2911 int bits = reinterpret_cast<int>(*node->handle()); 2911 int bits = reinterpret_cast<int>(*node->handle());
2912 __ mov(temp.reg(), bits & 0x0000FFFF); 2912 __ Set(temp.reg(), Immediate(bits & 0x0000FFFF));
2913 __ xor_(temp.reg(), bits & 0xFFFF0000); 2913 __ xor_(temp.reg(), bits & 0xFFFF0000);
2914 frame_->Push(&temp); 2914 frame_->Push(&temp);
2915 } else { 2915 } else {
2916 frame_->Push(node->handle()); 2916 frame_->Push(node->handle());
2917 } 2917 }
2918 } 2918 }
2919 2919
2920 2920
2921 class DeferredRegExpLiteral: public DeferredCode { 2921 class DeferredRegExpLiteral: public DeferredCode {
2922 public: 2922 public:
(...skipping 3221 matching lines...) Expand 10 before | Expand all | Expand 10 after
6144 6144
6145 // Slow-case: Go through the JavaScript implementation. 6145 // Slow-case: Go through the JavaScript implementation.
6146 __ bind(&slow); 6146 __ bind(&slow);
6147 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); 6147 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION);
6148 } 6148 }
6149 6149
6150 6150
6151 #undef __ 6151 #undef __
6152 6152
6153 } } // namespace v8::internal 6153 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/virtual-frame-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698