mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-02 04:34:43 +01:00
location_descriptor: Provide operator<< string overload (#24)
This commit is contained in:
parent
5c8bf5a15d
commit
b40d19c3b7
4 changed files with 39 additions and 13 deletions
24
src/frontend/ir/location_descriptor.cpp
Normal file
24
src/frontend/ir/location_descriptor.cpp
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/* 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.
|
||||
*/
|
||||
|
||||
#include <ostream>
|
||||
#include <fmt/format.h>
|
||||
#include "frontend/ir/location_descriptor.h"
|
||||
|
||||
namespace Dynarmic {
|
||||
namespace IR {
|
||||
|
||||
std::ostream& operator<<(std::ostream& o, const LocationDescriptor& loc) {
|
||||
o << fmt::format("{{{},{},{},{}}}",
|
||||
loc.PC(),
|
||||
loc.TFlag() ? "T" : "!T",
|
||||
loc.EFlag() ? "E" : "!E",
|
||||
loc.FPSCR().Value());
|
||||
return o;
|
||||
}
|
||||
|
||||
} // namespace IR
|
||||
} // namespace Dynarmic
|
||||
Loading…
Add table
Add a link
Reference in a new issue