Lines Matching refs:source

983 void CodeGeneratorX86::Move32(Location destination, Location source) {
984 if (source.Equals(destination)) {
988 if (source.IsRegister()) {
989 __ movl(destination.AsRegister<Register>(), source.AsRegister<Register>());
990 } else if (source.IsFpuRegister()) {
991 __ movd(destination.AsRegister<Register>(), source.AsFpuRegister<XmmRegister>());
993 DCHECK(source.IsStackSlot());
994 __ movl(destination.AsRegister<Register>(), Address(ESP, source.GetStackIndex()));
997 if (source.IsRegister()) {
998 __ movd(destination.AsFpuRegister<XmmRegister>(), source.AsRegister<Register>());
999 } else if (source.IsFpuRegister()) {
1000 __ movaps(destination.AsFpuRegister<XmmRegister>(), source.AsFpuRegister<XmmRegister>());
1002 DCHECK(source.IsStackSlot());
1003 __ movss(destination.AsFpuRegister<XmmRegister>(), Address(ESP, source.GetStackIndex()));
1007 if (source.IsRegister()) {
1008 __ movl(Address(ESP, destination.GetStackIndex()), source.AsRegister<Register>());
1009 } else if (source.IsFpuRegister()) {
1010 __ movss(Address(ESP, destination.GetStackIndex()), source.AsFpuRegister<XmmRegister>());
1011 } else if (source.IsConstant()) {
1012 HConstant* constant = source.GetConstant();
1016 DCHECK(source.IsStackSlot());
1017 __ pushl(Address(ESP, source.GetStackIndex()));
1023 void CodeGeneratorX86::Move64(Location destination, Location source) {
1024 if (source.Equals(destination)) {
1028 if (source.IsRegisterPair()) {
1030 Location::RegisterLocation(source.AsRegisterPairHigh<Register>()),
1033 Location::RegisterLocation(source.AsRegisterPairLow<Register>()),
1036 } else if (source.IsFpuRegister()) {
1037 XmmRegister src_reg = source.AsFpuRegister<XmmRegister>();
1043 DCHECK(source.IsDoubleStackSlot());
1044 __ movl(destination.AsRegisterPairLow<Register>(), Address(ESP, source.GetStackIndex()));
1046 Address(ESP, source.GetHighStackIndex(kX86WordSize)));
1049 if (source.IsFpuRegister()) {
1050 __ movaps(destination.AsFpuRegister<XmmRegister>(), source.AsFpuRegister<XmmRegister>());
1051 } else if (source.IsDoubleStackSlot()) {
1052 __ movsd(destination.AsFpuRegister<XmmRegister>(), Address(ESP, source.GetStackIndex()));
1053 } else if (source.IsRegisterPair()) {
1057 __ movl(Address(ESP, 0), source.AsRegisterPairLow<Register>());
1058 __ movl(Address(ESP, elem_size), source.AsRegisterPairHigh<Register>());
1067 if (source.IsRegisterPair()) {
1069 __ movl(Address(ESP, destination.GetStackIndex()), source.AsRegisterPairLow<Register>());
1071 source.AsRegisterPairHigh<Register>());
1072 } else if (source.IsFpuRegister()) {
1073 __ movsd(Address(ESP, destination.GetStackIndex()), source.AsFpuRegister<XmmRegister>());
1074 } else if (source.IsConstant()) {
1075 HConstant* constant = source.GetConstant();
1086 DCHECK(source.IsDoubleStackSlot()) << source;
1088 Location::StackSlot(source.GetStackIndex()),
1091 Location::StackSlot(source.GetHighStackIndex(kX86WordSize)),
1550 // If both the condition and the source types are integer, we can generate
3131 void InstructionCodeGeneratorX86::PushOntoFPStack(Location source,
3136 if (source.IsStackSlot()) {
3139 __ flds(Address(ESP, source.GetStackIndex() + stack_adjustment));
3141 __ filds(Address(ESP, source.GetStackIndex() + stack_adjustment));
3143 } else if (source.IsDoubleStackSlot()) {
3146 __ fldl(Address(ESP, source.GetStackIndex() + stack_adjustment));
3148 __ fildl(Address(ESP, source.GetStackIndex() + stack_adjustment));
3154 codegen_->Move32(stack_temp, source);
3162 codegen_->Move64(stack_temp, source);
5631 Location source = move->GetSource();
5634 if (source.IsRegister()) {
5636 __ movl(destination.AsRegister<Register>(), source.AsRegister<Register>());
5638 __ movd(destination.AsFpuRegister<XmmRegister>(), source.AsRegister<Register>());
5641 __ movl(Address(ESP, destination.GetStackIndex()), source.AsRegister<Register>());
5643 } else if (source.IsRegisterPair()) {
5647 __ movl(Address(ESP, 0), source.AsRegisterPairLow<Register>());
5648 __ movl(Address(ESP, elem_size), source.AsRegisterPairHigh<Register>());
5652 } else if (source.IsFpuRegister()) {
5654 __ movd(destination.AsRegister<Register>(), source.AsFpuRegister<XmmRegister>());
5656 __ movaps(destination.AsFpuRegister<XmmRegister>(), source.AsFpuRegister<XmmRegister>());
5658 XmmRegister src_reg = source.AsFpuRegister<XmmRegister>();
5663 __ movss(Address(ESP, destination.GetStackIndex()), source.AsFpuRegister<XmmRegister>());
5666 __ movsd(Address(ESP, destination.GetStackIndex()), source.AsFpuRegister<XmmRegister>());
5668 } else if (source.IsStackSlot()) {
5670 __ movl(destination.AsRegister<Register>(), Address(ESP, source.GetStackIndex()));
5672 __ movss(destination.AsFpuRegister<XmmRegister>(), Address(ESP, source.GetStackIndex()));
5675 MoveMemoryToMemory32(destination.GetStackIndex(), source.GetStackIndex());
5677 } else if (source.IsDoubleStackSlot()) {
5679 __ movl(destination.AsRegisterPairLow<Register>(), Address(ESP, source.GetStackIndex()));
5681 Address(ESP, source.GetHighStackIndex(kX86WordSize)));
5683 __ movsd(destination.AsFpuRegister<XmmRegister>(), Address(ESP, source.GetStackIndex()));
5686 MoveMemoryToMemory64(destination.GetStackIndex(), source.GetStackIndex());
5688 } else if (source.IsConstant()) {
5689 HConstant* constant = source.GetConstant();
5761 LOG(FATAL) << "Unimplemented move: " << destination << " <- " << source;
5805 Location source = move->GetSource();
5808 if (source.IsRegister() && destination.IsRegister()) {
5810 DCHECK_NE(destination.AsRegister<Register>(), source.AsRegister<Register>());
5811 __ xorl(destination.AsRegister<Register>(), source.AsRegister<Register>());
5812 __ xorl(source.AsRegister<Register>(), destination.AsRegister<Register>());
5813 __ xorl(destination.AsRegister<Register>(), source.AsRegister<Register>());
5814 } else if (source.IsRegister() && destination.IsStackSlot()) {
5815 Exchange(source.AsRegister<Register>(), destination.GetStackIndex());
5816 } else if (source.IsStackSlot() && destination.IsRegister()) {
5817 Exchange(destination.AsRegister<Register>(), source.GetStackIndex());
5818 } else if (source.IsStackSlot() && destination.IsStackSlot()) {
5819 Exchange(destination.GetStackIndex(), source.GetStackIndex());
5820 } else if (source.IsFpuRegister() && destination.IsFpuRegister()) {
5822 DCHECK_NE(source.reg(), destination.reg());
5823 __ xorpd(destination.AsFpuRegister<XmmRegister>(), source.AsFpuRegister<XmmRegister>());
5824 __ xorpd(source.AsFpuRegister<XmmRegister>(), destination.AsFpuRegister<XmmRegister>());
5825 __ xorpd(destination.AsFpuRegister<XmmRegister>(), source.AsFpuRegister<XmmRegister>());
5826 } else if (source.IsFpuRegister() && destination.IsStackSlot()) {
5827 Exchange32(source.AsFpuRegister<XmmRegister>(), destination.GetStackIndex());
5828 } else if (destination.IsFpuRegister() && source.IsStackSlot()) {
5829 Exchange32(destination.AsFpuRegister<XmmRegister>(), source.GetStackIndex());
5830 } else if (source.IsFpuRegister() && destination.IsDoubleStackSlot()) {
5832 XmmRegister reg = source.AsFpuRegister<XmmRegister>();
5842 } else if (destination.IsFpuRegister() && source.IsDoubleStackSlot()) {
5845 Address stack(ESP, source.GetStackIndex());
5854 } else if (destination.IsDoubleStackSlot() && source.IsDoubleStackSlot()) {
5855 Exchange(destination.GetStackIndex(), source.GetStackIndex());
5856 Exchange(destination.GetHighStackIndex(kX86WordSize), source.GetHighStackIndex(kX86WordSize));
5858 LOG(FATAL) << "Unimplemented: source: " << source << ", destination: " << destination;