2016-08-24 20:07:08 +01:00
|
|
|
/* This file is part of the dynarmic project.
|
|
|
|
* Copyright (c) 2016 MerryMage
|
|
|
|
* This software may be used and distributed according to the terms of the GNU
|
|
|
|
* General Public License version 2 or any later version.
|
|
|
|
*/
|
|
|
|
|
2018-01-01 22:49:17 +00:00
|
|
|
#include <xbyak.h>
|
|
|
|
|
2016-08-24 20:07:08 +01:00
|
|
|
#include "backend_x64/hostloc.h"
|
|
|
|
|
|
|
|
namespace Dynarmic {
|
|
|
|
namespace BackendX64 {
|
|
|
|
|
|
|
|
Xbyak::Reg64 HostLocToReg64(HostLoc loc) {
|
2017-02-26 23:27:41 +00:00
|
|
|
ASSERT(HostLocIsGPR(loc));
|
2016-08-24 20:07:08 +01:00
|
|
|
return Xbyak::Reg64(static_cast<int>(loc));
|
|
|
|
}
|
|
|
|
|
|
|
|
Xbyak::Xmm HostLocToXmm(HostLoc loc) {
|
2017-02-26 23:27:41 +00:00
|
|
|
ASSERT(HostLocIsXMM(loc));
|
2016-08-24 20:07:08 +01:00
|
|
|
return Xbyak::Xmm(static_cast<int>(loc) - static_cast<int>(HostLoc::XMM0));
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace BackendX64
|
|
|
|
} // namespace Dynarmic
|