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

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

Issue 15085026: ARM: Smi refactoring and improvements. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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/arm/assembler-arm.cc » ('j') | src/arm/macro-assembler-arm.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are 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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 } 452 }
453 INLINE(explicit Operand(const ExternalReference& f)); 453 INLINE(explicit Operand(const ExternalReference& f));
454 explicit Operand(Handle<Object> handle); 454 explicit Operand(Handle<Object> handle);
455 INLINE(explicit Operand(Smi* value)); 455 INLINE(explicit Operand(Smi* value));
456 456
457 // rm 457 // rm
458 INLINE(explicit Operand(Register rm)); 458 INLINE(explicit Operand(Register rm));
459 459
460 // rm <shift_op> shift_imm 460 // rm <shift_op> shift_imm
461 explicit Operand(Register rm, ShiftOp shift_op, int shift_imm); 461 explicit Operand(Register rm, ShiftOp shift_op, int shift_imm);
462 INLINE(static Operand SmiUntag(Register rm)) {
463 return Operand(rm, ASR, kSmiTagSize);
464 }
465 INLINE(static Operand PointerOffsetFromSmiKey(Register key)) {
466 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize < kPointerSizeLog2);
467 return Operand(key, LSL, kPointerSizeLog2 - kSmiTagSize);
468 }
469 INLINE(static Operand DoubleOffsetFromSmiKey(Register key)) {
470 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize < kDoubleSizeLog2);
471 return Operand(key, LSL, kDoubleSizeLog2 - kSmiTagSize);
472 }
462 473
463 // rm <shift_op> rs 474 // rm <shift_op> rs
464 explicit Operand(Register rm, ShiftOp shift_op, Register rs); 475 explicit Operand(Register rm, ShiftOp shift_op, Register rs);
465 476
466 // Return true if this is a register operand. 477 // Return true if this is a register operand.
467 INLINE(bool is_reg() const); 478 INLINE(bool is_reg() const);
468 479
469 // Return true if this operand fits in one instruction so that no 480 // Return true if this operand fits in one instruction so that no
470 // 2-instruction solution with a load into the ip register is necessary. If 481 // 2-instruction solution with a load into the ip register is necessary. If
471 // the instruction this operand is used for is a MOV or MVN instruction the 482 // the instruction this operand is used for is a MOV or MVN instruction the
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 // [rn +/- rm] Offset/NegOffset 519 // [rn +/- rm] Offset/NegOffset
509 // [rn +/- rm]! PreIndex/NegPreIndex 520 // [rn +/- rm]! PreIndex/NegPreIndex
510 // [rn], +/- rm PostIndex/NegPostIndex 521 // [rn], +/- rm PostIndex/NegPostIndex
511 explicit MemOperand(Register rn, Register rm, AddrMode am = Offset); 522 explicit MemOperand(Register rn, Register rm, AddrMode am = Offset);
512 523
513 // [rn +/- rm <shift_op> shift_imm] Offset/NegOffset 524 // [rn +/- rm <shift_op> shift_imm] Offset/NegOffset
514 // [rn +/- rm <shift_op> shift_imm]! PreIndex/NegPreIndex 525 // [rn +/- rm <shift_op> shift_imm]! PreIndex/NegPreIndex
515 // [rn], +/- rm <shift_op> shift_imm PostIndex/NegPostIndex 526 // [rn], +/- rm <shift_op> shift_imm PostIndex/NegPostIndex
516 explicit MemOperand(Register rn, Register rm, 527 explicit MemOperand(Register rn, Register rm,
517 ShiftOp shift_op, int shift_imm, AddrMode am = Offset); 528 ShiftOp shift_op, int shift_imm, AddrMode am = Offset);
529 INLINE(static MemOperand PointerAddressFromSmiKey(Register array,
530 Register key,
531 AddrMode am = Offset)) {
532 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize < kPointerSizeLog2);
533 return MemOperand(array, key, LSL, kPointerSizeLog2 - kSmiTagSize, am);
534 }
518 535
519 void set_offset(int32_t offset) { 536 void set_offset(int32_t offset) {
520 ASSERT(rm_.is(no_reg)); 537 ASSERT(rm_.is(no_reg));
521 offset_ = offset; 538 offset_ = offset;
522 } 539 }
523 540
524 uint32_t offset() const { 541 uint32_t offset() const {
525 ASSERT(rm_.is(no_reg)); 542 ASSERT(rm_.is(no_reg));
526 return offset_; 543 return offset_;
527 } 544 }
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 VFPConversionMode mode = kDefaultRoundToZero, 1042 VFPConversionMode mode = kDefaultRoundToZero,
1026 const Condition cond = al); 1043 const Condition cond = al);
1027 void vcvt_f64_f32(const DwVfpRegister dst, 1044 void vcvt_f64_f32(const DwVfpRegister dst,
1028 const SwVfpRegister src, 1045 const SwVfpRegister src,
1029 VFPConversionMode mode = kDefaultRoundToZero, 1046 VFPConversionMode mode = kDefaultRoundToZero,
1030 const Condition cond = al); 1047 const Condition cond = al);
1031 void vcvt_f32_f64(const SwVfpRegister dst, 1048 void vcvt_f32_f64(const SwVfpRegister dst,
1032 const DwVfpRegister src, 1049 const DwVfpRegister src,
1033 VFPConversionMode mode = kDefaultRoundToZero, 1050 VFPConversionMode mode = kDefaultRoundToZero,
1034 const Condition cond = al); 1051 const Condition cond = al);
1052 void vcvt_f64_s32(const DwVfpRegister dst,
1053 int fraction_bits,
1054 const Condition cond = al);
1035 1055
1036 void vneg(const DwVfpRegister dst, 1056 void vneg(const DwVfpRegister dst,
1037 const DwVfpRegister src, 1057 const DwVfpRegister src,
1038 const Condition cond = al); 1058 const Condition cond = al);
1039 void vabs(const DwVfpRegister dst, 1059 void vabs(const DwVfpRegister dst,
1040 const DwVfpRegister src, 1060 const DwVfpRegister src,
1041 const Condition cond = al); 1061 const Condition cond = al);
1042 void vadd(const DwVfpRegister dst, 1062 void vadd(const DwVfpRegister dst,
1043 const DwVfpRegister src1, 1063 const DwVfpRegister src1,
1044 const DwVfpRegister src2, 1064 const DwVfpRegister src2,
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
1414 public: 1434 public:
1415 explicit EnsureSpace(Assembler* assembler) { 1435 explicit EnsureSpace(Assembler* assembler) {
1416 assembler->CheckBuffer(); 1436 assembler->CheckBuffer();
1417 } 1437 }
1418 }; 1438 };
1419 1439
1420 1440
1421 } } // namespace v8::internal 1441 } } // namespace v8::internal
1422 1442
1423 #endif // V8_ARM_ASSEMBLER_ARM_H_ 1443 #endif // V8_ARM_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/assembler-arm.cc » ('j') | src/arm/macro-assembler-arm.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698