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

Side by Side Diff: src/DartARM32/assembler_arm.h

Issue 1538443003: Add mls instruction to the ARM integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nit. Created 5 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
« no previous file with comments | « no previous file | src/DartARM32/assembler_arm.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // This is forked from Dart revision df52deea9f25690eb8b66c5995da92b70f7ac1fe 5 // This is forked from Dart revision df52deea9f25690eb8b66c5995da92b70f7ac1fe
6 // Please update the (git) revision if we merge changes from Dart. 6 // Please update the (git) revision if we merge changes from Dart.
7 // https://code.google.com/p/dart/wiki/GettingTheSource 7 // https://code.google.com/p/dart/wiki/GettingTheSource
8 8
9 #ifndef VM_ASSEMBLER_ARM_H_ 9 #ifndef VM_ASSEMBLER_ARM_H_
10 #define VM_ASSEMBLER_ARM_H_ 10 #define VM_ASSEMBLER_ARM_H_
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 134
135 #if 0 135 #if 0
136 // Moved to encodeRotatedImm8() in IceAssemblerARM32.cpp 136 // Moved to encodeRotatedImm8() in IceAssemblerARM32.cpp
137 // Data-processing operands - Immediate. 137 // Data-processing operands - Immediate.
138 explicit Operand(uint32_t immediate) { 138 explicit Operand(uint32_t immediate) {
139 ASSERT(immediate < (1 << kImmed8Bits)); 139 ASSERT(immediate < (1 << kImmed8Bits));
140 type_ = 1; 140 type_ = 1;
141 encoding_ = immediate; 141 encoding_ = immediate;
142 } 142 }
143 #endif
144 143
145 #if 0
146 // Moved to decodeOperand() and encodeRotatedImm8() in IceAssemblerARM32.cpp 144 // Moved to decodeOperand() and encodeRotatedImm8() in IceAssemblerARM32.cpp
147 // Data-processing operands - Rotated immediate. 145 // Data-processing operands - Rotated immediate.
148 Operand(uint32_t rotate, uint32_t immed8) { 146 Operand(uint32_t rotate, uint32_t immed8) {
149 ASSERT((rotate < (1 << kRotateBits)) && (immed8 < (1 << kImmed8Bits))); 147 ASSERT((rotate < (1 << kRotateBits)) && (immed8 < (1 << kImmed8Bits)));
150 type_ = 1; 148 type_ = 1;
151 encoding_ = (rotate << kRotateShift) | (immed8 << kImmed8Shift); 149 encoding_ = (rotate << kRotateShift) | (immed8 << kImmed8Shift);
152 } 150 }
153 151
154 // Moved to decodeOperand() in IceAssemblerARM32.cpp 152 // Moved to decodeOperand() in IceAssemblerARM32.cpp
155 // Data-processing operands - Register. 153 // Data-processing operands - Register.
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 const Code::Comments& GetCodeComments() const; 441 const Code::Comments& GetCodeComments() const;
444 442
445 static const char* RegisterName(Register reg); 443 static const char* RegisterName(Register reg);
446 444
447 static const char* FpuRegisterName(FpuRegister reg); 445 static const char* FpuRegisterName(FpuRegister reg);
448 446
449 #if 0 447 #if 0
450 // Moved to ARM32::AssemblerARM32::and_() 448 // Moved to ARM32::AssemblerARM32::and_()
451 // Data-processing instructions. 449 // Data-processing instructions.
452 void and_(Register rd, Register rn, Operand o, Condition cond = AL); 450 void and_(Register rd, Register rn, Operand o, Condition cond = AL);
453 #endif
454 451
455 #if 0
456 // Moved to ARM32::AssemblerARM32::eor() 452 // Moved to ARM32::AssemblerARM32::eor()
457 void eor(Register rd, Register rn, Operand o, Condition cond = AL); 453 void eor(Register rd, Register rn, Operand o, Condition cond = AL);
458 454
459 // Moved to ARM32::AssemberARM32::sub() 455 // Moved to ARM32::AssemberARM32::sub()
460 void sub(Register rd, Register rn, Operand o, Condition cond = AL); 456 void sub(Register rd, Register rn, Operand o, Condition cond = AL);
461 void subs(Register rd, Register rn, Operand o, Condition cond = AL); 457 void subs(Register rd, Register rn, Operand o, Condition cond = AL);
462 458
463 // Moved to ARM32::AssemberARM32::rsb() 459 // Moved to ARM32::AssemberARM32::rsb()
464 void rsb(Register rd, Register rn, Operand o, Condition cond = AL); 460 void rsb(Register rd, Register rn, Operand o, Condition cond = AL);
465 void rsbs(Register rd, Register rn, Operand o, Condition cond = AL); 461 void rsbs(Register rd, Register rn, Operand o, Condition cond = AL);
(...skipping 30 matching lines...) Expand all
496 // Moved to ARM32::AssemblerARM32::cmn() 492 // Moved to ARM32::AssemblerARM32::cmn()
497 void cmn(Register rn, Operand o, Condition cond = AL); 493 void cmn(Register rn, Operand o, Condition cond = AL);
498 494
499 // Moved to ARM32::IceAssemblerARM32::orr(). 495 // Moved to ARM32::IceAssemblerARM32::orr().
500 void orr(Register rd, Register rn, Operand o, Condition cond = AL); 496 void orr(Register rd, Register rn, Operand o, Condition cond = AL);
501 void orrs(Register rd, Register rn, Operand o, Condition cond = AL); 497 void orrs(Register rd, Register rn, Operand o, Condition cond = AL);
502 498
503 // Moved to ARM32::IceAssemblerARM32::mov() 499 // Moved to ARM32::IceAssemblerARM32::mov()
504 void mov(Register rd, Operand o, Condition cond = AL); 500 void mov(Register rd, Operand o, Condition cond = AL);
505 void movs(Register rd, Operand o, Condition cond = AL); 501 void movs(Register rd, Operand o, Condition cond = AL);
506 #endif
507 502
508 #if 0
509 // Moved to ARM32::IceAssemblerARM32::bic() 503 // Moved to ARM32::IceAssemblerARM32::bic()
510 void bic(Register rd, Register rn, Operand o, Condition cond = AL); 504 void bic(Register rd, Register rn, Operand o, Condition cond = AL);
511 void bics(Register rd, Register rn, Operand o, Condition cond = AL); 505 void bics(Register rd, Register rn, Operand o, Condition cond = AL);
512 506
513 // Moved to ARM32::IceAssemblerARM32::mvn() 507 // Moved to ARM32::IceAssemblerARM32::mvn()
514 void mvn(Register rd, Operand o, Condition cond = AL); 508 void mvn(Register rd, Operand o, Condition cond = AL);
515 void mvns(Register rd, Operand o, Condition cond = AL); 509 void mvns(Register rd, Operand o, Condition cond = AL);
516 510
517 // Miscellaneous data-processing instructions. 511 // Miscellaneous data-processing instructions.
518 // Moved to ARM32::AssemblerARM32::clz() 512 // Moved to ARM32::AssemblerARM32::clz()
519 void clz(Register rd, Register rm, Condition cond = AL); 513 void clz(Register rd, Register rm, Condition cond = AL);
520 514
521 // Multiply instructions. 515 // Multiply instructions.
522 516
523 // Moved to ARM32::AssemblerARM32::mul() 517 // Moved to ARM32::AssemblerARM32::mul()
524 void mul(Register rd, Register rn, Register rm, Condition cond = AL); 518 void mul(Register rd, Register rn, Register rm, Condition cond = AL);
525 void muls(Register rd, Register rn, Register rm, Condition cond = AL); 519 void muls(Register rd, Register rn, Register rm, Condition cond = AL);
526 520
527 // Moved to ARM32::AssemblerARM32::mla() 521 // Moved to ARM32::AssemblerARM32::mla()
528 void mla(Register rd, Register rn, Register rm, Register ra, 522 void mla(Register rd, Register rn, Register rm, Register ra,
529 Condition cond = AL); 523 Condition cond = AL);
530 #endif 524 // Moved to ARM32::AssemblerARM32::mls()
531 void mls(Register rd, Register rn, Register rm, Register ra, 525 void mls(Register rd, Register rn, Register rm, Register ra,
532 Condition cond = AL); 526 Condition cond = AL);
527 #endif
528
533 void smull(Register rd_lo, Register rd_hi, Register rn, Register rm, 529 void smull(Register rd_lo, Register rd_hi, Register rn, Register rm,
534 Condition cond = AL); 530 Condition cond = AL);
531
535 #if 0 532 #if 0
536 // Moved to ARM32::AssemblerARM32::umull(); 533 // Moved to ARM32::AssemblerARM32::umull();
537 void umull(Register rd_lo, Register rd_hi, Register rn, Register rm, 534 void umull(Register rd_lo, Register rd_hi, Register rn, Register rm,
538 Condition cond = AL); 535 Condition cond = AL);
539 #endif 536 #endif
540 void smlal(Register rd_lo, Register rd_hi, Register rn, Register rm, 537 void smlal(Register rd_lo, Register rd_hi, Register rn, Register rm,
541 Condition cond = AL); 538 Condition cond = AL);
542 void umlal(Register rd_lo, Register rd_hi, Register rn, Register rm, 539 void umlal(Register rd_lo, Register rd_hi, Register rn, Register rm,
543 Condition cond = AL); 540 Condition cond = AL);
544 541
(...skipping 12 matching lines...) Expand all
557 // Moved to ARM32::AssemblerARM32::ldr() 554 // Moved to ARM32::AssemblerARM32::ldr()
558 // Load/store instructions. 555 // Load/store instructions.
559 void ldr(Register rd, Address ad, Condition cond = AL); 556 void ldr(Register rd, Address ad, Condition cond = AL);
560 // Moved to ARM32::AssemblerARM32::str() 557 // Moved to ARM32::AssemblerARM32::str()
561 void str(Register rd, Address ad, Condition cond = AL); 558 void str(Register rd, Address ad, Condition cond = AL);
562 559
563 // Moved to ARM32::AssemblerARM32::ldr() 560 // Moved to ARM32::AssemblerARM32::ldr()
564 void ldrb(Register rd, Address ad, Condition cond = AL); 561 void ldrb(Register rd, Address ad, Condition cond = AL);
565 // Moved to ARM32::AssemblerARM32::str() 562 // Moved to ARM32::AssemblerARM32::str()
566 void strb(Register rd, Address ad, Condition cond = AL); 563 void strb(Register rd, Address ad, Condition cond = AL);
564
565 // Moved to ARM32::AssemblerARM32::ldr()
566 void ldrh(Register rd, Address ad, Condition cond = AL);
567 // Moved to ARM32::AssemblerARM32::str()
568 void strh(Register rd, Address ad, Condition cond = AL);
567 #endif 569 #endif
568 570
569 void ldrh(Register rd, Address ad, Condition cond = AL);
570 void strh(Register rd, Address ad, Condition cond = AL);
571
572 void ldrsb(Register rd, Address ad, Condition cond = AL); 571 void ldrsb(Register rd, Address ad, Condition cond = AL);
573 void ldrsh(Register rd, Address ad, Condition cond = AL); 572 void ldrsh(Register rd, Address ad, Condition cond = AL);
574 573
575 // ldrd and strd actually support the full range of addressing modes, but 574 // ldrd and strd actually support the full range of addressing modes, but
576 // we don't use them, and we need to split them up into two instructions for 575 // we don't use them, and we need to split them up into two instructions for
577 // ARMv5TE, so we only support the base + offset mode. 576 // ARMv5TE, so we only support the base + offset mode.
578 void ldrd(Register rd, Register rn, int32_t offset, Condition cond = AL); 577 void ldrd(Register rd, Register rn, int32_t offset, Condition cond = AL);
579 void strd(Register rd, Register rn, int32_t offset, Condition cond = AL); 578 void strd(Register rd, Register rn, int32_t offset, Condition cond = AL);
580 579
581 #if 0 580 #if 0
582 // Folded into ARM32::AssemblerARM32::popList(), since it is its only use (and 581 // Folded into ARM32::AssemblerARM32::popList(), since it is its only use (and
583 // doesn't implement ARM LDM instructions). 582 // doesn't implement ARM LDM instructions).
584 void ldm(BlockAddressMode am, Register base, 583 void ldm(BlockAddressMode am, Register base,
585 RegList regs, Condition cond = AL); 584 RegList regs, Condition cond = AL);
586 585
587 // Folded into ARM32::AssemblerARM32::pushList(), since it is its only use 586 // Folded into ARM32::AssemblerARM32::pushList(), since it is its only use
588 // (and doesn't implement ARM STM instruction). 587 // (and doesn't implement ARM STM instruction).
589 void stm(BlockAddressMode am, Register base, 588 void stm(BlockAddressMode am, Register base,
590 RegList regs, Condition cond = AL); 589 RegList regs, Condition cond = AL);
591 590
592 // Moved to ARM::AssemblerARM32::ldrex(); 591 // Moved to ARM::AssemblerARM32::ldrex();
593 void ldrex(Register rd, Register rn, Condition cond = AL); 592 void ldrex(Register rd, Register rn, Condition cond = AL);
594 // Moved to ARM::AssemblerARM32::strex(); 593 // Moved to ARM::AssemblerARM32::strex();
595 void strex(Register rd, Register rt, Register rn, Condition cond = AL); 594 void strex(Register rd, Register rt, Register rn, Condition cond = AL);
596 #endif 595 #endif
597 596
598 // Miscellaneous instructions. 597 // Miscellaneous instructions.
599 void clrex(); 598 void clrex();
599
600 #if 0 600 #if 0
601 // Moved to ARM32::AssemblerARM32::nop(). 601 // Moved to ARM32::AssemblerARM32::nop().
602 void nop(Condition cond = AL); 602 void nop(Condition cond = AL);
603 603
604 // Moved to ARM32::AssemblerARM32::bkpt() 604 // Moved to ARM32::AssemblerARM32::bkpt()
605 // Note that gdb sets breakpoints using the undefined instruction 0xe7f001f0. 605 // Note that gdb sets breakpoints using the undefined instruction 0xe7f001f0.
606 void bkpt(uint16_t imm16); 606 void bkpt(uint16_t imm16);
607 607
608 static int32_t BkptEncoding(uint16_t imm16) { 608 static int32_t BkptEncoding(uint16_t imm16) {
609 // bkpt requires that the cond field is AL. 609 // bkpt requires that the cond field is AL.
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 // ARM32::AssemblerARM::uxt() (uxtb and uxth). 1323 // ARM32::AssemblerARM::uxt() (uxtb and uxth).
1324 #endif 1324 #endif
1325 1325
1326 DISALLOW_ALLOCATION(); 1326 DISALLOW_ALLOCATION();
1327 DISALLOW_COPY_AND_ASSIGN(Assembler); 1327 DISALLOW_COPY_AND_ASSIGN(Assembler);
1328 }; 1328 };
1329 1329
1330 } // namespace dart 1330 } // namespace dart
1331 1331
1332 #endif // VM_ASSEMBLER_ARM_H_ 1332 #endif // VM_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/DartARM32/assembler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698