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

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

Issue 21014003: Optionally use 31-bits SMI value for 64-bit system (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 }; 371 };
372 } 372 }
373 373
374 374
375 // ----------------------------------------------------------------------------- 375 // -----------------------------------------------------------------------------
376 // Machine instruction Immediates 376 // Machine instruction Immediates
377 377
378 class Immediate BASE_EMBEDDED { 378 class Immediate BASE_EMBEDDED {
379 public: 379 public:
380 explicit Immediate(int32_t value) : value_(value) {} 380 explicit Immediate(int32_t value) : value_(value) {}
381 #if V8_USE_31_BITS_SMI_VALUE
382 explicit Immediate(Smi* value) {
danno 2013/07/29 13:02:23 Don't add a Smi* constructor here. The wrapper fun
haitao.feng 2013/07/30 08:56:43 Done.
383 value_ = static_cast<int32_t>(reinterpret_cast<intptr_t>(value));
384 }
385 #endif
381 386
382 private: 387 private:
383 int32_t value_; 388 int32_t value_;
384 389
385 friend class Assembler; 390 friend class Assembler;
386 }; 391 };
387 392
388 393
389 // ----------------------------------------------------------------------------- 394 // -----------------------------------------------------------------------------
390 // Machine instruction Operands 395 // Machine instruction Operands
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 986
982 987
983 void rcl(Register dst, Immediate imm8) { 988 void rcl(Register dst, Immediate imm8) {
984 shift(dst, imm8, 0x2); 989 shift(dst, imm8, 0x2);
985 } 990 }
986 991
987 void rol(Register dst, Immediate imm8) { 992 void rol(Register dst, Immediate imm8) {
988 shift(dst, imm8, 0x0); 993 shift(dst, imm8, 0x0);
989 } 994 }
990 995
996 #if V8_USE_31_BITS_SMI_VALUE
danno 2013/07/29 13:02:23 Is there some way to not including this conditiona
haitao.feng 2013/07/30 08:56:43 Done.
997 void roll(Register dst, Immediate imm8) {
998 shift_32(dst, imm8, 0x0);
999 }
1000 #endif
1001
991 void rcr(Register dst, Immediate imm8) { 1002 void rcr(Register dst, Immediate imm8) {
992 shift(dst, imm8, 0x3); 1003 shift(dst, imm8, 0x3);
993 } 1004 }
994 1005
995 void ror(Register dst, Immediate imm8) { 1006 void ror(Register dst, Immediate imm8) {
996 shift(dst, imm8, 0x1); 1007 shift(dst, imm8, 0x1);
997 } 1008 }
998 1009
999 void rorl(Register dst, Immediate imm8) { 1010 void rorl(Register dst, Immediate imm8) {
1000 shift_32(dst, imm8, 0x1); 1011 shift_32(dst, imm8, 0x1);
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
1371 kRoundToNearest = 0x0, 1382 kRoundToNearest = 0x0,
1372 kRoundDown = 0x1, 1383 kRoundDown = 0x1,
1373 kRoundUp = 0x2, 1384 kRoundUp = 0x2,
1374 kRoundToZero = 0x3 1385 kRoundToZero = 0x3
1375 }; 1386 };
1376 1387
1377 void roundsd(XMMRegister dst, XMMRegister src, RoundingMode mode); 1388 void roundsd(XMMRegister dst, XMMRegister src, RoundingMode mode);
1378 1389
1379 void movmskpd(Register dst, XMMRegister src); 1390 void movmskpd(Register dst, XMMRegister src);
1380 void movmskps(Register dst, XMMRegister src); 1391 void movmskps(Register dst, XMMRegister src);
1392 #if V8_USE_31_BITS_SMI_VALUE
1393 void pcmpeqd(XMMRegister dst, XMMRegister src);
danno 2013/07/29 13:02:23 Why can't this always be part of the code (no cond
haitao.feng 2013/07/30 08:56:43 Done.
1394 #endif
1381 1395
1382 // The first argument is the reg field, the second argument is the r/m field. 1396 // The first argument is the reg field, the second argument is the r/m field.
1383 void emit_sse_operand(XMMRegister dst, XMMRegister src); 1397 void emit_sse_operand(XMMRegister dst, XMMRegister src);
1384 void emit_sse_operand(XMMRegister reg, const Operand& adr); 1398 void emit_sse_operand(XMMRegister reg, const Operand& adr);
1385 void emit_sse_operand(XMMRegister dst, Register src); 1399 void emit_sse_operand(XMMRegister dst, Register src);
1386 void emit_sse_operand(Register dst, XMMRegister src); 1400 void emit_sse_operand(Register dst, XMMRegister src);
1387 1401
1388 // Debugging 1402 // Debugging
1389 void Print(); 1403 void Print();
1390 1404
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1652 private: 1666 private:
1653 Assembler* assembler_; 1667 Assembler* assembler_;
1654 #ifdef DEBUG 1668 #ifdef DEBUG
1655 int space_before_; 1669 int space_before_;
1656 #endif 1670 #endif
1657 }; 1671 };
1658 1672
1659 } } // namespace v8::internal 1673 } } // namespace v8::internal
1660 1674
1661 #endif // V8_X64_ASSEMBLER_X64_H_ 1675 #endif // V8_X64_ASSEMBLER_X64_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698