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

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

Issue 293003: Remove unused 'unsafe smi' code on x64. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/x64/macro-assembler-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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 // power of two to multiply the index value by (e.g. 367 // power of two to multiply the index value by (e.g.
368 // to index by smi-value * kPointerSize, pass the smi and kPointerSizeLog2). 368 // to index by smi-value * kPointerSize, pass the smi and kPointerSizeLog2).
369 // The returned index register may be either src or dst, depending 369 // The returned index register may be either src or dst, depending
370 // on what is most efficient. If src and dst are different registers, 370 // on what is most efficient. If src and dst are different registers,
371 // src is always unchanged. 371 // src is always unchanged.
372 SmiIndex SmiToIndex(Register dst, Register src, int shift); 372 SmiIndex SmiToIndex(Register dst, Register src, int shift);
373 373
374 // Converts a positive smi to a negative index. 374 // Converts a positive smi to a negative index.
375 SmiIndex SmiToNegativeIndex(Register dst, Register src, int shift); 375 SmiIndex SmiToNegativeIndex(Register dst, Register src, int shift);
376 376
377 bool IsUnsafeSmi(Smi* value); 377 // Basic Smi operations.
378 void LoadUnsafeSmi(Register dst, Smi* source); 378 void Move(Register dst, Smi* source) {
379 Set(dst, reinterpret_cast<int64_t>(source));
380 }
379 381
380 // Basic Smi operations. 382 void Move(const Operand& dst, Smi* source) {
381 void Move(Register dst, Smi* source); 383 Set(dst, reinterpret_cast<int64_t>(source));
382 void Move(const Operand& dst, Smi* source); 384 }
385
383 void Push(Smi* smi); 386 void Push(Smi* smi);
384 void Test(const Operand& dst, Smi* source); 387 void Test(const Operand& dst, Smi* source);
385 388
386 // --------------------------------------------------------------------------- 389 // ---------------------------------------------------------------------------
387 // Macro instructions 390 // Macro instructions
388 391
389 // Load a register with a long value as efficiently as possible. 392 // Load a register with a long value as efficiently as possible.
390 void Set(Register dst, int64_t x); 393 void Set(Register dst, int64_t x);
391 void Set(const Operand& dst, int64_t x); 394 void Set(const Operand& dst, int64_t x);
392 395
393 // Handle support 396 // Handle support
394 bool IsUnsafeSmi(Handle<Object> value) {
395 return IsUnsafeSmi(Smi::cast(*value));
396 }
397
398 void LoadUnsafeSmi(Register dst, Handle<Object> source) {
399 LoadUnsafeSmi(dst, Smi::cast(*source));
400 }
401
402 void Move(Register dst, Handle<Object> source); 397 void Move(Register dst, Handle<Object> source);
403 void Move(const Operand& dst, Handle<Object> source); 398 void Move(const Operand& dst, Handle<Object> source);
404 void Cmp(Register dst, Handle<Object> source); 399 void Cmp(Register dst, Handle<Object> source);
405 void Cmp(const Operand& dst, Handle<Object> source); 400 void Cmp(const Operand& dst, Handle<Object> source);
406 void Push(Handle<Object> source); 401 void Push(Handle<Object> source);
407 402
408 // Control Flow 403 // Control Flow
409 void Jump(Address destination, RelocInfo::Mode rmode); 404 void Jump(Address destination, RelocInfo::Mode rmode);
410 void Jump(ExternalReference ext); 405 void Jump(ExternalReference ext);
411 void Jump(Handle<Code> code_object, RelocInfo::Mode rmode); 406 void Jump(Handle<Code> code_object, RelocInfo::Mode rmode);
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 } \ 693 } \
699 masm-> 694 masm->
700 #else 695 #else
701 #define ACCESS_MASM(masm) masm-> 696 #define ACCESS_MASM(masm) masm->
702 #endif 697 #endif
703 698
704 699
705 } } // namespace v8::internal 700 } } // namespace v8::internal
706 701
707 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ 702 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « no previous file | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698