Home | History | Annotate | Download | only in optimizing

Lines Matching defs:source

2  * Copyright (C) 2014 The Android Open Source Project
1213 void CodeGeneratorX86::Move32(Location destination, Location source) {
1214 if (source.Equals(destination)) {
1218 if (source.IsRegister()) {
1219 __ movl(destination.AsRegister<Register>(), source.AsRegister<Register>());
1220 } else if (source.IsFpuRegister()) {
1221 __ movd(destination.AsRegister<Register>(), source.AsFpuRegister<XmmRegister>());
1223 DCHECK(source.IsStackSlot());
1224 __ movl(destination.AsRegister<Register>(), Address(ESP, source.GetStackIndex()));
1227 if (source.IsRegister()) {
1228 __ movd(destination.AsFpuRegister<XmmRegister>(), source.AsRegister<Register>());
1229 source.IsFpuRegister()) {
1230 __ movaps(destination.AsFpuRegister<XmmRegister>(), source.AsFpuRegister<XmmRegister>());
1232 DCHECK(source.IsStackSlot());
1233 __ movss(destination.AsFpuRegister<XmmRegister>(), Address(ESP, source.GetStackIndex()));
1237 if (source.IsRegister()) {
1238 __ movl(Address(ESP, destination.GetStackIndex()), source.AsRegister<Register>());
1239 } else if (source.IsFpuRegister()) {
1240 __ movss(Address(ESP, destination.GetStackIndex()), source.AsFpuRegister<XmmRegister>());
1241 } else if (source.IsConstant()) {
1242 HConstant* constant = source.GetConstant();
1246 DCHECK(source.IsStackSlot());
1247 __ pushl(Address(ESP, source.GetStackIndex()));
1253 void CodeGeneratorX86::Move64(Location destination, Location source) {
1254 if (source.Equals(destination)) {
1258 if (source.IsRegisterPair()) {
1260 Location::RegisterLocation(source.AsRegisterPairHigh<Register>()),
1263 Location::RegisterLocation(source.AsRegisterPairLow<Register>()),
1266 } else if (source.IsFpuRegister()) {
1267 XmmRegister src_reg = source.AsFpuRegister<XmmRegister>();
1273 DCHECK(source.IsDoubleStackSlot());
1274 __ movl(destination.AsRegisterPairLow<Register>(), Address(ESP, source.GetStackIndex()));
1276 Address(ESP, source.GetHighStackIndex(kX86WordSize)));
1279 if (source.IsFpuRegister()) {
1280 __ movaps(destination.AsFpuRegister<XmmRegister>(), source.AsFpuRegister<XmmRegister>());
1281 } else if (source.IsDoubleStackSlot()) {
1282 __ movsd(destination.AsFpuRegister<XmmRegister>(), Address(ESP, source.GetStackIndex()));
1283 } else if (source.IsRegisterPair()) {
1287 __ movl(Address(ESP, 0), source.AsRegisterPairLow<Register>());
1288 __ movl(Address(ESP, elem_size), source.AsRegisterPairHigh<Register>());
1297 if (source.IsRegisterPair()) {
1299 __ movl(Address(ESP, destination.GetStackIndex()), source.AsRegisterPairLow<Register>());
1301 source.AsRegisterPairHigh<Register>());
1302 } else if (source.IsFpuRegister()) {
1303 __ movsd(Address(ESP, destination.GetStackIndex()), source.AsFpuRegister<XmmRegister>());
1304 } else if (source.IsConstant()) {
1305 HConstant* constant = source.GetConstant();
1312 DCHECK(source.IsDoubleStackSlot()) << source;
1314 Location::StackSlot(source.GetStackIndex()),
1317 Location::StackSlot(source.GetHighStackIndex(kX86WordSize)),
1774 // If both the condition and the source types are integer, we can generate
3370 void InstructionCodeGeneratorX86::PushOntoFPStack(Location source,
3375 if (source.IsStackSlot()) {
3378 __ flds(Address(ESP, source.GetStackIndex() + stack_adjustment));
3380 __ filds(Address(ESP, source.GetStackIndex() + stack_adjustment));
3382 } else if (source.IsDoubleStackSlot()) {
3385 __ fldl(Address(ESP, source.GetStackIndex() + stack_adjustment));
3387 __ fildl(Address(ESP, source.GetStackIndex() + stack_adjustment));
3393 codegen_->Move32(stack_temp, source);
3401 codegen_->Move64(stack_temp, source);
5796 Location source = move->GetSource();
5799 if (source.IsRegister()) {
5801 __ movl(destination.AsRegister<Register>(), source
5803 __ movd(destination.AsFpuRegister<XmmRegister>(), source.AsRegister<Register>());
5806 __ movl(Address(ESP, destination.GetStackIndex()), source.AsRegister<Register>());
5808 } else if (source.IsRegisterPair()) {
5812 __ movl(Address(ESP, 0), source.AsRegisterPairLow<Register>());
5813 __ movl(Address(ESP, elem_size), source.AsRegisterPairHigh<Register>());
5817 } else if (source.IsFpuRegister()) {
5819 __ movd(destination.AsRegister<Register>(), source.AsFpuRegister<XmmRegister>());
5821 __ movaps(destination.AsFpuRegister<XmmRegister>(), source.AsFpuRegister<XmmRegister>());
5823 XmmRegister src_reg = source.AsFpuRegister<XmmRegister>();
5828 __ movss(Address(ESP, destination.GetStackIndex()), source.AsFpuRegister<XmmRegister>());
5830 __ movsd(Address(ESP, destination.GetStackIndex()), source.AsFpuRegister<XmmRegister>());
5833 __ movups(Address(ESP, destination.GetStackIndex()), source.AsFpuRegister<XmmRegister>());
5835 } else if (source.IsStackSlot()) {
5837 __ movl(destination.AsRegister<Register>(), Address(ESP, source.GetStackIndex()));
5839 __ movss(destination.AsFpuRegister<XmmRegister>(), Address(ESP, source.GetStackIndex()));
5842 MoveMemoryToMemory32(destination.GetStackIndex(), source.GetStackIndex());
5844 } else if (source.IsDoubleStackSlot()) {
5846 __ movl(destination.AsRegisterPairLow<Register>(), Address(ESP, source.GetStackIndex()));
5848 Address(ESP, source.GetHighStackIndex(kX86WordSize)));
5850 __ movsd(destination.AsFpuRegister<XmmRegister>(), Address(ESP, source.GetStackIndex()));
5853 MoveMemoryToMemory64(destination.GetStackIndex(), source.GetStackIndex());
5855 } else if (source.IsSIMDStackSlot()) {
5857 __ movups(destination.AsFpuRegister<XmmRegister>(), Address(ESP, source.GetStackIndex()));
5858 } else if (source.IsConstant()) {
5859 HConstant* constant = source.GetConstant();
5931 LOG(FATAL) << "Unimplemented move: " << destination << " <- " << source;
5975 Location source = move->GetSource();
5978 if (source.IsRegister() && destination.IsRegister()) {
5980 DCHECK_NE(destination.AsRegister<Register>(), source.AsRegister<Register>());
5981 __ xorl(destination.AsRegister<Register>(), source.AsRegister<Register>());
5982 __ xorl(source.AsRegister<Register>(), destination.AsRegister<Register>());
5983 __ xorl(destination.AsRegister<Register>(), source.AsRegister<Register>());
5984 } else if (source.IsRegister() && destination.IsStackSlot()) {
5985 Exchange(source.AsRegister<Register>(), destination.GetStackIndex());
5986 } else if (source.IsStackSlot() && destination.IsRegister()) {
5987 Exchange(destination.AsRegister<Register>(), source.GetStackIndex());
5988 } else if (source.IsStackSlot() && destination.IsStackSlot()) {
5989 Exchange(destination.GetStackIndex(), source.GetStackIndex());
5990 } else if (source.IsFpuRegister() && destination.IsFpuRegister()) {
5992 DCHECK_NE(source.reg(), destination.reg());
5993 __ xorpd(destination.AsFpuRegister<XmmRegister>(), source.AsFpuRegister<XmmRegister>());
5994 __ xorpd(source.AsFpuRegister<XmmRegister>(), destination.AsFpuRegister<XmmRegister>());
5995 __ xorpd(destination.AsFpuRegister<XmmRegister>(), source.AsFpuRegister<XmmRegister>());
5996 } else if (source.IsFpuRegister() && destination.IsStackSlot()) {
5997 Exchange32(source.AsFpuRegister<XmmRegister>(), destination.GetStackIndex());
5998 } else if (destination.IsFpuRegister() && source.IsStackSlot()) {
5999 Exchange32(destination.AsFpuRegister<XmmRegister>(), source.GetStackIndex());
6000 } else if (source.IsFpuRegister() && destination.IsDoubleStackSlot()) {
6002 XmmRegister reg = source.AsFpuRegister<XmmRegister>();
6012 } else if (destination.IsFpuRegister() && source.IsDoubleStackSlot()) {
6015 Address stack(ESP, source.GetStackIndex());
6024 } else if (destination.IsDoubleStackSlot() && source.IsDoubleStackSlot()) {
6025 Exchange(destination.GetStackIndex(), source.GetStackIndex());
6026 Exchange(destination.GetHighStackIndex(kX86WordSize), source.GetHighStackIndex(kX86WordSize));
6028 LOG(FATAL) << "Unimplemented: source: " << source << ", destination: " << destination;