llvm.org GIT mirror llvm / 004c730
Merging r142841: ------------------------------------------------------------------------ r142841 | efriedma | 2011-10-24 13:24:21 -0700 (Mon, 24 Oct 2011) | 3 lines Add support to the old JIT for acquire/release loads and stores on x86. PR11207. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_30@142842 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 7 years ago
1 changed file(s) with 24 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
588588 }
589589 }
590590
591 static const MCInstrDesc *UpdateOp(MachineInstr &MI, const X86InstrInfo *II,
592 unsigned Opcode) {
593 const MCInstrDesc *Desc = &II->get(Opcode);
594 MI.setDesc(*Desc);
595 return Desc;
596 }
597
591598 template
592599 void Emitter::emitInstruction(MachineInstr &MI,
593600 const MCInstrDesc *Desc) {
595602
596603 // If this is a pseudo instruction, lower it.
597604 switch (Desc->getOpcode()) {
598 case X86::ADD16rr_DB: Desc = &II->get(X86::OR16rr); MI.setDesc(*Desc);break;
599 case X86::ADD32rr_DB: Desc = &II->get(X86::OR32rr); MI.setDesc(*Desc);break;
600 case X86::ADD64rr_DB: Desc = &II->get(X86::OR64rr); MI.setDesc(*Desc);break;
601 case X86::ADD16ri_DB: Desc = &II->get(X86::OR16ri); MI.setDesc(*Desc);break;
602 case X86::ADD32ri_DB: Desc = &II->get(X86::OR32ri); MI.setDesc(*Desc);break;
603 case X86::ADD64ri32_DB:Desc = &II->get(X86::OR64ri32);MI.setDesc(*Desc);break;
604 case X86::ADD16ri8_DB: Desc = &II->get(X86::OR16ri8);MI.setDesc(*Desc);break;
605 case X86::ADD32ri8_DB: Desc = &II->get(X86::OR32ri8);MI.setDesc(*Desc);break;
606 case X86::ADD64ri8_DB: Desc = &II->get(X86::OR64ri8);MI.setDesc(*Desc);break;
605 case X86::ADD16rr_DB: Desc = UpdateOp(MI, II, X86::OR16rr); break;
606 case X86::ADD32rr_DB: Desc = UpdateOp(MI, II, X86::OR32rr); break;
607 case X86::ADD64rr_DB: Desc = UpdateOp(MI, II, X86::OR64rr); break;
608 case X86::ADD16ri_DB: Desc = UpdateOp(MI, II, X86::OR16ri); break;
609 case X86::ADD32ri_DB: Desc = UpdateOp(MI, II, X86::OR32ri); break;
610 case X86::ADD64ri32_DB: Desc = UpdateOp(MI, II, X86::OR64ri32); break;
611 case X86::ADD16ri8_DB: Desc = UpdateOp(MI, II, X86::OR16ri8); break;
612 case X86::ADD32ri8_DB: Desc = UpdateOp(MI, II, X86::OR32ri8); break;
613 case X86::ADD64ri8_DB: Desc = UpdateOp(MI, II, X86::OR64ri8); break;
614 case X86::ACQUIRE_MOV8rm: Desc = UpdateOp(MI, II, X86::MOV8rm); break;
615 case X86::ACQUIRE_MOV16rm: Desc = UpdateOp(MI, II, X86::MOV16rm); break;
616 case X86::ACQUIRE_MOV32rm: Desc = UpdateOp(MI, II, X86::MOV32rm); break;
617 case X86::ACQUIRE_MOV64rm: Desc = UpdateOp(MI, II, X86::MOV64rm); break;
618 case X86::RELEASE_MOV8mr: Desc = UpdateOp(MI, II, X86::MOV8mr); break;
619 case X86::RELEASE_MOV16mr: Desc = UpdateOp(MI, II, X86::MOV16mr); break;
620 case X86::RELEASE_MOV32mr: Desc = UpdateOp(MI, II, X86::MOV32mr); break;
621 case X86::RELEASE_MOV64mr: Desc = UpdateOp(MI, II, X86::MOV64mr); break;
607622 }
608623
609624