1
0

allow float_fix to take stdin (for piping)

This commit is contained in:
Scott Beamer 2015-09-17 23:17:19 -07:00
parent 38a9b23ce7
commit 56daea793a

View File

@ -90,6 +90,8 @@ uint64_t UnrecodeFloatFromDouble(uint64_t raw_input) {
// - log line is a fld instruction
// - unrecoding the writeback data as a single float makes them match
void DiffAndFix(std::string rocket_filename, std::string lspike_filename) {
if (rocket_filename == "-")
rocket_filename = "/dev/stdin";
std::ifstream rocket_log(rocket_filename);
if (!rocket_log.is_open()) {
std::cout << "Couldn't open file " << rocket_filename << std::endl;